Source: gtk-theme-switch Version: 2.1.0-5 Tags: patch User: [email protected] Usertags: rebootstrap
gtk-theme-switch fails to cross build from source, because it uses the build architecture toolchain. Using dh_auto_build improves that, but the upstream Makefile calls the compiler $(GCC) rather than $(CC) and does not allow substituting pkg-config. After fixing all of that, gtk-theme-switch cross builds successfully. Please consider applying the attached patch. Helmut
diff --minimal -Nru gtk-theme-switch-2.1.0/debian/changelog gtk-theme-switch-2.1.0/debian/changelog --- gtk-theme-switch-2.1.0/debian/changelog 2014-10-26 17:36:30.000000000 +0100 +++ gtk-theme-switch-2.1.0/debian/changelog 2017-10-13 11:52:28.000000000 +0200 @@ -1,3 +1,12 @@ +gtk-theme-switch (2.1.0-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross tools to make. + + Add cross.patch. + + -- Helmut Grohne <[email protected]> Fri, 13 Oct 2017 11:52:28 +0200 + gtk-theme-switch (2.1.0-5) unstable; urgency=medium * Fix d/copyright (Closes: #766869) diff --minimal -Nru gtk-theme-switch-2.1.0/debian/patches/cross.patch gtk-theme-switch-2.1.0/debian/patches/cross.patch --- gtk-theme-switch-2.1.0/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ gtk-theme-switch-2.1.0/debian/patches/cross.patch 2017-10-13 11:52:28.000000000 +0200 @@ -0,0 +1,22 @@ +From: Helmut Grohne <[email protected]> +Subject: make pkg-config substitutable for cross compilation + +Index: gtk-theme-switch-2.1.0/Makefile +=================================================================== +--- gtk-theme-switch-2.1.0.orig/Makefile ++++ gtk-theme-switch-2.1.0/Makefile +@@ -24,11 +24,12 @@ + #========================================================================= + + GCC = gcc ++PKG_CONFIG ?= pkg-config + PREFIX=/usr/local + CFLAGS = -g -O2 -Wall +-CFLAGS_GTK2 = $(shell pkg-config gtk+-2.0 --cflags) ++CFLAGS_GTK2 = $(shell $(PKG_CONFIG) gtk+-2.0 --cflags) + +-LIBS_GTK2 = $(shell pkg-config gtk+-2.0 --libs) ++LIBS_GTK2 = $(shell $(PKG_CONFIG) gtk+-2.0 --libs) + + VERSION = 2.1.0 + diff --minimal -Nru gtk-theme-switch-2.1.0/debian/patches/series gtk-theme-switch-2.1.0/debian/patches/series --- gtk-theme-switch-2.1.0/debian/patches/series 2014-10-26 17:25:20.000000000 +0100 +++ gtk-theme-switch-2.1.0/debian/patches/series 2017-10-13 11:52:10.000000000 +0200 @@ -2,3 +2,4 @@ exit-cleanly-when-we-have-no-homedir.patch escape-theme-name-in-system.patch manpage-remove-eol-whitespace-and-fix-title.patch +cross.patch diff --minimal -Nru gtk-theme-switch-2.1.0/debian/rules gtk-theme-switch-2.1.0/debian/rules --- gtk-theme-switch-2.1.0/debian/rules 2013-12-04 14:08:26.000000000 +0100 +++ gtk-theme-switch-2.1.0/debian/rules 2017-10-13 11:52:04.000000000 +0200 @@ -2,6 +2,6 @@ %: dh $@ override_dh_auto_build: - make CFLAGS="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get LDFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" LIBS_GTK2="-lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 -lglib-2.0" + dh_auto_build -- GCC='$$(CC)' CFLAGS="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get LDFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" LIBS_GTK2="-lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 -lglib-2.0" override_dh_auto_install:

