Source: libmpeg3 Version: 1.8.dfsg-2 Tags: patch User: helm...@debian.org Usertags: rebootstrap
libmpeg3 fails to cross build from source, because it uses the build architecture compiler. After letting dh_auto_build pass cross compilers to make, the build proceeds a lot further but fails on errors from debian-build-rules.patch. It confuses the build architecture (dpkg --print-architecture or DEB_BUILD_ARCH) with the host architecture (DEB_HOST_ARCH) and hard codes the build architecture compiler (gcc). After fixing all of that, libmpeg3 cross builds successfully. Please consider applying the attached patch. Helmut
diff --minimal -Nru libmpeg3-1.8.dfsg/debian/changelog libmpeg3-1.8.dfsg/debian/changelog --- libmpeg3-1.8.dfsg/debian/changelog 2014-06-06 07:54:25.000000000 +0200 +++ libmpeg3-1.8.dfsg/debian/changelog 2017-09-20 09:42:49.000000000 +0200 @@ -1,3 +1,12 @@ +libmpeg3 (1.8.dfsg-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross compilers to make. + + Fix the debian-build-rules.patch. + + -- Helmut Grohne <hel...@subdivi.de> Wed, 20 Sep 2017 09:42:49 +0200 + libmpeg3 (1.8.dfsg-2) unstable; urgency=low * Add patch header-comment-fix.patch to fix a typo in the diff --minimal -Nru libmpeg3-1.8.dfsg/debian/patches/debian-build-rules.patch libmpeg3-1.8.dfsg/debian/patches/debian-build-rules.patch --- libmpeg3-1.8.dfsg/debian/patches/debian-build-rules.patch 2014-06-02 08:50:27.000000000 +0200 +++ libmpeg3-1.8.dfsg/debian/patches/debian-build-rules.patch 2017-09-20 09:42:49.000000000 +0200 @@ -37,7 +37,7 @@ OBJDIR := $(shell uname --machine) -+ARCH := $(shell dpkg --print-architecture) ++ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) +ifeq ($(strip $(prefix)),) @@ -163,7 +163,7 @@ ar rcs $(OUTPUT) `cat $(OBJDIR)/objs` +$(SHAREDOUTPUT): $(SOBJS) -+ gcc -shared -fPIC $(LDFLAGS) -o $(SHAREDOUTPUT) \ ++ $(CC) -shared -fPIC $(LDFLAGS) -o $(SHAREDOUTPUT) \ + $(SOBJS) \ + -Wl,-soname -Wl,$(SHLIB_SONAME) $(LIBS) + ( cd $(OBJDIR); \ diff --minimal -Nru libmpeg3-1.8.dfsg/debian/rules libmpeg3-1.8.dfsg/debian/rules --- libmpeg3-1.8.dfsg/debian/rules 2014-06-02 08:50:27.000000000 +0200 +++ libmpeg3-1.8.dfsg/debian/rules 2017-09-20 09:42:48.000000000 +0200 @@ -30,7 +30,7 @@ build-stamp: dh_testdir - $(MAKE) + dh_auto_build --buildsystem=makefile touch build-stamp