Source: alure Version: 1.2-6 Tags: patch User: helm...@debian.org Usertags: rebootstrap
alure fails to cross build from source, because it does not pass cross flags (such as -DCMAKE_SYSTEM_PROCESSOR) to cmake. The easiest way of doing that is letting dh_auto_configure do it. Further down the build fails to create an object file consumable by dpkg-shlibdeps, because it uses the build architecture compiler "cc". Switching to a host tool fixes the build. Please consider applying the attached patch. Helmut
diff --minimal -Nru alure-1.2/debian/changelog alure-1.2/debian/changelog --- alure-1.2/debian/changelog 2012-05-27 12:40:45.000000000 +0200 +++ alure-1.2/debian/changelog 2018-01-22 20:47:15.000000000 +0100 @@ -1,3 +1,12 @@ +alure (1.2-6.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_configure pass cross flags to cmake. + + Use a host $(CC) from buildtools.mk. + + -- Helmut Grohne <hel...@subdivi.de> Mon, 22 Jan 2018 20:47:15 +0100 + alure (1.2-6) unstable; urgency=low * Fix build with GCC 4.7 by cherrypicking upstream commit diff --minimal -Nru alure-1.2/debian/rules alure-1.2/debian/rules --- alure-1.2/debian/rules 2012-05-27 12:34:53.000000000 +0200 +++ alure-1.2/debian/rules 2018-01-22 20:47:12.000000000 +0100 @@ -11,15 +11,14 @@ TYPE=Debug endif -DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +include /usr/share/dpkg/architecture.mk +-include /usr/share/dpkg/buildtools.mk # Use this variable to allow options passed to cmake to be overridable -DEB_CMAKE_OPTIONS ?= -DCMAKE_VERBOSE_MAKEFILE=ON \ +DEB_CMAKE_OPTIONS ?= \ -DCMAKE_BUILD_TYPE=$(TYPE) \ - -DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_C_FLAGS="$(CFLAGS)" \ -DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \ - -DCMAKE_CXX_COMPILER="g++" \ -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" %: @@ -29,7 +28,7 @@ rm -rf build/* override_dh_auto_configure: - cd build && cmake $(DEB_CMAKE_OPTIONS) .. + dh_auto_configure --builddirectory=build -- $(DEB_CMAKE_OPTIONS) override_dh_auto_build: $(MAKE) --directory=build @@ -44,7 +43,7 @@ debian/tmp/alure-dummy.so: mkdir -p debian/tmp - cc -xc -shared -Wl,--no-as-needed -o $@ /dev/null \ + $(CC) -xc -shared -Wl,--no-as-needed -o $@ /dev/null \ -lsndfile \ -lvorbisfile \ -lFLAC \