Source: splix Version: 2.0.0+svn315-5 Tags: patch User: helm...@debian.org Usertags: rebootstrap
splix fails to cross build from source, because it uses the build architecture compiler (and dh_strip later fails operating on the ELF objects). The build hard codes g++ in two occasions and otherwise can be fixed by passing proper CC and CXX to make. Please consider applying the attached patch. Helmut
diff --minimal -Nru splix-2.0.0+svn315/debian/changelog splix-2.0.0+svn315/debian/changelog --- splix-2.0.0+svn315/debian/changelog 2016-06-12 17:04:14.000000000 +0200 +++ splix-2.0.0+svn315/debian/changelog 2016-09-09 22:35:38.000000000 +0200 @@ -1,3 +1,10 @@ +splix (2.0.0+svn315-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Use triplet-prefixed compilers (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Fri, 09 Sep 2016 22:26:17 +0200 + splix (2.0.0+svn315-5) unstable; urgency=medium * Team upload diff --minimal -Nru splix-2.0.0+svn315/debian/patches/0006-cross.patch splix-2.0.0+svn315/debian/patches/0006-cross.patch --- splix-2.0.0+svn315/debian/patches/0006-cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ splix-2.0.0+svn315/debian/patches/0006-cross.patch 2016-09-09 22:32:08.000000000 +0200 @@ -0,0 +1,22 @@ +From: Helmut Grohne <hel...@subdivi.de> +Subject: Use compilers passed to make + +Index: splix-2.0.0+svn315/rules.mk +=================================================================== +--- splix-2.0.0+svn315.orig/rules.mk ++++ splix-2.0.0+svn315/rules.mk +@@ -6,12 +6,12 @@ + + $(rastertoqpdl_TARGET): $(rastertoqpdl_OBJ) + $(call printCmd, $(cmd_link)) +- $(Q)g++ -o $@ $^ $(rastertoqpdl_CXXFLAGS) $(rastertoqpdl_LDFLAGS) \ ++ $(Q)$(CXX) -o $@ $^ $(rastertoqpdl_CXXFLAGS) $(rastertoqpdl_LDFLAGS) \ + $(rastertoqpdl_LIBS) + + $(pstoqpdl_TARGET): $(pstoqpdl_OBJ) + $(call printCmd, $(cmd_link)) +- $(Q)g++ -o $@ $^ $(pstoqpdl_CXXFLAGS) $(pstoqpdl_LDFLAGS) \ ++ $(Q)$(CXX) -o $@ $^ $(pstoqpdl_CXXFLAGS) $(pstoqpdl_LDFLAGS) \ + $(pstoqpdl_LIBS) + + .PHONY: install installcms diff --minimal -Nru splix-2.0.0+svn315/debian/patches/series splix-2.0.0+svn315/debian/patches/series --- splix-2.0.0+svn315/debian/patches/series 2016-06-12 16:55:47.000000000 +0200 +++ splix-2.0.0+svn315/debian/patches/series 2016-09-09 22:31:22.000000000 +0200 @@ -2,3 +2,4 @@ 0002-Dont-let-bash-trim-whitespace.patch 0003-fix-aready-typo.patch 0005-Set-debian-build-flags-during-build.patch +0006-cross.patch diff --minimal -Nru splix-2.0.0+svn315/debian/rules splix-2.0.0+svn315/debian/rules --- splix-2.0.0+svn315/debian/rules 2016-06-12 17:01:56.000000000 +0200 +++ splix-2.0.0+svn315/debian/rules 2016-09-09 22:29:15.000000000 +0200 @@ -5,6 +5,13 @@ # Harden export DEB_BUILD_MAINT_OPTIONS = hardening=+all +include /usr/share/dpkg/architecture.mk +ifeq ($(origin CC),default) +CC = $(DEB_HOST_GNU_TYPE)-gcc +endif +ifeq ($(origin CXX),default) +CXX = $(DEB_HOST_GNU_TYPE)-g++ +endif derives_from_ubuntu := $(shell (dpkg-vendor --derives-from Ubuntu && echo "yes") || echo "no") @@ -18,8 +25,8 @@ build-indep: build-stamp build-stamp: configure-stamp dh_testdir - $(MAKE) V=1 drv - $(MAKE) V=1 DRV_ONLY=1 rastertoqpdl_LIBS="-lcupsimage -lcups -lpthread -ljbig" pstoqpdl_LIBS="-lcupsimage -lcups -ljbig" + $(MAKE) V=1 drv CC=$(CC) CXX=$(CXX) + $(MAKE) V=1 DRV_ONLY=1 rastertoqpdl_LIBS="-lcupsimage -lcups -lpthread -ljbig" pstoqpdl_LIBS="-lcupsimage -lcups -ljbig" CC=$(CC) CXX=$(CXX) touch $@ clean: