Source: hexer Version: 1.0.3-1 Tags: patch User: [email protected] Usertags: rebootstrap
hexer fails to cross build from source, because it fails running ./bin2c. I'm attaching a patch that updates the build system to recognize CC_FOR_BUILD to build bin2c with the build architecture compiler. The variable also needs to be passed to the build. Finally it installs with -s, which breaks cross compilation and -dbgsym packages. Starting with debhelper 11 that will be disabled. For now, we can just fix it explicitly. Please consider applying the attached patch that makes hexer cross build successfully. Helmut
diff --minimal -Nru hexer-1.0.3/debian/changelog hexer-1.0.3/debian/changelog --- hexer-1.0.3/debian/changelog 2016-11-09 13:05:51.000000000 +0100 +++ hexer-1.0.3/debian/changelog 2018-03-24 07:44:25.000000000 +0100 @@ -1,3 +1,13 @@ +hexer (1.0.3-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + cross.patch: Build bin2c with the build architecture compiler. + + Pass CC_FOR_BUILD along. + + Do not strip during make install (drop with compat 11). + + -- Helmut Grohne <[email protected]> Sat, 24 Mar 2018 07:44:25 +0100 + hexer (1.0.3-1) unstable; urgency=medium * Point the Vcs-* fields to my full-source GitLab repository. diff --minimal -Nru hexer-1.0.3/debian/patches/cross.patch hexer-1.0.3/debian/patches/cross.patch --- hexer-1.0.3/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ hexer-1.0.3/debian/patches/cross.patch 2018-03-24 07:43:57.000000000 +0100 @@ -0,0 +1,21 @@ +Index: hexer-1.0.3/Makefile +=================================================================== +--- hexer-1.0.3.orig/Makefile ++++ hexer-1.0.3/Makefile +@@ -30,6 +30,7 @@ + + # -- Which compiler? -- + CC ?= cc ++CC_FOR_BUILD ?= $(CC) + CFLAGS ?= -O + LDFLAGS ?= + LDLIBS = $(LTERMCAP) -lm +@@ -71,7 +72,7 @@ + $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -DMYCALC=1 -o $@ calc.c -lm + + bin2c: bin2c.c +- $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ bin2c.c ++ $(CC_FOR_BUILD) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ bin2c.c + + helptext.c: help.txt bin2c + ./bin2c -n helptext -o $@ help.txt diff --minimal -Nru hexer-1.0.3/debian/patches/series hexer-1.0.3/debian/patches/series --- hexer-1.0.3/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ hexer-1.0.3/debian/patches/series 2018-03-24 07:43:13.000000000 +0100 @@ -0,0 +1 @@ +cross.patch diff --minimal -Nru hexer-1.0.3/debian/rules hexer-1.0.3/debian/rules --- hexer-1.0.3/debian/rules 2016-11-09 10:06:22.000000000 +0100 +++ hexer-1.0.3/debian/rules 2018-03-24 07:44:25.000000000 +0100 @@ -1,6 +1,9 @@ #!/usr/bin/make -f # debhelper rules file for hexer. +-include /usr/share/dpkg/buildtools.mk +export CC_FOR_BUILD ?= cc + # Aim for the top, adapt if anything should break on the buildds. DEB_BUILD_MAINT_OPTIONS= hardening=+all export DEB_BUILD_MAINT_OPTIONS @@ -17,7 +20,7 @@ export DEB_LDFLAGS_MAINT_APPEND override_dh_auto_install: - dh_auto_install -- PREFIX=/usr MANDIR=/usr/share/man/man1 + dh_auto_install -- PREFIX=/usr MANDIR=/usr/share/man/man1 INSTALL='install --strip-program=/bin/true' %: dh $@

