# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 PortGroup cmake 1.0 PortGroup wxWidgets 1.0 PortGroup github 1.0 wxWidgets.use wxPython-3.0 name gnuradio maintainers michaelld description GNU Radio is Software Defined Radio (SDR) categories science comms license GPL-3 platforms darwin macosx dist_subdir gnuradio if {${subport} eq ${name}} { github.setup gnuradio gnuradio 3.7.10.1 v revision 1 long_description ${description}: \ This port is kept up with the GNU Radio release, currently ${version}, which is typically updated every few months. conflicts gnuradio-next gnuradio-devel checksums \ rmd160 3aa056006c094dd4120593ac65fbee85965a3ca1 \ sha256 c77cc8fefdb054b0320bc4fc906c6013a6b6518bfb4de65f5d1631dfe5d22115 # set the version override string set GR_VERSION_INFO "Release" # overload the github livecheck regex to look for versions that # are just numbers and '.', no letters (e.g., "3.7.3git"). livecheck.regex archive/[join ${github.tag_prefix} ""](\[0-9\.\]+)${extract.suffix} } subport gnuradio-devel { 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. name gnuradio-devel conflicts gnuradio gnuradio-next github.setup gnuradio gnuradio 3fc55073f28ec97036dfe3f5ff9d9a7491f3ea80 version 20161028 checksums \ rmd160 1dd6b64b72536d6c6fa37bf82a909ff82ef937ae \ sha256 3802289737fea7e3e5b2b3563109f85117190eeed8d0e646e733aad3e5754a3c # set the version override string set GR_VERSION_INFO "devel-git-[string range ${github.version} 0 7](${version})" } subport gnuradio-next { 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. name gnuradio-next conflicts gnuradio gnuradio-devel github.setup gnuradio gnuradio 68eb2afc2128b2fe942a6be48c903dea6b4b4489 version 20160816 revision 1 checksums \ rmd160 cb297ba374c6af5c7fded74a259333e2e171e8eb \ sha256 6c6353f19e5dd4c54edf99a26fef778ce440e10270e498191c13732b02e61d7f # set the version override string set GR_VERSION_INFO "next-git-[string range ${github.version} 0 7](${version})" # overload the github livecheck URL with the correct branch livecheck.url ${github.homepage}/commits/next.atom } # temporary patch to fix header creation to be before dependencies # are determined, such that local (to the build) headers are found # before already-installed ones. if {${subport} eq "gnuradio"} { # patches for release only patchfiles-append \ patch-cmake-expand.release.diff } elseif {${subport} eq "gnuradio-devel"} { # patches for devel patchfiles-append \ patch-cmake-expand.devel.diff } else { # patches for next patchfiles-append \ patch-cmake-expand.next.diff } # override githib PortGroup homepage setting homepage http://gnuradio.org/ use_parallel_build yes depends_lib-append \ port:boost \ port:cppunit \ port:fftw-3-single \ port:log4cpp # need matplotlib for polar encoder/decoder, runtime # only. This is not checked for at configure. depends_run-append port:py27-matplotlib # do VPATH (out of source tree) build cmake.out_of_source yes # remove top-level library path, such that internal libraries # are used instead of any already-installed ones. configure.ldflags-delete -L${prefix}/lib # install CMake files into this directory. configure.args-append \ -DCMAKE_MODULES_DIR=${prefix}/share/cmake # override default version string to be MacPorts-specific configure.args-append \ -DGR_GIT_COUNT="MacPorts" \ -DGR_GIT_HASH="${GR_VERSION_INFO}" # release, devel, and next can use either the Volk. depends_lib-append path:lib/libvolk.dylib:volk # disable using internal VOLK configure.args-append \ -DENABLE_INTERNAL_VOLK=OFF post-destroot { # fix residual cmake module install location when # CMAKE_MODULES_DIR does not do the whole trick # GNU Radio installs cmake files as "Config*.cmake", which has the # odd behavior of requiring the files to be in a top-level shared # cmake directory; for MacPorts' cmake, these are, apparently: # ${prefix}/lib:${prefix}/share/cmake . I don't know why ... but # I do not want cmake files installed into the former, so move # them to the latter. if {[file exists ${destroot}${prefix}/lib/cmake]} { xinstall -m 755 -d ${destroot}${prefix}/share move ${destroot}${prefix}/lib/cmake \ ${destroot}${prefix}/share } } # per user concensus: enable all variants except +debug and +universal # (and, for devel and next: except +ctrlport, +performance_counters, and +zeromq); default_variants +docs +grc +qtgui +wxgui +uhd +wavelet \ +jack +portaudio +swig +sdl # require Python 2.7 depends_lib-append \ port:python27 # these are checked for at configure, then required for # runtime; so use depends_lib to get both. depends_lib-append \ port:py27-numpy \ port:py27-cheetah # these are not checked for at configure, but are required # for runtime; so use depends_run. depends_run-append \ port:py27-opengl \ port:py27-scipy # specify the Python version to use configure.args-append \ -DPYTHON_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7 \ -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.7/Headers \ -DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/2.7/Python \ -DGR_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages variant docs description "Install GNU Radio documentation" { depends_lib-append \ port:doxygen \ path:bin/dot:graphviz \ port:xmlto depends_build-append \ port:py27-sphinx configure.args-append \ -DENABLE_DOXYGEN=ON \ -DENABLE_SPHINX=ON \ -DSPHINX_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/2.7/bin/sphinx-build } if {![variant_isset docs]} { configure.args-append \ -DENABLE_DOXYGEN=OFF \ -DENABLE_SPHINX=OFF } variant grc requires swig description "Install GNU Radio Companion" { 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]} { configure.args-append \ -DENABLE_GRC=OFF } variant qtgui description "Install GNU Radio with support for Qt GUI" { PortGroup qt4 1.0 depends_lib-append \ port:qwtplot3d # 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= } variant wxgui description "Install GNU Radio with support for Wx GUI" { 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 } if {![variant_isset wxgui]} { configure.args-append \ -DENABLE_GR_WXGUI=OFF } variant uhd description "Install GNU Radio with support for UHD" { # allow for uhd or uhd-devel depends_lib-append \ path:lib/libuhd.dylib:uhd configure.args-append \ -DENABLE_GR_UHD=ON \ -DUHD_INCLUDE_DIRS=${prefix}/include \ -DUHD_LIBRARIES=${prefix}/lib/libuhd.dylib } if {![variant_isset uhd]} { configure.args-append \ -DENABLE_GR_UHD=OFF \ -DUHD_INCLUDE_DIRS= \ -DUHD_LIBRARIES= } variant wavelet description "Install GNU Radio Wavelet component" { depends_lib-append \ port:gsl configure.args-append \ -DENABLE_GR_WAVELET=ON } if {![variant_isset wavelet]} { configure.args-append \ -DENABLE_GR_WAVELET=OFF } variant jack description "Install GNU Radio with support for JACK audio" { depends_lib-append \ port:jack configure.args-append \ -DJACK_INCLUDE_DIR=${prefix}/include \ -DJACK_LIBRARY=${prefix}/lib/libjack.dylib } if {![variant_isset jack]} { configure.args-append \ -DJACK_INCLUDE_DIR= \ -DJACK_LIBRARY= } variant portaudio description "Install GNU Radio with support for portaudio audio" { depends_lib-append \ port:portaudio configure.args-append \ -DPORTAUDIO_INCLUDE_DIRS=${prefix}/include \ -DPORTAUDIO_LIBRARIES=${prefix}/lib/libportaudio.dylib } if {![variant_isset portaudio]} { configure.args-append \ -DPORTAUDIO_INCLUDE_DIRS= \ -DPORTAUDIO_LIBRARIES= } variant swig description "Install GNU Radio with support for SWIG-base Python bindings" { depends_build-append \ port:swig-python configure.args-append \ -DSWIG_EXECUTABLE=${prefix}/bin/swig } if {![variant_isset swig]} { configure.args-append \ -DSWIG_EXECUTABLE= } variant sdl description "Install GNU Radio with support for SDL-based video" { depends_lib-append \ port:libsdl configure.args-append \ -DENABLE_GR_VIDEO_SDL=ON \ -DSDLMAIN_LIBRARY=${prefix}/lib/libSDLmain.a \ -DSDL_INCLUDE_DIR=${prefix}/include/SDL } if {![variant_isset sdl]} { configure.args-append \ -DENABLE_GR_VIDEO_SDL=OFF \ -DSDLMAIN_LIBRARY= \ -DSDL_INCLUDE_DIR= } variant ctrlport description {Enable control port enhancements (EXPERIMENTAL)} { # as of commit 2e691d87 (2014-08-08), all CTRLPORT calls are noops # because of an issue with ICE. So, allow +ctrlport, but it won't do # anything until this is fixed. # as of commit 621c086b (2015-04-16), CTRLPORT has been moved to using # thrift, which needs debugging when building on OSX. Just disable # CTRLPORT for now. configure.args-append -DENABLE_GR_CTRLPORT=OFF } if {![variant_isset ctrlport]} { configure.args-append -DENABLE_GR_CTRLPORT=OFF } variant performance_counters description {Enable support for performance counters (EXPERIMENTAL)} { # 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 } if {![variant_isset performance_counters]} { configure.args-append \ -DENABLE_PERFORMANCE_COUNTERS=OFF } variant zeromq description {Install GNU Radio with support for the ZeroMQ lightweight messaging kernel (EXPERIMENTAL)} { 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 } if {![variant_isset zeromq]} { configure.args-append \ -DENABLE_GR_ZEROMQ=OFF } variant cxx11 description "Compile using C++11" { # require C++11 configure.cxxflags-append -std=c++11 if {${configure.cxx_stdlib} eq "libstdc++"} { # *clang* when using libstdc++ do not seem to support C++11; # C++11 support seems to need GCC 4.7+ when using libstdc++; # could use C++0x support on GCC4.[56], but just ignore it since # there are newer compilers already in place as defaults. # Blacklist GCC compilers not supporting C++11 and all CLANG. # This is probably not necessary, but it's good practice. compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]} # and whitelist those we do want to use. wish there were a better way. # these will be used in the order provided. compiler.whitelist macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7 } else { # using libc++; # Blacklist Clang not supporting C++11 in some form and all GCC. compiler.blacklist-append *gcc* {clang < 500} } }