# -*- 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.7.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-legacy gnuradio-next gnuradio-devel checksums \ rmd160 18383f299f75ecc8d11345872b9991f7eb44f321 \ sha256 461681cd7bdff80d07ba24c9b420f4ddcd5f869fc1c4ff671d2f155ff44d14ec # 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-legacy { name gnuradio-legacy github.setup gnuradio gnuradio 3.6.5.1 v revision 12 long_description ${description}: \ This port is for GNU Radio ${version}, reflecting the final release in the 3.6 API series. It is for legacy purposes only\; please consider updating your code to the GNU Radio 3.7 API. conflicts gnuradio gnuradio-next gnuradio-devel checksums \ rmd160 f5d5890fca81e5c379d32b3504976bc24b7ac12f \ sha256 1af7840b9b46aaa85786bf58274da4334b84192e04990b4f3132c1a84b84956f # fix INCLUDE_DIRECTORIES path order such that internal # directories are searched before ${prefix}/include or system # ones. patchfiles-append patch-path-order.diff # add checks for xgetbv instruction and cvtpi32_ps intrinsic patchfiles-append patch-volk_lib_CMakeLists.txt.legacy.diff # fix VOLK arch generators to include clang patchfiles-append patch-volk_gen_archs.xml.legacy.diff # fix SWIG include of std_string to come before anything else, # otherwise it will not be properly defined later on. patchfiles-append patch-gnuradio-core_swig_include-std_string.i.diff # fix friend function API declaration patchfiles-append patch-gnuradio-core_src_lib_io_ppio_ppdev.h.diff # 3.6.5.1 is the last of the 3.6 API development livecheck.type none } 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-legacy gnuradio gnuradio-next github.setup gnuradio gnuradio 55d8f482f5acf33b8f629556a4fa5019908bb4be version 20150710 checksums \ rmd160 9e17aad95ed72beb1fee6012b232cdc65514c82e \ sha256 c7db4306eebb56b600d8582fc9856679699618a7b5204c26b4990bc11ed34921 } 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-legacy gnuradio gnuradio-devel github.setup gnuradio gnuradio 85d46c7a5aa0a25462014922a3e0706cdf92db76 version 20150710 checksums \ rmd160 4f521f824fdc0ad01111ddd244deb602df794643 \ sha256 c9966524adf78688699ed6bbc8de7629002ff417a0378b2891c8e59704f8c6c8 # overload the github livecheck URL with the correct branch livecheck.url ${github.homepage}/commits/next.atom } # Volk split off on 2015-03-29, so it is relevant for devel and next, # and will come with release 3.7.6.2 / 3.7.7. legacy will always # provide Volk. if {${subport} eq "gnuradio-legacy"} { # now conflicts with the Volk port conflicts volk volk-devel # always enable VOLK, with or without orc configure.args-append -DENABLE_VOLK=ON default_variants +orc variant orc description "Install GNU Radio Volk with support for ORC" { depends_lib-append \ port:orc configure.args-append \ -DORCC_EXECUTABLE=${prefix}/bin/orcc } if {![variant_isset orc]} { configure.args-append \ -DORCC_EXECUTABLE= } } else { depends_lib-append path:lib/libvolk.dylib:volk configure.args-append \ -DENABLE_INTERNAL_VOLK=OFF # can be removed 2016-Apr-01 variant orc description "deprecated variant" {} } if {${subport} ne "gnuradio-legacy"} { # 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 # remove SIZE_T_32 check for SWIG; seems to help on older # 32/64 OSs; this is fixed for SWIG >= 3.0.0 in GNU Radio # devel and next as of 2015-04-28 (6277665c). if {${subport} eq "gnuradio"} { patchfiles-append patch-remove-SIZE_T_32.diff } # 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 } else { # patches for devel and next (which are kept aligned for now) patchfiles-append \ patch-cmake-expand.devel.diff } # 3.7 API variants variant ctrlport description {Enable control port enhancements (EXPERIMENTAL)} {} if {[variant_isset ctrlport]} { # 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 } else { configure.args-append -DENABLE_GR_CTRLPORT=OFF } variant performance_counters description {Enable support for performance counters (EXPERIMENTAL)} {} 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 } else { configure.args-append \ -DENABLE_PERFORMANCE_COUNTERS=OFF } variant zeromq description {Install GNU Radio with support for the ZeroMQ lightweight messaging kernel (EXPERIMENTAL)} {} if {[variant_isset zeromq]} { 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 } else { configure.args-append \ -DENABLE_GR_ZEROMQ=OFF } } # override githib PortGroup homepage setting homepage http://gnuradio.org/ use_parallel_build yes depends_lib-append \ port:boost \ port:cppunit \ port:fftw-3-single # 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; # for 3.7+, but will not hurt for legacy. configure.args-append \ -DCMAKE_MODULES_DIR=${prefix}/share/cmake 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=${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 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=${prefix}/Library/Frameworks/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 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} } }