[85209] trunk/dports/python/py-sip/Portfile

snc at macports.org snc at macports.org
Tue Oct 11 11:06:38 PDT 2011


Revision: 85209
          http://trac.macports.org/changeset/85209
Author:   snc at macports.org
Date:     2011-10-11 11:06:35 -0700 (Tue, 11 Oct 2011)
Log Message:
-----------
py24-sip: unify

Modified Paths:
--------------
    trunk/dports/python/py-sip/Portfile

Modified: trunk/dports/python/py-sip/Portfile
===================================================================
--- trunk/dports/python/py-sip/Portfile	2011-10-11 14:33:34 UTC (rev 85208)
+++ trunk/dports/python/py-sip/Portfile	2011-10-11 18:06:35 UTC (rev 85209)
@@ -2,12 +2,14 @@
 # $Id$
 
 PortSystem      1.0
+PortGroup           python 1.0
 
 name            py-sip
 version         4.11.2
+python.versions     24
 revision        1
 categories      python devel
-maintainers     blair openmaintainer
+maintainers         nomaintainer
 platforms       macosx
 
 description     create Python bindings for C and C++ libraries
@@ -20,38 +22,69 @@
     C or C++ library.
 
 homepage        http://www.riverbankcomputing.co.uk/software/sip/intro
-master_sites \
-    http://www.riverbankcomputing.com/static/Downloads/sip4/ \
-    http://gentoo.mirrors.easynews.com/linux/gentoo/distfiles/ \
-    http://gentoo.osuosl.org/distfiles/ \
-    http://www.gtlib.gatech.edu/pub/gentoo/distfiles/
 
-distname        sip-${version}
-checksums           md5     d799804ca0a88bd76c6c2cdf8935c3cb \
-                    sha1    586a86a55553617e39b1df8376166d03d697184c \
-                    rmd160  755e4610f9e3359df0a7a9f009ad16a5592341f0
+if {$subport != $name} {
+    master_sites \
+        http://www.riverbankcomputing.com/static/Downloads/sip4/ \
+        http://gentoo.mirrors.easynews.com/linux/gentoo/distfiles/ \
+        http://gentoo.osuosl.org/distfiles/ \
+        http://www.gtlib.gatech.edu/pub/gentoo/distfiles/
 
-dist_subdir python
+    distname        sip-${version}
+    checksums           rmd160  755e4610f9e3359df0a7a9f009ad16a5592341f0 \
+                        sha256  ced00216488aa4dd0728d706a551c36c694a26c95e85103ccc21913a8090373c
 
-depends_lib port:python24
+    patchfiles      patch-siputils.py.diff
 
-patchfiles      patch-siputils.py.diff
+    use_configure       yes
+    configure.cmd       ${python.bin} configure.py
+    configure.pre_args  -d ${python.bin} \
+                        -e ${python.include} \
+                        -v ${prefix}/share/sip \
+                        -p macx-g++ \
+                        --bindir=${prefix}/bin \
+                        --destdir=${python.pkgd} \
+                        --incdir=${python.include} \
+                        --sipdir=${prefix}/share/${subport}
 
-configure.cmd   ${prefix}/bin/python2.4 configure.py
-configure.pre_args  -d ${prefix}/lib/python2.4/site-packages \
-                -e ${prefix}/include/python2.4 \
-                -v ${prefix}/share/sip \
-                -p macx-g++
-configure.post_args LFLAGS="-F${prefix}/Library/Frameworks -L${prefix}/lib"
+    configure.post_args LFLAGS="-F${prefix}/Library/Frameworks -L${prefix}/lib"
 
-test.run    yes
-test.cmd    cd siplib && ${prefix}/bin/python2.4 -c 'import sip'
+    python.add_archflags    no
+    if {[variant_isset universal]} {
+        foreach arch ${configure.universal_archs} {
+            configure.args-append   "--arch=${arch}"
+        }
+    }
 
-post-destroot {
-    xinstall -m 755 -d ${destroot}${prefix}/share/doc
-    file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
-    xinstall -m 644 -W ${worksrcpath} LICENSE LICENSE-GPL2 LICENSE-GPL3 NEWS README \
-        ${destroot}${prefix}/share/doc/${name}
-    system "${prefix}/bin/python2.4 ${prefix}/lib/python2.4/compileall.py ${destroot}${prefix}"
-    system "${prefix}/bin/python2.4 -O ${prefix}/lib/python2.4/compileall.py ${destroot}${prefix}"
+    switch ${os.major} {
+        8   { configure.args-append   "--sdk=${developer_dir}/SDKs/MacOSX10.4u.sdk" }
+        9   { configure.args-append   "--sdk=${developer_dir}/SDKs/MacOSX10.5.sdk" }
+        10  { configure.args-append   "--sdk=${developer_dir}/SDKs/MacOSX10.6.sdk" }
+        11  { configure.args-append   "--sdk=${developer_dir}/SDKs/MacOSX10.7.sdk" }
+    }
+
+    build.cmd           make
+    build.target        all
+
+    test.run    yes
+    test.cmd    cd siplib && ${python.bin} -c 'import sip'
+
+    destroot.cmd        make
+    destroot.destdir    DESTDIR=${destroot}
+
+    post-destroot {
+        xinstall -m 755 -d ${destroot}${prefix}/share/doc
+        file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${subport}
+        xinstall -m 644 -W ${worksrcpath} LICENSE LICENSE-GPL2 LICENSE-GPL3 NEWS README \
+            ${destroot}${prefix}/share/doc/${subport}
+        move ${destroot}${prefix}/bin/sip ${destroot}${prefix}/bin/sip-${python.branch}
+        system "${python.bin} ${prefix}/lib/python2.4/compileall.py ${destroot}${prefix}"
+        system "${python.bin} -O ${prefix}/lib/python2.4/compileall.py ${destroot}${prefix}"
+    }
+
+    livecheck.type      none
+} else {
+    livecheck.url       http://www.riverbankcomputing.co.uk/software/sip/download
+    livecheck.regex     sip-(\\d+(\\.\\d+)+)${extract.suffix}
 }
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111011/cc396f69/attachment-0001.html>


More information about the macports-changes mailing list