[113379] trunk/dports/science/gnuradio

michaelld at macports.org michaelld at macports.org
Thu Nov 14 10:21:12 PST 2013


Revision: 113379
          https://trac.macports.org/changeset/113379
Author:   michaelld at macports.org
Date:     2013-11-14 10:21:12 -0800 (Thu, 14 Nov 2013)
Log Message:
-----------
gnuradio:
+ add fixes for SWIG on 10.9;
+ add comments about using depends_lib versus depends_run for specific dependencies;
+ whitespace;
+ update compiler blacklist to be current;
+ redo default_variants to work more reliably;
+ update release to 3.7.2;
+ update devel to 544dce18 and next to 2f6f79e5, both 20131113.

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

Added Paths:
-----------
    trunk/dports/science/gnuradio/files/patch-gnuradio-runtime_swig_std_std_container.i.diff
    trunk/dports/science/gnuradio/files/patch-swig-include-std_string.i.diff

Modified: trunk/dports/science/gnuradio/Portfile
===================================================================
--- trunk/dports/science/gnuradio/Portfile	2013-11-14 17:36:40 UTC (rev 113378)
+++ trunk/dports/science/gnuradio/Portfile	2013-11-14 18:21:12 UTC (rev 113379)
@@ -5,6 +5,7 @@
 PortGroup           cmake 1.0
 PortGroup           wxWidgets 1.0
 PortGroup           active_variants 1.1
+PortGroup           compiler_blacklist_versions 1.0
 
 wxWidgets.use       wxPython-3.0
 
@@ -20,18 +21,9 @@
 
 dist_subdir         gnuradio
 
-platform darwin {
-    if {${os.major} >= 13} {
-        pre-fetch {
-            ui_msg "SWIG (as of 2.0.10) does not generate the C++11 compliant code needed by GNU Radio, and hence $name cannot use SWIG to build on Mavericks or later.  This means the GNU Radio Python interface cannot be created, and that gnuradio-companion will not be installed."
-        }
-    }
-}
-
 if {${subport} eq ${name}} {
 
-    version         3.7.1
-    revision        1
+    version         3.7.2
 
     long_description    ${description}: \
         This port is kept up with the GNU Radio release, currently ${version}, which is typically updated every few months.
@@ -43,8 +35,8 @@
     master_sites    http://gnuradio.org/releases/gnuradio gnu
 
     checksums \
-        rmd160  c3c346d5d9a9b6d91f30b4b5d56737dcb9f41125 \
-        sha256  e9f7f66d175365e281175f889ed4fc46e20318affa8f1f5b4edbe477378ad6cd
+        rmd160  544dce18b81824437ed9919b4f65d3a3f4f9dceb \
+        sha256  b80b42eaa091cb77a168e15b029307856db249d460ff06dfdf292802c19a2669
 
     livecheck.url   http://gnuradio.org/releases/gnuradio/?C=M&O=D
     livecheck.regex >LATEST-IS-(\[^<\]*)<
@@ -81,13 +73,13 @@
     long_description    ${description}: \
         This port is kept up with the GNU Radio GIT 'master' branch, which is typically updated daily to weekly.  This version of GNU Radio generally contains fixes to, and its API is compatible with, the current GNU Radio release, and will be incorporated in an upcoming release.  This port may or not compile or function correctly, as it represents a work in progress.  If it does not work, check back in a few days.  Or try deactivating the currently active gnuradio port, cleaning any current builds, and trying again.
 
-    version             3.7.2_20131107
+    version             3.7.3_20131113
 
     conflicts           gnuradio-legacy gnuradio gnuradio-next
 
     fetch.type          git
     git.url             http://git.gnuradio.org/git/gnuradio.git
-    git.branch          5997f309e8209219851bb62b7e76184395b8630b
+    git.branch          4749434d9b964aa5c452e861f7551b222a4f98ac
 
     livecheck.url       http://gnuradio.org/cgit/gnuradio.git/log/?h=master
     livecheck.version   ${git.branch}
@@ -100,13 +92,13 @@
     long_description    ${description}: \
         This port is kept up with the GNU Radio GIT 'next' branch, which is typically updated daily to weekly.  This version of GNU Radio represents the next major release of GNU Radio, and hence its API is likely to be different than that provided by either gnuradio or gnuradio-devel.  This port may or not compile or function correctly, as it represents a work in progress.  If it does not work, check back in a few days.  Or try deactivating the currently active gnuradio port, cleaning any current builds, and trying again.
 
-    version             3.8.0_20131107
+    version             3.8.0_20131113
 
     conflicts           gnuradio-legacy gnuradio gnuradio-devel
 
     fetch.type          git
     git.url             http://git.gnuradio.org/git/gnuradio.git
-    git.branch          7c652f08b06497a50836b3be92bddb0c314bc803
+    git.branch          2f6f79e53e45c93223824742346f6a70f8007a05
 
     livecheck.url       http://gnuradio.org/cgit/gnuradio.git/log/?h=next
     livecheck.version   ${git.branch}
@@ -119,7 +111,7 @@
     # GNU Radio 3.7 has requirements that 3.6 does not, and provides
     # features that 3.6 does not have.
 
-    depends_lib-append  port:log4cpp
+    depends_lib-append port:log4cpp
 
     variant ctrlport description {Enable control port enhancements (EXPERIMENTAL)} {}
 
@@ -134,26 +126,38 @@
 
     }
 
