# -*- 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: Portfile 154357 2016-10-28 13:14:44Z michaelld@macports.org $ PortSystem 1.0 PortGroup github 1.0 PortGroup qmake5 1.0 name gqrx maintainers michaelld openmaintainer description Gqrx is a software defined radio (SDR) receiver using GNU Radio, OSMOSDR, and Qt5. long_description {Gqrx is a software defined radio receiver for Funcube Dongle (FCD), RTL2832U-based DVB-T devices (RTL-SDR), Universal Software Radio Peripherals (USRP) and Osmo SDR devices. Gqrx is powered by GNU Radio and the Qt5 GUI toolkit. Gqrx is free and open source software and anyone is invited to hack the source code to suit their needs.} categories science comms license GPL-3 BSD platforms darwin macosx # common directory for storing downloaded tarballs dist_subdir gqrx if {${subport} eq ${name}} { github.setup csete gqrx 2.5.3 v revision 3 checksums \ rmd160 99c662f04fa924c95f5b419a90f2816588003ca3 \ sha256 427de19213539edd56ebc0977b5844a55cc100a6cb7bfc38df3f0e0e0f52bd46 patchfiles-append patch-gqrx.pro.release.diff # bump the epoch because I moved the version from 20160113 to 2.5.1 epoch 1 long_description ${long_description} ${subport} \ provides the release version, which is typically updated every month or so. conflicts gqrx-devel } subport gqrx-devel { github.setup csete gqrx ce9859248e3593fd3b73a847292727bcb1c84af4 version 20161027 checksums rmd160 5a593797fdf06d459922b748a1a71af009f05563 \ sha256 bf795d8f5c17d875f1a3902de86506eff239b9bcdbf88a86971b355e94e565d3 patchfiles-append patch-gqrx.pro.devel.diff long_description ${long_description} \ This port is kept up with the Gqrx GIT 'master' branch, is typically updated weekly to monthly, and provides compatibility with the GNU Radio release 3.7 API: the gnuradio and gnuradio-devel ports. conflicts gqrx } # allow gqrx to work with both gnuradio and gnuradio-devel ... depends_lib-append port:gr-osmosdr \ path:lib/libgnuradio-audio.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" } } # override githib PortGroup homepage setting homepage http://gqrx.dk/ post-patch { # set install location reinplace "s|@APPSDIR@|${qt_apps_dir}|g" ${worksrcpath}/gqrx.pro # remove old version setting reinplace "s|\[ #\]*VER =.*||g" ${worksrcpath}/gqrx.pro # set version if {${name} eq ${subport}} { set VERSION_INFO "release-${version}" } else { set VERSION_INFO "git-[string range ${github.version} 0 7](${version})" } reinplace "s|\$\${VER}|MacPorts-${VERSION_INFO}|g" ${worksrcpath}/gqrx.pro # set arch type(s) set qt_arch_types {[string map {i386 x86} [get_canonical_archs]]} reinplace "s|@ARCHES@|${qt_arch_types}|g" ${worksrcpath}/gqrx.pro } configure.post_args gqrx.pro post-configure { # remove indirect dependency on Volk added by pkgconfig reinplace "s|-lvolk ||g" ${worksrcpath}/Makefile } post-destroot { # link the executable back to $qt_bins_dir, and, if $qt_dir is # not $prefix, back to $prefix/bin too. xinstall -m 755 -d ${destroot}${qt_bins_dir} ln -s ${qt_apps_dir}/Gqrx.app/Contents/MacOS/Gqrx \ ${destroot}${qt_bins_dir} if {${qt_dir} ne ${prefix}} { xinstall -m 755 -d ${destroot}${prefix}/bin ln -s ${qt_apps_dir}/Gqrx.app/Contents/MacOS/Gqrx \ ${destroot}${prefix}/bin } }