Source: lrzsz Version: 0.12.21-8 Tags: patch User: [email protected] Usertags: rebootstrap
lrzsz fails to cross build from source, because debian/rules errors out immediately. On a closer look, the statement that this doesn't work is wrong. The attached patch demonstrates that lrzsz can be cross built quite easily. Please consider applying it. Helmut
diff --minimal -Nru lrzsz-0.12.21/debian/changelog lrzsz-0.12.21/debian/changelog --- lrzsz-0.12.21/debian/changelog 2015-06-07 18:43:36.000000000 +0200 +++ lrzsz-0.12.21/debian/changelog 2017-08-31 13:30:55.000000000 +0200 @@ -1,3 +1,10 @@ +lrzsz (0.12.21-8.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Make cross compilation work, closes: #-1. + + -- Helmut Grohne <[email protected]> Thu, 31 Aug 2017 13:30:55 +0200 + lrzsz (0.12.21-8) unstable; urgency=low * Fixed reproducible builds, closes: #787995, thanks to Dhole. diff --minimal -Nru lrzsz-0.12.21/debian/rules lrzsz-0.12.21/debian/rules --- lrzsz-0.12.21/debian/rules 2015-06-07 18:41:36.000000000 +0200 +++ lrzsz-0.12.21/debian/rules 2017-08-31 13:30:55.000000000 +0200 @@ -3,12 +3,12 @@ testdir = test -f src/lrz.c && test -f debian/rules testroot = test x`whoami` = xroot -# FOR AUTOCONF 2.13 ONLY -ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) - confflags += $(DEB_HOST_GNU_TYPE) -else - $(error Cannot cross-compile this package out-of-the-box) +include /usr/share/dpkg/architecture.mk + +ifeq ($(origin CC),default) +CC = $(DEB_HOST_GNU_TYPE)-gcc endif +export CC CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) CFLAGS = $(shell dpkg-buildflags --get CFLAGS) @@ -53,7 +53,7 @@ $(MAKE) prefix=$(CURDIR)/debian/tmp/usr install ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" "" - strip -R .comment -R .note debian/tmp/usr/bin/* + $(DEB_HOST_GNU_TYPE)-strip -R .comment -R .note debian/tmp/usr/bin/* endif install -d -m 0755 debian/tmp/usr/share/doc/lrzsz

