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

khindenburg at macports.org khindenburg at macports.org
Fri Mar 18 18:52:49 PDT 2016


Revision: 146846
          https://trac.macports.org/changeset/146846
Author:   khindenburg at macports.org
Date:     2016-03-18 18:52:49 -0700 (Fri, 18 Mar 2016)
Log Message:
-----------
py-pmw: fix build for py27 #50924

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

Modified: trunk/dports/python/py-pmw/Portfile
===================================================================
--- trunk/dports/python/py-pmw/Portfile	2016-03-18 23:43:59 UTC (rev 146845)
+++ trunk/dports/python/py-pmw/Portfile	2016-03-19 01:52:49 UTC (rev 146846)
@@ -32,17 +32,22 @@
 if {${name} ne ${subport}} {
     depends_lib-append  port:py${python.version}-tkinter
 
+    if {${python.version} == 27} {
+        set pmw_folder Pmw_1_3_3
+    } else {
+        set pmw_folder Pmw_2_0_0
+    }
     post-patch {
-        reinplace "s|format|fmt|g" ${worksrcpath}/Pmw/Pmw_2_0_0/demos/Counter.py
+        reinplace "s|format|fmt|g" ${worksrcpath}/Pmw/${pmw_folder}/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
+        file attributes ${destroot}${python.pkgd}/Pmw/${pmw_folder}/demos/All.py -permissions +x
+        file attributes ${destroot}${python.pkgd}/Pmw/${pmw_folder}/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
+            ${destroot}${python.pkgd}/Pmw/${pmw_folder}/demos/All.py \
+            ${destroot}${python.pkgd}/Pmw/${pmw_folder}/tests/All.py
     }
 
     livecheck.type      none
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160318/f90d697c/attachment.html>


More information about the macports-changes mailing list