Source: openttd
Version: 1.8.0-1
Tags: patch
User: [email protected]
Usertags: rebootstrap

openttd fails to cross build from source, because it uses the build
architecture pkg-config. The build system expects the packaging to pass
--pkg-config to use a triplet-prefixed pkg-config. Doing so is
sufficient to make openttd cross buildable. Please consider applying the
attached patch.

Helmut
diff --minimal -Nru openttd-1.8.0/debian/changelog 
openttd-1.8.0/debian/changelog
--- openttd-1.8.0/debian/changelog      2018-04-30 15:46:44.000000000 +0200
+++ openttd-1.8.0/debian/changelog      2018-05-15 20:57:32.000000000 +0200
@@ -1,3 +1,10 @@
+openttd (1.8.0-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Supply --pkg-config to ./configure. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Tue, 15 May 2018 20:57:32 +0200
+
 openttd (1.8.0-1) unstable; urgency=medium
 
   * [4c62ea5] New upstream release 1.8.0
diff --minimal -Nru openttd-1.8.0/debian/rules openttd-1.8.0/debian/rules
--- openttd-1.8.0/debian/rules  2018-04-30 15:46:44.000000000 +0200
+++ openttd-1.8.0/debian/rules  2018-05-15 20:57:30.000000000 +0200
@@ -6,8 +6,10 @@
 %:
        dh $@
 
-DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+include /usr/share/dpkg/architecture.mk
+-include /usr/share/dpkg/buildtools.mk
+PKG_CONFIG ?= pkg-config
+
 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
 CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
 endif
@@ -29,7 +31,7 @@
 # to be explicit about the dependencies, in case we're not running in a
 # clean build root.
 override_dh_auto_configure:
-       ./configure $(CROSS) --prefix-dir=/usr --install-dir=debian/tmp 
--menu-group="Game;StrategyGame;" --without-allegro --with-zlib --with-sdl 
--with-png --with-freetype --with-fontconfig --with-icu --with-liblzo2 
--with-liblzma --without-iconv --with-xdg-basedir --disable-strip 
CFLAGS="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS) $(CPPFLAGS)" 
LDFLAGS="$(LDFLAGS)" CFLAGS_BUILD="$(CFLAGS) $(CPPFLAGS)" 
CXXFLAGS_BUILD="$(CXXFLAGS) $(CPPFLAGS)" LDFLAGS_BUILD="$(LDFLAGS)"
+       ./configure $(CROSS) --prefix-dir=/usr --install-dir=debian/tmp 
--menu-group="Game;StrategyGame;" --without-allegro --with-zlib --with-sdl 
--with-png --with-freetype --with-fontconfig --with-icu --with-liblzo2 
--with-liblzma --without-iconv --with-xdg-basedir --disable-strip 
--pkg-config=$(PKG_CONFIG) CFLAGS="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS) 
$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CFLAGS_BUILD="$(CFLAGS) $(CPPFLAGS)" 
CXXFLAGS_BUILD="$(CXXFLAGS) $(CPPFLAGS)" LDFLAGS_BUILD="$(LDFLAGS)"
 
 # Do some extra installation
 override_dh_auto_install:

Reply via email to