Source: xosview Version: 1.19-1 Tags: patch User: [email protected] Usertags: rebootstrap
xosview fails to cross build from source, because it builds for the build architecture: * The upstream build system defaults to the build architecture compiler and the packaging fails to pass cross compilers. dh_auto_build fixes that. * The packaging sets PLATFORM according to the build architecture, while it should be evaluating the host architecture. * The upstream build system determines its $(ARCH) from uname, which is a build architecture property and needs to be overriden by debian/rules. After fixing all of the above, xosview cross builds successfully. Please consider applying the attached patch. Helmut
diff --minimal -Nru xosview-1.19/debian/changelog xosview-1.19/debian/changelog --- xosview-1.19/debian/changelog 2016-12-10 14:15:30.000000000 +0100 +++ xosview-1.19/debian/changelog 2017-10-27 06:31:37.000000000 +0200 @@ -1,3 +1,13 @@ +xosview (1.19-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross compilers to make. + + Fix build/host confusion. + + Also pass ARCH= to make. + + -- Helmut Grohne <[email protected]> Fri, 27 Oct 2017 06:31:37 +0200 + xosview (1.19-1) unstable; urgency=low * New upstream release. diff --minimal -Nru xosview-1.19/debian/rules xosview-1.19/debian/rules --- xosview-1.19/debian/rules 2016-06-30 07:39:12.000000000 +0200 +++ xosview-1.19/debian/rules 2017-10-27 06:31:34.000000000 +0200 @@ -4,19 +4,19 @@ #export DH_VERBOSE=1 DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/architecture.mk include /usr/share/dpkg/buildflags.mk CXX=g++ -DEB_BUILD_ARCH_OS ?=$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) -ifeq ($(DEB_BUILD_ARCH_OS),linux) +ifeq ($(DEB_HOST_ARCH_OS),linux) PLATFORM=linux -else ifeq ($(DEB_BUILD_ARCH_OS),kfreebsd) +else ifeq ($(DEB_HOST_ARCH_OS),kfreebsd) PLATFORM=bsd -else ifeq ($(DEB_BUILD_ARCH_OS),hurd) +else ifeq ($(DEB_HOST_ARCH_OS),hurd) PLATFORM=gnu else - $(error Missing implementation for $(DEB_BUILD_ARCH_OS)) + $(error Missing implementation for $(DEB_HOST_ARCH_OS)) endif build: build-arch build-indep @@ -24,7 +24,7 @@ build-indep: build-stamp build-stamp: dh_testdir - $(MAKE) PLATFORM=$(PLATFORM) + dh_auto_build -- PLATFORM=$(PLATFORM) ARCH=$(DEB_HOST_ARCH_CPU) touch $@ clean:

