[131482] trunk/dports/science/gnuradio/Portfile

michaelld at macports.org michaelld at macports.org
Mon Jan 12 10:04:40 PST 2015


Revision: 131482
          https://trac.macports.org/changeset/131482
Author:   michaelld at macports.org
Date:     2015-01-12 10:04:40 -0800 (Mon, 12 Jan 2015)
Log Message:
-----------
gnuradio*: require Python 2.7; leave +python2[67] legacy variants for now.

Modified Paths:
--------------
    trunk/dports/science/gnuradio/Portfile

Modified: trunk/dports/science/gnuradio/Portfile
===================================================================
--- trunk/dports/science/gnuradio/Portfile	2015-01-12 17:46:19 UTC (rev 131481)
+++ trunk/dports/science/gnuradio/Portfile	2015-01-12 18:04:40 UTC (rev 131482)
@@ -178,6 +178,13 @@
 # anything until this is fixed.
 
 #        depends_lib-append port:zeroc-ice35
+
+    # pyice is not checked for at configure, but is
+    # required for runtime; so use depends_run.
+
+#                depends_run-append \
+#                    port:py27-zeroc-ice35
+
         configure.args-append -DENABLE_GR_CTRLPORT=ON
 
     } else {
@@ -190,6 +197,13 @@
 
     if {[variant_isset performance_counters]} {
 
+        # these are not checked for at configure, but are
+        # required for runtime; so use depends_run.
+
+        depends_run-append \
+            port:py27-pygraphviz \
+            port:py27-networkx
+
         configure.args-append \
             -DENABLE_PERFORMANCE_COUNTERS=ON
 
@@ -207,6 +221,12 @@
         depends_lib-append \
             port:cppzmq
 
+        # pyzmq is not checked for at configure, but is
+        # required for runtime; so use depends_run.
+
+        depends_run-append \
+            port:py27-zmq
+
         configure.args-append \
             -DENABLE_GR_ZEROMQ=ON
 
@@ -229,9 +249,6 @@
     port:cppunit \
     port:fftw-3-single
 
-depends_build-append \
-    port:pkgconfig
-
 # do VPATH build
 
 set vpath           ${workpath}/build
@@ -283,160 +300,43 @@
 }
 
 # per user concensus: enable all variants except +debug and +universal
-# (and, for next, except +ctrlport, +performance_counters, and +zeromq);
+# (and, for devel and next: except +ctrlport, +performance_counters, and +zeromq);
 
 default_variants +docs +grc +qtgui +wxgui +uhd +orc +wavelet \
     +jack +portaudio +swig +sdl
 
-# 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}
-}
+# require Python 2.7
 
-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}
+# these are checked for at configure, then required for
+# runtime; so use depends_lib to get both.
 
-            # specify the Python dependencies
+depends_lib-append \
+    port:py27-numpy \
+    port:py27-cheetah
 
-            depends_lib-append \
-                port:${p}
+# these are not checked for at configure, but are required
+# for runtime; so use depends_run.
 
-            # these are checked for at configure, then required for
-            # runtime; so use depends_lib to get both.
+depends_run-append \
+    port:py27-opengl \
+    port:py27-scipy
 
-            depends_lib-append \
-                port:py${s}-numpy \
-                port:py${s}-cheetah
+# specify the Python version to use
 
