Source: lowdown Version: 1.1.0-1 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
lowdown fails to cross build from source, because it performs a native build. Since there is a configure script, debhelper concludes that the autoconf build system should be used and that it thus should not pass cross tools to make, but it really should. Also since dh_auto_configure is overridden, passing cross flags there (CC in particular) is required. Last but not least, the pkg-config invocations also need to use the host tools. I'm attaching a patch for your convenience. Helmut
diff --minimal -Nru lowdown-1.1.0/debian/changelog lowdown-1.1.0/debian/changelog --- lowdown-1.1.0/debian/changelog 2023-11-08 07:33:19.000000000 +0100 +++ lowdown-1.1.0/debian/changelog 2024-03-15 07:15:58.000000000 +0100 @@ -1,3 +1,10 @@ +lowdown (1.1.0-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Use cross tools. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Fri, 15 Mar 2024 07:15:58 +0100 + lowdown (1.1.0-1) unstable; urgency=medium * New upstream release. diff --minimal -Nru lowdown-1.1.0/debian/rules lowdown-1.1.0/debian/rules --- lowdown-1.1.0/debian/rules 2023-01-07 03:47:09.000000000 +0100 +++ lowdown-1.1.0/debian/rules 2024-03-15 07:15:58.000000000 +0100 @@ -1,6 +1,8 @@ #!/usr/bin/make -f include /usr/share/dpkg/architecture.mk +-include /usr/share/dpkg/buildtools.mk +PKG_CONFIG ?= pkg-config # output every command that modifies files on the build system. #export DH_VERBOSE = 1 @@ -10,17 +12,18 @@ # Use libbsd for a system copy of the BSD functions, instead of upstream's # embedded compats.c coming from the oconfigure project. # Also see https://github.com/kristapsdz/oconfigure/issues/19 -CFLAGS += $(shell pkg-config --cflags libmd libbsd-overlay) -LDFLAGS += $(shell pkg-config --libs libmd libbsd-overlay) +CFLAGS += $(shell $(PKG_CONFIG) --cflags libmd libbsd-overlay) +LDFLAGS += $(shell $(PKG_CONFIG) --libs libmd libbsd-overlay) # avoid symbol leakage; keep this in the package until merged upstream: # see https://github.com/kristapsdz/lowdown/issues/109 LDFLAGS += -Wl,--version-script=debian/liblowdown.map %: - dh $@ + dh $@ --buildsystem=makefile override_dh_auto_configure: + CC='$(CC)' \ CFLAGS="${CFLAGS}" \ ./configure \ PREFIX=/usr \