# -*- 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 active_variants 1.1 name gr-osmosdr maintainers michaelld openmaintainer description gr-osmosdr provides support for OsmoSDR hardware within GNU Radio long_description Includes OSMO SDR support GNU Radio source and sink blocks in C++, Python, and GNU Radio Companion (grc). This port also offers a wrapper functionality for the FunCube Dongle, FunCube Dongle Pro+, HackRF, RFSpace, Ettus UHD, and rtl-sdr radios and software. By using gr-osmosdr source you can take advantage of a common software API in your applications independent of the underlying radio hardware. This port is kept up with the gr-osmosdr GIT 'master' branch, which is typically updated weekly to monthly, providing compatibility with GNU Radio release 3.7 API: the gnuradio and gnuradio-devel ports. categories science comms homepage http://sdr.osmocom.org/trac/wiki/GrOsmoSDR license GPL-3 platforms darwin macosx set commit 164a09fc11cec2d8b15b38e8b512fa542d6cecc7 version 20160228 revision 3 distname ${name}-${commit} checksums ${distname}.tar.gz \ rmd160 1971a00f876eac172cf7e19c43bf736e566a01d6 \ sha256 0b10cd56a9c0319ff60f60fcf4f59e996a855b5f7b2efea55afc0d5a876d8bd6 master_sites http://cgit.osmocom.org/gr-osmosdr/snapshot/ # allow gr-osmosdr to work with both gnuradio and gnuradio-devel ... depends_lib-append path:lib/libgnuradio-runtime.dylib:gnuradio # ... but not with gnuradio-next pre-fetch { if {![catch {set installed [lindex [registry_active gnuradio-next] 0]}]} { # gnuradio-next is installed; this version of gr-osmosdr does not work with gnuradio-next ui_msg "\nError: ${name} requires the gnuradio or gnuradio-devel port, and will not work with the gnuradio-next port. deactivate gnuradio-next, and then install or activate gnuradio or gnuradio-devel.\n" return -code error "Invalid port dependency: gnuradio-next" } } livecheck.url http://cgit.osmocom.org/gr-osmosdr/log/?h=master livecheck.version ${commit} livecheck.regex id=(\[a-f0-9\]+).*>HEAD< # 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 # per user concensus: enable all variants except +debug and +universal default_variants +docs +uhd +swig +hackrf +fcdproplus +rtlsdr +bladeRF +airspy +soapysdr +sdrplay # common configure flags configure.args-append \ -DENABLE_IQBALANCE=OFF \ -DENABLE_OSMOSDR=OFF \ -DENABLE_FCD=ON \ -DENABLE_FILE=ON \ -DENABLE_MIRI=OFF \ -DENABLE_RFSPACE=ON \ -DENABLE_REDPITAYA=OFF # specify the Python dependencies depends_lib-append \ port:python27 # 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 ${name} documentation" { depends_build-append \ port:doxygen \ path:bin/dot:graphviz configure.args-append \ -DDOXYGEN_DOT_EXECUTABLE=${prefix}/bin/dot \ -DDOXYGEN_EXECUTABLE=${prefix}/bin/doxygen } if {![variant_isset docs]} { configure.args-append \ -DDOXYGEN_DOT_EXECUTABLE= \ -DDOXYGEN_EXECUTABLE= } variant uhd description "Install ${name} with support for UHD" { # allow uhd or uhd-devel depends_lib-append \ path:lib/libuhd.dylib:uhd # require gnuradio to also have this variant require_active_variants \ path:lib/libgnuradio-runtime.dylib:gnuradio uhd configure.args-append \ -DENABLE_UHD=ON \ -DGNURADIO_UHD_INCLUDE_DIRS=${prefix}/include \ -DGNURADIO_UHD_LIBRARIES=${prefix}/lib/libgnuradio-uhd.dylib \ -DUHD_INCLUDE_DIRS=${prefix}/include/uhd \ -DUHD_LIBRARIES=${prefix}/lib/libuhd.dylib } if {![variant_isset uhd]} { configure.args-append \ -DENABLE_UHD=OFF \ -DGNURADIO_UHD_INCLUDE_DIRS= \ -DGNURADIO_UHD_LIBRARIES= \ -DUHD_INCLUDE_DIRS= \ -DUHD_LIBRARIES= } variant swig description "Install ${name} with support for SWIG-base Python bindings" { depends_lib-append \ port:swig-python # require gnuradio to also have this variant require_active_variants \ path:lib/libgnuradio-runtime.dylib:gnuradio swig configure.args-append \ -DSWIG_EXECUTABLE=${prefix}/bin/swig } if {![variant_isset swig]} { configure.args-append \ -DSWIG_EXECUTABLE= } variant hackrf description "Install ${name} with support for hackrf" { depends_lib-append port:hackrf configure.args-append -DENABLE_HACKRF=ON } if {![variant_isset hackrf]} { configure.args-append -DENABLE_HACKRF=OFF } variant fcdproplus description "Install ${name} with support for FunCube Dongle Pro+ (fcdproplus)" { depends_lib-append port:gr-fcdproplus configure.args-append -DENABLE_FCDPP=ON } if {![variant_isset fcdproplus]} { configure.args-append -DENABLE_FCDPP=OFF } variant rtlsdr description "Install ${name} with support for rtl-sdr" { depends_lib-append port:rtl-sdr configure.args-append -DENABLE_RTL=ON -DENABLE_RTL_TCP=ON } if {![variant_isset rtlsdr]} { configure.args-append -DENABLE_RTL=OFF -DENABLE_RTL_TCP=OFF } variant bladeRF description "Install ${name} with support for bladeRF" { depends_lib-append port:bladeRF configure.args-append -DENABLE_BLADERF=ON } if {![variant_isset bladeRF]} { configure.args-append -DENABLE_BLADERF=OFF } variant airspy description "Install ${name} with support for airspy" { depends_lib-append port:airspy configure.args-append -DENABLE_AIRSPY=ON } if {![variant_isset airspy]} { configure.args-append -DENABLE_AIRSPY=OFF } variant soapysdr description "Install ${name} with support for SoapySDR" { depends_lib-append port:soapysdr configure.args-append -DENABLE_SOAPY=ON } if {![variant_isset soapysdr]} { configure.args-append -DENABLE_SOAPY=OFF } variant sdrplay description "Install ${name} with support for SDRplay" { depends_lib-append port:sdrplay configure.args-append -DENABLE_NONFREE=ON -DENABLE_SDRPLAY=ON } if {![variant_isset sdrplay]} { configure.args-append -DENABLE_NONFREE=OFF -DENABLE_SDRPLAY=OFF }