Source: twofish Version: 0.3-5 Tags: patch User: helm...@debian.org Usertags: rebootstrap
twofish fails to cross build from source, because debian/rules hard codes the build architecture compiler. The host compiler is best obtained from dpkg's buildtools.mk. After doing so, twofish fails running its tests despite DEB_BUILD_OPTIONS=nocheck. The attached patch fixes both. Please consider applying it. Helmut
diff --minimal -Nru twofish-0.3/debian/changelog twofish-0.3/debian/changelog --- twofish-0.3/debian/changelog 2016-05-07 12:27:19.000000000 +0200 +++ twofish-0.3/debian/changelog 2019-05-26 17:16:32.000000000 +0200 @@ -1,3 +1,12 @@ +twofish (0.3-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Use $(CC) from dpkg's buildtools.mk. + + Support DEB_BUILD_OPTIONS=nocheck. + + -- Helmut Grohne <hel...@subdivi.de> Sun, 26 May 2019 17:16:32 +0200 + twofish (0.3-5) unstable; urgency=low * Step Standards-Version to 3.9.8, no changes. diff --minimal -Nru twofish-0.3/debian/rules twofish-0.3/debian/rules --- twofish-0.3/debian/rules 2016-05-07 10:44:38.000000000 +0200 +++ twofish-0.3/debian/rules 2019-05-26 17:16:32.000000000 +0200 @@ -1,6 +1,7 @@ #!/usr/bin/make -f # Debian package build rules file for twofish +-include /usr/share/dpkg/buildtools.mk CFLAGS = $(shell dpkg-buildflags --get CFLAGS) -Wall -Wextra CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) -Wl,-z,now @@ -26,17 +27,19 @@ build-arch-stamp: dh_testdir # - gcc -c -o twofish.o $(CPPFLAGS) $(CFLAGS) twofish.c + $(CC) -c -o twofish.o $(CPPFLAGS) $(CFLAGS) twofish.c ar clq $(ANAME) twofish.o ranlib $(ANAME) # Shared library -rm twofish.o - gcc $(CPPFLAGS) $(CFLAGS) -fPIC -shared -Wl,-soname,$(SONAME) \ + $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -shared -Wl,-soname,$(SONAME) \ $(LDFLAGS) -Wl,-z,defs -lc -o $(SONAME) twofish.c # # test suite - gcc -o twofishtest $(CPPFLAGS) $(CFLAGS) main.c $(LDFLAGS) -L. $(ALINKING) +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + $(CC) -o twofishtest $(CPPFLAGS) $(CFLAGS) main.c $(LDFLAGS) -L. $(ALINKING) ./twofishtest +endif touch build-arch-stamp clean: