341.4. sdrangel-7.27.2
Software radio receiver, transmitter and analyser with decoders for ADS-B, AIS, APRS, FT8, DATV and more
| Version | 7.27.2, release 1 |
| Shelf | sdr — SDR DSP libraries, GNU Radio and its blocks, receivers, decoders and signal analysis |
| Phase | 44_apps (Applications), 355 of 422 in build order |
| Licence | GPL-3.0-or-later |
| Homepage | https://www.sdrangel.org/ |
| Build time | 59.4 SBU |
| Installed size | 166.7 MiB in 286 files |
| Recipe | ports/core/sdr/sdrangel/kpkgbuild |
About
SDRangel is a Qt 6 software-defined radio receiver, transmitter and analyser. Every radio, demodulator, modulator and tool is a plugin under /usr/lib/sdrangel/plugins: decoders for ADS-B, AIS, APRS, FT8, DAB, DATV, DSD, FreeDV, M17 and many more, a satellite and star tracker, and a map. sdrangel is the graphical program and sdrangelsrv the same engine as a headless server driven over its REST API.
Sources
sdrangel-7.27.2.tar.gz(131.8 MiB)
sha256eec945efc55d743cc9b0c6e7a8a9e20c9d289d4a70dfb907c3b923a6b555a8ff
upstream: https://github.com/f4exb/sdrangel/archive/refs/tags/v7.27.2.tar.gz
archive copy: sources-4/sdr--sdrangel-7.27.2.tar.gz
Dependencies
Depends on: cmake, ninja, pkgconf, qt6-qtbase, qt6-qtwayland, qt6-qtsvg, qt6-qtdeclarative, qt6-qtwebsockets, qt6-qtmultimedia, qt6-qtpositioning, qt6-qtlocation, qt6-qtcharts, qt6-qtserialport, qt6-qtscxml, qt6-qtspeech, mesa, libglvnd, boost, fftw, libusb, hidapi, opus, flac, zlib, ffmpeg, codec2, libunwind-nongnu, airspy, bladerf, hackrf, rtl-sdr, soapysdr, airspyhf, limesuite, libiio, libmirisdr, libperseus-sdr, uhd, libfobos, cm256cc, dsdcc, mbelib, serialdv, libdab, faad2, sgp4, aptdec, cspice, ggmorse, libinmarsatc, rnnoise, libsigmf, opencv, librsvg, hamlib.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
sgp4-range-rate.patch— the satellite tracker reads the topocentric range rate astopo.range_rate; the sgp4 library the tree carries names that memberrangeRate, and the patch reads it under that name.
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 sdrangel'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/sdr/sdrangel.
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/sdrangel
echo 'eec945efc55d743cc9b0c6e7a8a9e20c9d289d4a70dfb907c3b923a6b555a8ff sdrangel-7.27.2.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/sdrangel
SRC=$SRC_ROOT/sdrangel-7.27.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf sdrangel-7.27.2.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:
patch -p1 -i "$PORT_SRC/sgp4-range-rate.patch"
case "$(uname -m)" in
aarch64) _march=armv8-a ;;
*) _march=x86-64 ;;
esac
export CXXFLAGS="$CXXFLAGS -DFLATBUFFERS_LOCALE_INDEPENDENT=0"
cmake -B build -G Ninja \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_POLICY_DEFAULT_CMP0167=NEW \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DARCH_OPT=$_march \
-DENABLE_QT6=ON \
-DENABLE_EXTERNAL_LIBRARIES=OFF \
-DENABLE_LIBUNWIND=ON \
-DDEBUG_OUTPUT=OFF \
-DBUILD_GUI=ON \
-DBUILD_SERVER=ON \
-DBUILD_BENCH=OFF \
-DBUNDLE=OFF \
-DENABLE_PROFILER=OFF \
-DRX_SAMPLE_24BIT=ON \
-DVKFFT_BACKEND=1 \
-DENABLE_AIRSPY=ON \
-DENABLE_BLADERF=ON \
-DENABLE_HACKRF=ON \
-DENABLE_RTLSDR=ON \
-DENABLE_SOAPYSDR=ON \
-DENABLE_FUNCUBE=ON \
-DENABLE_METIS=ON \
-DENABLE_AARONIARTSA=ON \
-DENABLE_AIRSPYHF=ON \
-DENABLE_LIMESUITE=ON \
-DENABLE_IIO=ON \
-DENABLE_MIRISDR=ON \
-DENABLE_PERSEUS=ON \
-DENABLE_SDRPLAY=OFF \
-DENABLE_XTRX=OFF \
-DENABLE_USRP=ON \
-DENABLE_FOBOS=ON \
-DENABLE_PACK_MIRSDRAPI=OFF \
-DCSPICE_INCLUDE_DIR=/usr/include/cspice \
-DCM256CC_DIR=/usr \
-DCMAKE_DISABLE_FIND_PACKAGE_CUDAToolkit=ON \
-DCMAKE_DISABLE_FIND_PACKAGE_Qt6WebEngineCore=ON \
-DCMAKE_DISABLE_FIND_PACKAGE_Qt6WebEngineQuick=ON \
-DCMAKE_DISABLE_FIND_PACKAGE_Qt6WebEngineWidgets=ON \
-DCCACHE=OFF \
-Wno-dev
ninja -C build
DESTDIR=$PKG ninja -C build install
for s in 48 64 128 256 512; do
install -d "$PKG/usr/share/icons/hicolor/${s}x${s}/apps"
rsvg-convert -w $s -h $s cmake/cpack/sdrangel_icon.svg \
-o "$PKG/usr/share/icons/hicolor/${s}x${s}/apps/sdrangel_icon.png"
done
cat > "$PKG/usr/share/applications/sdrangel.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=SDRangel
GenericName=SDR Receiver, Transmitter and Analyser
Comment=Receive, transmit and decode radio: ADS-B, AIS, APRS, FT8, DATV, FreeDV and more
Exec=sdrangel
Terminal=false
Icon=sdrangel_icon
Categories=Network;HamRadio;Qt;
Keywords=SDR;radio;transceiver;ADS-B;AIS;APRS;FT8;DATV;FreeDV;
StartupWMClass=sdrangel
DESKTOP
chmod 644 "$PKG/usr/share/applications/sdrangel.desktop"
test -x "$PKG/usr/bin/sdrangel"
test -x "$PKG/usr/bin/sdrangelsrv"
test -n "$(find "$PKG/usr/lib/sdrangel/plugins" -name '*inputrtlsdr.so' | head -1)"
for _p in inputairspyhf inputlimesdr inputplutosdr inputsdrplay inputperseus \
inputusrp inputFOBOS demoddsd demoddab demodapt demodinmarsat \
sigmffilesink featureambe featuremorsedecoder featuredenoiser \
featurestartracker featurelimerfe modatv; do
test -n "$(find "$PKG/usr/lib/sdrangel/plugins" -name "*$_p.so" | head -1)"
done
The switches, and why each is set:
CXXFLAGS="$CXXFLAGS -DFLATBUFFERS_LOCALE_INDEPENDENT=0"— The headers of libsigmf include FlatBuffers’ own, which take_XOPEN_VERSION 700to mean thatstrtoll_landstrtoull_lexist; musl has neither. With the macro at0, FlatBuffers uses the plainstrtollandstrtoull.-DCMAKE_POLICY_DEFAULT_CMP0167=NEW— Find Boost through theBoostConfig.cmakethat boost installs, not CMake’s ownFindBoostmodule.-DARCH_OPT=$_march—ARCH_OPTis passed straight to-march, and upstream’s default,native, ties the binary to the processor of the build machine.build.shnames the architecture’s baseline instead:x86-64, orarmv8-aon aarch64.-DENABLE_QT6=ON— Build against Qt 6; upstream’s default is Qt 5.-DENABLE_EXTERNAL_LIBRARIES=OFF— Use installed libraries only. In itsONandAUTOmodes the build clones and builds its helper libraries from git at configure time. Each optional library is then found from its port: codec2 (FreeDV, M17), ffmpeg (DATV receive), Opus, FLAC, zlib, hidapi (FUNcube), cm256cc (the remote input, output, sink and source), dsdcc and mbelib (DSD), serialdv (AMBE), libdab and faad2 (DAB), sgp4 (satellite tracker), aptdec (APT), cspice (star tracker), ggmorse (Morse decoder), libinmarsatc (Inmarsat-C), rnnoise (denoiser), libsigmf (SigMF file input and sink) and opencv (ATV and DATV transmit).-DENABLE_LIBUNWIND=ON— Stack traces in the exception handlers, through the libunwind-nongnu port.-DDEBUG_OUTPUT=OFF,-DENABLE_PROFILER=OFF,-DBUNDLE=OFF— No debug messages, no runtime profiler, and no self-contained distribution bundle; all upstream’s defaults.-DBUILD_GUI=ON,-DBUILD_SERVER=ON,-DBUILD_BENCH=OFF— Buildsdrangelandsdrangelsrv, but not the benchmark program.-DRX_SAMPLE_24BIT=ON— 24-bit internal receive DSP, upstream’s default. The Perseus input is built only with it.-DVKFFT_BACKEND=1— The CUDA backend for vkFFT, upstream’s default, rather than Vulkan. CUDAToolkit is never looked up (below), so no GPU FFT engine is built.-DENABLE_AIRSPY=ON— and the otherENABLE_<radio>=ONswitches: Airspy, Airspy HF+, bladeRF, HackRF, RTL-SDR, LimeSuite, PlutoSDR through libiio, MiriSDR (which also drives the old SDRplay radios as thesdrplayinput), Perseus, USRP through uhd, SoapySDR and FUNcube, each from its port; Fobos, which loads libfobos at run time; and Metis and the Aaronia RTSA, which are reached over the network.-DENABLE_SDRPLAY=OFF,-DENABLE_XTRX=OFF— No SDRplay API 3 input and no XTRX input; their libraries are not ports.-DENABLE_PACK_MIRSDRAPI=OFF— Do not include the closedmirsdr-apilibrary, which upstream marks for personal use only.-DCSPICE_INCLUDE_DIR=/usr/include/cspice— cspice keeps its headers in/usr/include/cspice, which the bundled find module does not search.-DCM256CC_DIR=/usr— Search that installation for cm256cc directly. Without it, the bundled find module first asks pkg-config for a minimum version oflibcm256cc, and thelibcm256cc.pcthat the cm256cc port installs states a lower version than its release, so the check fails and cm256cc counts as missing.-DCMAKE_DISABLE_FIND_PACKAGE_CUDAToolkit=ON— Never look for CUDA, so the CUDA vkFFT engine is never built.-DCMAKE_DISABLE_FIND_PACKAGE_Qt6WebEngineCore=ON— with the same forQt6WebEngineQuickandQt6WebEngineWidgets: do not use Qt WebEngine, although qt6-qtwebengine is a port. It serves only the sky map and the 3D view of the map feature; the map keeps its 2D view without it.-DCCACHE=OFF— Presets the variable upstream’sfind_program(CCACHE ...)would fill, so the build does not set ccache as its compiler launcher itself. The tree’s ccache arrives throughCMAKE_C_COMPILER_LAUNCHERandCMAKE_CXX_COMPILER_LAUNCHERin the build environment.
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/sdrangel, 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 sdrangel-7.27.2-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/sdrangel, and runs the triggers its paths call for.
Contents
Installed programs: sdrangel, sdrangelsrv.
Installed directories: /usr/lib/sdrangel, /usr/share/licenses/sdrangel, /usr/share/sdrangel.
Notes
The remote input, remote sink, remote source and remote output plugins are built only when the compiler has SSE3 or NEON. ARCH_OPT’s x86-64 baseline defines no SSE3, so those four are built on aarch64 only.
A radio, decoder or tool whose library the configuration does not find is dropped with only a status message. build.sh therefore ends by checking that sdrangel and sdrangelsrv are executable and that a list of plugins is in the package (the RTL-SDR, Airspy HF+, LimeSDR, PlutoSDR, old SDRplay, Perseus, USRP and Fobos inputs, the DSD, DAB, APT and Inmarsat demodulators, the SigMF file sink, the AMBE, Morse decoder, denoiser, star tracker and LimeRFE features, and the ATV modulator), so losing the library behind one of those fails the build instead of dropping its plugin in silence.
Upstream’s desktop entry has no StartupWMClass. With no organisation domain set, Qt’s Wayland app id is the executable’s name, sdrangel, which the entry build.sh writes names. The SVG icon is also rasterised to PNGs from 48 to 512 pixels.