Source: sash
Version: 3.8-3
Tags: patch
User: [email protected]
Usertags: rebootstrap

sash fails to cross build from source, because it uses build
architecture build tools (cc, strip). Having dh_auto_build supply cross
compilers to make and removing the explicit strip invocation (dh_strip
still strips), makes a cross build succeed. Please consider applying the
attached patch. It also fixed -dbgsym generation.

Helmut
diff --minimal -Nru sash-3.8/debian/changelog sash-3.8/debian/changelog
--- sash-3.8/debian/changelog   2014-07-19 11:40:36.000000000 +0200
+++ sash-3.8/debian/changelog   2017-01-27 08:20:51.000000000 +0100
@@ -1,3 +1,12 @@
+sash (3.8-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Closes: #-1
+    + Let dh_auto_build pass cross compilers.
+    + d/patches/no_strip: Do not strip during build.
+
+ -- Helmut Grohne <[email protected]>  Fri, 27 Jan 2017 08:20:51 +0100
+
 sash (3.8-3) unstable; urgency=medium
 
   * Drop support for adosfs, mfs on FreeBSD.
diff --minimal -Nru sash-3.8/debian/patches/no_strip 
sash-3.8/debian/patches/no_strip
--- sash-3.8/debian/patches/no_strip    1970-01-01 01:00:00.000000000 +0100
+++ sash-3.8/debian/patches/no_strip    2017-01-27 08:20:51.000000000 +0100
@@ -0,0 +1,18 @@
+From: Helmut Grohne <[email protected]>
+Subject: do not strip during build
+
+ * Breaks cross compilation by using the wrong strip
+ * Breaks generation of -dbgsym packages
+
+Index: sash-3.8/Makefile
+===================================================================
+--- sash-3.8.orig/Makefile
++++ sash-3.8/Makefile
+@@ -65,7 +65,6 @@
+ 
+ sash: $(OBJS)
+       $(CC) $(LDFLAGS) -o sash $(OBJS) $(LIBS)
+-      strip sash
+ 
+ clean:
+       rm -f $(OBJS) sash
diff --minimal -Nru sash-3.8/debian/patches/series 
sash-3.8/debian/patches/series
--- sash-3.8/debian/patches/series      2014-04-20 08:55:33.000000000 +0200
+++ sash-3.8/debian/patches/series      2017-01-27 08:20:51.000000000 +0100
@@ -1,3 +1,4 @@
 touch_error_handling
 buildsystem
 freebsd_build
+no_strip
diff --minimal -Nru sash-3.8/debian/rules sash-3.8/debian/rules
--- sash-3.8/debian/rules       2014-04-20 09:48:04.000000000 +0200
+++ sash-3.8/debian/rules       2017-01-27 08:20:50.000000000 +0100
@@ -9,7 +9,7 @@
        dh $@
 
 override_dh_auto_build:
-       $(MAKE) OPT="`dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get 
CPPFLAGS`" LDFLAGS="-static `dpkg-buildflags --get LDFLAGS`"
+       dh_auto_build -- OPT="`dpkg-buildflags --get CFLAGS` `dpkg-buildflags 
--get CPPFLAGS`" LDFLAGS="-static `dpkg-buildflags --get LDFLAGS`"
 
 override_dh_auto_install:
        make install BINDIR=$(pkgdir)/bin MANDIR=$(pkgdir)/usr/share/man

Reply via email to