Source: dnsmasq Version: 2.76-3 Tags: patch User: [email protected] Usertags: rebootstrap
dnsmasq fails to cross build from source, because it uses build architecture tools (e.g. gcc, pkg-config, strip) instead of triplet prefixed tools. Adding those prefixes makes cross builds work and does not affect native builds. Please consider applying the attached patch. Helmut
diff -u dnsmasq-2.76/debian/changelog dnsmasq-2.76/debian/changelog --- dnsmasq-2.76/debian/changelog +++ dnsmasq-2.76/debian/changelog @@ -1,3 +1,10 @@ +dnsmasq (2.76-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Use triplet-prefixed tools. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Tue, 30 Aug 2016 13:59:12 +0200 + dnsmasq (2.76-3) unstable; urgency=medium * Bump auth zone serial on SIGHUP. (closes: #833733) diff -u dnsmasq-2.76/debian/rules dnsmasq-2.76/debian/rules --- dnsmasq-2.76/debian/rules +++ dnsmasq-2.76/debian/rules @@ -24,8 +24,13 @@ TARGET = install-i18n DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date) +ifeq ($(origin CC),default) + CC = $(DEB_HOST_GNU_TYPE)-gcc +endif + # Force package version based on git tags. ifneq (,$(filter gitversion,$(DEB_BUILD_OPTIONS))) PACKAGE_VERSION = $(shell bld/get-version `pwd` | sed 's/test/~&/; s/[a-z]/~&/; s/-/./g; s/$$/-1/; s/^/-v/';) @@ -138,7 +143,7 @@ -d debian/base/usr/share/doc/$(package)/examples \ -d debian/base/usr/share/$(package) \ -d debian/base/var/lib/misc - make $(TARGET) PREFIX=/usr DESTDIR=`pwd`/debian/base CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=gcc + make $(TARGET) PREFIX=/usr DESTDIR=`pwd`/debian/base CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS))) # Need to remove paypal links in Debian Package for policy reasons. sed -e /\<H2\>Donations/Q -e /icon.png/d doc.html -e /favicon.ico/d >debian/base/usr/share/doc/$(package)/doc.html @@ -170,7 +175,7 @@ fi \ done ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - strip -R .note -R .comment debian/base/usr/sbin/dnsmasq + $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/base/usr/sbin/dnsmasq endif cd debian/base && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums dpkg-shlibdeps --warnings=1 debian/base/usr/sbin/dnsmasq @@ -186,7 +191,7 @@ -d debian/utils/usr/share/man/man1 \ -d debian/utils/usr/bin \ -d debian/utils/usr/share/doc/dnsmasq-utils - make -C contrib/lease-tools PREFIX=/usr DESTDIR=`pwd`/debian/utils CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=gcc + make -C contrib/lease-tools PREFIX=/usr DESTDIR=`pwd`/debian/utils CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config install -m 755 contrib/lease-tools/dhcp_release debian/utils/usr/bin/dhcp_release install -m 644 contrib/lease-tools/dhcp_release.1 debian/utils/usr/share/man/man1/dhcp_release.1 gzip -9n debian/utils/usr/share/man/man1/dhcp_release.1 @@ -200,8 +205,8 @@ gzip -9n debian/utils/usr/share/doc/dnsmasq-utils/changelog.Debian gzip -9n debian/utils/usr/share/man/man1/dhcp_lease_time.1 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - strip -R .note -R .comment debian/utils/usr/bin/dhcp_release - strip -R .note -R .comment debian/utils/usr/bin/dhcp_lease_time + $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/utils/usr/bin/dhcp_release + $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/utils/usr/bin/dhcp_lease_time endif cd debian/utils && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums dpkg-shlibdeps -Tdebian/utils-substvars debian/utils/usr/bin/dhcp_release debian/utils/usr/bin/dhcp_lease_time

