Source: espeak
Version: 1.48.04+dfsg-3
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

espeak fails to cross build from source, because it uses the build
architecture compiler. Later dh_strip fails when it uses host
architecture tools. Simply passing triplet-prefixed CXX is sufficient to
make it build. Please consider applying the attached patch.

Helmut
diff --minimal -Nru espeak-1.48.04+dfsg/debian/changelog 
espeak-1.48.04+dfsg/debian/changelog
--- espeak-1.48.04+dfsg/debian/changelog        2016-05-22 23:59:26.000000000 
+0200
+++ espeak-1.48.04+dfsg/debian/changelog        2016-09-04 19:30:47.000000000 
+0200
@@ -1,3 +1,11 @@
+espeak (1.48.04+dfsg-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Pass triplet-prefixed CXX to make
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 04 Sep 2016 19:30:27 +0200
+
 espeak (1.48.04+dfsg-3) unstable; urgency=medium
 
   * patches/char_cast: New patch, fixes build with g++-6 (Closes: Bug#811772).
diff --minimal -Nru espeak-1.48.04+dfsg/debian/rules 
espeak-1.48.04+dfsg/debian/rules
--- espeak-1.48.04+dfsg/debian/rules    2016-01-24 01:11:24.000000000 +0100
+++ espeak-1.48.04+dfsg/debian/rules    2016-09-04 19:30:25.000000000 +0200
@@ -7,19 +7,22 @@
 soname=libespeak.so.1
 version=$(shell dpkg-parsechangelog|sed -n -e 's/^Version: //p'|cut -d- 
-f1|cut -d. -f1-2)
 
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CXX),default)
+       CXX = $(DEB_HOST_GNU_TYPE)-g++
+endif
 ESPEAK_DATA=/usr/lib/$(DEB_HOST_MULTIARCH)
 
 override_dh_auto_build:
        cp src/portaudio19.h src/portaudio.h
-       cd src && $(MAKE) CXXFLAGS="$(CXXFLAGS) $(CFLAGS)" 
DATADIR=$(ESPEAK_DATA)/espeak-data libespeak.a
+       cd src && $(MAKE) CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) $(CFLAGS)" 
DATADIR=$(ESPEAK_DATA)/espeak-data libespeak.a
        # Remove object files so we can rebuild them with
        # AUDIO=runtime enabled
        rm -f src/*.o
-       cd src && $(MAKE) CXXFLAGS="$(CXXFLAGS) $(CFLAGS)" 
DATADIR=$(ESPEAK_DATA)/espeak-data espeak AUDIO=runtime
+       cd src && $(MAKE) CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) $(CFLAGS)" 
DATADIR=$(ESPEAK_DATA)/espeak-data espeak AUDIO=runtime
 
        # Build static speak binary
-       cd platforms/big_endian && CFLAGS="$(CFLAGS)" $(MAKE)
+       cd platforms/big_endian && CFLAGS="$(CFLAGS)" $(MAKE) CXX=$(CXX)
        # Build voice metadata.
        cp -a $(CURDIR)/espeak-data $(CURDIR)/espeak-data-local
        $(CURDIR)/platforms/big_endian/espeak-phoneme-data 
$(CURDIR)/espeak-data-local $(CURDIR)/espeak-data-local 
$(CURDIR)/espeak-data-local/phondata-manifest

Reply via email to