Bug#852768: ocrad FTCBFS: uses the build architecture C++ compiler
Source: ocrad
Version: 0.25-2
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap
ocrad fails to cross build from source, because it uses the build
architecture C++ compiler. Simply passing a triplet-prefixed CXX
variable to configure makes the cross build succeed. Please consider
applying the attached patch.
Helmut
diff --minimal -Nru ocrad-0.25/debian/changelog ocrad-0.25/debian/changelog
--- ocrad-0.25/debian/changelog 2017-01-17 18:36:35.000000000 +0100
+++ ocrad-0.25/debian/changelog 2017-01-27 07:16:16.000000000 +0100
@@ -1,3 +1,10 @@
+ocrad (0.25-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: Pass triplet-prefixed CXX to configure (Closes: #-1).
+
+ -- Helmut Grohne <helmut@subdivi.de> Fri, 27 Jan 2017 07:16:16 +0100
+
ocrad (0.25-2) unstable; urgency=medium
* QA upload.
diff --minimal -Nru ocrad-0.25/debian/rules ocrad-0.25/debian/rules
--- ocrad-0.25/debian/rules 2016-07-12 11:52:24.000000000 +0200
+++ ocrad-0.25/debian/rules 2017-01-27 07:16:15.000000000 +0100
@@ -4,7 +4,11 @@
CPPFLAGS = -W -Wall $(shell dpkg-buildflags --get CPPFLAGS) -D_FILE_OFFSET_BITS=64
LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architectur -qDEB_HOST_GNU_TYPE)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+ifeq ($(origin CXX),default)
+CXX = $(DEB_HOST_GNU_TYPE)-g++
+endif
.PHONY: build build-indep build-arch
build: build-indep build-arch
@@ -23,6 +27,7 @@
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
+ CXX="$(CXX)" \
CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
touch $(@)
Reply to: