Source: libcompface
Version: 1:1.5.2-5
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

libcompface fails to cross build from source, because its Makefile based
build system hard codes the build architecture compiler (gcc).
Substituting a triplet-prefixed version fixes the build. The errors from
using the build architecture strip on host architecture ELF objects are
ignored, but that still means that libcompface is not reproducible.
Please apply the attached patch after stretch is released.

Helmut
diff -u libcompface-1.5.2/debian/changelog libcompface-1.5.2/debian/changelog
--- libcompface-1.5.2/debian/changelog
+++ libcompface-1.5.2/debian/changelog
@@ -1,3 +1,10 @@
+libcompface (1:1.5.2-5.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Pass triplet-prefixed CC to make (closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Thu, 27 Apr 2017 21:00:20 +0200
+
 libcompface (1:1.5.2-5) unstable; urgency=high
 
   * Fixed bufferoverflow when reading xbm files (closes: #534973)
diff -u libcompface-1.5.2/debian/rules libcompface-1.5.2/debian/rules
--- libcompface-1.5.2/debian/rules
+++ libcompface-1.5.2/debian/rules
@@ -4,6 +4,11 @@
 
 SHELL = /bin/bash
 
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+CC := $(DEB_HOST_GNU_TYPE)-gcc
+endif
+
 package=libcompface
 
 version=1.0.0 #$(shell expr `pwd` : '.*-\([0-9.]*\)')
@@ -15,7 +20,7 @@
 build:         build-libc6
        $(checkdir)
        @echo '### Building binaries...'
-       $(MAKE) LDFLAGS="-s -L$(CURDIR)/shared"
+       $(MAKE) LDFLAGS="-s -L$(CURDIR)/shared" 'CC=$(CC)'
        touch build
 
 build-libc6:
@@ -30,6 +35,7 @@
        cd shared && \
            $(MAKE) -f ../Makefile VPATH=".." srcdir=".." \
                LDFLAGS="-lc"\
+               'CC=$(CC)' \
                CFLAGS="-O2 -fPIC -pipe -D_BSD_SOURCE -D_REENTRANT" shared && \
                ln -sf $(package).so $(package).so.$(version_major) &&  \
                ln -sf $(package).so.$(version) $(package).so #&& \
@@ -41,6 +47,7 @@
 #
        cd static && \
             $(MAKE) -f ../Makefile VPATH=".." srcdir=".." \
+                 'CC=$(CC)' \
                  CFLAGS="-O2 -pipe -D_BSD_SOURCE" LDFLAGS="-s" static #&& \
 #                strip --strip-debug $(package).a
 

Reply via email to