-    platform darwin {
-        if {${os.major} < 13} {
+    # GNU Radio 3.7.1+ works with Apple GCC, some Apple clang >=
+    # 500.2.79, and MacPorts clang 3.4 or newer; blacklist other
+    # compilers.
 
-            # VOLK requires a GCC variant (Apple or MacPorts), for
-            # now; blacklist all clang variants, for now.
-            # http://trac.macports.org/ticket/37979
+    if {${os.major} == 13} {
+        # works with Apple's clang 500.2.79 on 10.9, but not 10.8.
+        compiler.blacklist-append { clang < 500.2.79 }
+    } else {
+        compiler.blacklist-append clang
+    }
 
-            compiler.blacklist *clang*
-        }
-    }
+    compiler.blacklist-append \
+        macports-clang-2.9 macports-clang-3.1 \
+        macports-clang-3.2 macports-clang-3.3
+
+    # temporary patch for fix swig build on 10.9; tested on 10.8 and
+    # does not seem to hurt.
+
+    patchfiles-append patch-swig-include-std_string.i.diff
+
 } else {
 
     # legacy works with Apple GCC only, because the cmake build script
     # does not robustly check for the xgetbv instruction; a fix for
     # this issue is in release 3.7.1 and newer.
 
-    compiler.blacklist *clang* macports* dragonegg*
+    compiler.blacklist-append *clang* macports*
 
 }
 
+compiler.blacklist-append dragonegg*
+
 use_parallel_build  yes
 
 depends_lib-append  \
@@ -171,6 +175,19 @@
 configure.dir       ${vpath}
 build.dir           ${vpath}
 
