[131520] trunk/dports/science/gr-osmosdr/Portfile

michaelld at macports.org michaelld at macports.org
Tue Jan 13 07:24:31 PST 2015


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

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

Modified: trunk/dports/science/gr-osmosdr/Portfile
===================================================================
--- trunk/dports/science/gr-osmosdr/Portfile	2015-01-13 15:20:42 UTC (rev 131519)
+++ trunk/dports/science/gr-osmosdr/Portfile	2015-01-13 15:24:31 UTC (rev 131520)
@@ -103,71 +103,24 @@
 
 default_variants +docs +uhd +swig +hackrf +fcdproplus +rtlsdr +bladeRF +airspy
 
-# 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 GNU Radio using 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
+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
 
-            if {"${subport}" eq "gr-osmosdr-legacy"} {
-
-                require_active_variants port:gnuradio-legacy ${p}
-
-            } else {
-
-                require_active_variants \
-                    path:lib/libgnuradio-runtime.dylib:gnuradio ${p}
-
-            }
-
-            # specify the Python dependencies
-
-            depends_lib-append \
-                port:${p}
-
-            # specify the 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
-
-        }
-    }]
-}
-
-# Python is required; default to 2.7
-
-if {![variant_isset python26] && ![variant_isset python27]} {
-    default_variants +python27
-}
-
-# Make sure -python27 was not specified alone
-
-if {![variant_isset python26] && ![variant_isset python27]} {
-    ui_error "${name} requires a Python to be selected; you cannot use -python27 as a variant alone."
-    return -code error "Invalid variant selection"
-}
-
 variant docs description "Install ${name} documentation" {
 
     depends_build-append \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150113/5675017e/attachment.html>


More information about the macports-changes mailing list