Source: warzone2100
Version: 4.2.7-2
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

warzone2100 fails to cross build from source, because it does not pass
cross flags to cmake. The easiest way of doing so - using
dh_auto_configure - makes warzone2100 cross buildable (after disabling
-Wdate-time). Please consider applying the attached patch.

Helmut
diff --minimal -Nru warzone2100-4.2.7/debian/changelog 
warzone2100-4.2.7/debian/changelog
--- warzone2100-4.2.7/debian/changelog  2022-07-30 17:28:56.000000000 +0200
+++ warzone2100-4.2.7/debian/changelog  2022-10-28 14:44:33.000000000 +0200
@@ -1,3 +1,12 @@
+warzone2100 (4.2.7-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_configure pass cross flags to cmake.
+    + Disable -Wdate-time as it breaks the build with -Werror.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 28 Oct 2022 14:44:33 +0200
+
 warzone2100 (4.2.7-2) unstable; urgency=medium
 
   * Team upload.
diff --minimal -Nru warzone2100-4.2.7/debian/rules 
warzone2100-4.2.7/debian/rules
--- warzone2100-4.2.7/debian/rules      2022-07-30 17:28:43.000000000 +0200
+++ warzone2100-4.2.7/debian/rules      2022-10-28 14:44:33.000000000 +0200
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 #export DH_VERBOSE=1
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=-timeless
 export DEB_CPPFLAGS_MAINT_APPEND = -DNDEBUG
 
 # riscv64 needs explicit -latomic
@@ -10,16 +10,14 @@
 endif
 
 %:
-       dh $@
+       dh $@ -Scmake+ninja -Bdebian/build
 
 override_dh_auto_configure:
        # Remove embedded code copies so we never use them
        rm -rf 3rdparty/miniupnpc
        # Remove generated files so we regenerate them
        rm -f doc/warzone2100.6
-       rm -rf debian/build
-       mkdir debian/build
-       cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja -S . -B debian/build
+       dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo
 
 override_dh_auto_build:
        (cd po ; ./update-po.sh ; cp -r custom ../debian/build/po )

Reply via email to