Source: openttd
Version: 12.1-2
Tags: patch
User: [email protected]
Usertags: ftcbfs

Since openttd 12.1, upstream requires building the strgen utility in a
separate build pass for cross builds. The packaging has not been updated
to accommodate this. As such, it fails running strgen. I'm attaching a
patch for your convenience.

Helmut
diff --minimal -Nru openttd-12.2/debian/changelog openttd-12.2/debian/changelog
--- openttd-12.2/debian/changelog       2022-04-20 15:17:01.000000000 +0200
+++ openttd-12.2/debian/changelog       2022-09-28 09:58:26.000000000 +0200
@@ -1,3 +1,10 @@
+openttd (12.2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Build native strgen. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Wed, 28 Sep 2022 09:58:26 +0200
+
 openttd (12.2-1) unstable; urgency=medium
 
   * [789d2fd] Fix typo in Suggests: timidity (Closes: #1003269)
diff --minimal -Nru openttd-12.2/debian/clean openttd-12.2/debian/clean
--- openttd-12.2/debian/clean   1970-01-01 01:00:00.000000000 +0100
+++ openttd-12.2/debian/clean   2022-09-28 09:58:24.000000000 +0200
@@ -0,0 +1 @@
+build-native
diff --minimal -Nru openttd-12.2/debian/rules openttd-12.2/debian/rules
--- openttd-12.2/debian/rules   2022-04-20 15:17:01.000000000 +0200
+++ openttd-12.2/debian/rules   2022-09-28 09:58:26.000000000 +0200
@@ -2,6 +2,8 @@
 # -*- makefile -*-
 # Makefile to build the openttd debian package.
 
+include /usr/share/dpkg/architecture.mk
+
 # Use debhelper default for all targets (but some are overridden below).
 %:
        dh $@ --buildsystem=cmake
@@ -37,7 +39,11 @@
 # to be explicit about the dependencies, in case we're not running in a
 # clean build root.
 override_dh_auto_configure:
-       dh_auto_configure -- $(CMAKE_CONFIG_ARGUMENTS)
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+       dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_configure 
-Bbuild-native -- -DOPTION_TOOLS_ONLY=ON
+       dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build -Bbuild-native
+endif
+       dh_auto_configure -- $(CMAKE_CONFIG_ARGUMENTS) $(if $(filter 
$(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)),,-DHOST_BINARY_DIR=$(CURDIR)/build-native)
 
 execute_after_dh_install-arch:
        # Prevent installing duplicate license file

Reply via email to