[146819] trunk/dports/python/py-pmw/Portfile

khindenburg at macports.org khindenburg at macports.org
Fri Mar 18 07:13:40 PDT 2016


Revision: 146819
          https://trac.macports.org/changeset/146819
Author:   khindenburg at macports.org
Date:     2016-03-18 07:13:40 -0700 (Fri, 18 Mar 2016)
Log Message:
-----------
pw-pmw: move post-patch inside subport if; make demos/tests All.py executable and remove dos eol

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

Modified: trunk/dports/python/py-pmw/Portfile
===================================================================
--- trunk/dports/python/py-pmw/Portfile	2016-03-18 14:05:37 UTC (rev 146818)
+++ trunk/dports/python/py-pmw/Portfile	2016-03-18 14:13:40 UTC (rev 146819)
@@ -6,6 +6,7 @@
 
 name                py-pmw
 version             2.0.0
+revision            1
 maintainers         nomaintainer
 platforms           darwin
 license             MIT
@@ -28,14 +29,22 @@
 
 python.versions     27 34 35
 
-post-patch {
-    reinplace "s|format|fmt|g" ${worksrcpath}/Pmw/Pmw_2_0_0/demos/Counter.py
-    system  -W ${worksrcpath} "/usr/bin/find . -type f -name '*.py' -print0 | xargs -0 perl -pi -e 's|/usr/bin/env python|${prefix}/bin/python${python.branch}|g'"
-}
-
 if {${name} ne ${subport}} {
     depends_lib-append  port:py${python.version}-tkinter
 
+    post-patch {
+        reinplace "s|format|fmt|g" ${worksrcpath}/Pmw/Pmw_2_0_0/demos/Counter.py
+        system  -W ${worksrcpath} "/usr/bin/find . -type f -name '*.py' -print0 | xargs -0 perl -pi -e 's|/usr/bin/env python|${prefix}/bin/python${python.branch}|g'"
+    }
+
+    post-destroot {
+        file attributes ${destroot}${python.pkgd}/Pmw/Pmw_2_0_0/demos/All.py -permissions +x
+        file attributes ${destroot}${python.pkgd}/Pmw/Pmw_2_0_0/tests/All.py -permissions +x
+        reinplace "s|\r||g" \
+            ${destroot}${python.pkgd}/Pmw/Pmw_2_0_0/demos/All.py \
+            ${destroot}${python.pkgd}/Pmw/Pmw_2_0_0/tests/All.py
+    }
+
     livecheck.type      none
 } else {
     livecheck.regex     Pmw-(\[0-9.\]+)${extract.suffix}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160318/b9ad871c/attachment.html>


More information about the macports-changes mailing list