+# for 10.9, temporary fix to SWIG compile issue
+
+platform darwin 13 {
+    pre-patch {
+        set std_dest_dir ${worksrcpath}/gnuradio-runtime/swig/std
+        if {[file exists ${std_dest_dir}]} {
+            delete ${std_dest_dir}
+        }
+        copy [glob ${prefix}/share/swig/*/std] ${std_dest_dir}
+    }
+    patchfiles-append patch-gnuradio-runtime_swig_std_std_container.i.diff
+}
+
 # remove top-level include path, such that internal headers are used
 # instead of any already-installed ones.
 
@@ -213,6 +230,16 @@
     }
 }
 
+# shortcut to installing all variants except Python
+
+variant full description {Deprecated legacy variant} {}
+
+# per user concensus: enable all variants except +debug and +universal
+# (and, for next, except +ctrlport);
+
+default_variants +docs +grc +qtgui +wxgui +uhd +orc +wavelet \
+    +jack +portaudio +swig +sdl
+
 # set Python variants
 
 set pythons_suffixes {26 27}
@@ -238,10 +265,18 @@
             # specify the Python dependencies
 
             depends_lib-append \
-                port:${p} \
+                port:${p}
+
+            # these are checked for at configure, then required for
+            # runtime; so use depends_lib to get both.
+
+            depends_lib-append \
                 port:py${s}-numpy \
                 port:py${s}-cheetah
 
+            # these are not checked for at configure, but are required
+            # for runtime; so use depends_run.
+
             depends_run-append \
                 port:py${s}-opengl \
                 port:py${s}-scipy
@@ -268,6 +303,9 @@
 
             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
@@ -276,8 +314,16 @@
 
             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/qt4/plugins/designer/libpy${s}qt4.dylib: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
 
@@ -285,7 +331,10 @@
 
             if {[variant_isset wxgui]} {
 
-                depends_run-append \
+                # 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
 
             }
@@ -293,8 +342,11 @@
             if {[variant_exists ctrlport] && \
                     [variant_isset ctrlport]} {
 
-                depends_lib-append port:py${s}-zeroc-ice34
+                # pyice is not checked for at configure, but is
+                # required for runtime; so use depends_run.
 
+                depends_run-append port:py${s}-zeroc-ice34
+
             }
         }
     }]
@@ -494,22 +546,6 @@
 
 }
 
-# disable SWIG (and GRC) on 10.9 until SWIG works better
-
-platform darwin {
-    if {${os.major} >= 13} {
-
-        default_variants -swig -grc
-
-        if {[variant_isset swig] || [variant_isset grc]} {
-
-            ui_error "SWIG does not generate the C++11 compliant code needed by GNU Radio, and hence $name cannot use SWIG to build on Mavericks or later.  This means the GNU Radio Python interface cannot be created, and that gnuradio-companion will not be installed."
-            error "unsupported platform"
-
-        }
-    }
-}
-
 if {![variant_isset swig]} {
 
     configure.args-append \
@@ -537,24 +573,3 @@
         -DSDL_INCLUDE_DIR=
 
 }
-
-# shortcut to installing all variants except Python
-
-platform darwin {
-    if {${os.major} >= 13} {
-
-        variant full \
-            requires docs qtgui wxgui uhd orc wavelet jack portaudio sdl \
-            description {Enable all variants except +debug and +universal (and, for next, except +ctrlport)} {}
-
-    } else {
-
-        variant full \
-            requires docs grc qtgui wxgui uhd orc wavelet jack portaudio swig sdl \
-            description {Enable all variants except +debug and +universal (and, for next, except +ctrlport)} {}
-
-    }
-}
-# make +full the default; per user concensus
-
-default_variants-append +full

Added: trunk/dports/science/gnuradio/files/patch-gnuradio-runtime_swig_std_std_container.i.diff
===================================================================
--- trunk/dports/science/gnuradio/files/patch-gnuradio-runtime_swig_std_std_container.i.diff	                        (rev 0)
+++ trunk/dports/science/gnuradio/files/patch-gnuradio-runtime_swig_std_std_container.i.diff	2013-11-14 18:21:12 UTC (rev 113379)
@@ -0,0 +1,24 @@
+--- gnuradio-runtime/swig/std/std_container.i.orig	2013-09-16 11:55:57.000000000 -0400
++++ gnuradio-runtime/swig/std/std_container.i	2013-11-13 15:55:21.000000000 -0500
+@@ -46,8 +46,8 @@
+   void resize(size_type new_size);
+   
+   #ifdef SWIG_EXPORT_ITERATOR_METHODS
+-  iterator erase(iterator pos);
+-  iterator erase(iterator first, iterator last);
++  iterator erase(const_iterator pos);
++  iterator erase(const_iterator first, const_iterator last);
+   #endif
+   
+ %enddef
+@@ -68,8 +68,8 @@
+   void resize(size_type new_size, const value_type& x);
+   
+   #ifdef SWIG_EXPORT_ITERATOR_METHODS
+-  iterator insert(iterator pos, const value_type& x);
+-  void insert(iterator pos, size_type n, const value_type& x);
++  iterator insert(const_iterator pos, const value_type& x);
++  void insert(const_iterator pos, size_type n, const value_type& x);
+   #endif
+   
+ %enddef

Added: trunk/dports/science/gnuradio/files/patch-swig-include-std_string.i.diff
===================================================================
--- trunk/dports/science/gnuradio/files/patch-swig-include-std_string.i.diff	                        (rev 0)
+++ trunk/dports/science/gnuradio/files/patch-swig-include-std_string.i.diff	2013-11-14 18:21:12 UTC (rev 113379)
@@ -0,0 +1,20 @@
+--- gnuradio-runtime/swig/gnuradio.i
++++ gnuradio-runtime/swig/gnuradio.i
+@@ -28,6 +28,7 @@
+ // SWIG interface definition
+ ////////////////////////////////////////////////////////////////////////
+ 
++%include "std_string.i"
+ %include <gr_extras.i>
+ 
+ #ifdef SW_RUNTIME
+--- gnuradio-runtime/swig/gr_types.i
++++ gnuradio-runtime/swig/gr_types.i
+@@ -23,7 +23,6 @@
+ #ifndef SWIG_GR_TYPES_I
+ #define SWIG_GR_TYPES_I
+ 
+-%include "std_string.i"
+ %include "stdint.i"
+ 
+ %{
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131114/de50420c/attachment.html>


More information about the macports-changes mailing list