From 44cba101ce0e97c8e7551005c8bc916518a6bd80 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 26 Mar 2018 14:52:50 -0700 Subject: packaging to make use of CXX_FOR_BUILD for dictgen --- debian/patches/cross.patch | 21 +++++++++++++++++++++ debian/patches/series | 1 + debian/rules | 3 +++ 3 files changed, 25 insertions(+) create mode 100644 debian/patches/cross.patch diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch new file mode 100644 index 0000000..4ce10a2 --- /dev/null +++ b/debian/patches/cross.patch @@ -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 --git a/debian/patches/series b/debian/patches/series index 252c97d..559c234 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ patch-README-for-Debian.patch +cross.patch diff --git a/debian/rules b/debian/rules index 84fd4e2..a132819 100755 --- a/debian/rules +++ b/debian/rules @@ -5,5 +5,8 @@ # non-executable libraries export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie +-include /usr/share/dpkg/buildtools.mk +export CXX_FOR_BUILD ?= g++ + %: dh $@ -- cgit v1.2.3