-            # these are not checked for at configure, but are required
-            # for runtime; so use depends_run.
+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_run-append \
-                port:py${s}-opengl \
-                port:py${s}-scipy
-
-            # 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
-
-            # check for variants that require Python
-
-            if {[variant_isset docs]} {
-
-                depends_build-append \
-                    port:py${s}-sphinx
-
-                configure.args-append \
-                    -DSPHINX_EXECUTABLE=${prefix}/bin/sphinx-build-${v}
-
-            }
-
-            if {[variant_isset grc]} {
-
-                # these are checked for at configure, then required
-                # for runtime; so use depends_lib to get both.
-
-                depends_lib-append \
-                    port:py${s}-lxml \
-                    port:py${s}-pygtk
-
-            }
-
-            if {[variant_isset qtgui]} {
-
-                # pyqt4 is checked for at configure, then required for
-                # runtime; so use depends_lib to get both.  Can use
-                # either py*-pyqt4 or py*-pyqt4-devel.
-
-                depends_lib-append \
-                    path:share/py${s}-sip/PyQt4:py${s}-pyqt4
-
-                # pyqwt is not checked for at configure, but is
-                # required for runtime; so use depends_run.
-
-                depends_run-append \
-                    port:py${s}-pyqwt
-
-            }
-
-            if {[variant_isset wxgui]} {
-
-                # wxpython is checked for at configure, then required
-                # for runtime; so use depends_lib to get both.
-
-                depends_lib-append \
-                    port:py${s}-wxpython-3.0
-
-            }
-
-            if {[variant_exists ctrlport] && \
-                [variant_isset ctrlport]} {
-
-                # pyice is not checked for at configure, but is
-                # required for runtime; so use depends_run.
-
-#                depends_run-append \
-#                    port:py${s}-zeroc-ice35
-
-            }
-
-            if {[variant_exists performance_counters] && \
-                [variant_isset performance_counters]} {
-
-                # these are not checked for at configure, but are
-                # required for runtime; so use depends_run.
-
-                depends_run-append \
-                    port:py${s}-pygraphviz \
-                    port:py${s}-networkx
-
-            }
-
-            if {[variant_exists zeromq] && \
-                [variant_isset zeromq]} {
-
-                # pyzmq is not checked for at configure, but is
-                # required for runtime; so use depends_run.
-
-                depends_run-append \
-                    port:py${s}-zmq
-
-            }
-        }
-    }]
-}
-
-# 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 "GNU Radio requires a Python to be selected; you cannot use -python27 as a variant alone."
-    return -code error "Invalid variant selection"
-}
-
 variant docs description "Install GNU Radio documentation" {
 
     depends_lib-append \
@@ -444,9 +344,13 @@
         path:bin/dot:graphviz \
         port:xmlto
 
+    depends_build-append \
+        port:py27-sphinx
+
     configure.args-append \
         -DENABLE_DOXYGEN=ON \
-        -DENABLE_SPHINX=ON
+        -DENABLE_SPHINX=ON \
+        -DSPHINX_EXECUTABLE=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/bin/sphinx-build
 
 }
 
@@ -463,6 +367,13 @@
     configure.args-append \
         -DENABLE_GRC=ON
 
+    # these are checked for at configure, then required
+    # for runtime; so use depends_lib to get both.
+
+    depends_lib-append \
+        port:py27-lxml \
+        port:py27-pygtk
+
 }
 
 if {![variant_isset grc]} {
@@ -474,24 +385,43 @@
 
 variant qtgui description "Install GNU Radio with support for Qt GUI" {
 
+    PortGroup qt4 1.0
+
     depends_lib-append \
-        port:qt4-mac \
         port:qwtplot3d
 
-    configure.args-append \
-        -DENABLE_GR_QTGUI=ON \
-        -DQT_QMAKE_EXECUTABLE=${prefix}/bin/qmake
+    # pyqt4 is checked for at configure, then required for
+    # runtime; so use depends_lib to get both.  Can use
+    # either py*-pyqt4 or py*-pyqt4-devel.
 
+    depends_lib-append \
+        path:share/py27-sip/PyQt4:py27-pyqt4
+
     # Requires qwt >= 5.2, so not the "qwt" port.  Also requires
     # py*-pyqwt which does not compile with qwt >= 6.0; so -have- to
     # use qwt52 for now.
 
     depends_lib-append port:qwt52
 
+    # pyqwt is not checked for at configure, but is
+    # required for runtime; so use depends_run.
+
+    depends_run-append \
+        port:py27-pyqwt
+
+    configure.args-append \
+        -DENABLE_GR_QTGUI=ON \
+        -DQT_QMAKE_EXECUTABLE=${qt_qmake_cmd}
+
 }
 
 if {![variant_isset qtgui]} {
 
+    # qt4 portgroup provides pkgconfig, so if not using Qt need that here.
+
+    depends_build-append \
+        port:pkgconfig
+
     configure.args-append \
         -DENABLE_GR_QTGUI=OFF \
         -DQT_QMAKE_EXECUTABLE=
@@ -503,6 +433,12 @@
     depends_lib-append \
         port:${wxWidgets.port}
 
+    # wxpython is checked for at configure, then required
+    # for runtime; so use depends_lib to get both.
+
+    depends_lib-append \
+        port:py27-wxpython-3.0
+
     configure.args-append \
         -DENABLE_GR_WXGUI=ON
 
@@ -517,6 +453,8 @@
 
 variant uhd description "Install GNU Radio with support for UHD" {
 
+    # allow for uhd or uhd-devel
+
     depends_lib-append \
         path:lib/libuhd.dylib:uhd
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150112/f74094af/attachment-0001.html>


More information about the macports-changes mailing list