341.6. gqrx-2.17.7
Software radio receiver with a spectrum and waterfall, over GNU Radio and gr-osmosdr
| Version | 2.17.7, release 1 |
| Shelf | sdr — SDR DSP libraries, GNU Radio and its blocks, receivers, decoders and signal analysis |
| Phase | 44_apps (Applications), 357 of 422 in build order |
| Licence | GPL-3.0-or-later AND Apache-2.0 |
| Homepage | https://gqrx.dk/ |
| Build time | 1.3 SBU |
| Installed size | 2.3 MiB in 12 files |
| Recipe | ports/core/sdr/gqrx/kpkgbuild |
About
Gqrx is a software-defined radio receiver: it tunes and demodulates AM, FM and SSB with a live spectrum and waterfall. It is a Qt 6 program built on GNU Radio, and it reaches the radio hardware through gr-osmosdr, which in turn drives RTL-SDR, Airspy, HackRF, bladeRF, USRP and anything SoapySDR supports.
Sources
gqrx-2.17.7.tar.gz(3.5 MiB)
sha2564aaab8a3c185cd99d6dda56d95b8f1b20128a6acfd2e86e0349d432a5fdcbce4
upstream: https://github.com/gqrx-sdr/gqrx/archive/refs/tags/v2.17.7.tar.gz
archive copy: sources-4/sdr--gqrx-2.17.7.tar.gz
Dependencies
Depends on: cmake, ninja, pkgconf, qt6-qtbase, qt6-qtsvg, qt6-qtwayland, gnuradio, gr-osmosdr, boost, libvolk, libpulse, librsvg.
Required by: no port names it.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install gqrx'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/sdr/gqrx.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/sdr/gqrx
echo '4aaab8a3c185cd99d6dda56d95b8f1b20128a6acfd2e86e0349d432a5fdcbce4 gqrx-2.17.7.tar.gz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/gqrx
SRC=$SRC_ROOT/gqrx-2.17.7
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf gqrx-2.17.7.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
cmake -B build -G Ninja \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_POLICY_DEFAULT_CMP0167=NEW \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DFORCE_QT6=ON \
-DLINUX_AUDIO_BACKEND=Pulseaudio \
-DCUSTOM_AIRSPY_KERNELS=OFF \
-DCCACHE=OFF \
-Wno-dev
ninja -C build
DESTDIR=$PKG ninja -C build install
install -Dm644 resources/gqrx.1 "$PKG/usr/share/man/man1/gqrx.1"
for s in 32 48 64 128 256; do
install -d "$PKG/usr/share/icons/hicolor/${s}x${s}/apps"
rsvg-convert -w $s -h $s resources/icons/gqrx.svg \
-o "$PKG/usr/share/icons/hicolor/${s}x${s}/apps/gqrx.png"
done
cat > "$PKG/usr/share/applications/dk.gqrx.gqrx.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Gqrx
GenericName=Software Defined Radio
Comment=Receive AM, FM and SSB with a spectrum and waterfall display
Exec=gqrx
Terminal=false
Icon=gqrx
Categories=AudioVideo;Audio;Qt;HamRadio;
Keywords=SDR;Radio;HAM;receiver;waterfall;scanner;rtl-sdr;
StartupWMClass=dk.gqrx.gqrx
DESKTOP
chmod 644 "$PKG/usr/share/applications/dk.gqrx.gqrx.desktop"
test -x "$PKG/usr/bin/gqrx"
The switches, and why each is set:
-DCMAKE_POLICY_DEFAULT_CMP0167=NEW— makes everyfind_package(Boost)in the configure, including the ones GNU Radio’s installed CMake package makes, read Boost’s own config package instead of CMake’s old FindBoost module. The module looks for alibboost_systemlibrary file, and Boost.System is header-only, so the search through it fails. gnuradio sets the same policy for the same reason.-DFORCE_QT6=ON— require Qt 6. Without it, configure tries Qt 6 quietly and falls back to Qt 5 when Qt 6 is not found, which would build against a different toolkit thandependsnames.-DLINUX_AUDIO_BACKEND=Pulseaudio— play demodulated audio through the PulseAudio API (libpulse), which PipeWire serves on KDOS (see Audio). The other choices are PortAudio and GNU Radio’s own audio sink. Pulseaudio is also upstream’s default.-DCUSTOM_AIRSPY_KERNELS=OFF— leave out what upstream calls “non-standard Airspy optimizations”. With it on (upstream’s default), gqrx sets the source’s bandwidth to its decimation rate whenever the input device string containsairspy, and gr-osmosdr’s Airspy source answers by loading one of its built-in IQ conversion filter kernels into the radio. Off, the radio keeps its own filter.-DCCACHE=OFF— gqrx’s configure looks for accacheprogram and, when it finds one, sets it as the compiler launcher itself. Presetting the cache variable toOFFstops that search, so whether a compile goes through ccache is left to theCMAKE_C_COMPILER_LAUNCHERandCMAKE_CXX_COMPILER_LAUNCHERthe build environment sets.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/gqrx, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf gqrx-2.17.7-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/gqrx, and runs the triggers its paths call for.
Contents
Installed programs: gqrx.
Installed directories: /usr/share/licenses/gqrx.
Short descriptions
gqrx |
Software Defined Radio GUI application |
Notes
Upstream’s manual page resources/gqrx.1 is not installed by its build, so build.sh installs it. Upstream installs a dk.gqrx.gqrx.desktop, and the recipe writes its own over it. gqrx sets no desktop file name, so Qt’s Wayland plugin makes the app id from the reversed organisation domain (gqrx.dk) and the executable’s name: dk.gqrx.gqrx, which the entry repeats in StartupWMClass. The SVG icon is also rasterised to PNGs from 32 to 256 pixels (see Desktop entries belong to the port).