diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2018-03-26 14:52:50 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2018-03-26 14:52:50 -0700 |
commit | 44cba101ce0e97c8e7551005c8bc916518a6bd80 (patch) | |
tree | 904d98e005899bc9236bcba8522204e470253bcf | |
parent | 3fdbfee2c6b66a8b72514ed49bd350c11ef573fe (diff) | |
download | zxcvbn-c-44cba101ce0e97c8e7551005c8bc916518a6bd80.tar.gz |
packaging to make use of CXX_FOR_BUILD for dictgen
-rw-r--r-- | debian/patches/cross.patch | 21 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rwxr-xr-x | debian/rules | 3 |
3 files changed, 25 insertions, 0 deletions
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 $@ |