[131528] trunk/dports/science/gr-ais/Portfile

michaelld at macports.org michaelld at macports.org
Tue Jan 13 12:34:54 PST 2015


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

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

Modified: trunk/dports/science/gr-ais/Portfile
===================================================================
--- trunk/dports/science/gr-ais/Portfile	2015-01-13 20:29:09 UTC (rev 131527)
+++ trunk/dports/science/gr-ais/Portfile	2015-01-13 20:34:54 UTC (rev 131528)
@@ -4,7 +4,6 @@
 PortSystem          1.0
 PortGroup           cmake 1.0
 PortGroup           github 1.0
-PortGroup           active_variants 1.1
 
 github.setup        bistromath gr-ais 7fdfc4d24b7bd44456a1734ae4d934af56a17475
 version             20140919
@@ -75,54 +74,20 @@
 
 build.post_args VERBOSE=1
 
-# 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}
-
-            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."
-}
+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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150113/97813d12/attachment.html>


More information about the macports-changes mailing list