[131532] trunk/dports/science/gr-mac/Portfile

michaelld at macports.org michaelld at macports.org
Tue Jan 13 13:05:53 PST 2015


Revision: 131532
          https://trac.macports.org/changeset/131532
Author:   michaelld at macports.org
Date:     2015-01-13 13:05:53 -0800 (Tue, 13 Jan 2015)
Log Message:
-----------
gr-mac: require Python 2.7; leave +python2[67] legacy variants for now.

Modified Paths:
--------------
    trunk/dports/science/gr-mac/Portfile

Modified: trunk/dports/science/gr-mac/Portfile
===================================================================
--- trunk/dports/science/gr-mac/Portfile	2015-01-13 21:03:43 UTC (rev 131531)
+++ trunk/dports/science/gr-mac/Portfile	2015-01-13 21:05:53 UTC (rev 131532)
@@ -4,7 +4,6 @@
 PortSystem          1.0
 PortGroup           cmake 1.0
 PortGroup           github 1.0
-PortGroup           active_variants 1.1
 
 github.setup        jmalsbury gr-mac 0d636dd36a8e1667198aa59631d0d87dd17c6815
 version             20140913
@@ -82,57 +81,24 @@
     copy ${worksrcpath}/examples ${destroot}${prefix}/share/examples/mac
 }
 
-# set Python variants
+# set Python legacy variants; these can be removed 2016-01-01
 
-set pythons_suffixes {26 27}
-global chosen_python_suffix
-set chosen_python_suffix ""
+variant python26 description {Legacy variant} {}
+variant python27 description {Legacy variant} {}
 
-set pythons_ports {}
-foreach s ${pythons_suffixes} {
-    lappend pythons_ports python${s}
-}
+# specify the Python dependencies
 
-foreach s ${pythons_suffixes} {
-    set p python${s}
-    set v [join [split ${s} ""] "."]
-    set i [lsearch -exact ${pythons_ports} ${p}]
-    set c [lreplace ${pythons_ports} ${i} ${i}]
-    eval [subst {
-        variant ${p} description "Build ${name} for Python ${v}" \
-            conflicts ${c} {
+depends_lib-append \
+    port:python27
 
-            set chosen_python_suffix ${s}
+# specify the Python version to use
 
-            # require gnuradio to also have this Python variant
-            require_active_variants \
-                path:lib/libgnuradio-runtime.dylib:gnuradio ${p}
+configure.args-append \
+    -DPYTHON_EXECUTABLE=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 \
+    -DPYTHON_INCLUDE_DIR=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/Headers \
+    -DPYTHON_LIBRARY=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/Python \
+    -DGR_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages
 
-            depends_lib-append \
-                port:${p}
-
-            # specify that Python version to use
-            configure.args-append \
-                -DPYTHON_EXECUTABLE=${prefix}/bin/python${v} \
-                -DPYTHON_INCLUDE_DIR=${prefix}/Library/Frameworks/Python.framework/Versions/${v}/Headers \
-                -DPYTHON_LIBRARY=${prefix}/Library/Frameworks/Python.framework/Versions/${v}/Python \
-                -DGR_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/${v}/lib/python${v}/site-packages
-        }
-    }]
-}
-
-# if no python variant is set, default to 2.7
-if {![variant_isset python26] &&
-    ![variant_isset python27]} {
-    default_variants +python27
-}
-
-# make sure -python27 was not used alone
-if {![variant_isset python26] &&
-    ![variant_isset python27]} {
-    return -code error "Exactly one Python variant must be selected."
-}
-
 notes "
 Before ${name} will work correctly, you will need to execute
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150113/968c4793/attachment.html>


More information about the macports-changes mailing list