Source: bls-standalone Version: 0.20151231 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
bls-standalone fails to cross build from source, because it builds for the build architecture. The standard solution - using dh_auto_build - does not just work here, because bls-standalone invokes the built "compile" utility, which is also installed into the package. Given the small package size and few Build-Depends, a good solution is building the package twice in this case: Once for running compile for the build architetcure and then a second time for installing the files. The compile utility seems to have architecture-independent output. Please consider applying the attached patch. Helmut
diff --minimal -Nru bls-standalone-0.20151231/debian/changelog bls-standalone-0.20151231+nmu1/debian/changelog --- bls-standalone-0.20151231/debian/changelog 2015-12-31 20:11:55.000000000 +0100 +++ bls-standalone-0.20151231+nmu1/debian/changelog 2021-05-09 06:38:03.000000000 +0200 @@ -1,3 +1,10 @@ +bls-standalone (0.20151231+nmu1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Build twice. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Sun, 09 May 2021 06:38:03 +0200 + bls-standalone (0.20151231) unstable; urgency=low * Initial release. diff --minimal -Nru bls-standalone-0.20151231/debian/rules bls-standalone-0.20151231+nmu1/debian/rules --- bls-standalone-0.20151231/debian/rules 2015-12-31 20:11:25.000000000 +0100 +++ bls-standalone-0.20151231+nmu1/debian/rules 2021-05-09 06:38:01.000000000 +0200 @@ -4,6 +4,7 @@ #export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS=hardening=+all +include /usr/share/dpkg/architecture.mk include /usr/share/dpkg/buildflags.mk CFLAGS += -Wall @@ -16,6 +17,10 @@ $(MAKE) -C scan CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' scan/compile -o rules/rules.compiled rules/*.description rules/*.switch sed -e "s!^\(lib\|share\)dirdefault *= *'[^']*' *#.*!\1dirdefault = '/usr/\1/bls-standalone'!" bls-standalone.py > bls-standalone +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) + dh_auto_clean --sourcedirectory=scan + dh_auto_build --sourcedirectory=scan -- CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' +endif touch $@ build-arch build: build-arch-stamp