Source: eukleides
Version: 1.5.4-4.2
Tags: patch
User: [email protected]
Usertags: ftcbfs

eukleides fails to cross build from source, because it does not pass
cross tools to make. The easiest way of fixing that - using
dh_auto_build - fixes the build part, but it still uses install with the
-s flag and thus fails at using the build architecture strip on a host
architecture object. It is best to defer all stripping to dh_strip.
Doing otherwise also breaks generation of -dbgsym packages as well as
DEB_BUILD_OPTIONS=nostrip. The attached patch fixes all of that. Please
consider applying it.

Helmut
diff --minimal -Nru eukleides-1.5.4/debian/changelog 
eukleides-1.5.4/debian/changelog
--- eukleides-1.5.4/debian/changelog    2020-05-29 17:05:05.000000000 +0200
+++ eukleides-1.5.4/debian/changelog    2020-06-13 15:06:16.000000000 +0200
@@ -1,3 +1,13 @@
+eukleides (1.5.4-4.3) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross tools to make.
+    + cross.patch: Make install substitutable.
+    + Pass a non-stripping install to make install.
+
+ -- Helmut Grohne <[email protected]>  Sat, 13 Jun 2020 15:06:16 +0200
+
 eukleides (1.5.4-4.2) unstable; urgency=low
 
   * Non-maintainer upload.
diff --minimal -Nru eukleides-1.5.4/debian/patches/cross.patch 
eukleides-1.5.4/debian/patches/cross.patch
--- eukleides-1.5.4/debian/patches/cross.patch  1970-01-01 01:00:00.000000000 
+0100
+++ eukleides-1.5.4/debian/patches/cross.patch  2020-06-13 15:06:16.000000000 
+0200
@@ -0,0 +1,19 @@
+--- eukleides-1.5.4.orig/build/Makefile
++++ eukleides-1.5.4/build/Makefile
+@@ -12,6 +12,7 @@
+ YACC = bison
+ YFLAGS = -d
+ CC = gcc
++INSTALL ?= install
+ IFLAGS = -I$(COMMON_DIR) -I$(MAIN_DIR) -I$(BUILD_DIR) 
+ ifneq ($(strip $(LOCALES)),)
+ MOFLAGS = -DMO_DIR=\"$(MO_DIR)\" 
+@@ -55,7 +56,7 @@
+ 
+ install: $(BINARY)
+       @echo "Installing $<"
+-      @install -s $< $(BIN_DIR)
++      @$(INSTALL) -s $< $(BIN_DIR)
+ 
+ uninstall:
+       @$(RM) $(addprefix $(BIN_DIR)/,$(BINARIES))
diff --minimal -Nru eukleides-1.5.4/debian/patches/series 
eukleides-1.5.4/debian/patches/series
--- eukleides-1.5.4/debian/patches/series       2017-11-06 13:42:43.000000000 
+0100
+++ eukleides-1.5.4/debian/patches/series       2020-06-13 15:06:16.000000000 
+0200
@@ -1,3 +1,4 @@
 old-patches.diff
 spelling-mistakes.diff
 ld-as-needed.diff
+cross.patch
diff --minimal -Nru eukleides-1.5.4/debian/rules eukleides-1.5.4/debian/rules
--- eukleides-1.5.4/debian/rules        2020-05-29 17:05:05.000000000 +0200
+++ eukleides-1.5.4/debian/rules        2020-06-13 15:06:16.000000000 +0200
@@ -14,7 +14,7 @@
 
 build-stamp: 
        dh_testdir
-       CFLAGS="$(CFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE)
+       CFLAGS="$(CFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" dh_auto_build
        touch $@
 
 clean: 
@@ -29,7 +29,7 @@
        dh_testroot
        dh_prep
        dh_installdirs
-       $(MAKE) DESTDIR=$(CURDIR)/debian/eukleides install
+       $(MAKE) DESTDIR=$(CURDIR)/debian/eukleides install INSTALL='install 
--strip-program=true'
 
 binary-indep: build install
 

Reply via email to