Source: zxcvbn-c Version: 2.3+dfsg-1 Tags: patch User: [email protected] Usertags: rebootstrap
zxcvbn-c fails to cross build from source, because it fails running ./dictgen. That tool should be compiled with the build architecture compiler. The attached patch implements that and makes zxcvbn-c cross build successfully. Please consider applying it. Helmut
diff --minimal -Nru zxcvbn-c-2.3+dfsg/debian/changelog zxcvbn-c-2.3+dfsg/debian/changelog --- zxcvbn-c-2.3+dfsg/debian/changelog 2017-06-25 07:58:17.000000000 +0200 +++ zxcvbn-c-2.3+dfsg/debian/changelog 2018-03-25 13:36:47.000000000 +0200 @@ -1,3 +1,11 @@ +zxcvbn-c (2.3+dfsg-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Use the build architecture compiler for + dict-generate.cpp. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Sun, 25 Mar 2018 13:36:47 +0200 + zxcvbn-c (2.3+dfsg-1) unstable; urgency=medium * New upstream release (Closes: #858108). diff --minimal -Nru zxcvbn-c-2.3+dfsg/debian/patches/cross.patch zxcvbn-c-2.3+dfsg/debian/patches/cross.patch --- zxcvbn-c-2.3+dfsg/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ zxcvbn-c-2.3+dfsg/debian/patches/cross.patch 2018-03-25 13:36:18.000000000 +0200 @@ -0,0 +1,21 @@ +Index: zxcvbn-c-2.3+dfsg/makefile +=================================================================== +--- zxcvbn-c-2.3+dfsg.orig/makefile ++++ zxcvbn-c-2.3+dfsg/makefile +@@ -5,6 +5,7 @@ + CC ?= gcc + AR ?= ar + CXX ?= g++ ++CXX_FOR_BUILD ?= $(CXX) + + # need zxcvbn.h prior to package installation + CPPFLAGS += -I. +@@ -57,7 +58,7 @@ + ./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS) + + dictgen: dict-generate.cpp makefile +- $(CXX) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ ++ $(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ + -o dictgen dict-generate.cpp $(LDFLAGS) + + test-c++inline: test.c zxcvbn-c++inline.o diff --minimal -Nru zxcvbn-c-2.3+dfsg/debian/patches/series zxcvbn-c-2.3+dfsg/debian/patches/series --- zxcvbn-c-2.3+dfsg/debian/patches/series 2017-06-25 07:48:16.000000000 +0200 +++ zxcvbn-c-2.3+dfsg/debian/patches/series 2018-03-25 13:35:17.000000000 +0200 @@ -1 +1,2 @@ patch-README-for-Debian.patch +cross.patch diff --minimal -Nru zxcvbn-c-2.3+dfsg/debian/rules zxcvbn-c-2.3+dfsg/debian/rules --- zxcvbn-c-2.3+dfsg/debian/rules 2017-06-25 07:48:16.000000000 +0200 +++ zxcvbn-c-2.3+dfsg/debian/rules 2018-03-25 13:36:41.000000000 +0200 @@ -4,6 +4,8 @@ # executables in order to run the test suite, we only install # non-executable libraries export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie +-include /usr/share/dpkg/buildtools.mk +export CXX_FOR_BUILD ?= g++ %: dh $@

