Source: foremost Version: 1.5.7-6 Tags: patch User: [email protected] Usertags: rebootstrap
foremost fails to cross build from source, because it has a rather uncommon way to handle the CC variable and its assumptions on CC are broken by how dh_auto_build uses it. During cross compilation, dh_auto_build overrides CC with a cross compiler, but foremost stuffs all sorts of flags into CC. The proper way to cross compile foremost is overriding RAW_CC and leaving CC alone. The attached patch does just that. Please consider applying it. Helmut
diff --minimal -Nru foremost-1.5.7/debian/changelog foremost-1.5.7/debian/changelog --- foremost-1.5.7/debian/changelog 2015-02-23 13:54:58.000000000 +0100 +++ foremost-1.5.7/debian/changelog 2017-01-11 09:44:00.000000000 +0100 @@ -1,3 +1,10 @@ +foremost (1.5.7-6.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Override RAW_CC instead of CC. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Wed, 11 Jan 2017 09:44:00 +0100 + foremost (1.5.7-6) sid; urgency=low * Update man page with newly supported format. (Closes: #777260) diff --minimal -Nru foremost-1.5.7/debian/rules foremost-1.5.7/debian/rules --- foremost-1.5.7/debian/rules 2014-07-07 15:36:04.000000000 +0200 +++ foremost-1.5.7/debian/rules 2017-01-11 09:44:00.000000000 +0100 @@ -4,10 +4,17 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS=hardening=+all +include /usr/share/dpkg/architecture.mk +ifeq ($(origin CC),default) +CC := $(DEB_HOST_GNU_TYPE)-gcc +endif %: dh $@ +override_dh_auto_build: + $(MAKE) RAW_CC='$(CC)' + override_dh_auto_install: install -D -m 644 foremost.conf $(CURDIR)/debian/foremost/etc/foremost.conf install -D -m 755 foremost $(CURDIR)/debian/foremost/usr/bin/foremost

