Source: deal Version: 3.1.9-10 Tags: patch User: helm...@debian.org Usertags: rebootstrap
deal fails to cross build from source, because it uses the build architecture compiler. Using dh_auto_build is the easiest way of doing so. Then it fails running ./makecounttable. It turns out that we need to use the build architecture compiler for that one file. Proceeding the build, it fails linking deal because the Makefile hard codes g++. The attached patch makes deal cross buildable. Please consider applying it. Helmut
diff --minimal -Nru deal-3.1.9/debian/changelog deal-3.1.9/debian/changelog --- deal-3.1.9/debian/changelog 2018-09-25 22:04:00.000000000 +0200 +++ deal-3.1.9/debian/changelog 2019-01-11 17:38:44.000000000 +0100 @@ -1,3 +1,13 @@ +deal (3.1.9-10.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross tools to make. + + Except for makecounttable where we need the native compiler. + + cross.patch: Make the C++ linker substitutable. + + -- Helmut Grohne <hel...@subdivi.de> Fri, 11 Jan 2019 17:38:44 +0100 + deal (3.1.9-10) unstable; urgency=medium * Repository moved to salsa. diff --minimal -Nru deal-3.1.9/debian/patches/cross.patch deal-3.1.9/debian/patches/cross.patch --- deal-3.1.9/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ deal-3.1.9/debian/patches/cross.patch 2019-01-11 17:38:44.000000000 +0100 @@ -0,0 +1,11 @@ +--- deal-3.1.9.orig/Makefile ++++ deal-3.1.9/Makefile +@@ -56,7 +56,7 @@ + BINARY=./deal + + deal: $(OBJS) +- g++ $(CFLAGS) $(OBJS) -o deal $(LDFLAGS) $(EXTRA_LDFLAGS) ++ $(CXX) $(CFLAGS) $(OBJS) -o deal $(LDFLAGS) $(EXTRA_LDFLAGS) + + universal: + $(MAKE) clean diff --minimal -Nru deal-3.1.9/debian/patches/series deal-3.1.9/debian/patches/series --- deal-3.1.9/debian/patches/series 2017-11-29 20:16:05.000000000 +0100 +++ deal-3.1.9/debian/patches/series 2019-01-11 17:38:44.000000000 +0100 @@ -3,3 +3,4 @@ absolute-paths seed-getpid no-version-warning +cross.patch diff --minimal -Nru deal-3.1.9/debian/rules deal-3.1.9/debian/rules --- deal-3.1.9/debian/rules 2017-11-29 20:00:46.000000000 +0100 +++ deal-3.1.9/debian/rules 2019-01-11 17:38:44.000000000 +0100 @@ -1,7 +1,10 @@ #!/usr/bin/make -f +include /usr/share/dpkg/architecture.mk + override_dh_auto_build: - $(MAKE) EXTRA_LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" \ + dpkg-architecture -f -a$(DEB_BUILD_ARCH) -c dh_auto_build -- makecounttable LDFLAGS= + dh_auto_build -- EXTRA_LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" \ EXTRA_CFLAGS="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" override_dh_auto_test: