Package: groff
Version: 1.22.3-5
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: hardened1-linux-amd64

Dear Groff Maintainers,

I have successfully bootstrapped the hardened1-linux-amd64 [1]
port using a set of patches [2].
I'm working towards making the port ready for being accepted to
Debian and the attached patches are adding the port support to
groff.

This patch can be generally useful for cross-compiling when
different build flags are used for the build and host systems.

Dpkg support for the port is being discussed in #812782.

Accepting this patch would make (re-)bootstrapping the new
port easier.

Thank you in advance,
Balint

[1]
http://balintreczey.hu/blog/proposing-amd64-hardened-architecture-for-debian/
[2] https://anonscm.debian.org/cgit/users/rbalint/rebootstrap.git/


diff --git a/debian/rules b/debian/rules
index 84f6894..dfda63f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,6 +15,7 @@ include /usr/share/dpkg/buildflags.mk
 
 buildflags := CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \
 	      CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)"
+buildflags_native := $(shell DEB_HOST_ARCH=$(DEB_BUILD_ARCH) dpkg-buildflags --export=configure)
 
 # From Makefile.in
 version  = $(shell cat VERSION)
@@ -47,7 +48,7 @@ override_dh_auto_configure:
 		$(buildflags) \
 		$(CURDIR)/src/libs/gnulib/configure $(confflags_gnulib)
 ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
-	$(buildflags) YACC='bison -y' PSPRINT=lpr PAGE=A4 \
+	$(buildflags_native) YACC='bison -y' PSPRINT=lpr PAGE=A4 \
 		DEB_HOST_GNU_TYPE=$(DEB_BUILD_GNU_TYPE) \
 		env -u CONFIG_SITE \
 		dh_auto_configure --builddirectory=debian/build-native -- \

Reply via email to