Source: qm-dsp Version: 1.7.1-2 Tags: patch User: helm...@debian.org Usertags: rebootstrap
qm-dsp fails to cross build from source, because it uses the build architecture tools for some parts: * The first make invocation uses build architecture compilers as make defaults. * debian/rules hard codes the build architecture pkg-config. * debian/rules hard codes the build architecture C++ compiler. After fixing all of that, qm-dsp cross builds successfully. Please consider applying the attached patch. Helmut
diff --minimal -Nru qm-dsp-1.7.1/debian/changelog qm-dsp-1.7.1/debian/changelog --- qm-dsp-1.7.1/debian/changelog 2016-12-15 23:04:50.000000000 +0100 +++ qm-dsp-1.7.1/debian/changelog 2017-08-15 11:46:35.000000000 +0200 @@ -1,3 +1,12 @@ +qm-dsp (1.7.1-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross compilers to make. + + Prefix host tools with host triplet. + + -- Helmut Grohne <hel...@subdivi.de> Tue, 15 Aug 2017 11:46:35 +0200 + qm-dsp (1.7.1-2) unstable; urgency=medium * B-D on pkg-config & libatlas-base-dev diff --minimal -Nru qm-dsp-1.7.1/debian/rules qm-dsp-1.7.1/debian/rules --- qm-dsp-1.7.1/debian/rules 2016-12-15 23:04:50.000000000 +0100 +++ qm-dsp-1.7.1/debian/rules 2017-08-15 11:46:33.000000000 +0200 @@ -2,7 +2,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all -DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +include /usr/share/dpkg/architecture.mk PREFIX = /usr LIBDIR=lib/$(DEB_HOST_MULTIARCH) DESTDIR=$(CURDIR)/debian/tmp @@ -12,6 +12,10 @@ MAJVERS = 0 MINVERS = 0.0 +ifeq ($(origin CXX),default) +CXX = $(DEB_HOST_GNU_TYPE)-g++ +endif +PKG_CONFIG ?= $(DEB_HOST_GNU_TYPE)-pkg-config CFLAGS += -DNDEBUG -O3 -fPIC -ffast-math -ftree-vectorize -DUSE_PTHREADS CXXFLAGS += -fPIC -Wall CXXFLAGS += $(CFLAGS) @@ -22,8 +26,8 @@ QM-DSP_DEP = libqm-dsp.a QM-DSP_H = qm-dsp -QM-DSP_CFLAGS=$(shell pkg-config --cflags blas-atlas lapack-atlas) -QM-DSP_LFLAGS=-llapack_atlas $(shell pkg-config --libs blas-atlas lapack-atlas) -lpthread +QM-DSP_CFLAGS=$(shell $(PKG_CONFIG) --cflags blas-atlas lapack-atlas) +QM-DSP_LFLAGS=-llapack_atlas $(shell $(PKG_CONFIG) --libs blas-atlas lapack-atlas) -lpthread CFLAGS+=$(QM-DSP_CFLAGS) @@ -31,9 +35,9 @@ dh $@ override_dh_auto_build: - $(MAKE) -f build/general/Makefile.inc + dh_auto_build --buildsystem=makefile -- -f build/general/Makefile.inc dh_auto_build - g++ -shared $(LDFLAGS) -o $(QM-DSP_MAJ) -Wl,-soname,$(QM-DSP_MAJ) -Wl,--whole-archive $(QM-DSP_DEP) -Wl,--no-whole-archive $(QM-DSP_LFLAGS) + $(CXX) -shared $(LDFLAGS) -o $(QM-DSP_MAJ) -Wl,-soname,$(QM-DSP_MAJ) -Wl,--whole-archive $(QM-DSP_DEP) -Wl,--no-whole-archive $(QM-DSP_LFLAGS) override_dh_auto_install: install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/base