diff --git a/debian/patches/0006-cross.patch b/debian/patches/0006-cross.patch new file mode 100644 index 0000000..afa638b --- /dev/null +++ b/debian/patches/0006-cross.patch @@ -0,0 +1,22 @@ +From: Helmut Grohne +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 --git a/debian/patches/series b/debian/patches/series index 5d187dc..947cb47 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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 --git a/debian/rules b/debian/rules index e4c6b9a..8c58e3a 100755 --- a/debian/rules +++ b/debian/rules @@ -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: