/
Portfile
160 lines (98 loc) · 5.5 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# -*- 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 qmake 1.0
PortGroup active_variants 1.1
PortGroup github 1.0
name gqrx
maintainers michaelld openmaintainer
description Gqrx is a software defined radio (SDR) receiver using GNU Radio, OSMOSDR, and Qt4.
categories science comms
license GPL-3 BSD
platforms darwin macosx
set description_common {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 Qt GUI toolkit. Gqrx is free and open source software and anyone is invited to hack the source code to suit their needs.}
if {${subport} ne "gqrx-devel"} {
# patch to fix usage of real and imag to be compatible with both
# libstdc++ and libc++ runtimes; this patch is included with the
# devel from upstream.
# configure.cxx_stdlib works with MacPorts SVN trunk, not release;
# do something else until both work.
# if {[info exists configure.cxx_stdlib] && [string match libc++ ${configure.cxx_stdlib}]}
patchfiles-append patch-fix-real-imag.diff
}
post-patch {
# set install location
reinplace "s|@APPSDIR@|${qt_apps_dir}|g" ${worksrcpath}/gqrx.pro
# set version
reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/gqrx.pro
# set arch type(s)
reinplace "s|@ARCHES@|${qt_arch_types}|g" ${worksrcpath}/gqrx.pro
}
configure.post_args gqrx.pro
post-destroot {
# link the executable back to $qt_bins_dir
ln -s ${qt_apps_dir}/Gqrx.app/Contents/MacOS/Gqrx \
${destroot}${qt_bins_dir}
}
if {${subport} eq ${name}} {
long_description ${description} \
This port is kept up with the latest Gqrx tagged release, is typically updated every few months, and provides compatibility with the GNU Radio release 3.7 API: the gnuradio and gnuradio-devel ports. ${description_common}
github.setup csete gqrx 2.2.0 v
checksums rmd160 f8fc0f253734ad5dbe15155fe4e3de8b0c9bac72 \
sha256 6f3114a7476cd1deaaaa37d08669ae44bdc387ce49f24a1db6ca2cf054467c45
conflicts gqrx-legacy gqrx-devel
patchfiles-append patch-gqrx.pro.diff
}
subport gqrx-devel {
long_description ${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. ${description_common}
github.setup csete gqrx 57e4e6ef2ea242126984014fbc979d9c19f25f07
version 2.2.1_20140306
checksums rmd160 57ad3ccf04b3367756834a2f0b4ed53985e34d05 \
sha256 79877b4197fe60d61049a63ed86922759aa2efef92c4adf9ced46ccd6a9100a2
# fix port name set by github PortGroup
name gqrx-devel
conflicts gqrx-legacy gqrx
patchfiles-append patch-gqrx.pro-devel.diff
}
subport gqrx-legacy {
long_description ${description} \
This port is for the last Gqrx commit providing compatibility with GNU Radio release 3.6 API: the gnuradio-legacy port. ${description_common}
github.setup csete gqrx 90ea4cfd685dffeac21cf1d860228f6eead1e4a5
# fix port name set by github PortGroup
name gqrx-legacy
version 2.0_20130703
checksums rmd160 eba005dfad221997a7d80a8d8cd132cfea209667 \
sha256 83403f9d2c05d10a8d8df76a4282c41b9d3547ceccaebecc92c1d3f0835a6f59
conflicts gqrx gqrx-devel
# gqrx-legacy works with *-legacy only
depends_lib-append port:gnuradio-legacy \
port:gr-osmosdr-legacy
patchfiles-append patch-gqrx.pro-legacy.diff
# no version checking for now
livecheck.type none
}
# override githib PortGroup homepage setting
homepage http://gqrx.dk/
if {${subport} ne "gqrx-legacy"} {
# 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-legacy or gnuradio-next
pre-fetch {
if {![catch {set installed [lindex [registry_active gnuradio-legacy] 0]}]} {
# gnuradio-legacy is installed; this version of gr-osmosdr does not work with gnuradio-legacy
ui_msg "\nError: ${name} requires the gnuradio or gnuradio-devel port, and will not work with the gnuradio-legacy port. deactivate gnuradio-legacy, and then install or activate gnuradio or gnuradio-devel.\n"
return -code error "Invalid port dependency: gnuradio-legacy"
}
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"
}
}
variant portaudio description "Use PortAudio 2.0 for the audio interface" {
depends_lib-append port:portaudio
configure.args-append AUDIO_BACKEND=portaudio
}
}