Source: fcode-utils
Version: 1.0.2-7
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

fcode-utils fails to cross build from source, because the upstream
Makefiles strip with the build architecture strip. In one place, strip
isn't even substitutable. Beyond breaking cross compilation, this also
breaks DEB_BUILD_OPTIONS=nostrip as well as generation of -dbgsym
packages. It is best practice to leave stripping up to dh_strip. The
attached patch implements that and fixes all mentioned issues. Please
consider applying it.

Helmut
diff --minimal -Nru fcode-utils-1.0.2/debian/changelog 
fcode-utils-1.0.2/debian/changelog
--- fcode-utils-1.0.2/debian/changelog  2016-01-01 00:12:23.000000000 +0100
+++ fcode-utils-1.0.2/debian/changelog  2020-08-27 21:56:19.000000000 +0200
@@ -1,3 +1,10 @@
+fcode-utils (1.0.2-7.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Don't strip with the build architecture strip. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Thu, 27 Aug 2020 21:56:19 +0200
+
 fcode-utils (1.0.2-7) unstable; urgency=medium
 
   * Backport 05-bigendian.patch from upstream to fix some issues on big-endian
diff --minimal -Nru fcode-utils-1.0.2/debian/patches/nostrip.patch 
fcode-utils-1.0.2/debian/patches/nostrip.patch
--- fcode-utils-1.0.2/debian/patches/nostrip.patch      1970-01-01 
01:00:00.000000000 +0100
+++ fcode-utils-1.0.2/debian/patches/nostrip.patch      2020-08-27 
21:55:56.000000000 +0200
@@ -0,0 +1,19 @@
+--- fcode-utils-1.0.2.orig/romheaders/Makefile
++++ fcode-utils-1.0.2/romheaders/Makefile
+@@ -23,6 +23,7 @@
+ 
+ CC  = gcc
+ CFLAGS += -O2 -Wall -W -ansi -I../shared
++STRIP = strip
+ 
+ SOURCES = romheaders.c ../shared/classcodes.c
+ 
+@@ -32,7 +33,7 @@
+ 
+ romheaders: $(SOURCES)
+       $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SOURCES) -o $@
+-      strip romheaders
++      $(STRIP) romheaders
+       
+ clean:
+       rm -f *~
diff --minimal -Nru fcode-utils-1.0.2/debian/patches/series 
fcode-utils-1.0.2/debian/patches/series
--- fcode-utils-1.0.2/debian/patches/series     2016-01-01 00:10:18.000000000 
+0100
+++ fcode-utils-1.0.2/debian/patches/series     2020-08-27 21:55:32.000000000 
+0200
@@ -3,3 +3,4 @@
 03-makefile.patch
 04-getopt.patch
 05-bigendian.patch
+nostrip.patch
diff --minimal -Nru fcode-utils-1.0.2/debian/rules 
fcode-utils-1.0.2/debian/rules
--- fcode-utils-1.0.2/debian/rules      2014-05-29 18:52:09.000000000 +0200
+++ fcode-utils-1.0.2/debian/rules      2020-08-27 21:56:18.000000000 +0200
@@ -2,3 +2,6 @@
 
 %:
        dh $@ --parallel
+
+override_dh_auto_build:
+       dh_auto_build -- STRIP=true

Reply via email to