Source: joe
Version: 4.3-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

joe fails to cross build from source, because it configures the build
for the build architecture (by failure of passing --host) and uses the
build architecture strip. The attached patch addresses both issues and
makes joe cross build. Alternatively, moving to dh_auto_configure and
dh_strip also fixes the cross build as both tools are well aware of
cross building. Please consider applying the attached patch or moving to
debhelper.

Helmut
diff --minimal -Nru joe-4.3/debian/changelog joe-4.3/debian/changelog
--- joe-4.3/debian/changelog    2016-11-06 14:40:14.000000000 +0100
+++ joe-4.3/debian/changelog    2016-11-14 06:48:12.000000000 +0100
@@ -1,3 +1,12 @@
+joe (4.3-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: closes: #-1
+    + Pass --host to ./configure
+    + Use triplet-prefixed strip
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 14 Nov 2016 06:48:12 +0100
+
 joe (4.3-1) unstable; urgency=low
 
   * New upstream version.
diff --minimal -Nru joe-4.3/debian/rules joe-4.3/debian/rules
--- joe-4.3/debian/rules        2016-11-06 14:39:13.000000000 +0100
+++ joe-4.3/debian/rules        2016-11-14 06:48:11.000000000 +0100
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
+
 tmp := $(CURDIR)/debian/joe
 docdir := $(tmp)/usr/share/doc/joe
 
@@ -8,6 +10,10 @@
 CFLAGS += -O2
 endif
 
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+CONFIGURE_FLAGS += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+endif
+
 build: build-indep build-arch
 
 build-indep:
@@ -17,7 +23,7 @@
 config.status:
        dh_autoreconf
        CFLAGS="$(CFLAGS)" ./configure --sysconfdir=/etc --prefix=/usr \
-          --mandir='$${datadir}/man'
+          --mandir='$${datadir}/man' $(CONFIGURE_FLAGS)
 
 joe/joe: joe/main.c
        $(MAKE)
@@ -32,7 +38,7 @@
        rm -rf $(tmp)
        $(MAKE) DESTDIR=$(tmp) install
 ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
-       strip --remove-section=.comment --remove-section=.note 
$(tmp)/usr/bin/joe
+       $(DEB_HOST_GNU_TYPE)-strip --remove-section=.comment 
--remove-section=.note $(tmp)/usr/bin/joe
 endif
        rm -f $(tmp)/usr/bin/termidx
        gzip -9 $(tmp)/usr/share/man/man1/joe.1

Reply via email to