Source: rockdodger Version: 1.1.3-2 Tags: patch User: helm...@debian.org Usertags: rebootstrap
rockdodger fails to cross build from source, because it uses build architecture build tools. Since it does not use debhelper, we cannot use dh_auto_build or dh_strip. Still, we can use dpkg's buildtools.mk to set up CC and STRIP with the correct tool names. Thus the attached patch makes rockdodger cross buildable. Please consider applying it or using debhelper. Helmut
diff --minimal -Nru rockdodger-1.1.3/debian/changelog rockdodger-1.1.3/debian/changelog --- rockdodger-1.1.3/debian/changelog 2019-02-16 18:35:41.000000000 +0100 +++ rockdodger-1.1.3/debian/changelog 2019-03-02 21:32:31.000000000 +0100 @@ -1,3 +1,10 @@ +rockdodger (1.1.3-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Let dpkg's buildtools.mk supply tools. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Sat, 02 Mar 2019 21:32:31 +0100 + rockdodger (1.1.3-2) unstable; urgency=low * Made build reproducible, fixed DEBIAN/md5sums. diff --minimal -Nru rockdodger-1.1.3/debian/rules rockdodger-1.1.3/debian/rules --- rockdodger-1.1.3/debian/rules 2019-02-16 18:35:19.000000000 +0100 +++ rockdodger-1.1.3/debian/rules 2019-03-02 21:32:29.000000000 +0100 @@ -1,8 +1,11 @@ #!/usr/bin/make -f +-include /usr/share/dpkg/buildtools.mk + testdir = test -f rocks.c && test -f debian/rules testroot = test x`whoami` = xroot +STRIP ?= strip CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) CFLAGS = $(shell dpkg-buildflags --get CFLAGS) LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) @@ -24,7 +27,7 @@ build-stamp: $(testdir) - $(MAKE) DESTDIR=$(CURDIR)/debian/tmp prefix=$(CURDIR)/debian/tmp/usr bindir=$(CURDIR)/debian/tmp/usr/games datarootdir=$(CURDIR)/debian/tmp/usr/share localstatedir=$(CURDIR)/debian/tmp/var + $(MAKE) 'CC=$(CC)' DESTDIR=$(CURDIR)/debian/tmp prefix=$(CURDIR)/debian/tmp/usr bindir=$(CURDIR)/debian/tmp/usr/games datarootdir=$(CURDIR)/debian/tmp/usr/share localstatedir=$(CURDIR)/debian/tmp/var touch $@ binary: binary-arch binary-indep @@ -36,7 +39,7 @@ $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp prefix=$(CURDIR)/debian/tmp/usr bindir=$(CURDIR)/debian/tmp/usr/games datarootdir=$(CURDIR)/debian/tmp/usr/share localstatedir=$(CURDIR)/debian/tmp/var ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - strip --strip-unneeded -R .comment -R .note debian/tmp/usr/games/rockdodger + $(STRIP) --strip-unneeded -R .comment -R .note debian/tmp/usr/games/rockdodger endif rm debian/tmp/var/games/rockdodger.scores