From helmut at subdivi.de Sun May 12 19:30:20 2019 From: helmut at subdivi.de (Helmut Grohne) Date: Sun, 12 May 2019 20:30:20 +0200 Subject: [Debian-lego-team] Bug#928898: t2n FTCBFS: multiple reasons Message-ID: <20190512183019.GA31978@alf.mars> Source: t2n Version: 0.6-6 Tags: patch User: helmutg at debian.org Usertags: rebootstrap t2n fails to cross build from source, because it does not pass cross tools to make. The easiest way to fix that - using dh_auto_build - is not sufficient here, because the Makefile hard codes gcc in one place and uses a non-standard compiler variable name "LK". The attached patch fixes all of that. Please consider applying it. Helmut -------------- next part -------------- diff --minimal -Nru t2n-0.6/debian/changelog t2n-0.6/debian/changelog --- t2n-0.6/debian/changelog 2017-08-01 10:15:56.000000000 +0200 +++ t2n-0.6/debian/changelog 2019-05-12 20:22:00.000000000 +0200 @@ -1,3 +1,13 @@ +t2n (0.6-6.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross tools to make. + + Also pass the C++ compiler as LK. + + cross.patch: Don't hardcode gcc. + + -- Helmut Grohne Sun, 12 May 2019 20:22:00 +0200 + t2n (0.6-6) unstable; urgency=medium * Corrected section in d/gbp.conf. diff --minimal -Nru t2n-0.6/debian/patches/cross.patch t2n-0.6/debian/patches/cross.patch --- t2n-0.6/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ t2n-0.6/debian/patches/cross.patch 2019-05-12 20:22:00.000000000 +0200 @@ -0,0 +1,11 @@ +--- t2n-0.6.orig/Makefile ++++ t2n-0.6/Makefile +@@ -41,7 +41,7 @@ + $(OBJDIR)/ezargs.o + + $(OBJDIR)/usbscan: $(SRCDIR)/usbscan.c +- gcc $(CFLAGS) $(LDFLAGS) $(SRCDIR)/usbscan.c $(LIBS) -o $(OBJDIR)/usbscan ++ $(CC) $(CFLAGS) $(LDFLAGS) $(SRCDIR)/usbscan.c $(LIBS) -o $(OBJDIR)/usbscan + + $(OBJDIR)/$(MAIN) : $(OBJS) + $(LK) $(LDFLAGS) $(OBJS) $(LIBS) -o $(OBJDIR)/$(MAIN) diff --minimal -Nru t2n-0.6/debian/patches/series t2n-0.6/debian/patches/series --- t2n-0.6/debian/patches/series 2016-09-12 09:18:29.000000000 +0200 +++ t2n-0.6/debian/patches/series 2019-05-12 20:22:00.000000000 +0200 @@ -1 +1,2 @@ 01-readme-typo.patch +cross.patch diff --minimal -Nru t2n-0.6/debian/rules t2n-0.6/debian/rules --- t2n-0.6/debian/rules 2016-07-09 09:17:40.000000000 +0200 +++ t2n-0.6/debian/rules 2019-05-12 20:22:00.000000000 +0200 @@ -9,4 +9,4 @@ override_dh_auto_build: # post hardenning options to Makefile - make LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" CFLAGS="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" + dh_auto_build -- LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" CFLAGS="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" LK='$$(CXX)'