Source: clips
Version: 6.30-4.1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

clips fails to cross build from source, because it builds for the build
architecture. Usually, that means one should pass --host to configure,
but clips' configure is too old to understand that. Instead, one is
supposed to export environment variables such as CC. The easiest way of
doing that is leveraging dpkg's buildtools.mk. Once done, it fails
stripping via install -s as that uses the build architecture strip.
Beyond breaking cross compilation, it also breaks
DEB_BUILD_OPTIONS=nostrip and generation of -dbgsym packages. It is best
to defer all stripping to dh_strip, which knows the right strip and when
to strip. The attached patch fixes all of this. Please consider applying
it.

Helmut
diff --minimal -Nru clips-6.30/debian/changelog clips-6.30/debian/changelog
--- clips-6.30/debian/changelog 2020-03-30 20:51:48.000000000 +0200
+++ clips-6.30/debian/changelog 2020-12-15 20:33:05.000000000 +0100
@@ -1,3 +1,12 @@
+clips (6.30-4.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dpkg's buildtools.mk supply cross tools via environment.
+    + Defer stripping to dh_strip.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 15 Dec 2020 20:33:05 +0100
+
 clips (6.30-4.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --minimal -Nru clips-6.30/debian/rules clips-6.30/debian/rules
--- clips-6.30/debian/rules     2020-03-30 20:51:48.000000000 +0200
+++ clips-6.30/debian/rules     2020-12-15 20:33:05.000000000 +0100
@@ -16,6 +16,9 @@
 #export DH_VERBOSE=1
 export DH_OPTIONS
 
+DPKG_EXPORT_BUILDTOOLS=1
+-include /usr/share/dpkg/buildtools.mk
+
 package=clips
 
 core/configure: core/configure.in
@@ -60,14 +63,14 @@
        dh_installdebconf
        dh_prep
        dh_installdirs -a
-       cd core && $(MAKE) -f Makefile INSTALL_PROGRAM='install' \
+       cd core && $(MAKE) -f Makefile INSTALL_PROGRAM='install 
--strip-program=true' \
                prefix=$(CURDIR)/debian/libclips/usr install-libs
        # Fix for lib files
        rm `pwd`/debian/libclips/usr/lib/libclips.a 
        rm `pwd`/debian/libclips/usr/lib/libclips.so
-       cd core && $(MAKE) -f Makefile INSTALL_PROGRAM='install' \
+       cd core && $(MAKE) -f Makefile INSTALL_PROGRAM='install 
--strip-program=true' \
                prefix=$(CURDIR)/debian/clips/usr install-bin
-       cd core && $(MAKE) -f Makefile INSTALL_PROGRAM='install' \
+       cd core && $(MAKE) -f Makefile INSTALL_PROGRAM='install 
--strip-program=true' \
                prefix=$(CURDIR)/debian/libclips-dev/usr install-includes
        install -m655 core/libclips.a `pwd`/debian/libclips-dev/usr/lib/
        [ ! -e `pwd`/debian/libclips-dev/usr/lib/libclips.so ] || ( cd 
`pwd`/debian/libclips-dev/usr/lib && ln -s libclips.so.6.30 libclips.so )

Reply via email to