Revision
132580
Author
petr@macports.org
Date
2015-02-04 21:20:58 -0800 (Wed, 04 Feb 2015)

Log Message

py-ngl: add py27 subport, correct lib dependencies, minor corrections

Modified Paths

Diff

Modified: trunk/dports/python/py-ngl/Portfile (132579 => 132580)


--- trunk/dports/python/py-ngl/Portfile	2015-02-05 05:13:23 UTC (rev 132579)
+++ trunk/dports/python/py-ngl/Portfile	2015-02-05 05:20:58 UTC (rev 132580)
@@ -33,18 +33,21 @@
     }
 }
 
-python.versions     26
+python.versions     26 27
 
 if {${name} ne ${subport}} {
-    depends_lib-append  port:py26-nio
+    depends_lib-append  port:zlib 
+                        port:libpng 
+                        port:xorg-libX11 \
+                        port:py${python.version}-nio
 
-    # ncarg is not universal (and thus py26-nio is not universal)
+    # ncarg is not universal, thus py-ngl is neither
     universal_variant   no
 
     patch {
         reinplace "s|/usr/X11R6/lib|${prefix}/lib|" ${worksrcpath}/setup.py
-        reinplace "s|/usr/bin/env python|${prefix}/bin/python2.6|" ${worksrcpath}/examples/pynglex
-        reinplace "s|py_cmd = 'python'|py_cmd = '${prefix}/bin/python2.6'|" ${worksrcpath}/examples/pynglex
+        reinplace "s|/usr/bin/env python|${python.bin}|" ${worksrcpath}/examples/pynglex
+        reinplace "s|py_cmd = 'python'|py_cmd = '${python.bin}'|" ${worksrcpath}/examples/pynglex
     }
 
     build.env           PNG_PREFIX=${prefix} \
@@ -77,7 +80,7 @@
         append g95_conflicts " conflicts gcc${ver_no_dot}"
 
         if {[variant_isset gcc${ver_no_dot}]} {
-            if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
+            if {${default_fortran_variant} ne "+gcc${ver_no_dot}"} {
                 set default_fortran_variant ""
             }
         }
@@ -86,12 +89,12 @@
     eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
 
     if {[variant_isset g95]} {
-        if {${default_fortran_variant} != "+g95"} {
+        if {${default_fortran_variant} ne "+g95"} {
             set default_fortran_variant ""
         }
     }
 
-    if {${default_fortran_variant} != ""} {
+    if {${default_fortran_variant} ne ""} {
         default_variants-append "${default_fortran_variant}"
     }
 
@@ -130,6 +133,6 @@
     livecheck.type   none
 } else {
     livecheck.type   regex
-    livecheck.url    ${master_sites}
+    livecheck.url    http://www.pyngl.ucar.edu/Download/
     livecheck.regex  {of PyNGL is ([0-9]\.[0-9]\.[0-9]+)}
 }