Source: netdiag Version: 1.1-3 Tags: patch User: helm...@debian.org Usertags: rebootstrap
netdiag fails to cross build from source, because each of its subprojects builds for the build architecture rather than the host architecture. The cure depends on the build system in use. The attached patch fixes all of them and makes netdiag cross build successfully. Please consider applying it. Helmut
diff -u netdiag-1.1/debian/changelog netdiag-1.1/debian/changelog --- netdiag-1.1/debian/changelog +++ netdiag-1.1/debian/changelog @@ -1,3 +1,14 @@ +netdiag (1.1-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_configure pass --host to trafshow's ./configure. + + Pass a cross compiler to netwatch's and tcpblast's ./configure. + + Let dh_auto_build pass cross compilers to make for tcpspray, statnet + and netload. + + -- Helmut Grohne <hel...@subdivi.de> Tue, 30 Jan 2018 20:38:54 +0100 + netdiag (1.1-3) unstable; urgency=medium * Bumped Standards-Version to 4.1.3, no changes needed. diff -u netdiag-1.1/debian/rules netdiag-1.1/debian/rules --- netdiag-1.1/debian/rules +++ netdiag-1.1/debian/rules @@ -4,6 +4,7 @@ # Uncomment this to turn on verbose mode. #DH_VERBOSE=1 +-include /usr/share/dpkg/buildtools.mk include /usr/share/quilt/quilt.make CFLAGS =`dpkg-buildflags --get CPPFLAGS` @@ -15,9 +16,9 @@ dh_testdir dh_update_autotools_config # Add here commands to configure the package. - (cd trafshow*; CFLAGS="$(CFLAGS) $(LDFLAGS)" ./configure) - (cd netwatch*; CFLAGS="$(CFLAGS) $(LDFLAGS)" ./configure) - (cd tcpblast*; no_libnsl=yes ./configure) + CFLAGS="$(CFLAGS) $(LDFLAGS)" dh_auto_configure --sourcedirectory trafshow* + cd netwatch* && CC="$(CC)" CFLAGS="$(CFLAGS) $(LDFLAGS)" ./configure + cd tcpblast* && CC="$(CC)" no_libnsl=yes ./configure touch configure-stamp @@ -29,12 +30,12 @@ dh_testdir # Add here commands to compile the package. - (cd tcpspray; CFLAGS="$(CFLAGS) $(LDFLAGS)" make) - (cd statnet*; CFLAGS="$(CFLAGS) $(LDFLAGS)" make) + CFLAGS="$(CFLAGS) $(LDFLAGS)" dh_auto_build --sourcedirectory tcpspray* + CFLAGS="$(CFLAGS) $(LDFLAGS)" dh_auto_build --sourcedirectory statnet* (cd trafshow*; make) (cd netwatch*; make) (cd tcpblast*; CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" make) - (cd netload*; CFLAGS="$(CFLAGS) $(LDFLAGS)" make) + CFLAGS="$(CFLAGS) $(LDFLAGS)" dh_auto_build --sourcedirectory netload* touch $@