Package: gettext Version: 0.19.8.1-1 Severity: minor Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu yakkety ubuntu-patch
Hi Santiago, In Ubuntu, we are carrying a patch to gettext to make it cross-buildable. This seems a worthwhile feature to include in Debian also, given gettext's status as a base package. Please find attached a patch to debian/rules which should enable this. Thanks for considering the patch. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
diff -Nru gettext-0.19.8.1/debian/rules gettext-0.19.8.1/debian/rules --- gettext-0.19.8.1/debian/rules 2016-06-12 15:00:00.000000000 -0700 +++ gettext-0.19.8.1/debian/rules 2016-07-26 22:53:41.000000000 -0700 @@ -4,7 +4,11 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=-format -CC = gcc +DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) + +CC = $(DEB_HOST_GNU_TYPE)-gcc CFLAGS := `dpkg-buildflags --get CFLAGS` -Wall CXXFLAGS := `dpkg-buildflags --get CXXFLAGS` -Wall LDFLAGS := `dpkg-buildflags --get LDFLAGS` @@ -15,6 +19,18 @@ DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +STRIP = true + +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + # FIXME: libtool seems to call strip directly + ifeq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)) + INSTALL_PROGRAM += -s + STRIP=strip --strip-unneeded --remove-section=.comment --remove-section=.note + else + STRIP=$(DEB_HOST_GNU_TYPE)-strip --strip-unneeded --remove-section=.comment --remove-section=.note + endif +endif + export AM_UPDATE_INFO_DIR = no # PNET_ARCHS = %alpha%amd64%hppa%i386%ia64%mips%mipsel%powerpc%s390%sparc% @@ -29,9 +45,10 @@ NOJAVA_ARCHS = %none% build: ./configure --prefix=/usr --enable-threads $(CSHARP) \ + --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \ --disable-native-java CC="$(CC)" CFLAGS="$(CFLAGS)" \ JAVAC=/usr/lib/jvm/default-java/bin/javac \ CPPFLAGS="$(CPPFLAGS)" \ CXXFLAGS="$(CXXFLAGS)" \