Source: readsb Version: 3.16-2 Tags: patch User: [email protected] Usertags: ftcbfs
readsb fails to cross build from source, because it builds for the build architecture. debian/rules does not pass any cross tools to the make invocation. The easiest way of doing so is using dh_auto_build. Even with that change, the upstream Makefile still hard codes the build architecture pkg-config. The attached patch both uses dh_auto_build and makes pkg-config substitutable. Please consider applying it. Helmut
diff -Nru readsb-3.16/debian/changelog readsb-3.16/debian/changelog --- readsb-3.16/debian/changelog 2025-09-02 23:18:24.000000000 +0200 +++ readsb-3.16/debian/changelog 2026-10-30 11:02:56.000000000 +0100 @@ -1,3 +1,12 @@ +readsb (3.16-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross tools to make. + + cross.patch: Make pkg-config substitutable. + + -- Helmut Grohne <[email protected]> Fri, 30 Oct 2026 11:02:56 +0100 + readsb (3.16-2) unstable; urgency=medium * fix gcc-15 compilation (Closes: #1097777) diff -Nru readsb-3.16/debian/patches/cross.patch readsb-3.16/debian/patches/cross.patch --- readsb-3.16/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ readsb-3.16/debian/patches/cross.patch 2026-10-30 11:02:56.000000000 +0100 @@ -0,0 +1,68 @@ +--- readsb-3.16.orig/Makefile ++++ readsb-3.16/Makefile +@@ -17,6 +17,7 @@ + TRACKS_UUID ?= no + PRINT_UUIDS ?= no + ++PKG_CONFIG ?= pkg-config + DIALECT = -std=c11 + CFLAGS = $(DIALECT) -W -Wall -Werror -fno-common -O2 + CFLAGS += -DMODES_READSB_VERSION=\"$(READSB_VERSION)\" +@@ -59,9 +60,9 @@ + CFLAGS += -DDISABLE_INTERACTIVE + else + ifeq ($(UNAME), Darwin) +- LIBS += $(shell pkg-config --libs ncurses 2>/dev/null || echo -lncurses) ++ LIBS += $(shell $(PKG_CONFIG) --libs ncurses 2>/dev/null || echo -lncurses) + else +- LIBS += $(shell pkg-config --libs ncurses) ++ LIBS += $(shell $(PKG_CONFIG) --libs ncurses) + endif + endif + +@@ -123,8 +124,8 @@ + CFLAGS += -I$(RTLSDR_PREFIX)/include + LDFLAGS += -L$(RTLSDR_PREFIX)/lib + else +- CFLAGS += $(shell pkg-config --cflags librtlsdr) +- LDFLAGS += $(shell pkg-config --libs-only-L librtlsdr) ++ CFLAGS += $(shell $(PKG_CONFIG) --cflags librtlsdr) ++ LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L librtlsdr) + endif + + # static linking not well supported, use at own risk +@@ -137,26 +138,26 @@ + + ifeq ($(BLADERF), yes) + SDR_OBJ += sdr_bladerf.o sdr_ubladerf.o +- CFLAGS += $(shell pkg-config --cflags libbladeRF) -DENABLE_BLADERF +- LIBS_SDR += $(shell pkg-config --libs libbladeRF) ++ CFLAGS += $(shell $(PKG_CONFIG) --cflags libbladeRF) -DENABLE_BLADERF ++ LIBS_SDR += $(shell $(PKG_CONFIG) --libs libbladeRF) + endif + + ifeq ($(HACKRF), yes) + SDR_OBJ += sdr_hackrf.o +- CFLAGS += $(shell pkg-config --cflags libhackrf) -DENABLE_HACKRF +- LIBS_SDR += $(shell pkg-config --libs libhackrf) ++ CFLAGS += $(shell $(PKG_CONFIG) --cflags libhackrf) -DENABLE_HACKRF ++ LIBS_SDR += $(shell $(PKG_CONFIG) --libs libhackrf) + endif + + ifeq ($(PLUTOSDR), yes) + SDR_OBJ += sdr_plutosdr.o +- CFLAGS += $(shell pkg-config --cflags libiio libad9361) -DENABLE_PLUTOSDR +- LIBS_SDR += $(shell pkg-config --libs libiio libad9361) ++ CFLAGS += $(shell $(PKG_CONFIG) --cflags libiio libad9361) -DENABLE_PLUTOSDR ++ LIBS_SDR += $(shell $(PKG_CONFIG) --libs libiio libad9361) + endif + + ifeq ($(SOAPYSDR), yes) + SDR_OBJ += sdr_soapy.o +- CFLAGS += $(shell pkg-config --cflags SoapySDR) -DENABLE_SOAPYSDR +- LIBS_SDR += $(shell pkg-config --libs SoapySDR) ++ CFLAGS += $(shell $(PKG_CONFIG) --cflags SoapySDR) -DENABLE_SOAPYSDR ++ LIBS_SDR += $(shell $(PKG_CONFIG) --libs SoapySDR) + endif + + # add custom overrides if user defines them diff -Nru readsb-3.16/debian/patches/series readsb-3.16/debian/patches/series --- readsb-3.16/debian/patches/series 2025-09-02 23:18:24.000000000 +0200 +++ readsb-3.16/debian/patches/series 2026-10-30 11:02:56.000000000 +0100 @@ -1,3 +1,4 @@ reproducible-build.patch spelling.patch nogit.patch +cross.patch diff -Nru readsb-3.16/debian/rules readsb-3.16/debian/rules --- readsb-3.16/debian/rules 2025-09-02 23:18:24.000000000 +0200 +++ readsb-3.16/debian/rules 2026-10-30 11:02:55.000000000 +0100 @@ -60,7 +60,7 @@ dh $@ override_dh_auto_build: - make -j4 $(CONFIG_SWITCH) + dh_auto_build -- $(CONFIG_SWITCH) help2man -N --no-discard-stderr ./viewadsb > debian/viewadsb.1 help2man -N --no-discard-stderr ./readsb > debian/readsb.1

