source: trunk/dports/python/py-lightblue/Portfile

Last change on this file was 126559, checked in by larryv@…, 3 years ago

py{25,26}-lightblue: Replace with py27-lightblue

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 126559 2014-10-12 02:43:36Z ryandesign@macports.org $
3
4PortSystem              1.0
5PortGroup               python 1.0
6
7name                    py-lightblue
8version                 0.4
9revision                1
10license                 GPL-3+
11maintainers             nomaintainer
12supported_archs         noarch
13
14description             A cross-platform Python Bluetooth API
15long_description        A cross-platform Python Bluetooth API for Mac OS X, \
16                        GNU/Linux and Python For Series 60. Provides simple device \
17                        and service discovery, RFCOMM sockets, L2CAP client \
18                        sockets, OBEX file transfer, service advertising, and \
19                        access to local device information.
20platforms               darwin
21homepage                http://lightblue.sourceforge.net/
22master_sites            sourceforge:project/lightblue/lightblue/${version}
23distname                lightblue-${version}
24checksums               ${distname}${extract.suffix} \
25                        md5     2f2bf66faa4bf1a79eb28a47584077b7 \
26                        sha1    78331a3c1640f0e351f71774b576fef1d9d3951d \
27                        rmd160  9eb520d354b3b95b8e324cf846a6cb5556a29056
28
29python.versions         27
30
31if {${name} ne ${subport}} {
32    depends_lib-append  port:py${python.version}-pyobjc-cocoa
33
34    patchfiles          patch-deviceInquiryComplete_error_aborted-signature.diff
35   
36    extract.only        lightblue-${version}.tar.gz
37   
38    if {${os.platform} eq "darwin" && ${os.major} >= 10} {
39   
40        distfiles-append LightAquaBlue-framework-MacOS10.6.zip LightAquaBlue-python-MacOS10.6.zip
41        checksums-append LightAquaBlue-framework-MacOS10.6.zip \
42                            md5     1a46f98ec2ff688bb6d23df02e91c052 \
43                            sha1    f43accbcf4edf82553c12d3a809b03905a8777bf \
44                            rmd160  0efeb78018bccc1d458bcdddd08d9ee20e439e83 \
45                        LightAquaBlue-python-MacOS10.6.zip \
46                            md5     a5eb3152039033ab100f4b855bd79478 \
47                            sha1    220cafd2ee4f4cae46dd56454d02994c27c7eb4f \
48                            rmd160  08aa939afe0be496af521e3e249732ad978e1f8c
49        patchfiles-append patch-setup.py.diff
50   
51    # Extract LightAquaBlue-framework to replace existing version in tar archive
52        post-extract {
53            system "cd ${workpath}/${distname}/src/mac && rm -rf LightAquaBlue"
54                system "cd ${workpath}/${distname}/src/mac && unzip ${distpath}/LightAquaBlue-framework-MacOS10.6.zip"
55                system "cd ${workpath}/${distname}/src/mac && mv LightAquaBlue LightAquaBlue-xcode"
56                system "cd ${workpath}/${distname}/src/mac && unzip ${distpath}/LightAquaBlue-python-MacOS10.6.zip"
57        }
58   
59        post-patch {
60            reinplace "s|/Library/Frameworks|${frameworks_dir}|g" \
61                ${worksrcpath}/src/mac/LightAquaBlue/__init__.py
62        }
63    }
64
65    if {${os.platform} eq "darwin" && ${os.major} >= 12} {
66        # Fix #37361: use 10.7 SDK on 10.8 or later
67        configure.sdkroot ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
68    }
69   
70    post-patch {
71        reinplace "s|/Library/Frameworks|${frameworks_dir}|g" \
72            ${worksrcpath}/setup.py \
73            ${worksrcpath}/src/mac/_LightAquaBlue.py
74        reinplace "s|DSTROOT=/|SDKROOT='${configure.sdkroot}' DSTROOT='${destroot}'|g" \
75            ${worksrcpath}/setup.py
76    }
77}
Note: See TracBrowser for help on using the repository browser.