Source: gtk-chtheme Version: 0.3.1-5 Tags: patch User: helm...@debian.org Usertags: rebootstrap
gtk-chtheme fails to cross build from source, because it uses build architecture tools. The make invocation from debian/rules fails to pass cross compilers to make. dh_auto_build fixes that. Then the Makefile fails to use the passed cross $PKG_CONFIG and uses the build architecture strip. Stripping during make install is particularly bad as it breaks -dbgsym packages in addition to breaking cross building. The attached patch fixes all of these problems and makes gtk-chtheme cross build successfully. Please consider applying it. Helmut
diff --minimal -Nru gtk-chtheme-0.3.1/debian/changelog gtk-chtheme-0.3.1/debian/changelog --- gtk-chtheme-0.3.1/debian/changelog 2011-04-10 12:55:48.000000000 +0200 +++ gtk-chtheme-0.3.1/debian/changelog 2018-01-22 20:14:19.000000000 +0100 @@ -1,3 +1,13 @@ +gtk-chtheme (0.3.1-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_make pass cross tools to make. + + cross.patch: Use the passed $PKG_CONFIG. + + cross.patch: Defer stripping to dh_strip. + + -- Helmut Grohne <hel...@subdivi.de> Mon, 22 Jan 2018 20:14:19 +0100 + gtk-chtheme (0.3.1-5) unstable; urgency=low * Fix FTBFS on some deprecated calls against gtk3+ (Closes: #621975). diff --minimal -Nru gtk-chtheme-0.3.1/debian/patches/cross.patch gtk-chtheme-0.3.1/debian/patches/cross.patch --- gtk-chtheme-0.3.1/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ gtk-chtheme-0.3.1/debian/patches/cross.patch 2018-01-22 20:14:19.000000000 +0100 @@ -0,0 +1,26 @@ +Index: gtk-chtheme-0.3.1/Makefile +=================================================================== +--- gtk-chtheme-0.3.1.orig/Makefile ++++ gtk-chtheme-0.3.1/Makefile +@@ -1,10 +1,11 @@ + include Metadata + ++PKG_CONFIG ?= pkg-config + CFLAGS := $(if $(RPM_OPT_FLAGS), $(RPM_OPT_FLAGS), $(CFLAGS)) + +-LDFLAGS = $(shell pkg-config --libs gtk+-2.0) ++LDFLAGS = $(shell $(PKG_CONFIG) --libs gtk+-2.0) + CFLAGS += -Wall +-CFLAGS += $(shell pkg-config --cflags gtk+-2.0) -DGTK_DISABLE_BROKEN -DGTK_DISABLE_DEPRECATED ++CFLAGS += $(shell $(PKG_CONFIG) --cflags gtk+-2.0) -DGTK_DISABLE_BROKEN -DGTK_DISABLE_DEPRECATED + CFLAGS += -DPROJNAME='"$(PROJNAME)"' -DVERSION='"$(VERSION)"' + CPPFLAGS = + CXXFLAGS = +@@ -38,7 +39,6 @@ + -rm -f $(EXENAME).spec $(EXENAME).1 Makefile.bak + + install: all +- strip $(EXENAME) + install -d $(DESTDIR)/$(BINDIR) + install -c $(EXENAME) $(DESTDIR)/$(BINDIR) + install -d $(DESTDIR)/$(MANDIR)/man1 diff --minimal -Nru gtk-chtheme-0.3.1/debian/patches/series gtk-chtheme-0.3.1/debian/patches/series --- gtk-chtheme-0.3.1/debian/patches/series 2011-04-10 12:50:40.000000000 +0200 +++ gtk-chtheme-0.3.1/debian/patches/series 2018-01-22 20:14:01.000000000 +0100 @@ -1,2 +1,3 @@ backup-gtkrc-implementation.patch deprecated-on-gtk3+.patch +cross.patch diff --minimal -Nru gtk-chtheme-0.3.1/debian/rules gtk-chtheme-0.3.1/debian/rules --- gtk-chtheme-0.3.1/debian/rules 2011-04-10 12:56:36.000000000 +0200 +++ gtk-chtheme-0.3.1/debian/rules 2018-01-22 20:14:19.000000000 +0100 @@ -18,7 +18,7 @@ build: build-stamp build-stamp: configure-stamp dh_testdir - $(MAKE) + dh_auto_build #docbook-to-man debian/gtk-chtheme.sgml > gtk-chtheme.1 touch $@