[97042] trunk/dports/python

jmr at macports.org jmr at macports.org
Sat Aug 25 01:47:40 PDT 2012


Revision: 97042
          https://trac.macports.org/changeset/97042
Author:   jmr at macports.org
Date:     2012-08-25 01:47:38 -0700 (Sat, 25 Aug 2012)
Log Message:
-----------
 py*-libxslt: unify, add py27

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

Removed Paths:
-------------
    trunk/dports/python/py25-libxslt/
    trunk/dports/python/py26-libxslt/

Modified: trunk/dports/python/py-libxslt/Portfile
===================================================================
--- trunk/dports/python/py-libxslt/Portfile	2012-08-25 08:26:01 UTC (rev 97041)
+++ trunk/dports/python/py-libxslt/Portfile	2012-08-25 08:47:38 UTC (rev 97042)
@@ -24,23 +24,46 @@
                         sha1 69f74df8228b504a87e2b257c2d5238281c65154 \
                         rmd160 fc7630352ae5772d25fc8132a373d477fb8d8d5f
 
-depends_lib-append      port:libxslt \
-                        port:py-libxml2
+foreach v {24 25 26 27} {
+    subport py${v}-libxslt "
+        set python.version $v
+        set python.branch [join [split $v ""] .]
+    "
+}
 
-configure.python        ${prefix}/bin/python2.4
-configure.args          --mandir=${prefix}/share/man \
-                        --enable-static \
-                        --with-libxml-prefix=${prefix} \
-                        --with-python \
-                        --without-crypto
+if {$subport != $name} {
+    depends_lib             port:libxslt \
+                            port:py${python.version}-libxml2
 
-destroot.dir            ${worksrcpath}/python
+    configure.python        ${prefix}/bin/python${python.branch}
+    configure.args          --mandir=${prefix}/share/man \
+                            --enable-static \
+                            --with-libxml-prefix=${prefix} \
+                            --with-python \
+                            --without-crypto
 
-post-destroot {
-    move ${destroot}${prefix}/share/doc/libxslt-python-${version} \
-         ${destroot}${prefix}/share/doc/${name}
+    destroot.dir            ${worksrcpath}/python
+    if {${python.version} >= 26} {
+        destroot.args       PYTHON_SITE_PACKAGES="${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages"
+    }
+
+    post-destroot {
+        move ${destroot}${prefix}/share/doc/libxslt-python-${version} \
+             ${destroot}${prefix}/share/doc/${subport}
+    }
+    livecheck.type  none
+} else {
+    distfiles
+    supported_archs noarch
+    replaced_by py24-libxslt
+    depends_lib port:py24-libxslt
+    patch {}
+    build {}
+    destroot {
+        system "echo $name is a stub port > ${destroot}${prefix}/share/doc/${name}/README"
+    }
+
+    livecheck.type  regex
+    livecheck.url   ${homepage}news.html
+    livecheck.regex {<h3>(\d+(?:\.\d+)*): .*</h3>}
 }
-
-livecheck.type  regex
-livecheck.url   ${homepage}news.html
-livecheck.regex {<h3>(\d+(?:\.\d+)*): .*</h3>}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120825/c6a360f7/attachment.html>


More information about the macports-changes mailing list