source: trunk/dports/science/gqrx/Portfile

Last change on this file was 154357, checked in by michaelld@…, 11 months ago

gqrx:
+ devel has moved to using Qt5 only, so just use Qt5 throughout even though release can technically support Qt4;
+ rev-bump release for Qt5 change;
+ update devel to ce985924 (20161027).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1# -*- 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
2# $Id: Portfile 154357 2016-10-28 13:14:44Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6PortGroup           qmake5 1.0
7
8name                gqrx
9maintainers         michaelld openmaintainer
10
11description         Gqrx is a software defined radio (SDR) receiver using GNU Radio, OSMOSDR, and Qt5.
12long_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.}
13
14categories          science comms
15license             GPL-3 BSD
16platforms           darwin macosx
17
18# common directory for storing downloaded tarballs
19dist_subdir         gqrx
20
21if {${subport} eq ${name}} {
22
23    github.setup    csete gqrx 2.5.3 v
24    revision        3
25    checksums       \
26        rmd160 99c662f04fa924c95f5b419a90f2816588003ca3 \
27        sha256 427de19213539edd56ebc0977b5844a55cc100a6cb7bfc38df3f0e0e0f52bd46
28
29    patchfiles-append   patch-gqrx.pro.release.diff
30
31    # bump the epoch because I moved the version from 20160113 to 2.5.1
32    epoch           1
33
34    long_description ${long_description} ${subport} \
35provides the release version, which is typically updated every month or so.
36    conflicts       gqrx-devel
37
38}
39
40subport gqrx-devel {
41
42    github.setup        csete gqrx ce9859248e3593fd3b73a847292727bcb1c84af4
43    version             20161027
44    checksums           rmd160 5a593797fdf06d459922b748a1a71af009f05563 \
45                        sha256 bf795d8f5c17d875f1a3902de86506eff239b9bcdbf88a86971b355e94e565d3
46
47    patchfiles-append   patch-gqrx.pro.devel.diff
48
49    long_description    ${long_description}  \
50        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.
51    conflicts           gqrx
52
53}
54
55# allow gqrx to work with both gnuradio and gnuradio-devel ...
56
57depends_lib-append  port:gr-osmosdr \
58    path:lib/libgnuradio-audio.dylib:gnuradio
59
60# ... but not with gnuradio-next
61
62pre-fetch {
63    if {![catch {set installed [lindex [registry_active gnuradio-next] 0]}]} {
64        # gnuradio-next is installed; this version of gr-osmosdr does not work with gnuradio-next
65        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"
66        return -code error "Invalid port dependency: gnuradio-next"
67    }
68}
69
70# override githib PortGroup homepage setting
71
72homepage            http://gqrx.dk/
73
74post-patch {
75
76    # set install location
77
78    reinplace "s|@APPSDIR@|${qt_apps_dir}|g" ${worksrcpath}/gqrx.pro
79
80    # remove old version setting
81
82    reinplace "s|\[ #\]*VER =.*||g" ${worksrcpath}/gqrx.pro
83
84    # set version
85
86    if {${name} eq ${subport}} {
87        set VERSION_INFO "release-${version}"
88    } else {
89        set VERSION_INFO "git-[string range ${github.version} 0 7](${version})"
90    }
91
92    reinplace "s|\$\${VER}|MacPorts-${VERSION_INFO}|g" ${worksrcpath}/gqrx.pro
93
94    # set arch type(s)
95
96    set qt_arch_types {[string map {i386 x86} [get_canonical_archs]]}
97    reinplace "s|@ARCHES@|${qt_arch_types}|g" ${worksrcpath}/gqrx.pro
98
99}
100
101configure.post_args gqrx.pro
102
103post-configure {
104
105    # remove indirect dependency on Volk added by pkgconfig
106
107    reinplace "s|-lvolk ||g" ${worksrcpath}/Makefile
108
109}
110
111post-destroot {
112
113    # link the executable back to $qt_bins_dir, and, if $qt_dir is
114    # not $prefix, back to $prefix/bin too.
115
116    xinstall -m 755 -d ${destroot}${qt_bins_dir}
117    ln -s ${qt_apps_dir}/Gqrx.app/Contents/MacOS/Gqrx \
118        ${destroot}${qt_bins_dir}
119
120    if {${qt_dir} ne ${prefix}} {
121        xinstall -m 755 -d ${destroot}${prefix}/bin
122        ln -s ${qt_apps_dir}/Gqrx.app/Contents/MacOS/Gqrx \
123            ${destroot}${prefix}/bin
124    }
125}
Note: See TracBrowser for help on using the repository browser.