From 959560388c77e88afed60566fcafa6a0ccfc06a2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 12:25:04 +0000 Subject: [PATCH 01/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index ad83ba8..379e73f 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open source realtime-strategy game License: GPLv2+ @@ -187,6 +187,9 @@ popd %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sun Mar 6 2022 Hans de Goede - 1.0-1 - New upstream release 1.0 (rhbz1974007) - Fix FTBFS (rhbz2047116) From 2991c314c3be08a5a95816a333145e7ff32ac271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Mon, 1 Aug 2022 15:13:01 +0200 Subject: [PATCH 02/29] Rebuilt for ICU 71.1 --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index 379e73f..044d08b 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Open source realtime-strategy game License: GPLv2+ @@ -187,6 +187,9 @@ popd %changelog +* Mon Aug 01 2022 Frantisek Zatloukal - 1.0-3 +- Rebuilt for ICU 71.1 + * Sat Jul 23 2022 Fedora Release Engineering - 1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 461db30a86bf7fff9c58b6793cc4718ede39e8f8 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 14 Aug 2022 23:35:17 +0200 Subject: [PATCH 03/29] Fix FTBFS (rhbz#2114565) --- widelands-1.0-gcc12.1.patch | 11 +++++++++++ widelands.spec | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 widelands-1.0-gcc12.1.patch diff --git a/widelands-1.0-gcc12.1.patch b/widelands-1.0-gcc12.1.patch new file mode 100644 index 0000000..9bb34be --- /dev/null +++ b/widelands-1.0-gcc12.1.patch @@ -0,0 +1,11 @@ +diff -up widelands-1.0/src/network/bufferedconnection.h~ widelands-1.0/src/network/bufferedconnection.h +--- widelands-1.0/src/network/bufferedconnection.h~ 2021-06-14 11:22:20.000000000 +0200 ++++ widelands-1.0/src/network/bufferedconnection.h 2022-08-14 22:23:40.946949729 +0200 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include "network/network.h" + #include "network/relay_protocol.h" diff --git a/widelands.spec b/widelands.spec index 044d08b..5c94288 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Open source realtime-strategy game License: GPLv2+ @@ -22,6 +22,7 @@ Patch1: widelands-build20-gcc10.patch # at glew 2.3, or maybe backport: # https://github.com/nigels-com/glew/commit/715afa0ff56c0eb12c23938b80aa2813daa10d81 Patch2: widelands-1.0-make-sdl2-use-x11.patch +Patch3: widelands-1.0-gcc12.1.patch BuildRequires: SDL2-devel BuildRequires: SDL2_image-devel @@ -187,6 +188,9 @@ popd %changelog +* Sun Aug 14 2022 Hans de Goede - 1.0-4 +- Fix FTBFS (rhbz#2114565) + * Mon Aug 01 2022 Frantisek Zatloukal - 1.0-3 - Rebuilt for ICU 71.1 From bf48c8638de564e0fdf9dea52ec140ae77aee93d Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Sat, 31 Dec 2022 03:49:48 +0000 Subject: [PATCH 04/29] Rebuild for ICU 72 --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index 5c94288..c11b662 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Open source realtime-strategy game License: GPLv2+ @@ -188,6 +188,9 @@ popd %changelog +* Sat Dec 31 2022 Pete Walter - 1.0-5 +- Rebuild for ICU 72 + * Sun Aug 14 2022 Hans de Goede - 1.0-4 - Fix FTBFS (rhbz#2114565) From 7c8a59603b437a6ad01a911f5ff54da31b4f4012 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 06:49:11 +0000 Subject: [PATCH 05/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index c11b662..e56cf8e 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Open source realtime-strategy game License: GPLv2+ @@ -188,6 +188,9 @@ popd %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 1.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Dec 31 2022 Pete Walter - 1.0-5 - Rebuild for ICU 72 From 01a266aea21806e4a198ef19f102c8124c2930ee Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 28 Mar 2023 11:19:32 +0200 Subject: [PATCH 06/29] New upstream release 1.1 (rhbz#2135131) Fix FTBFS (rhbz#2171759) --- .gitignore | 1 + ...9C81844E3EFFC3726CD477D53DCA9A6A3B14A4.gpg | Bin 1760 -> 0 bytes sources | 3 +- widelands-1.0-gcc12.1.patch | 11 - widelands-1.0-make-sdl2-use-x11.patch | 28 +- widelands-1.1-f37-sys-minizip-buildfix.patch | 14 + widelands-1.1-gcc13.patch | 314 ++++++++++++++++++ widelands-build19-ppc64le.patch | 14 +- widelands-build20-gcc10.patch | 24 +- widelands.spec | 24 +- 10 files changed, 377 insertions(+), 56 deletions(-) delete mode 100644 gpgkey-B79C81844E3EFFC3726CD477D53DCA9A6A3B14A4.gpg delete mode 100644 widelands-1.0-gcc12.1.patch create mode 100644 widelands-1.1-f37-sys-minizip-buildfix.patch create mode 100644 widelands-1.1-gcc13.patch diff --git a/.gitignore b/.gitignore index 2551fae..7b353a0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ Widelands-Build14-src.7z /widelands-build21.tar.gz /widelands-1.0.tar.gz /widelands-1.0.tar.gz.asc +/widelands-1.1.tar.gz diff --git a/gpgkey-B79C81844E3EFFC3726CD477D53DCA9A6A3B14A4.gpg b/gpgkey-B79C81844E3EFFC3726CD477D53DCA9A6A3B14A4.gpg deleted file mode 100644 index eef2ed00b8a3c67eaac780a3cc2c23144f3eaabc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1760 zcmajec{mgd0>|;Wgc)bU3`V&prEwNHX2_LI(_kFQ>rT0ago$zti_9Wp+_B?`oDIE> z)a10zgXW3`p-FGHDYV=N)vZ1R54Yq)wTNyjJx8YMvT%{&*lBJAGAe5$jMu`%|cI zGwvQlc6_z8uu7iA6&jZPa^xenZDvAJ-SqmZL3Br}8yiKBgq+gybhnEV;|N!`>z)ry zJa|_E(#wr<;1iX?!|x8rTrP$_6!Gr1w9Qyt7}M)wNa%fbpZUap$cYOz&f+HdpS5k) zdsV+ScqFR+H#eWN@%La*{AQjV#aY0lCJU6cWlNWp&0lahVCU4HI`=X{Qw(AA=r0Bwa%E(n(OB-FW-a53 zUfnp|ScOeg>n~aP)gR6{9nUCdUEY(pFv}K#O@1pywNB718QvEqj4^b`Rx7uf%&N5% ztVm&LGZ8jOJ5VRO@!7~>v6|_$=1wD+w4UkD9W2Tza0lNTb9*Q)roL_yD4#16ksO5ce<-Sp$!M2TbT6!6@9zL-mdqE*Urufdioc z96}D#R1izPi96{G@gEPL!1m|)>Wh`~fd2U_2nFWh2Y1{9@WA-_ctNMcq5OO>5Cj1N z13_njAY=>x$}jSti5~`b;#jyfE#XvWS>BjS>CGY0Gr?81^O)on3xMl;j~d3y()c^HC3Vs&c5a@)dOdy9GKk z_t}rs=g8NHrhuhFgI1zrK*EfFt?7XE&h!g_0z>7aL_!W_DhB=IH8r zL;rjyLFGF52a-F#P5$TDH3sS=ia-&_LSVCss5lX$al!CLO)uMGjo?QuvD*_8^ z)W92BbsMg+Yaw@h1fkc0Z(Gm!%D%U+F|rQ~+D3AO$;^RnO~lRW2hC6Oz7qDXlVfR( z_{tOX%H#FyusM?|sM%>^;hzsr32$}+S}PasC5WqAjzs}jkM$8hiJu6+sBg@<>DzS+ z)U{QAhB0VSG)q$3c@q+%vIN&$9WoZspBQ)Sp$U6|p72&QtgDM<#50*(7th(L_!}aw znL#DD0uVYgnhT=>-aX$e)g5>1j7f(DQn#)x^WZ3p9v-kO} z+Tyx(1M3?scB@Y#rvqr7CrIj4_TM)j(4^)S-fj=Yx>A&oBb>35c5DBXE}4!A(F4_U zzRc<`v;_GXW-nAql9SFV_8BY6f?B6w<}TXvt1HTtik;Evd3#~-WRlqA+cCe-Y6@Wv zLC$q(+(N1C?2m>yC0eM!Gp;_f8qFz})?YaTbej_xR{WY*&9QS1oY(fn|G=31O7!gF zE*_s&1IYPVR=^#n5AQ2-UZJjx$RhwZ=x%py?t6siQ><*8;wnY@4CpP)+~>k{t!SmG zeW?D2eSug$ozYe`GwbPxov>wvwKk5u#)L=QaEob8xlEGb1_qC(mQAT`re2wde?5H* zyzx6w=UD0a6G{0P#wvqSfof(59UC%js1i6#(rxUeqf76*sSS$y!it$@sG#-ZmF;2k zUBf>>CIj0b58P6JLG_Y0?fXBNuDV2Bq-E3@z?Q-;HsUOym0) zUE7TpTxu85{ef%jOY0n>J6mBPeuTVjHKfAR=S$q-b|1mT(UD)xB8BG%KWNCI9om1& zjHMKX2NCM7xllaG{oPyzRsU!+x{DV0sajUMD?!V3Pi7_ys-Gp4kDh!ZxV$Q!_q)6y z`#Y=9m#y*LQ$B||p`9jswLg_kx+Hx98!X4yTpzFb`FQ@fVEYZf)UF`PRC4*y10~1tgrwD2PX6&9)&5rUv09gb#wEzGB diff --git a/sources b/sources index 2d3b479..97a184f 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (widelands-1.0.tar.gz) = 1092750944a8669682097dfbd2b578cdb8fab377f32cb81ce8d85b9d9b2e8ae8c4c73500c0a89be649b360fd7e086e19595eba37cecb8d64679e46f7da13e46e -SHA512 (widelands-1.0.tar.gz.asc) = ea4f9b5c57c1fb05d451e36b8a774f0fa87f1e65312186b79a9d9fdbec52202edafffc19cfd7c3e8c28105c9657655cab51bee814cfc466003ca2f05d2d47d39 +SHA512 (widelands-1.1.tar.gz) = 29dbeae0940468c8aad6f0fa610c8467bdb6ecf2ba5fe9175683b7cdaab5f977fa86beb71de29057c829e9738568d15e10bc22fa7fc9e58132151a1a02d72d9d diff --git a/widelands-1.0-gcc12.1.patch b/widelands-1.0-gcc12.1.patch deleted file mode 100644 index 9bb34be..0000000 --- a/widelands-1.0-gcc12.1.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up widelands-1.0/src/network/bufferedconnection.h~ widelands-1.0/src/network/bufferedconnection.h ---- widelands-1.0/src/network/bufferedconnection.h~ 2021-06-14 11:22:20.000000000 +0200 -+++ widelands-1.0/src/network/bufferedconnection.h 2022-08-14 22:23:40.946949729 +0200 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - - #include "network/network.h" - #include "network/relay_protocol.h" diff --git a/widelands-1.0-make-sdl2-use-x11.patch b/widelands-1.0-make-sdl2-use-x11.patch index 37a0cf1..0c4deb2 100644 --- a/widelands-1.0-make-sdl2-use-x11.patch +++ b/widelands-1.0-make-sdl2-use-x11.patch @@ -1,7 +1,7 @@ -diff -up widelands-1.0/src/graphic/text/test/render_richtext.cc~ widelands-1.0/src/graphic/text/test/render_richtext.cc ---- widelands-1.0/src/graphic/text/test/render_richtext.cc~ 2021-06-14 11:22:20.000000000 +0200 -+++ widelands-1.0/src/graphic/text/test/render_richtext.cc 2022-03-06 15:37:49.207677348 +0100 -@@ -115,6 +115,9 @@ int main(int argc, char** argv) { +diff -up widelands-1.1/src/graphic/text/test/render_richtext.cc.orig widelands-1.1/src/graphic/text/test/render_richtext.cc +--- widelands-1.1/src/graphic/text/test/render_richtext.cc.orig 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/graphic/text/test/render_richtext.cc 2023-03-27 21:11:06.712405327 +0200 +@@ -114,6 +114,9 @@ int main(int argc, char** argv) { if (parse_arguments(argc, argv, &w, outname, inname, allowed_tags)) return 0; @@ -11,10 +11,10 @@ diff -up widelands-1.0/src/graphic/text/test/render_richtext.cc~ widelands-1.0/s if (SDL_Init(SDL_INIT_VIDEO) < 0) { std::cerr << "SDLInit did not succeed: " << SDL_GetError() << std::endl; return 1; -diff -up widelands-1.0/src/website/website_common.cc~ widelands-1.0/src/website/website_common.cc ---- widelands-1.0/src/website/website_common.cc~ 2021-06-14 11:22:20.000000000 +0200 -+++ widelands-1.0/src/website/website_common.cc 2022-03-06 15:37:57.151598065 +0100 -@@ -19,6 +19,7 @@ +diff -up widelands-1.1/src/website/website_common.cc.orig widelands-1.1/src/website/website_common.cc +--- widelands-1.1/src/website/website_common.cc.orig 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/website/website_common.cc 2023-03-27 21:11:06.712405327 +0200 +@@ -18,6 +18,7 @@ #include "website/website_common.h" @@ -22,8 +22,8 @@ diff -up widelands-1.0/src/website/website_common.cc~ widelands-1.0/src/website/ #include #include "base/i18n.h" -@@ -32,6 +33,9 @@ - void initialize() { +@@ -33,6 +34,9 @@ void initialize() { + set_initializer_thread(); i18n::set_locale("en"); + // GLEW only supports glx atm, force use of X11 even under Wayland @@ -32,10 +32,10 @@ diff -up widelands-1.0/src/website/website_common.cc~ widelands-1.0/src/website/ if (SDL_Init(SDL_INIT_VIDEO) != 0) { // We sometimes run into a missing video driver in our CI environment, so we exit 0 to prevent // too frequent failures -diff -up widelands-1.0/src/wlapplication.cc~ widelands-1.0/src/wlapplication.cc ---- widelands-1.0/src/wlapplication.cc~ 2021-06-14 11:22:20.000000000 +0200 -+++ widelands-1.0/src/wlapplication.cc 2022-03-06 15:37:00.952158832 +0100 -@@ -370,6 +370,9 @@ WLApplication::WLApplication(int const a +diff -up widelands-1.1/src/wlapplication.cc.orig widelands-1.1/src/wlapplication.cc +--- widelands-1.1/src/wlapplication.cc.orig 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/wlapplication.cc 2023-03-27 21:11:06.713405319 +0200 +@@ -404,6 +404,9 @@ WLApplication::WLApplication(int const a #endif // Start the SDL core diff --git a/widelands-1.1-f37-sys-minizip-buildfix.patch b/widelands-1.1-f37-sys-minizip-buildfix.patch new file mode 100644 index 0000000..8873993 --- /dev/null +++ b/widelands-1.1-f37-sys-minizip-buildfix.patch @@ -0,0 +1,14 @@ +diff -up widelands-1.1/cmake/WlFunctions.cmake~ widelands-1.1/cmake/WlFunctions.cmake +--- widelands-1.1/cmake/WlFunctions.cmake~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/cmake/WlFunctions.cmake 2023-03-28 10:31:21.413196378 +0200 +@@ -77,7 +77,9 @@ macro(_common_compile_tasks) + wl_include_directories(${NAME} ${CMAKE_SOURCE_DIR}/src) + wl_include_directories(${NAME} ${CMAKE_BINARY_DIR}/src) + if(MINIZIP_STATIC_LIBRARIES) +- wl_include_directories(${NAME} ${MINIZIP_INCLUDE_DIRS}) ++ if (MINIZIP_INCLUDE_DIRS) ++ wl_include_directories(${NAME} ${MINIZIP_INCLUDE_DIRS}) ++ endif() + target_compile_options(${NAME} PUBLIC ${MINIZIP_CFLAGS}) + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + include(CheckCXXCompilerFlag) diff --git a/widelands-1.1-gcc13.patch b/widelands-1.1-gcc13.patch new file mode 100644 index 0000000..b948e62 --- /dev/null +++ b/widelands-1.1-gcc13.patch @@ -0,0 +1,314 @@ +diff -up widelands-1.1/src/base/md5.h~ widelands-1.1/src/base/md5.h +--- widelands-1.1/src/base/md5.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/base/md5.h 2023-03-27 21:28:34.494634126 +0200 +@@ -22,6 +22,7 @@ + + #include + #include ++#include + #include + + /* Structure to save state of computation between the single steps. */ +diff -up widelands-1.1/src/build_info.h~ widelands-1.1/src/build_info.h +--- widelands-1.1/src/build_info.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/build_info.h 2023-03-27 21:24:21.545738695 +0200 +@@ -20,6 +20,7 @@ + #define WL_BUILD_INFO_H + + #include ++#include + + constexpr uint16_t kWidelandsCopyrightStart = 2002; + // If the following line is changed, the corresponding regex in 'utils/update_copyright.py' will +diff -up widelands-1.1/src/graphic/align.h~ widelands-1.1/src/graphic/align.h +--- widelands-1.1/src/graphic/align.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/graphic/align.h 2023-03-27 21:37:50.732994947 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_GRAPHIC_ALIGN_H + #define WL_GRAPHIC_ALIGN_H + ++#include + #include + + #include "base/rect.h" +diff -up widelands-1.1/src/base/random.h~ widelands-1.1/src/base/random.h +--- widelands-1.1/src/base/random.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/base/random.h 2023-03-27 21:40:08.219843589 +0200 +@@ -20,6 +20,7 @@ + #define WL_BASE_RANDOM_H + + #include ++#include + #include + + extern const uint32_t rng_sbox[256]; +diff -up widelands-1.1/src/io/filesystem/zip_filesystem.h~ widelands-1.1/src/io/filesystem/zip_filesystem.h +--- widelands-1.1/src/io/filesystem/zip_filesystem.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/io/filesystem/zip_filesystem.h 2023-03-27 21:46:36.709590151 +0200 +@@ -23,6 +23,7 @@ + + #include + #include ++#include + + #include "io/filesystem/filesystem.h" + #include "io/streamread.h" +diff -up widelands-1.1/src/base/time_string.h~ widelands-1.1/src/base/time_string.h +--- widelands-1.1/src/base/time_string.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/base/time_string.h 2023-03-27 22:28:19.024604798 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_BASE_TIME_STRING_H + #define WL_BASE_TIME_STRING_H + ++#include + #include + + /// Get a string representation conforming to ISO 8601 of the current time (in +diff -up widelands-1.1/src/logic/generic_save_handler.h~ widelands-1.1/src/logic/generic_save_handler.h +--- widelands-1.1/src/logic/generic_save_handler.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/generic_save_handler.h 2023-03-27 22:32:49.724403544 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GENERIC_SAVE_HANDLER_H + #define WL_LOGIC_GENERIC_SAVE_HANDLER_H + ++#include + #include + + #include "io/filesystem/filesystem.h" +diff -up widelands-1.1/src/scripting/persistence.h~ widelands-1.1/src/scripting/persistence.h +--- widelands-1.1/src/scripting/persistence.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/scripting/persistence.h 2023-03-27 22:39:15.022270365 +0200 +@@ -19,6 +19,8 @@ + #ifndef WL_SCRIPTING_PERSISTENCE_H + #define WL_SCRIPTING_PERSISTENCE_H + ++#include ++ + #include "scripting/lua.h" + + class FileRead; +diff -up widelands-1.1/src/map_io/map_elemental_packet.h~ widelands-1.1/src/map_io/map_elemental_packet.h +--- widelands-1.1/src/map_io/map_elemental_packet.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/map_io/map_elemental_packet.h 2023-03-27 22:44:03.699928430 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_MAP_IO_MAP_ELEMENTAL_PACKET_H + #define WL_MAP_IO_MAP_ELEMENTAL_PACKET_H + ++#include + #include + #include + +diff -up widelands-1.1/src/logic/save_handler.h~ widelands-1.1/src/logic/save_handler.h +--- widelands-1.1/src/logic/save_handler.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/save_handler.h 2023-03-27 22:53:07.898560634 +0200 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_SAVE_HANDLER_H + #define WL_LOGIC_SAVE_HANDLER_H + ++#include ++ + #include "io/filesystem/filesystem.h" + + namespace Widelands { +diff -up widelands-1.1/src/logic/map_revision.h~ widelands-1.1/src/logic/map_revision.h +--- widelands-1.1/src/logic/map_revision.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/map_revision.h 2023-03-27 22:57:27.966473320 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MAP_REVISION_H + #define WL_LOGIC_MAP_REVISION_H + ++#include + #include + + namespace Widelands { +diff -up widelands-1.1/src/logic/addons.h~ widelands-1.1/src/logic/addons.h +--- widelands-1.1/src/logic/addons.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/addons.h 2023-03-27 22:58:16.316085244 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_ADDONS_H + #define WL_LOGIC_ADDONS_H + ++#include + #include + #include + #include +diff -up widelands-1.1/src/logic/ai_dna_handler.h~ widelands-1.1/src/logic/ai_dna_handler.h +--- widelands-1.1/src/logic/ai_dna_handler.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/ai_dna_handler.h 2023-03-27 22:58:21.068047105 +0200 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_AI_DNA_HANDLER_H + #define WL_LOGIC_AI_DNA_HANDLER_H + ++#include ++ + #include "logic/player.h" + + namespace Widelands { +diff -up widelands-1.1/src/logic/cmd_queue.h~ widelands-1.1/src/logic/cmd_queue.h +--- widelands-1.1/src/logic/cmd_queue.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/cmd_queue.h 2023-03-27 22:58:25.692009993 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_CMD_QUEUE_H + #define WL_LOGIC_CMD_QUEUE_H + ++#include + #include + + #include "base/times.h" +diff -up widelands-1.1/src/logic/game.h~ widelands-1.1/src/logic/game.h +--- widelands-1.1/src/logic/game.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/game.h 2023-03-27 22:58:30.387972304 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GAME_H + #define WL_LOGIC_GAME_H + ++#include + #include + + #include "base/md5.h" +diff -up widelands-1.1/src/logic/game_controller.h~ widelands-1.1/src/logic/game_controller.h +--- widelands-1.1/src/logic/game_controller.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/game_controller.h 2023-03-27 22:58:37.804912776 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GAME_CONTROLLER_H + #define WL_LOGIC_GAME_CONTROLLER_H + ++#include + #include + + #include "base/times.h" +diff -up widelands-1.1/src/logic/game_settings.h~ widelands-1.1/src/logic/game_settings.h +--- widelands-1.1/src/logic/game_settings.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/game_settings.h 2023-03-27 22:58:42.244877140 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GAME_SETTINGS_H + #define WL_LOGIC_GAME_SETTINGS_H + ++#include + #include + #include + +diff -up widelands-1.1/src/logic/map.h~ widelands-1.1/src/logic/map.h +--- widelands-1.1/src/logic/map.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/map.h 2023-03-27 22:58:50.229813053 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MAP_H + #define WL_LOGIC_MAP_H + ++#include + #include + #include + #include +diff -up widelands-1.1/src/logic/mapastar.h~ widelands-1.1/src/logic/mapastar.h +--- widelands-1.1/src/logic/mapastar.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/mapastar.h 2023-03-27 22:58:56.220764976 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MAPASTAR_H + #define WL_LOGIC_MAPASTAR_H + ++#include + #include + + #include "logic/map.h" +diff -up widelands-1.1/src/logic/maphollowregion.h~ widelands-1.1/src/logic/maphollowregion.h +--- widelands-1.1/src/logic/maphollowregion.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/maphollowregion.h 2023-03-27 22:59:00.125733634 +0200 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_MAPHOLLOWREGION_H + #define WL_LOGIC_MAPHOLLOWREGION_H + ++#include ++ + #include "logic/map.h" + + namespace Widelands { +diff -up widelands-1.1/src/logic/message_queue.h~ widelands-1.1/src/logic/message_queue.h +--- widelands-1.1/src/logic/message_queue.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/message_queue.h 2023-03-27 22:59:06.236684594 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MESSAGE_QUEUE_H + #define WL_LOGIC_MESSAGE_QUEUE_H + ++#include + #include + #include + +diff -up widelands-1.1/src/logic/pathfield.h~ widelands-1.1/src/logic/pathfield.h +--- widelands-1.1/src/logic/pathfield.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/pathfield.h 2023-03-27 22:59:09.948654805 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_PATHFIELD_H + #define WL_LOGIC_PATHFIELD_H + ++#include + #include + + #include "logic/cookie_priority_queue.h" +diff -up widelands-1.1/src/logic/player.h~ widelands-1.1/src/logic/player.h +--- widelands-1.1/src/logic/player.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/player.h 2023-03-27 22:59:14.012622187 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_PLAYER_H + #define WL_LOGIC_PLAYER_H + ++#include + #include + #include + +diff -up widelands-1.1/src/logic/playercommand.h~ widelands-1.1/src/logic/playercommand.h +--- widelands-1.1/src/logic/playercommand.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/playercommand.h 2023-03-27 22:59:17.612593293 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_PLAYERCOMMAND_H + #define WL_LOGIC_PLAYERCOMMAND_H + ++#include + #include + + #include "economy/flag.h" +diff -up widelands-1.1/src/logic/replay_game_controller.h~ widelands-1.1/src/logic/replay_game_controller.h +--- widelands-1.1/src/logic/replay_game_controller.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/replay_game_controller.h 2023-03-27 22:59:21.420562726 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_REPLAY_GAME_CONTROLLER_H + #define WL_LOGIC_REPLAY_GAME_CONTROLLER_H + ++#include + #include + + #include "logic/cmd_queue.h" +diff -up widelands-1.1/src/logic/single_player_game_controller.h~ widelands-1.1/src/logic/single_player_game_controller.h +--- widelands-1.1/src/logic/single_player_game_controller.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/single_player_game_controller.h 2023-03-27 22:59:27.132516891 +0200 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H + #define WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H + ++#include ++ + #include "ai/computer_player.h" + #include "logic/game_controller.h" + +diff -up widelands-1.1/src/logic/single_player_game_settings_provider.h~ widelands-1.1/src/logic/single_player_game_settings_provider.h +--- widelands-1.1/src/logic/single_player_game_settings_provider.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/logic/single_player_game_settings_provider.h 2023-03-27 22:59:30.908486580 +0200 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H + #define WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H + ++#include ++ + #include "logic/game_settings.h" + + /** +diff -up widelands-1.1/src/graphic/text/textstream.h~ widelands-1.1/src/graphic/text/textstream.h +--- widelands-1.1/src/graphic/text/textstream.h~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/graphic/text/textstream.h 2023-03-27 23:05:15.095850210 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_GRAPHIC_TEXT_TEXTSTREAM_H + #define WL_GRAPHIC_TEXT_TEXTSTREAM_H + ++#include + #include + + namespace RT { diff --git a/widelands-build19-ppc64le.patch b/widelands-build19-ppc64le.patch index d1a092c..3142f2e 100644 --- a/widelands-build19-ppc64le.patch +++ b/widelands-build19-ppc64le.patch @@ -1,11 +1,9 @@ -diff -up widelands-1.0/CMakeLists.txt~ widelands-1.0/CMakeLists.txt ---- widelands-1.0/CMakeLists.txt~ 2021-06-14 11:22:20.000000000 +0200 -+++ widelands-1.0/CMakeLists.txt 2022-03-04 17:22:38.799386008 +0100 -@@ -314,9 +314,8 @@ if(NOT MSVC) - wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=format-security") - wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=return-type") - wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=shadow") -- wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=uninitialized") +diff -up widelands-1.1/CMakeLists.txt~ widelands-1.1/CMakeLists.txt +--- widelands-1.1/CMakeLists.txt~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/CMakeLists.txt 2023-03-27 20:45:53.395721787 +0200 +@@ -395,7 +395,7 @@ if(NOT MSVC) + endif() + endif() - wl_add_flag(WL_GENERIC_CXX_FLAGS "-std=c++11") + wl_add_flag(WL_GENERIC_CXX_FLAGS "-std=gnu++11") diff --git a/widelands-build20-gcc10.patch b/widelands-build20-gcc10.patch index 8787c49..ef56ff0 100644 --- a/widelands-build20-gcc10.patch +++ b/widelands-build20-gcc10.patch @@ -7,24 +7,24 @@ For some reason the s390x build (and only the s390x build) fails with: cc1plus: some warnings being treated as errors This fixes this. -diff -up widelands-1.0/src/ui_basic/box.cc~ widelands-1.0/src/ui_basic/box.cc ---- widelands-1.0/src/ui_basic/box.cc~ 2021-06-14 11:22:20.000000000 +0200 -+++ widelands-1.0/src/ui_basic/box.cc 2022-03-04 17:24:19.916850150 +0100 -@@ -177,7 +177,7 @@ void Box::layout() { - int spacing = -inner_spacing_; +diff -up widelands-1.1/src/ui_basic/box.cc~ widelands-1.1/src/ui_basic/box.cc +--- widelands-1.1/src/ui_basic/box.cc~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/ui_basic/box.cc 2023-03-27 20:56:58.130613954 +0200 +@@ -178,7 +178,7 @@ void Box::layout() { + int spacing = -1 * inner_spacing_; for (size_t idx = 0; idx < items_.size(); ++idx) { -- int depth, unused = 0; -+ int depth = 0, unused = 0; +- int depth; ++ int depth = 0; + int unused = 0; get_item_desired_size(idx, &depth, &unused); totaldepth += depth; - if (items_[idx].type != Item::ItemPanel || items_[idx].u.panel.panel->is_visible()) { -@@ -270,7 +270,7 @@ void Box::update_positions() { +@@ -275,7 +275,7 @@ void Box::update_positions() { } for (uint32_t idx = 0; idx < items_.size(); ++idx) { -- int depth, breadth = 0; -+ int depth = 0, breadth = 0; +- int depth; ++ int depth = 0; + int breadth = 0; get_item_size(idx, &depth, &breadth); - if (items_[idx].type == Item::ItemPanel) { diff --git a/widelands.spec b/widelands.spec index e56cf8e..095f4da 100644 --- a/widelands.spec +++ b/widelands.spec @@ -2,15 +2,13 @@ %global fonts font(amiri) font(dejavusans) font(dejavusansmono) font(dejavuserif) font(widelands) font(gargi) font(wenquanyimicrohei) font(frankruehlclm) Name: widelands -Version: 1.0 -Release: 6%{?dist} +Version: 1.1 +Release: 1%{?dist} Summary: Open source realtime-strategy game License: GPLv2+ URL: http://www.widelands.org -Source0: https://launchpad.net/widelands/1.x/%{version}/+download/widelands-%{version}.tar.gz -Source1: https://launchpad.net/widelands/1.x/%{version}/+download/widelands-%{version}.tar.gz.asc -Source2: gpgkey-B79C81844E3EFFC3726CD477D53DCA9A6A3B14A4.gpg +Source0: https://github.com/widelands/widelands/archive/v%{version}/%{name}-%{version}.tar.gz # gnu++11 fix in CMakeLists.txt for PPC64 little-endian # + remove -Werror=uninitialized to fix build with gcc12 Patch0: widelands-build19-ppc64le.patch @@ -22,8 +20,10 @@ Patch1: widelands-build20-gcc10.patch # at glew 2.3, or maybe backport: # https://github.com/nigels-com/glew/commit/715afa0ff56c0eb12c23938b80aa2813daa10d81 Patch2: widelands-1.0-make-sdl2-use-x11.patch -Patch3: widelands-1.0-gcc12.1.patch +Patch3: widelands-1.1-gcc13.patch +Patch4: widelands-1.1-f37-sys-minizip-buildfix.patch +BuildRequires: asio-devel BuildRequires: SDL2-devel BuildRequires: SDL2_image-devel BuildRequires: SDL2_mixer-devel @@ -39,8 +39,8 @@ BuildRequires: gcc-c++ BuildRequires: glew-devel BuildRequires: libpng-devel BuildRequires: libcurl-devel +BuildRequires: minizip-devel BuildRequires: python3 -BuildRequires: gnupg2 # For the %%build part generating the symlinks BuildRequires: fontconfig %{fonts} Requires: hicolor-icon-theme @@ -54,14 +54,12 @@ perhaps will have a thought, what Widelands is all about. %prep -gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} %autosetup -p1 %build %cmake \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=%{_bindir} \ -DWL_INSTALL_BASEDIR=%{_prefix}/share/%{name} \ -DWL_INSTALL_DATADIR=%{_prefix}/share/%{name} \ -DOPTION_BUILD_WEBSITE_TOOLS=OFF \ @@ -72,6 +70,10 @@ gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} %install %cmake_install +mkdir -p $RPM_BUILD_ROOT%{_bindir} +mv $RPM_BUILD_ROOT%{_prefix}/games/%{name} \ + $RPM_BUILD_ROOT%{_bindir}/%{name} + # Validate desktop file (provided by upstream) desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop @@ -188,6 +190,10 @@ popd %changelog +* Mon Mar 27 2023 Hans de Goede - 1.1-1 +- New upstream release 1.1 (rhbz#2135131) +- Fix FTBFS (rhbz#2171759) + * Sat Jan 21 2023 Fedora Release Engineering - 1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 9594c69e2a76d4289a33b61ea155e4839a71cc32 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 28 Mar 2023 12:08:13 +0200 Subject: [PATCH 07/29] New upstream release 1.1 (rhbz#2135131) Fix FTBFS (rhbz#2171759) --- widelands-1.1-disable-some-tests.patch | 20 ++++++++++++++++++++ widelands.spec | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 widelands-1.1-disable-some-tests.patch diff --git a/widelands-1.1-disable-some-tests.patch b/widelands-1.1-disable-some-tests.patch new file mode 100644 index 0000000..126bb02 --- /dev/null +++ b/widelands-1.1-disable-some-tests.patch @@ -0,0 +1,20 @@ +For some reasons some of the tests are failing on s390x. +This likely is an endianness issue in the tests themselves. + +I strongly doubt anyone is actually playing widelands on s390x, +so this just disables the failing tests. +diff -up widelands-1.1/src/base/test/CMakeLists.txt~ widelands-1.1/src/base/test/CMakeLists.txt +--- widelands-1.1/src/base/test/CMakeLists.txt~ 2022-10-22 13:51:16.000000000 +0200 ++++ widelands-1.1/src/base/test/CMakeLists.txt 2023-03-28 11:58:34.622478286 +0200 +@@ -3,11 +3,9 @@ wl_test(test_base + base_test_main.cc + test_geometry.cc + test_math.cc +- test_md5.cc + test_times.cc + test_time_string.cc + test_utf8.cc +- test_string.cc + DEPENDS + base + base_geometry diff --git a/widelands.spec b/widelands.spec index 095f4da..3180ca2 100644 --- a/widelands.spec +++ b/widelands.spec @@ -22,6 +22,9 @@ Patch1: widelands-build20-gcc10.patch Patch2: widelands-1.0-make-sdl2-use-x11.patch Patch3: widelands-1.1-gcc13.patch Patch4: widelands-1.1-f37-sys-minizip-buildfix.patch +%ifarch s390x +Patch5: widelands-1.1-disable-some-tests.patch +%endif BuildRequires: asio-devel BuildRequires: SDL2-devel From d29b372779b9152c549d9889c514ae405dcf1099 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 28 Mar 2023 12:34:37 +0200 Subject: [PATCH 08/29] New upstream release 1.1 (rhbz#2135131) Fix FTBFS (rhbz#2171759) --- widelands.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/widelands.spec b/widelands.spec index 3180ca2..94c1472 100644 --- a/widelands.spec +++ b/widelands.spec @@ -10,7 +10,6 @@ License: GPLv2+ URL: http://www.widelands.org Source0: https://github.com/widelands/widelands/archive/v%{version}/%{name}-%{version}.tar.gz # gnu++11 fix in CMakeLists.txt for PPC64 little-endian -# + remove -Werror=uninitialized to fix build with gcc12 Patch0: widelands-build19-ppc64le.patch # Fix failures on s390x due to uninitialized variables Patch1: widelands-build20-gcc10.patch @@ -22,9 +21,7 @@ Patch1: widelands-build20-gcc10.patch Patch2: widelands-1.0-make-sdl2-use-x11.patch Patch3: widelands-1.1-gcc13.patch Patch4: widelands-1.1-f37-sys-minizip-buildfix.patch -%ifarch s390x Patch5: widelands-1.1-disable-some-tests.patch -%endif BuildRequires: asio-devel BuildRequires: SDL2-devel @@ -57,7 +54,15 @@ perhaps will have a thought, what Widelands is all about. %prep -%autosetup -p1 +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%ifarch s390x +%patch5 -p1 +%endif %build From 0d6898a0b70f4b3b99809f361d2641a547d7e723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Tue, 11 Jul 2023 22:23:22 +0200 Subject: [PATCH 09/29] Rebuilt for ICU 73.2 --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index 94c1472..7df8258 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open source realtime-strategy game License: GPLv2+ @@ -198,6 +198,9 @@ popd %changelog +* Tue Jul 11 2023 František Zatloukal - 1.1-2 +- Rebuilt for ICU 73.2 + * Mon Mar 27 2023 Hans de Goede - 1.1-1 - New upstream release 1.1 (rhbz#2135131) - Fix FTBFS (rhbz#2171759) From 59d1dc733db5f1984673e60a3bcfc78ed03f7709 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 18:12:25 +0000 Subject: [PATCH 10/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index 7df8258..8d3d359 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Open source realtime-strategy game License: GPLv2+ @@ -198,6 +198,9 @@ popd %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jul 11 2023 František Zatloukal - 1.1-2 - Rebuilt for ICU 73.2 From f169758575a334b4cc1d33543e5c1d0264d8fc02 Mon Sep 17 00:00:00 2001 From: Lukas Javorsky Date: Mon, 4 Dec 2023 16:49:04 +0000 Subject: [PATCH 11/29] Rebuilt for minizip-ng transition Fedora change Fedora Change: https://fedoraproject.org/wiki/Changes/MinizipNGTransition --- widelands.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/widelands.spec b/widelands.spec index 8d3d359..22029b7 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Open source realtime-strategy game License: GPLv2+ @@ -39,7 +39,7 @@ BuildRequires: gcc-c++ BuildRequires: glew-devel BuildRequires: libpng-devel BuildRequires: libcurl-devel -BuildRequires: minizip-devel +BuildRequires: minizip-ng-compat-devel BuildRequires: python3 # For the %%build part generating the symlinks BuildRequires: fontconfig %{fonts} @@ -198,6 +198,10 @@ popd %changelog +* Mon Dec 04 2023 Lukas Javorsky - 1.1-4 +- Rebuilt for minizip-ng transition Fedora change +- Fedora Change: https://fedoraproject.org/wiki/Changes/MinizipNGTransition + * Sat Jul 22 2023 Fedora Release Engineering - 1.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From e9167ef3684299379058ba56c30d969e586a635c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 08:47:07 +0000 Subject: [PATCH 12/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index 22029b7..df1a75b 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Open source realtime-strategy game License: GPLv2+ @@ -198,6 +198,9 @@ popd %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 1.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Dec 04 2023 Lukas Javorsky - 1.1-4 - Rebuilt for minizip-ng transition Fedora change - Fedora Change: https://fedoraproject.org/wiki/Changes/MinizipNGTransition From 6ae07c97ac804fad063fa57013486ba6f58636a8 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Wed, 31 Jan 2024 20:26:30 +0000 Subject: [PATCH 13/29] Rebuild for ICU 74 --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index df1a75b..8d31d85 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Open source realtime-strategy game License: GPLv2+ @@ -198,6 +198,9 @@ popd %changelog +* Wed Jan 31 2024 Pete Walter - 1.1-6 +- Rebuild for ICU 74 + * Sat Jan 27 2024 Fedora Release Engineering - 1.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From c5a8ed78efed9a8487df3395cc90e6635c3d3df4 Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:49 +0200 Subject: [PATCH 14/29] Eliminate use of obsolete %patchN syntax (#2283636) --- widelands.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/widelands.spec b/widelands.spec index 8d31d85..5e3e05d 100644 --- a/widelands.spec +++ b/widelands.spec @@ -55,13 +55,13 @@ perhaps will have a thought, what Widelands is all about. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 +%patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 +%patch -P3 -p1 +%patch -P4 -p1 %ifarch s390x -%patch5 -p1 +%patch -P5 -p1 %endif From 6d18867708555aec68306019f2d5c6d1d8fd5a33 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 09:20:33 +0000 Subject: [PATCH 15/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index 5e3e05d..e4621a3 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Open source realtime-strategy game License: GPLv2+ @@ -198,6 +198,9 @@ popd %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 1.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jan 31 2024 Pete Walter - 1.1-6 - Rebuild for ICU 74 From 4e35d1d7a4aee101eb2de1ab3cebfebdb78edc3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Wed, 7 Aug 2024 10:20:31 +0200 Subject: [PATCH 16/29] convert license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- widelands.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/widelands.spec b/widelands.spec index e4621a3..46507a0 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,10 +3,11 @@ Name: widelands Version: 1.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Open source realtime-strategy game -License: GPLv2+ +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later URL: http://www.widelands.org Source0: https://github.com/widelands/widelands/archive/v%{version}/%{name}-%{version}.tar.gz # gnu++11 fix in CMakeLists.txt for PPC64 little-endian @@ -198,6 +199,9 @@ popd %changelog +* Wed Aug 07 2024 Miroslav Suchý - 1.1-8 +- convert license to SPDX + * Sat Jul 20 2024 Fedora Release Engineering - 1.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 69b5ee17ff3d65fb616d653a297ef002d4863449 Mon Sep 17 00:00:00 2001 From: Peter Hanecak Date: Sun, 25 Aug 2024 13:14:03 +0200 Subject: [PATCH 17/29] New upstream release 1.2 (rhbz#2271240) --- widelands-1.1-gcc13.patch | 314 ---------------------------- widelands-1.2-build19-ppc64le.patch | 12 ++ widelands-1.2-build20-gcc10.patch | 21 ++ widelands-1.2-gcc13.patch | 191 +++++++++++++++++ widelands-build19-ppc64le.patch | 12 -- widelands-build20-gcc10.patch | 30 --- widelands.spec | 15 +- 7 files changed, 233 insertions(+), 362 deletions(-) delete mode 100644 widelands-1.1-gcc13.patch create mode 100644 widelands-1.2-build19-ppc64le.patch create mode 100644 widelands-1.2-build20-gcc10.patch create mode 100644 widelands-1.2-gcc13.patch delete mode 100644 widelands-build19-ppc64le.patch delete mode 100644 widelands-build20-gcc10.patch diff --git a/widelands-1.1-gcc13.patch b/widelands-1.1-gcc13.patch deleted file mode 100644 index b948e62..0000000 --- a/widelands-1.1-gcc13.patch +++ /dev/null @@ -1,314 +0,0 @@ -diff -up widelands-1.1/src/base/md5.h~ widelands-1.1/src/base/md5.h ---- widelands-1.1/src/base/md5.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/base/md5.h 2023-03-27 21:28:34.494634126 +0200 -@@ -22,6 +22,7 @@ - - #include - #include -+#include - #include - - /* Structure to save state of computation between the single steps. */ -diff -up widelands-1.1/src/build_info.h~ widelands-1.1/src/build_info.h ---- widelands-1.1/src/build_info.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/build_info.h 2023-03-27 21:24:21.545738695 +0200 -@@ -20,6 +20,7 @@ - #define WL_BUILD_INFO_H - - #include -+#include - - constexpr uint16_t kWidelandsCopyrightStart = 2002; - // If the following line is changed, the corresponding regex in 'utils/update_copyright.py' will -diff -up widelands-1.1/src/graphic/align.h~ widelands-1.1/src/graphic/align.h ---- widelands-1.1/src/graphic/align.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/graphic/align.h 2023-03-27 21:37:50.732994947 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_GRAPHIC_ALIGN_H - #define WL_GRAPHIC_ALIGN_H - -+#include - #include - - #include "base/rect.h" -diff -up widelands-1.1/src/base/random.h~ widelands-1.1/src/base/random.h ---- widelands-1.1/src/base/random.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/base/random.h 2023-03-27 21:40:08.219843589 +0200 -@@ -20,6 +20,7 @@ - #define WL_BASE_RANDOM_H - - #include -+#include - #include - - extern const uint32_t rng_sbox[256]; -diff -up widelands-1.1/src/io/filesystem/zip_filesystem.h~ widelands-1.1/src/io/filesystem/zip_filesystem.h ---- widelands-1.1/src/io/filesystem/zip_filesystem.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/io/filesystem/zip_filesystem.h 2023-03-27 21:46:36.709590151 +0200 -@@ -23,6 +23,7 @@ - - #include - #include -+#include - - #include "io/filesystem/filesystem.h" - #include "io/streamread.h" -diff -up widelands-1.1/src/base/time_string.h~ widelands-1.1/src/base/time_string.h ---- widelands-1.1/src/base/time_string.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/base/time_string.h 2023-03-27 22:28:19.024604798 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_BASE_TIME_STRING_H - #define WL_BASE_TIME_STRING_H - -+#include - #include - - /// Get a string representation conforming to ISO 8601 of the current time (in -diff -up widelands-1.1/src/logic/generic_save_handler.h~ widelands-1.1/src/logic/generic_save_handler.h ---- widelands-1.1/src/logic/generic_save_handler.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/generic_save_handler.h 2023-03-27 22:32:49.724403544 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_GENERIC_SAVE_HANDLER_H - #define WL_LOGIC_GENERIC_SAVE_HANDLER_H - -+#include - #include - - #include "io/filesystem/filesystem.h" -diff -up widelands-1.1/src/scripting/persistence.h~ widelands-1.1/src/scripting/persistence.h ---- widelands-1.1/src/scripting/persistence.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/scripting/persistence.h 2023-03-27 22:39:15.022270365 +0200 -@@ -19,6 +19,8 @@ - #ifndef WL_SCRIPTING_PERSISTENCE_H - #define WL_SCRIPTING_PERSISTENCE_H - -+#include -+ - #include "scripting/lua.h" - - class FileRead; -diff -up widelands-1.1/src/map_io/map_elemental_packet.h~ widelands-1.1/src/map_io/map_elemental_packet.h ---- widelands-1.1/src/map_io/map_elemental_packet.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/map_io/map_elemental_packet.h 2023-03-27 22:44:03.699928430 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_MAP_IO_MAP_ELEMENTAL_PACKET_H - #define WL_MAP_IO_MAP_ELEMENTAL_PACKET_H - -+#include - #include - #include - -diff -up widelands-1.1/src/logic/save_handler.h~ widelands-1.1/src/logic/save_handler.h ---- widelands-1.1/src/logic/save_handler.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/save_handler.h 2023-03-27 22:53:07.898560634 +0200 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_SAVE_HANDLER_H - #define WL_LOGIC_SAVE_HANDLER_H - -+#include -+ - #include "io/filesystem/filesystem.h" - - namespace Widelands { -diff -up widelands-1.1/src/logic/map_revision.h~ widelands-1.1/src/logic/map_revision.h ---- widelands-1.1/src/logic/map_revision.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/map_revision.h 2023-03-27 22:57:27.966473320 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_MAP_REVISION_H - #define WL_LOGIC_MAP_REVISION_H - -+#include - #include - - namespace Widelands { -diff -up widelands-1.1/src/logic/addons.h~ widelands-1.1/src/logic/addons.h ---- widelands-1.1/src/logic/addons.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/addons.h 2023-03-27 22:58:16.316085244 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_ADDONS_H - #define WL_LOGIC_ADDONS_H - -+#include - #include - #include - #include -diff -up widelands-1.1/src/logic/ai_dna_handler.h~ widelands-1.1/src/logic/ai_dna_handler.h ---- widelands-1.1/src/logic/ai_dna_handler.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/ai_dna_handler.h 2023-03-27 22:58:21.068047105 +0200 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_AI_DNA_HANDLER_H - #define WL_LOGIC_AI_DNA_HANDLER_H - -+#include -+ - #include "logic/player.h" - - namespace Widelands { -diff -up widelands-1.1/src/logic/cmd_queue.h~ widelands-1.1/src/logic/cmd_queue.h ---- widelands-1.1/src/logic/cmd_queue.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/cmd_queue.h 2023-03-27 22:58:25.692009993 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_CMD_QUEUE_H - #define WL_LOGIC_CMD_QUEUE_H - -+#include - #include - - #include "base/times.h" -diff -up widelands-1.1/src/logic/game.h~ widelands-1.1/src/logic/game.h ---- widelands-1.1/src/logic/game.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/game.h 2023-03-27 22:58:30.387972304 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_GAME_H - #define WL_LOGIC_GAME_H - -+#include - #include - - #include "base/md5.h" -diff -up widelands-1.1/src/logic/game_controller.h~ widelands-1.1/src/logic/game_controller.h ---- widelands-1.1/src/logic/game_controller.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/game_controller.h 2023-03-27 22:58:37.804912776 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_GAME_CONTROLLER_H - #define WL_LOGIC_GAME_CONTROLLER_H - -+#include - #include - - #include "base/times.h" -diff -up widelands-1.1/src/logic/game_settings.h~ widelands-1.1/src/logic/game_settings.h ---- widelands-1.1/src/logic/game_settings.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/game_settings.h 2023-03-27 22:58:42.244877140 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_GAME_SETTINGS_H - #define WL_LOGIC_GAME_SETTINGS_H - -+#include - #include - #include - -diff -up widelands-1.1/src/logic/map.h~ widelands-1.1/src/logic/map.h ---- widelands-1.1/src/logic/map.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/map.h 2023-03-27 22:58:50.229813053 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_MAP_H - #define WL_LOGIC_MAP_H - -+#include - #include - #include - #include -diff -up widelands-1.1/src/logic/mapastar.h~ widelands-1.1/src/logic/mapastar.h ---- widelands-1.1/src/logic/mapastar.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/mapastar.h 2023-03-27 22:58:56.220764976 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_MAPASTAR_H - #define WL_LOGIC_MAPASTAR_H - -+#include - #include - - #include "logic/map.h" -diff -up widelands-1.1/src/logic/maphollowregion.h~ widelands-1.1/src/logic/maphollowregion.h ---- widelands-1.1/src/logic/maphollowregion.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/maphollowregion.h 2023-03-27 22:59:00.125733634 +0200 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_MAPHOLLOWREGION_H - #define WL_LOGIC_MAPHOLLOWREGION_H - -+#include -+ - #include "logic/map.h" - - namespace Widelands { -diff -up widelands-1.1/src/logic/message_queue.h~ widelands-1.1/src/logic/message_queue.h ---- widelands-1.1/src/logic/message_queue.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/message_queue.h 2023-03-27 22:59:06.236684594 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_MESSAGE_QUEUE_H - #define WL_LOGIC_MESSAGE_QUEUE_H - -+#include - #include - #include - -diff -up widelands-1.1/src/logic/pathfield.h~ widelands-1.1/src/logic/pathfield.h ---- widelands-1.1/src/logic/pathfield.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/pathfield.h 2023-03-27 22:59:09.948654805 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_PATHFIELD_H - #define WL_LOGIC_PATHFIELD_H - -+#include - #include - - #include "logic/cookie_priority_queue.h" -diff -up widelands-1.1/src/logic/player.h~ widelands-1.1/src/logic/player.h ---- widelands-1.1/src/logic/player.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/player.h 2023-03-27 22:59:14.012622187 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_PLAYER_H - #define WL_LOGIC_PLAYER_H - -+#include - #include - #include - -diff -up widelands-1.1/src/logic/playercommand.h~ widelands-1.1/src/logic/playercommand.h ---- widelands-1.1/src/logic/playercommand.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/playercommand.h 2023-03-27 22:59:17.612593293 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_PLAYERCOMMAND_H - #define WL_LOGIC_PLAYERCOMMAND_H - -+#include - #include - - #include "economy/flag.h" -diff -up widelands-1.1/src/logic/replay_game_controller.h~ widelands-1.1/src/logic/replay_game_controller.h ---- widelands-1.1/src/logic/replay_game_controller.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/replay_game_controller.h 2023-03-27 22:59:21.420562726 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_REPLAY_GAME_CONTROLLER_H - #define WL_LOGIC_REPLAY_GAME_CONTROLLER_H - -+#include - #include - - #include "logic/cmd_queue.h" -diff -up widelands-1.1/src/logic/single_player_game_controller.h~ widelands-1.1/src/logic/single_player_game_controller.h ---- widelands-1.1/src/logic/single_player_game_controller.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/single_player_game_controller.h 2023-03-27 22:59:27.132516891 +0200 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H - #define WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H - -+#include -+ - #include "ai/computer_player.h" - #include "logic/game_controller.h" - -diff -up widelands-1.1/src/logic/single_player_game_settings_provider.h~ widelands-1.1/src/logic/single_player_game_settings_provider.h ---- widelands-1.1/src/logic/single_player_game_settings_provider.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/logic/single_player_game_settings_provider.h 2023-03-27 22:59:30.908486580 +0200 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H - #define WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H - -+#include -+ - #include "logic/game_settings.h" - - /** -diff -up widelands-1.1/src/graphic/text/textstream.h~ widelands-1.1/src/graphic/text/textstream.h ---- widelands-1.1/src/graphic/text/textstream.h~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/graphic/text/textstream.h 2023-03-27 23:05:15.095850210 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_GRAPHIC_TEXT_TEXTSTREAM_H - #define WL_GRAPHIC_TEXT_TEXTSTREAM_H - -+#include - #include - - namespace RT { diff --git a/widelands-1.2-build19-ppc64le.patch b/widelands-1.2-build19-ppc64le.patch new file mode 100644 index 0000000..403949a --- /dev/null +++ b/widelands-1.2-build19-ppc64le.patch @@ -0,0 +1,12 @@ +diff -uNr widelands-1.2.orig/CMakeLists.txt widelands-1.2/CMakeLists.txt +--- widelands-1.2.orig/CMakeLists.txt 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/CMakeLists.txt 2024-08-25 11:56:53.948000000 +0200 +@@ -272,7 +272,7 @@ + wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-unsafe-buffer-usage") + endif() + elseif(MSVC) +- wl_add_flag(WL_GENERIC_CXX_FLAGS "/std:c++17") ++ wl_add_flag(WL_GENERIC_CXX_FLAGS "/std:gnu++17") + # https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/ + # Disabled warnings that are overly verbose right now or just do not make sense. + wl_add_flag(WL_COMPILE_DIAGNOSTICS "/wd4244") diff --git a/widelands-1.2-build20-gcc10.patch b/widelands-1.2-build20-gcc10.patch new file mode 100644 index 0000000..94c85fe --- /dev/null +++ b/widelands-1.2-build20-gcc10.patch @@ -0,0 +1,21 @@ +diff -uNr widelands-1.2.orig/src/ui_basic/box.cc widelands-1.2/src/ui_basic/box.cc +--- widelands-1.2.orig/src/ui_basic/box.cc 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/ui_basic/box.cc 2024-08-25 12:02:46.697000000 +0200 +@@ -180,7 +180,7 @@ + int infspace_count = 0; + + for (size_t idx = 0; idx < items_.size(); ++idx) { +- int depth; ++ int depth = 0; + int unused = 0; + get_item_desired_size(idx, &depth, &unused); + totaldepth += depth; +@@ -274,7 +274,7 @@ + // Do not modify hidden items + continue; + } +- int depth; ++ int depth = 0; + int breadth = 0; + get_item_size(idx, &depth, &breadth); + diff --git a/widelands-1.2-gcc13.patch b/widelands-1.2-gcc13.patch new file mode 100644 index 0000000..ebb7505 --- /dev/null +++ b/widelands-1.2-gcc13.patch @@ -0,0 +1,191 @@ +diff -uNr widelands-1.2.orig/src/io/filesystem/zip_filesystem.h widelands-1.2/src/io/filesystem/zip_filesystem.h +--- widelands-1.2.orig/src/io/filesystem/zip_filesystem.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/io/filesystem/zip_filesystem.h 2024-08-25 12:10:18.849000000 +0200 +@@ -23,6 +23,7 @@ + + #include + #include ++#include + + #include "io/filesystem/filesystem.h" + #include "io/streamread.h" +diff -uNr widelands-1.2.orig/src/logic/addons.h widelands-1.2/src/logic/addons.h +--- widelands-1.2.orig/src/logic/addons.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/addons.h 2024-08-25 12:11:14.871000000 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_ADDONS_H + #define WL_LOGIC_ADDONS_H + ++#include + #include + #include + #include +diff -uNr widelands-1.2.orig/src/logic/ai_dna_handler.h widelands-1.2/src/logic/ai_dna_handler.h +--- widelands-1.2.orig/src/logic/ai_dna_handler.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/ai_dna_handler.h 2024-08-25 12:11:28.162000000 +0200 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_AI_DNA_HANDLER_H + #define WL_LOGIC_AI_DNA_HANDLER_H + ++#include ++ + #include "logic/player.h" + + namespace Widelands { +diff -uNr widelands-1.2.orig/src/logic/cmd_queue.h widelands-1.2/src/logic/cmd_queue.h +--- widelands-1.2.orig/src/logic/cmd_queue.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/cmd_queue.h 2024-08-25 12:11:40.627000000 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_CMD_QUEUE_H + #define WL_LOGIC_CMD_QUEUE_H + ++#include + #include + + #include "base/times.h" +diff -uNr widelands-1.2.orig/src/logic/game_controller.h widelands-1.2/src/logic/game_controller.h +--- widelands-1.2.orig/src/logic/game_controller.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/game_controller.h 2024-08-25 12:12:00.083000000 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GAME_CONTROLLER_H + #define WL_LOGIC_GAME_CONTROLLER_H + ++#include + #include + + #include "base/times.h" +diff -uNr widelands-1.2.orig/src/logic/game.h widelands-1.2/src/logic/game.h +--- widelands-1.2.orig/src/logic/game.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/game.h 2024-08-25 12:11:51.139000000 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GAME_H + #define WL_LOGIC_GAME_H + ++#include + #include + + #include "base/md5.h" +diff -uNr widelands-1.2.orig/src/logic/game_settings.h widelands-1.2/src/logic/game_settings.h +--- widelands-1.2.orig/src/logic/game_settings.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/game_settings.h 2024-08-25 12:12:12.053000000 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GAME_SETTINGS_H + #define WL_LOGIC_GAME_SETTINGS_H + ++#include + #include + #include + +diff -uNr widelands-1.2.orig/src/logic/mapastar.h widelands-1.2/src/logic/mapastar.h +--- widelands-1.2.orig/src/logic/mapastar.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/mapastar.h 2024-08-25 12:12:28.530000000 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MAPASTAR_H + #define WL_LOGIC_MAPASTAR_H + ++#include + #include + + #include "logic/map.h" +diff -uNr widelands-1.2.orig/src/logic/map.h widelands-1.2/src/logic/map.h +--- widelands-1.2.orig/src/logic/map.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/map.h 2024-08-25 12:12:20.583000000 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MAP_H + #define WL_LOGIC_MAP_H + ++#include + #include + #include + #include +diff -uNr widelands-1.2.orig/src/logic/maphollowregion.h widelands-1.2/src/logic/maphollowregion.h +--- widelands-1.2.orig/src/logic/maphollowregion.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/maphollowregion.h 2024-08-25 12:12:36.331000000 +0200 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_MAPHOLLOWREGION_H + #define WL_LOGIC_MAPHOLLOWREGION_H + ++#include ++ + #include "logic/map.h" + + namespace Widelands { +diff -uNr widelands-1.2.orig/src/logic/message_queue.h widelands-1.2/src/logic/message_queue.h +--- widelands-1.2.orig/src/logic/message_queue.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/message_queue.h 2024-08-25 12:12:45.472000000 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MESSAGE_QUEUE_H + #define WL_LOGIC_MESSAGE_QUEUE_H + ++#include + #include + #include + +diff -uNr widelands-1.2.orig/src/logic/pathfield.h widelands-1.2/src/logic/pathfield.h +--- widelands-1.2.orig/src/logic/pathfield.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/pathfield.h 2024-08-25 12:12:53.039000000 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_PATHFIELD_H + #define WL_LOGIC_PATHFIELD_H + ++#include + #include + + #include "logic/cookie_priority_queue.h" +diff -uNr widelands-1.2.orig/src/logic/playercommand.h widelands-1.2/src/logic/playercommand.h +--- widelands-1.2.orig/src/logic/playercommand.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/playercommand.h 2024-08-25 12:13:17.512000000 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_PLAYERCOMMAND_H + #define WL_LOGIC_PLAYERCOMMAND_H + ++#include + #include + + #include "economy/flag.h" +diff -uNr widelands-1.2.orig/src/logic/player.h widelands-1.2/src/logic/player.h +--- widelands-1.2.orig/src/logic/player.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/player.h 2024-08-25 12:13:09.308000000 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_PLAYER_H + #define WL_LOGIC_PLAYER_H + ++#include + #include + #include + #include +diff -uNr widelands-1.2.orig/src/logic/replay_game_controller.h widelands-1.2/src/logic/replay_game_controller.h +--- widelands-1.2.orig/src/logic/replay_game_controller.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/replay_game_controller.h 2024-08-25 12:13:24.791000000 +0200 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_REPLAY_GAME_CONTROLLER_H + #define WL_LOGIC_REPLAY_GAME_CONTROLLER_H + ++#include + #include + + #include "logic/cmd_queue.h" +diff -uNr widelands-1.2.orig/src/logic/single_player_game_controller.h widelands-1.2/src/logic/single_player_game_controller.h +--- widelands-1.2.orig/src/logic/single_player_game_controller.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/single_player_game_controller.h 2024-08-25 12:13:32.239000000 +0200 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H + #define WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H + ++#include ++ + #include "ai/computer_player.h" + #include "logic/game_controller.h" + +diff -uNr widelands-1.2.orig/src/logic/single_player_game_settings_provider.h widelands-1.2/src/logic/single_player_game_settings_provider.h +--- widelands-1.2.orig/src/logic/single_player_game_settings_provider.h 2024-03-28 11:12:05.000000000 +0100 ++++ widelands-1.2/src/logic/single_player_game_settings_provider.h 2024-08-25 12:13:40.343000000 +0200 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H + #define WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H + ++#include ++ + #include "logic/game_settings.h" + + /** diff --git a/widelands-build19-ppc64le.patch b/widelands-build19-ppc64le.patch deleted file mode 100644 index 3142f2e..0000000 --- a/widelands-build19-ppc64le.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up widelands-1.1/CMakeLists.txt~ widelands-1.1/CMakeLists.txt ---- widelands-1.1/CMakeLists.txt~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/CMakeLists.txt 2023-03-27 20:45:53.395721787 +0200 -@@ -395,7 +395,7 @@ if(NOT MSVC) - endif() - endif() - -- wl_add_flag(WL_GENERIC_CXX_FLAGS "-std=c++11") -+ wl_add_flag(WL_GENERIC_CXX_FLAGS "-std=gnu++11") - endif() - - # Cross-compile-unit optimization slows linking significantly. diff --git a/widelands-build20-gcc10.patch b/widelands-build20-gcc10.patch deleted file mode 100644 index ef56ff0..0000000 --- a/widelands-build20-gcc10.patch +++ /dev/null @@ -1,30 +0,0 @@ -For some reason the s390x build (and only the s390x build) fails with: - -/builddir/build/BUILD/widelands-build20/src/ui_basic/box.cc: In member function 'virtual void UI::Box::layout()': -/builddir/build/BUILD/widelands-build20/src/ui_basic/box.cc:163:14: error: 'depth' may be used uninitialized in this function [-Werror=maybe-uninitialized] - 163 | totaldepth += depth; - | ~~~~~~~~~~~^~~~~~~~ -cc1plus: some warnings being treated as errors - -This fixes this. -diff -up widelands-1.1/src/ui_basic/box.cc~ widelands-1.1/src/ui_basic/box.cc ---- widelands-1.1/src/ui_basic/box.cc~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/ui_basic/box.cc 2023-03-27 20:56:58.130613954 +0200 -@@ -178,7 +178,7 @@ void Box::layout() { - int spacing = -1 * inner_spacing_; - - for (size_t idx = 0; idx < items_.size(); ++idx) { -- int depth; -+ int depth = 0; - int unused = 0; - get_item_desired_size(idx, &depth, &unused); - totaldepth += depth; -@@ -275,7 +275,7 @@ void Box::update_positions() { - } - - for (uint32_t idx = 0; idx < items_.size(); ++idx) { -- int depth; -+ int depth = 0; - int breadth = 0; - get_item_size(idx, &depth, &breadth); - diff --git a/widelands.spec b/widelands.spec index 46507a0..d993983 100644 --- a/widelands.spec +++ b/widelands.spec @@ -2,8 +2,8 @@ %global fonts font(amiri) font(dejavusans) font(dejavusansmono) font(dejavuserif) font(widelands) font(gargi) font(wenquanyimicrohei) font(frankruehlclm) Name: widelands -Version: 1.1 -Release: 8%{?dist} +Version: 1.2 +Release: 1%{?dist} Summary: Open source realtime-strategy game # Automatically converted from old format: GPLv2+ - review is highly recommended. @@ -11,16 +11,16 @@ License: GPL-2.0-or-later URL: http://www.widelands.org Source0: https://github.com/widelands/widelands/archive/v%{version}/%{name}-%{version}.tar.gz # gnu++11 fix in CMakeLists.txt for PPC64 little-endian -Patch0: widelands-build19-ppc64le.patch +Patch0: widelands-1.2-build19-ppc64le.patch # Fix failures on s390x due to uninitialized variables -Patch1: widelands-build20-gcc10.patch +Patch1: widelands-1.2-build20-gcc10.patch # widelands uses glew which atm is hardcoded to glx, see e.g.: # https://github.com/nigels-com/glew/issues/172 # This can be fixed cleaner by switching to glewContextInit once we are # at glew 2.3, or maybe backport: # https://github.com/nigels-com/glew/commit/715afa0ff56c0eb12c23938b80aa2813daa10d81 Patch2: widelands-1.0-make-sdl2-use-x11.patch -Patch3: widelands-1.1-gcc13.patch +Patch3: widelands-1.2-gcc13.patch Patch4: widelands-1.1-f37-sys-minizip-buildfix.patch Patch5: widelands-1.1-disable-some-tests.patch @@ -38,7 +38,7 @@ BuildRequires: gettext BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: glew-devel -BuildRequires: libpng-devel +BuildRequires: libpng-devel >= 1.6.0 BuildRequires: libcurl-devel BuildRequires: minizip-ng-compat-devel BuildRequires: python3 @@ -199,6 +199,9 @@ popd %changelog +* Sun Aug 25 2024 Peter Hanmecak - 1.2-1 +- New upstream release 1.2 (rhbz#2271240) + * Wed Aug 07 2024 Miroslav Suchý - 1.1-8 - convert license to SPDX From cd42f5b5cc7f4444dae9e9b71f8f313fe239822c Mon Sep 17 00:00:00 2001 From: Peter Hanecak Date: Sun, 25 Aug 2024 14:09:25 +0200 Subject: [PATCH 18/29] New upstream release 1.2 (rhbz#2271240) --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7b353a0..125b4c9 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ Widelands-Build14-src.7z /widelands-1.0.tar.gz /widelands-1.0.tar.gz.asc /widelands-1.1.tar.gz +/widelands-1.2.tar.gz diff --git a/sources b/sources index 97a184f..ed15c5b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (widelands-1.1.tar.gz) = 29dbeae0940468c8aad6f0fa610c8467bdb6ecf2ba5fe9175683b7cdaab5f977fa86beb71de29057c829e9738568d15e10bc22fa7fc9e58132151a1a02d72d9d +SHA512 (widelands-1.2.tar.gz) = e05812f93defe8b9a3da60e6ba73a65bba47abec3199298f9a778fb42655aba671cb45a2603c2936538de1e0f82892a183ea5e1df15937b9812d369d068fab81 From 0afa0e79be58675848a53be79b1d11f70663d816 Mon Sep 17 00:00:00 2001 From: Peter Hanecak Date: Sun, 1 Sep 2024 11:24:56 +0200 Subject: [PATCH 19/29] fixed surname in changelog --- widelands.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index d993983..9d34f23 100644 --- a/widelands.spec +++ b/widelands.spec @@ -199,7 +199,7 @@ popd %changelog -* Sun Aug 25 2024 Peter Hanmecak - 1.2-1 +* Sun Aug 25 2024 Peter Hanecak - 1.2-1 - New upstream release 1.2 (rhbz#2271240) * Wed Aug 07 2024 Miroslav Suchý - 1.1-8 From d62e7cffd5cb26679fa16b50fe0b8c6d1284e2d1 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Sun, 8 Dec 2024 23:03:13 +0000 Subject: [PATCH 20/29] Rebuild for ICU 76 --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index 9d34f23..85825f5 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open source realtime-strategy game # Automatically converted from old format: GPLv2+ - review is highly recommended. @@ -199,6 +199,9 @@ popd %changelog +* Sun Dec 08 2024 Pete Walter - 1.2-2 +- Rebuild for ICU 76 + * Sun Aug 25 2024 Peter Hanecak - 1.2-1 - New upstream release 1.2 (rhbz#2271240) From 3cbfab953458db11545336b22199c0fb6b7f9e31 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 15:01:13 +0000 Subject: [PATCH 21/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index 85825f5..4bd07d4 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Open source realtime-strategy game # Automatically converted from old format: GPLv2+ - review is highly recommended. @@ -199,6 +199,9 @@ popd %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 1.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sun Dec 08 2024 Pete Walter - 1.2-2 - Rebuild for ICU 76 From c7aea9316cd6e7049fc74a23f2efa4367f0ee031 Mon Sep 17 00:00:00 2001 From: Peter Hanecak Date: Sun, 16 Feb 2025 17:19:08 +0100 Subject: [PATCH 22/29] New upstream release 1.2 (rhbz#2322776) Generate font file symlinks also for DejaVuSansCondensed (rhbz#2334803) --- .gitignore | 1 + sources | 2 +- widelands-1.1-disable-some-tests.patch | 20 - widelands-1.2-gcc13.patch | 191 ------ widelands-1.2.1-disable-some-tests.patch | 11 + widelands-1.2.1-gcc13.patch | 724 +++++++++++++++++++++++ widelands-1.2.1-gcc15.patch | 41 ++ widelands.spec | 24 +- 8 files changed, 797 insertions(+), 217 deletions(-) delete mode 100644 widelands-1.1-disable-some-tests.patch delete mode 100644 widelands-1.2-gcc13.patch create mode 100644 widelands-1.2.1-disable-some-tests.patch create mode 100644 widelands-1.2.1-gcc13.patch create mode 100644 widelands-1.2.1-gcc15.patch diff --git a/.gitignore b/.gitignore index 125b4c9..5486b85 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ Widelands-Build14-src.7z /widelands-1.0.tar.gz.asc /widelands-1.1.tar.gz /widelands-1.2.tar.gz +/widelands-1.2.1.tar.gz diff --git a/sources b/sources index ed15c5b..b1ebe21 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (widelands-1.2.tar.gz) = e05812f93defe8b9a3da60e6ba73a65bba47abec3199298f9a778fb42655aba671cb45a2603c2936538de1e0f82892a183ea5e1df15937b9812d369d068fab81 +SHA512 (widelands-1.2.1.tar.gz) = eb765367e57bab7d016a0e9ad0f5f2e17e31124cb94a149c87a17ce22169509361f408297233e14001e12a8546cfbea879a21a05e47b7f48ba6924ce1a8080e9 diff --git a/widelands-1.1-disable-some-tests.patch b/widelands-1.1-disable-some-tests.patch deleted file mode 100644 index 126bb02..0000000 --- a/widelands-1.1-disable-some-tests.patch +++ /dev/null @@ -1,20 +0,0 @@ -For some reasons some of the tests are failing on s390x. -This likely is an endianness issue in the tests themselves. - -I strongly doubt anyone is actually playing widelands on s390x, -so this just disables the failing tests. -diff -up widelands-1.1/src/base/test/CMakeLists.txt~ widelands-1.1/src/base/test/CMakeLists.txt ---- widelands-1.1/src/base/test/CMakeLists.txt~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/base/test/CMakeLists.txt 2023-03-28 11:58:34.622478286 +0200 -@@ -3,11 +3,9 @@ wl_test(test_base - base_test_main.cc - test_geometry.cc - test_math.cc -- test_md5.cc - test_times.cc - test_time_string.cc - test_utf8.cc -- test_string.cc - DEPENDS - base - base_geometry diff --git a/widelands-1.2-gcc13.patch b/widelands-1.2-gcc13.patch deleted file mode 100644 index ebb7505..0000000 --- a/widelands-1.2-gcc13.patch +++ /dev/null @@ -1,191 +0,0 @@ -diff -uNr widelands-1.2.orig/src/io/filesystem/zip_filesystem.h widelands-1.2/src/io/filesystem/zip_filesystem.h ---- widelands-1.2.orig/src/io/filesystem/zip_filesystem.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/io/filesystem/zip_filesystem.h 2024-08-25 12:10:18.849000000 +0200 -@@ -23,6 +23,7 @@ - - #include - #include -+#include - - #include "io/filesystem/filesystem.h" - #include "io/streamread.h" -diff -uNr widelands-1.2.orig/src/logic/addons.h widelands-1.2/src/logic/addons.h ---- widelands-1.2.orig/src/logic/addons.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/addons.h 2024-08-25 12:11:14.871000000 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_ADDONS_H - #define WL_LOGIC_ADDONS_H - -+#include - #include - #include - #include -diff -uNr widelands-1.2.orig/src/logic/ai_dna_handler.h widelands-1.2/src/logic/ai_dna_handler.h ---- widelands-1.2.orig/src/logic/ai_dna_handler.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/ai_dna_handler.h 2024-08-25 12:11:28.162000000 +0200 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_AI_DNA_HANDLER_H - #define WL_LOGIC_AI_DNA_HANDLER_H - -+#include -+ - #include "logic/player.h" - - namespace Widelands { -diff -uNr widelands-1.2.orig/src/logic/cmd_queue.h widelands-1.2/src/logic/cmd_queue.h ---- widelands-1.2.orig/src/logic/cmd_queue.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/cmd_queue.h 2024-08-25 12:11:40.627000000 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_CMD_QUEUE_H - #define WL_LOGIC_CMD_QUEUE_H - -+#include - #include - - #include "base/times.h" -diff -uNr widelands-1.2.orig/src/logic/game_controller.h widelands-1.2/src/logic/game_controller.h ---- widelands-1.2.orig/src/logic/game_controller.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/game_controller.h 2024-08-25 12:12:00.083000000 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_GAME_CONTROLLER_H - #define WL_LOGIC_GAME_CONTROLLER_H - -+#include - #include - - #include "base/times.h" -diff -uNr widelands-1.2.orig/src/logic/game.h widelands-1.2/src/logic/game.h ---- widelands-1.2.orig/src/logic/game.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/game.h 2024-08-25 12:11:51.139000000 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_GAME_H - #define WL_LOGIC_GAME_H - -+#include - #include - - #include "base/md5.h" -diff -uNr widelands-1.2.orig/src/logic/game_settings.h widelands-1.2/src/logic/game_settings.h ---- widelands-1.2.orig/src/logic/game_settings.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/game_settings.h 2024-08-25 12:12:12.053000000 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_GAME_SETTINGS_H - #define WL_LOGIC_GAME_SETTINGS_H - -+#include - #include - #include - -diff -uNr widelands-1.2.orig/src/logic/mapastar.h widelands-1.2/src/logic/mapastar.h ---- widelands-1.2.orig/src/logic/mapastar.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/mapastar.h 2024-08-25 12:12:28.530000000 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_MAPASTAR_H - #define WL_LOGIC_MAPASTAR_H - -+#include - #include - - #include "logic/map.h" -diff -uNr widelands-1.2.orig/src/logic/map.h widelands-1.2/src/logic/map.h ---- widelands-1.2.orig/src/logic/map.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/map.h 2024-08-25 12:12:20.583000000 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_MAP_H - #define WL_LOGIC_MAP_H - -+#include - #include - #include - #include -diff -uNr widelands-1.2.orig/src/logic/maphollowregion.h widelands-1.2/src/logic/maphollowregion.h ---- widelands-1.2.orig/src/logic/maphollowregion.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/maphollowregion.h 2024-08-25 12:12:36.331000000 +0200 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_MAPHOLLOWREGION_H - #define WL_LOGIC_MAPHOLLOWREGION_H - -+#include -+ - #include "logic/map.h" - - namespace Widelands { -diff -uNr widelands-1.2.orig/src/logic/message_queue.h widelands-1.2/src/logic/message_queue.h ---- widelands-1.2.orig/src/logic/message_queue.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/message_queue.h 2024-08-25 12:12:45.472000000 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_MESSAGE_QUEUE_H - #define WL_LOGIC_MESSAGE_QUEUE_H - -+#include - #include - #include - -diff -uNr widelands-1.2.orig/src/logic/pathfield.h widelands-1.2/src/logic/pathfield.h ---- widelands-1.2.orig/src/logic/pathfield.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/pathfield.h 2024-08-25 12:12:53.039000000 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_PATHFIELD_H - #define WL_LOGIC_PATHFIELD_H - -+#include - #include - - #include "logic/cookie_priority_queue.h" -diff -uNr widelands-1.2.orig/src/logic/playercommand.h widelands-1.2/src/logic/playercommand.h ---- widelands-1.2.orig/src/logic/playercommand.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/playercommand.h 2024-08-25 12:13:17.512000000 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_PLAYERCOMMAND_H - #define WL_LOGIC_PLAYERCOMMAND_H - -+#include - #include - - #include "economy/flag.h" -diff -uNr widelands-1.2.orig/src/logic/player.h widelands-1.2/src/logic/player.h ---- widelands-1.2.orig/src/logic/player.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/player.h 2024-08-25 12:13:09.308000000 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_PLAYER_H - #define WL_LOGIC_PLAYER_H - -+#include - #include - #include - #include -diff -uNr widelands-1.2.orig/src/logic/replay_game_controller.h widelands-1.2/src/logic/replay_game_controller.h ---- widelands-1.2.orig/src/logic/replay_game_controller.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/replay_game_controller.h 2024-08-25 12:13:24.791000000 +0200 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_REPLAY_GAME_CONTROLLER_H - #define WL_LOGIC_REPLAY_GAME_CONTROLLER_H - -+#include - #include - - #include "logic/cmd_queue.h" -diff -uNr widelands-1.2.orig/src/logic/single_player_game_controller.h widelands-1.2/src/logic/single_player_game_controller.h ---- widelands-1.2.orig/src/logic/single_player_game_controller.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/single_player_game_controller.h 2024-08-25 12:13:32.239000000 +0200 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H - #define WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H - -+#include -+ - #include "ai/computer_player.h" - #include "logic/game_controller.h" - -diff -uNr widelands-1.2.orig/src/logic/single_player_game_settings_provider.h widelands-1.2/src/logic/single_player_game_settings_provider.h ---- widelands-1.2.orig/src/logic/single_player_game_settings_provider.h 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/src/logic/single_player_game_settings_provider.h 2024-08-25 12:13:40.343000000 +0200 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H - #define WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H - -+#include -+ - #include "logic/game_settings.h" - - /** diff --git a/widelands-1.2.1-disable-some-tests.patch b/widelands-1.2.1-disable-some-tests.patch new file mode 100644 index 0000000..d9473de --- /dev/null +++ b/widelands-1.2.1-disable-some-tests.patch @@ -0,0 +1,11 @@ +diff -uNr widelands.orig/src/base/test/CMakeLists.txt widelands/src/base/test/CMakeLists.txt +--- widelands.orig/src/base/test/CMakeLists.txt 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/base/test/CMakeLists.txt 2025-02-16 12:21:07.246000000 +0100 +@@ -7,7 +7,6 @@ + test_times.cc + test_time_string.cc + test_utf8.cc +- test_string.cc + DEPENDS + base + base_crypto diff --git a/widelands-1.2.1-gcc13.patch b/widelands-1.2.1-gcc13.patch new file mode 100644 index 0000000..57956bb --- /dev/null +++ b/widelands-1.2.1-gcc13.patch @@ -0,0 +1,724 @@ +diff -uNr widelands.orig/src/io/filesystem/zip_filesystem.h widelands/src/io/filesystem/zip_filesystem.h +--- widelands.orig/src/io/filesystem/zip_filesystem.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/io/filesystem/zip_filesystem.h 2025-02-16 12:16:38.737000000 +0100 +@@ -23,6 +23,7 @@ + + #include + #include ++#include + + #include "io/filesystem/filesystem.h" + #include "io/streamread.h" +diff -uNr widelands.orig/src/logic/addons.h widelands/src/logic/addons.h +--- widelands.orig/src/logic/addons.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/addons.h 2025-02-16 12:16:38.739000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_ADDONS_H + #define WL_LOGIC_ADDONS_H + ++#include + #include + #include + #include +diff -uNr widelands.orig/src/logic/ai_dna_handler.h widelands/src/logic/ai_dna_handler.h +--- widelands.orig/src/logic/ai_dna_handler.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/ai_dna_handler.h 2025-02-16 12:16:38.739000000 +0100 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_AI_DNA_HANDLER_H + #define WL_LOGIC_AI_DNA_HANDLER_H + ++#include ++ + #include "logic/player.h" + + namespace Widelands { +diff -uNr widelands.orig/src/logic/cmd_queue.h widelands/src/logic/cmd_queue.h +--- widelands.orig/src/logic/cmd_queue.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/cmd_queue.h 2025-02-16 12:16:38.739000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_CMD_QUEUE_H + #define WL_LOGIC_CMD_QUEUE_H + ++#include + #include + + #include "base/times.h" +diff -uNr widelands.orig/src/logic/game_controller.h widelands/src/logic/game_controller.h +--- widelands.orig/src/logic/game_controller.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/game_controller.h 2025-02-16 12:16:38.739000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GAME_CONTROLLER_H + #define WL_LOGIC_GAME_CONTROLLER_H + ++#include + #include + + #include "base/times.h" +diff -uNr widelands.orig/src/logic/game.h widelands/src/logic/game.h +--- widelands.orig/src/logic/game.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/game.h 2025-02-16 12:16:38.739000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GAME_H + #define WL_LOGIC_GAME_H + ++#include + #include + + #include "base/crypto.h" +diff -uNr widelands.orig/src/logic/game.h.orig widelands/src/logic/game.h.orig +--- widelands.orig/src/logic/game.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ widelands/src/logic/game.h.orig 2024-11-12 21:03:25.000000000 +0100 +@@ -0,0 +1,529 @@ ++/* ++ * Copyright (C) 2002-2024 by the Widelands Development Team ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, see . ++ * ++ */ ++ ++#ifndef WL_LOGIC_GAME_H ++#define WL_LOGIC_GAME_H ++ ++#include ++ ++#include "base/crypto.h" ++#include "base/random.h" ++#include "economy/flag_job.h" ++#include "io/streamwrite.h" ++#include "logic/cmd_queue.h" ++#include "logic/detected_port_space.h" ++#include "logic/editor_game_base.h" ++#include "logic/map_objects/tribes/shipstates.h" ++#include "logic/save_handler.h" ++#include "logic/trade_agreement.h" ++#include "scripting/logic.h" ++ ++class InteractivePlayer; ++struct GameSettings; ++class GameController; ++ ++namespace Widelands { ++ ++/// How often are statistics to be sampled. ++constexpr Duration kStatisticsSampleTime(30 * 1000); ++// See forester_cache_ ++constexpr int16_t kInvalidForesterEntry = -1; ++ ++constexpr uint32_t kScenarioDifficultyNotSet = 0; ++ ++struct Flag; ++struct Path; ++struct PlayerImmovable; ++enum class IslandExploreDirection; ++class PortDock; ++enum class ScoutingDirection; ++struct Ship; ++class TrainingSite; ++#if 0 // TODO(Nordfriese): Re-add training wheels code after v1.0 ++class TrainingWheels; ++#endif ++enum class StockPolicy; ++ ++enum { ++ gs_notrunning = 0, // game is being prepared ++ gs_running, // game was fully prepared at some point and is now in-game ++ gs_ending ++}; ++ ++// The entry types that are written to the syncstream ++// The IDs are a number in the higher 4 bits and the length in bytes in the lower 4 bits ++// Keep this synchronized with utils/syncstream/syncexcerpt-to-text.py ++enum SyncEntry : uint8_t { ++ // Used in: ++ // game.cc Game::report_desync() ++ // Parameters: ++ // s32 id of desynced user, -1 when written on client ++ kDesync = 0x14, ++ // map_object.cc CmdDestroyMapObject::execute() ++ // u32 object serial ++ kDestroyObject = 0x24, ++ // economy.cc Economy::process_requests() ++ // u8 request type ++ // u8 request index ++ // u32 target serial ++ kProcessRequests = 0x36, ++ // economy.cc Economy::handle_active_supplies() ++ // u32 assignments size ++ kHandleActiveSupplies = 0x44, ++ // request.cc Request::start_transfer() ++ // u32 target serial ++ // u32 source(?) serial ++ kStartTransfer = 0x58, ++ // cmd_queue.cc CmdQueue::run_queue() ++ // u32 duetime ++ // u32 command id ++ kRunQueue = 0x68, ++ // game.h Game::logic_rand_seed() ++ // u32 random seed ++ kRandomSeed = 0x74, ++ // game.cc Game::logic_rand() ++ // u32 random value ++ kRandom = 0x84, ++ // map_object.cc CmdAct::execute() ++ // u32 object serial ++ // u8 object type (see map_object.h MapObjectType) ++ kCmdAct = 0x95, ++ // battle.cc Battle::Battle() ++ // u32 first soldier serial ++ // u32 second soldier serial ++ kBattle = 0xA8, ++ // bob.cc Bob::set_position() ++ // u32 bob serial ++ // s16 position x ++ // s16 position y ++ kBobSetPosition = 0xB8 ++}; ++ ++class PlayerCommand; ++class ReplayWriter; ++ ++/** class Game ++ * ++ * This class manages the entire lifetime of a game session, from creating the ++ * game and setting options, selecting maps to the actual playing phase and the ++ * final statistics screen(s). ++ */ ++ ++class Game : public EditorGameBase { ++public: ++ struct GeneralStats { ++ std::vector land_size; ++ std::vector nr_workers; ++ std::vector nr_buildings; ++ std::vector nr_wares; ++ std::vector productivity; ++ std::vector nr_casualties; ++ std::vector nr_kills; ++ std::vector nr_msites_lost; ++ std::vector nr_msites_defeated; ++ std::vector nr_civil_blds_lost; ++ std::vector nr_civil_blds_defeated; ++ std::vector miltary_strength; ++ std::vector nr_ships; ++ std::vector nr_naval_victories; ++ std::vector nr_naval_losses; ++ ++ std::vector custom_statistic; ++ }; ++ using GeneralStatsVector = std::vector; ++ ++ friend class CmdQueue; // this class handles the commands ++ friend struct GameClassPacket; ++ friend struct GamePlayerInfoPacket; ++ friend struct GameLoader; ++ ++ // TODO(kxq): The lifetime of game-instance is okay for this, but is this the right spot? ++ // TODO(kxq): I should find the place where LUA changes map, and clear this whenever that ++ // happens. ++ // TODO(kxq): When done, the x_check in worker.cc could be removed (or made more rare, and put ++ // under an assert as then mismatch would indicate the presence of a bug). ++ // TODO(k.halfmann): this shoud perhpas better be a map, it will be quite sparse? ++ ++ /** Qualitity of terrain for tree planting normalized to int16. ++ * ++ * Indexed by MapIndex. -1 is an ivalid entry. Shared between all tribes (on the same server) ++ * will be cleared when diffrences are detected. Presently, that can only happen if terrain ++ * is changed (lua scripting). The map is sparse, lookups are fast. ++ */ ++ std::vector forester_cache_; ++ ++ Game(); ++ ~Game() override; ++ ++ bool is_game() const override { ++ return true; ++ } ++ ++ // life cycle ++ void set_game_controller(std::shared_ptr); ++ GameController* game_controller(); ++ void set_write_replay(bool wr); ++ void set_write_syncstream(bool wr); ++ void save_syncstream(bool save); ++ void init_newgame(const GameSettings&); ++ void init_savegame(const GameSettings&); ++ ++ enum class StartGameType { kMap, kSinglePlayerScenario, kMultiPlayerScenario, kSaveGame }; ++ ++ bool run(StartGameType, const std::string& script_to_run, const std::string& prefix_for_replays); ++ ++ // Returns the upcasted lua interface. ++ LuaGameInterface& lua() override; ++ ++ // Run a single player scenario directly via --scenario on the cmdline. Will ++ // run the 'script_to_run' after any init scripts of the map. ++ // `list_of_scenarios` is list of this scenario and – if applicable – ++ // all the subsequent scenarios in the campaign. ++ // Returns the result of run(). ++ bool run_splayer_scenario_direct(const std::list& list_of_scenarios, ++ const std::string& script_to_run); ++ ++ // Run a single player loaded game directly via --loadgame on the cmdline. Will ++ // run the 'script_to_run' directly after the game was loaded. ++ // Returns the result of run(). ++ bool run_load_game(const std::string& filename, const std::string& script_to_run); ++ ++ bool run_replay(const std::string& filename, const std::string& script_to_run); ++ ++#if 0 // TODO(Nordfriese): Re-add training wheels code after v1.0 ++ bool acquire_training_wheel_lock(const std::string& objective); ++ void release_training_wheel_lock(); ++ void mark_training_wheel_as_solved(const std::string& objective); ++ void skip_training_wheel(const std::string& objective); ++ void run_training_wheel(const std::string& objective, bool force); ++ ++ bool training_wheels_wanted() const; ++ std::string active_training_wheel() const; ++#endif ++ ++ void postload() override; ++ void postload_addons_before_loading(); ++ ++ void think() override; ++ ++ ReplayWriter* get_replaywriter() { ++ return replaywriter_.get(); ++ } ++ ++ /** ++ * \return \c true if the game is completely loaded and running (or paused) ++ * or \c false otherwise. ++ */ ++ bool is_loaded() const { ++ return state_ == gs_running; ++ } ++ ++ void cleanup_for_load() override; ++ void full_cleanup() override; ++ ++ // in-game logic ++ const CmdQueue& cmdqueue() const { ++ return cmdqueue_; ++ } ++ CmdQueue& cmdqueue() { ++ return cmdqueue_; ++ } ++ const RNG& rng() const { ++ return rng_; ++ } ++ RNG& rng() { ++ return rng_; ++ } ++ ++ uint32_t logic_rand(); ++ ++ /// Generate a random location within radius from location. ++ Coords random_location(Coords location, uint8_t radius); ++ ++ void logic_rand_seed(uint32_t const seed) { ++ rng().seed(seed); ++ syncstream().unsigned_8(SyncEntry::kRandomSeed); ++ syncstream().unsigned_32(seed); ++ } ++ ++ StreamWrite& syncstream(); ++ void report_sync_request(); ++ void report_desync(int32_t playernumber); ++ crypto::MD5Checksum get_sync_hash() const; ++ ++ void enqueue_command(Command*); ++ ++ void send_player_command(Widelands::PlayerCommand*); ++ ++ void send_player_bulldoze(PlayerImmovable&, bool recurse = false); ++ void send_player_dismantle(PlayerImmovable&, bool keep_wares); ++ void send_player_build(int32_t, const Coords&, DescriptionIndex); ++ void send_player_build_flag(int32_t, const Coords&); ++ void send_player_build_road(int32_t, Path&); ++ void send_player_build_waterway(int32_t, Path&); ++ void send_player_flagaction(Flag&, FlagJob::Type); ++ void send_player_start_stop_building(Building&); ++ void send_player_toggle_infinite_production(Building&); ++ void send_player_set_soldier_preference(MapObject&, SoldierPreference preference); ++ void send_player_start_or_cancel_expedition(Building&); ++ void send_player_expedition_config(PortDock&, WareWorker, DescriptionIndex, bool); ++ ++ void send_player_enhance_building(Building&, DescriptionIndex, bool keep_wares); ++ void send_player_evict_worker(Worker&); ++ void send_player_set_stock_policy(Building&, WareWorker, DescriptionIndex, StockPolicy); ++ void send_player_set_ware_priority( ++ PlayerImmovable&, WareWorker, DescriptionIndex, const WarePriority&, bool is_cs = false); ++ void send_player_set_input_max_fill( ++ PlayerImmovable&, DescriptionIndex index, WareWorker type, uint32_t, bool is_cs = false); ++ void send_player_change_training_options(TrainingSite&, TrainingAttribute, int32_t); ++ void send_player_drop_soldier(MapObject&, int32_t); ++ void send_player_change_soldier_capacity(Building&, int32_t); ++ void send_player_enemyflagaction(const Flag&, ++ PlayerNumber, ++ const std::vector&, ++ bool allow_conquer); ++ void send_player_mark_object_for_removal(PlayerNumber, Immovable&, bool); ++ ++ void send_player_ship_scouting_direction(const Ship& ship, WalkingDir direction); ++ void send_player_ship_construct_port(const Ship& ship, Coords coords); ++ void send_player_ship_explore_island(const Ship& ship, IslandExploreDirection direction); ++ void send_player_ship_set_destination(const Ship& ship, const MapObject* dest); ++ void send_player_ship_set_destination(const Ship& ship, const DetectedPortSpace& dest); ++ void send_player_sink_ship(const Ship& ship); ++ void send_player_refit_ship(const Ship& ship, ShipType t); ++ void send_player_warship_command(const Ship& ship, ++ WarshipCommand cmd, ++ const std::vector& parameters); ++ void send_player_cancel_expedition_ship(const Ship&); ++ void send_player_propose_trade(const Trade& trade); ++ void send_player_toggle_mute(const Building&, bool all); ++ void send_player_diplomacy(PlayerNumber, DiplomacyAction, PlayerNumber); ++ void send_player_pinned_note( ++ PlayerNumber p, Coords pos, const std::string& text, const RGBColor& rgb, bool del); ++ void send_player_ship_port_name(PlayerNumber p, Serial s, const std::string& name); ++ void send_player_fleet_targets(PlayerNumber p, Serial i, Quantity q); ++ ++ InteractivePlayer* get_ipl(); ++ const InteractivePlayer* get_ipl() const; ++ ++ SaveHandler& save_handler() { ++ return savehandler_; ++ } ++ ++ uint32_t get_scenario_difficulty() const { ++ return scenario_difficulty_; ++ } ++ void set_scenario_difficulty(uint32_t d) { ++ assert(scenario_difficulty_ == kScenarioDifficultyNotSet); ++ assert(d != kScenarioDifficultyNotSet); ++ scenario_difficulty_ = d; ++ } ++ ++ // Statistics ++ const GeneralStatsVector& get_general_statistics() const { ++ return general_stats_; ++ } ++ ++ void read_statistics(FileRead& fr, uint16_t packet_version); ++ void write_statistics(FileWrite& fw); ++ ++ void sample_statistics(); ++ ++ const std::string& get_win_condition_displayname() const; ++ void set_win_condition_displayname(const std::string& name); ++ int32_t get_win_condition_duration() const; ++ void set_win_condition_duration(int32_t); ++ ++ bool is_replay() const { ++ return !replay_filename_.empty(); ++ } ++ const std::string& replay_filename() const { ++ assert(is_replay()); ++ return replay_filename_; ++ } ++ ++ bool is_ai_training_mode() const { ++ return ai_training_mode_; ++ } ++ ++ bool is_auto_speed() const { ++ return auto_speed_; ++ } ++ ++ void set_ai_training_mode(bool); ++ ++ void set_auto_speed(bool); ++ ++ /** ++ * Cause the game to proceed with this file directly after the current game ends. ++ * A .wgf file will be loaded as a singleplayer savegame this way; ++ * a map file will be loaded as a singleplayer scenario. ++ */ ++ void set_next_game_to_load(const std::string& file); ++ ++ const std::list& list_of_scenarios() const { ++ return list_of_scenarios_; ++ } ++ ++ // TODO(sirver,trading): document these functions once the interface settles. ++ int propose_trade(const Trade& trade); ++ void accept_trade(int trade_id); ++ void cancel_trade(int trade_id); ++ ++ struct PendingDiplomacyAction { ++ PlayerNumber sender; ///< The player who initiated the action. ++ DiplomacyAction action; ///< The action to perform. ++ PlayerNumber other; ///< The other player affected, if any. ++ ++ PendingDiplomacyAction(PlayerNumber p1, DiplomacyAction a, PlayerNumber p2) ++ : sender(p1), action(a), other(p2) { ++ } ++ ++ inline bool operator==(const PendingDiplomacyAction& pda) const { ++ return sender == pda.sender && action == pda.action && other == pda.other; ++ } ++ }; ++ const std::list& pending_diplomacy_actions() const { ++ return pending_diplomacy_actions_; ++ } ++ std::list& pending_diplomacy_actions() { ++ return pending_diplomacy_actions_; ++ } ++ ++ [[nodiscard]] bool diplomacy_allowed() const { ++ return diplomacy_allowed_; ++ } ++ void set_diplomacy_allowed(bool allow) { ++ diplomacy_allowed_ = allow; ++ } ++ ++ [[nodiscard]] bool naval_warfare_allowed() const { ++ return naval_warfare_allowed_; ++ } ++ void set_naval_warfare_allowed(bool allow) { ++ naval_warfare_allowed_ = allow; ++ } ++ ++private: ++ bool did_postload_addons_before_loading_{false}; ++ ++ void sync_reset(); ++ ++ crypto::MD5Checksummer synchash_; ++ ++ struct SyncWrapper : public StreamWrite { ++ SyncWrapper(Game& game, crypto::MD5Checksummer& target) : game_(game), target_(target) { ++ } ++ ++ ~SyncWrapper() override; ++ ++ /// Start dumping the entire syncstream into a file. ++ /// ++ /// Note that this file is deleted at the end of the game, unless ++ /// \ref syncstreamsave_ has been set. ++ void start_dump(const std::string& fname); ++ ++ void data(void const* data, size_t size) override; ++ ++ public: ++ Game& game_; ++ crypto::MD5Checksummer& target_; ++ uint32_t counter_{0U}; ++ uint32_t next_diskspacecheck_{0U}; ++ std::unique_ptr dump_; ++ std::string dumpfname_; ++ bool syncstreamsave_{false}; ++ // Use a cyclic buffer for storing parts of the syncstream ++ // Currently used buffer ++ size_t current_excerpt_id_{0U}; ++ // (Arbitrary) count of buffers ++ // Syncreports seem to be requested from the network clients every game second so this ++ // buffer should be big enough to store the last 32 seconds of the game actions leading ++ // up to the desync ++ static constexpr size_t kExcerptSize = 32; ++ // Array of byte buffers ++ // std::string is used as a binary buffer here ++ std::string excerpts_buffer_[kExcerptSize]; ++ } syncwrapper_; ++ ++ void delete_pending_player_commands(); ++ void do_send_player_command(PlayerCommand*); ++ std::shared_ptr ctrl_; ++ ++ /// Whether a replay writer should be created. ++ /// Defaults to \c true, and should only be set to \c false for playing back ++ /// replays. ++ bool writereplay_{true}; ++ ++ /// Whether a syncsteam file should be created. ++ /// Defaults to \c false, and can be set to true for network games. The file ++ /// is written only if \ref writereplay_ is true too. ++ bool writesyncstream_{false}; ++ ++ bool ai_training_mode_{false}; ++ bool auto_speed_{false}; ++ ++ int32_t state_{gs_notrunning}; ++ ++ RNG rng_; ++ ++ CmdQueue cmdqueue_; ++ std::deque pending_player_commands_; ++ ++ SaveHandler savehandler_; ++ ++ std::unique_ptr replaywriter_; ++ ++ uint32_t scenario_difficulty_{kScenarioDifficultyNotSet}; ++ ++ GeneralStatsVector general_stats_; ++ int next_trade_agreement_id_ = 1; ++ // Maps from trade agreement id to the agreement. ++ std::map trade_agreements_; ++ ++ std::list pending_diplomacy_actions_; ++ bool diplomacy_allowed_{true}; ++ bool naval_warfare_allowed_{false}; ++ ++ /// For save games and statistics generation ++ std::string win_condition_displayname_; ++ ++ int32_t win_condition_duration_{kDefaultWinConditionDuration}; ++ ++#if 0 // TODO(Nordfriese): Re-add training wheels code after v1.0 ++ std::unique_ptr training_wheels_; ++ bool training_wheels_wanted_{false}; ++#endif ++ ++ /** Filename of the replay represented by this game, or empty if this is not a replay. */ ++ std::string replay_filename_; ++ ++ std::string next_game_to_load_; ++ std::list list_of_scenarios_; ++}; ++ ++inline Coords Game::random_location(Coords location, uint8_t radius) { ++ const uint16_t s = radius * 2 + 1; ++ location.x += logic_rand() % s - radius; ++ location.y += logic_rand() % s - radius; ++ map().normalize_coords(location); ++ return location; ++} ++} // namespace Widelands ++ ++#endif // end of include guard: WL_LOGIC_GAME_H +diff -uNr widelands.orig/src/logic/game_settings.h widelands/src/logic/game_settings.h +--- widelands.orig/src/logic/game_settings.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/game_settings.h 2025-02-16 12:16:38.740000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GAME_SETTINGS_H + #define WL_LOGIC_GAME_SETTINGS_H + ++#include + #include + #include + +diff -uNr widelands.orig/src/logic/mapastar.h widelands/src/logic/mapastar.h +--- widelands.orig/src/logic/mapastar.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/mapastar.h 2025-02-16 12:16:38.740000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MAPASTAR_H + #define WL_LOGIC_MAPASTAR_H + ++#include + #include + + #include "logic/map.h" +diff -uNr widelands.orig/src/logic/map.h widelands/src/logic/map.h +--- widelands.orig/src/logic/map.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/map.h 2025-02-16 12:16:38.740000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MAP_H + #define WL_LOGIC_MAP_H + ++#include + #include + #include + #include +diff -uNr widelands.orig/src/logic/maphollowregion.h widelands/src/logic/maphollowregion.h +--- widelands.orig/src/logic/maphollowregion.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/maphollowregion.h 2025-02-16 12:16:38.740000000 +0100 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_MAPHOLLOWREGION_H + #define WL_LOGIC_MAPHOLLOWREGION_H + ++#include ++ + #include "logic/map.h" + + namespace Widelands { +diff -uNr widelands.orig/src/logic/message_queue.h widelands/src/logic/message_queue.h +--- widelands.orig/src/logic/message_queue.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/message_queue.h 2025-02-16 12:16:38.740000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MESSAGE_QUEUE_H + #define WL_LOGIC_MESSAGE_QUEUE_H + ++#include + #include + #include + +diff -uNr widelands.orig/src/logic/pathfield.h widelands/src/logic/pathfield.h +--- widelands.orig/src/logic/pathfield.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/pathfield.h 2025-02-16 12:16:38.740000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_PATHFIELD_H + #define WL_LOGIC_PATHFIELD_H + ++#include + #include + + #include "logic/cookie_priority_queue.h" +diff -uNr widelands.orig/src/logic/playercommand.h widelands/src/logic/playercommand.h +--- widelands.orig/src/logic/playercommand.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/playercommand.h 2025-02-16 12:16:38.740000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_PLAYERCOMMAND_H + #define WL_LOGIC_PLAYERCOMMAND_H + ++#include + #include + + #include "economy/flag.h" +diff -uNr widelands.orig/src/logic/player.h widelands/src/logic/player.h +--- widelands.orig/src/logic/player.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/player.h 2025-02-16 12:16:38.741000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_PLAYER_H + #define WL_LOGIC_PLAYER_H + ++#include + #include + #include + #include +diff -uNr widelands.orig/src/logic/replay_game_controller.h widelands/src/logic/replay_game_controller.h +--- widelands.orig/src/logic/replay_game_controller.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/replay_game_controller.h 2025-02-16 12:16:38.741000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_REPLAY_GAME_CONTROLLER_H + #define WL_LOGIC_REPLAY_GAME_CONTROLLER_H + ++#include + #include + + #include "logic/cmd_queue.h" +diff -uNr widelands.orig/src/logic/single_player_game_controller.h widelands/src/logic/single_player_game_controller.h +--- widelands.orig/src/logic/single_player_game_controller.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/single_player_game_controller.h 2025-02-16 12:16:38.741000000 +0100 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H + #define WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H + ++#include ++ + #include "ai/computer_player.h" + #include "logic/game_controller.h" + +diff -uNr widelands.orig/src/logic/single_player_game_settings_provider.h widelands/src/logic/single_player_game_settings_provider.h +--- widelands.orig/src/logic/single_player_game_settings_provider.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/single_player_game_settings_provider.h 2025-02-16 12:16:38.741000000 +0100 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H + #define WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H + ++#include ++ + #include "logic/game_settings.h" + + /** diff --git a/widelands-1.2.1-gcc15.patch b/widelands-1.2.1-gcc15.patch new file mode 100644 index 0000000..c6763e8 --- /dev/null +++ b/widelands-1.2.1-gcc15.patch @@ -0,0 +1,41 @@ +diff -uNr widelands.orig/src/base/format/abstract_node.h widelands/src/base/format/abstract_node.h +--- widelands.orig/src/base/format/abstract_node.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/base/format/abstract_node.h 2025-02-16 15:15:22.182000000 +0100 +@@ -19,6 +19,8 @@ + #ifndef WL_BASE_FORMAT_ABSTRACT_NODE_H + #define WL_BASE_FORMAT_ABSTRACT_NODE_H + ++#include ++ + namespace format_impl { + + enum Flags : uint8_t { +diff -uNr widelands.orig/src/logic/map_objects/tribes/requirements.h widelands/src/logic/map_objects/tribes/requirements.h +--- widelands.orig/src/logic/map_objects/tribes/requirements.h 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/logic/map_objects/tribes/requirements.h 2025-02-16 15:22:47.038000000 +0100 +@@ -20,6 +20,7 @@ + #define WL_LOGIC_MAP_OBJECTS_TRIBES_REQUIREMENTS_H + + #include ++#include + #include + #include + #include +diff -uNr widelands.orig/src/third_party/eris/eris.c widelands/src/third_party/eris/eris.c +--- widelands.orig/src/third_party/eris/eris.c 2024-11-12 21:03:25.000000000 +0100 ++++ widelands/src/third_party/eris/eris.c 2025-02-16 12:44:28.581000000 +0100 +@@ -27,13 +27,7 @@ + #include + #include + #include +- +-/* Not using stdbool because Visual Studio lives in the past... */ +-#ifndef __cplusplus +-typedef int bool; +-#define false 0 +-#define true 1 +-#endif ++#include + + /* Mark us as part of the Lua core to get access to what we need. */ + #define LUA_CORE diff --git a/widelands.spec b/widelands.spec index 4bd07d4..d72e4cb 100644 --- a/widelands.spec +++ b/widelands.spec @@ -2,8 +2,8 @@ %global fonts font(amiri) font(dejavusans) font(dejavusansmono) font(dejavuserif) font(widelands) font(gargi) font(wenquanyimicrohei) font(frankruehlclm) Name: widelands -Version: 1.2 -Release: 3%{?dist} +Version: 1.2.1 +Release: 1%{?dist} Summary: Open source realtime-strategy game # Automatically converted from old format: GPLv2+ - review is highly recommended. @@ -20,9 +20,10 @@ Patch1: widelands-1.2-build20-gcc10.patch # at glew 2.3, or maybe backport: # https://github.com/nigels-com/glew/commit/715afa0ff56c0eb12c23938b80aa2813daa10d81 Patch2: widelands-1.0-make-sdl2-use-x11.patch -Patch3: widelands-1.2-gcc13.patch +Patch3: widelands-1.2.1-gcc13.patch Patch4: widelands-1.1-f37-sys-minizip-buildfix.patch -Patch5: widelands-1.1-disable-some-tests.patch +Patch5: widelands-1.2.1-disable-some-tests.patch +Patch6: widelands-1.2.1-gcc15.patch BuildRequires: asio-devel BuildRequires: SDL2-devel @@ -55,7 +56,7 @@ perhaps will have a thought, what Widelands is all about. %prep -%setup -q +%setup -q -n widelands %patch -P0 -p1 %patch -P1 -p1 %patch -P2 -p1 @@ -64,6 +65,7 @@ perhaps will have a thought, what Widelands is all about. %ifarch s390x %patch -P5 -p1 %endif +%patch -P6 -p1 %build @@ -143,6 +145,14 @@ ln -s $(fc-match -f "%{file}" "monospace:italic") \ usr/share/%{name}/i18n/fonts/dejavu-fonts/DejaVuSansMono-Oblique.ttf ln -s $(fc-match -f "%{file}" "monospace:bold:italic") \ usr/share/%{name}/i18n/fonts/dejavu-fonts/DejaVuSansMono-BoldOblique.ttf +ln -s $(fc-match -f "%{file}" "DejaVuSansCondensed") \ + usr/share/%{name}/i18n/fonts/dejavu-fonts/DejaVuSansCondensed.ttf +ln -s $(fc-match -f "%{file}" "DejaVuSansCondensed:bold") \ + usr/share/%{name}/i18n/fonts/dejavu-fonts/DejaVuSansCondensed-Bold.ttf +ln -s $(fc-match -f "%{file}" "DejaVuSansCondensed:italic") \ + usr/share/%{name}/i18n/fonts/dejavu-fonts/DejaVuSansCondensed-Oblique.ttf +ln -s $(fc-match -f "%{file}" "DejaVuSansCondensed:bold:italic") \ + usr/share/%{name}/i18n/fonts/dejavu-fonts/DejaVuSansCondensed-BoldOblique.ttf # Chinese fonts rm -r usr/share/%{name}/i18n/fonts/MicroHei @@ -199,6 +209,10 @@ popd %changelog +* Sun Feb 16 2025 Peter Hanecak - 1.2.1-1 +- New upstream release 1.2 (rhbz#2322776) +- Generate font file symlinks also for DejaVuSansCondensed (rhbz#2334803) + * Sun Jan 19 2025 Fedora Release Engineering - 1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From a559babaaf56e5a066f9eae0c601693b3b929ee5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:25:15 +0000 Subject: [PATCH 23/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index d72e4cb..96cdd20 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open source realtime-strategy game # Automatically converted from old format: GPLv2+ - review is highly recommended. @@ -209,6 +209,9 @@ popd %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sun Feb 16 2025 Peter Hanecak - 1.2.1-1 - New upstream release 1.2 (rhbz#2322776) - Generate font file symlinks also for DejaVuSansCondensed (rhbz#2334803) From edd8a2078c7883dbe562f1f145cec22f0f500e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Wed, 6 Aug 2025 09:58:39 +0200 Subject: [PATCH 24/29] Rebuilt for icu 77.1 --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index 96cdd20..8e6d036 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.2.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Open source realtime-strategy game # Automatically converted from old format: GPLv2+ - review is highly recommended. @@ -209,6 +209,9 @@ popd %changelog +* Wed Aug 06 2025 František Zatloukal - 1.2.1-3 +- Rebuilt for icu 77.1 + * Fri Jul 25 2025 Fedora Release Engineering - 1.2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 6d8733dd8847be685f0f379ea229fbb38f8e6650 Mon Sep 17 00:00:00 2001 From: Peter Hanecak Date: Sun, 21 Dec 2025 22:59:59 +0100 Subject: [PATCH 25/29] New upstream release 1.3 (rhbz#2422054) --- .gitignore | 1 + sources | 2 +- widelands-1.2-build19-ppc64le.patch | 12 - widelands-1.2.1-gcc13.patch | 724 ------------------ widelands-1.2.1-gcc15.patch | 41 - widelands-1.3-build19-ppc64le.patch | 12 + ...delands-1.3-f37-sys-minizip-buildfix.patch | 8 +- widelands-1.3-gcc13.patch | 180 +++++ widelands-1.3-gcc15.patch | 29 + ...h => widelands-1.3-make-sdl2-use-x11.patch | 26 +- widelands.spec | 37 +- 11 files changed, 262 insertions(+), 810 deletions(-) delete mode 100644 widelands-1.2-build19-ppc64le.patch delete mode 100644 widelands-1.2.1-gcc13.patch delete mode 100644 widelands-1.2.1-gcc15.patch create mode 100644 widelands-1.3-build19-ppc64le.patch rename widelands-1.1-f37-sys-minizip-buildfix.patch => widelands-1.3-f37-sys-minizip-buildfix.patch (62%) create mode 100644 widelands-1.3-gcc13.patch create mode 100644 widelands-1.3-gcc15.patch rename widelands-1.0-make-sdl2-use-x11.patch => widelands-1.3-make-sdl2-use-x11.patch (54%) diff --git a/.gitignore b/.gitignore index 5486b85..f78d0dd 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ Widelands-Build14-src.7z /widelands-1.1.tar.gz /widelands-1.2.tar.gz /widelands-1.2.1.tar.gz +/widelands-1.3.tar.gz diff --git a/sources b/sources index b1ebe21..d7384c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (widelands-1.2.1.tar.gz) = eb765367e57bab7d016a0e9ad0f5f2e17e31124cb94a149c87a17ce22169509361f408297233e14001e12a8546cfbea879a21a05e47b7f48ba6924ce1a8080e9 +SHA512 (widelands-1.3.tar.gz) = 52bde9ecf69bf3f9a231e5d2934075a5965e8317e83a2abf47ba4e55eaca898258de61a8783324fed1ed330262897ec8daaa6db641ed4845ccc6bf59c227d859 diff --git a/widelands-1.2-build19-ppc64le.patch b/widelands-1.2-build19-ppc64le.patch deleted file mode 100644 index 403949a..0000000 --- a/widelands-1.2-build19-ppc64le.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr widelands-1.2.orig/CMakeLists.txt widelands-1.2/CMakeLists.txt ---- widelands-1.2.orig/CMakeLists.txt 2024-03-28 11:12:05.000000000 +0100 -+++ widelands-1.2/CMakeLists.txt 2024-08-25 11:56:53.948000000 +0200 -@@ -272,7 +272,7 @@ - wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-unsafe-buffer-usage") - endif() - elseif(MSVC) -- wl_add_flag(WL_GENERIC_CXX_FLAGS "/std:c++17") -+ wl_add_flag(WL_GENERIC_CXX_FLAGS "/std:gnu++17") - # https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/ - # Disabled warnings that are overly verbose right now or just do not make sense. - wl_add_flag(WL_COMPILE_DIAGNOSTICS "/wd4244") diff --git a/widelands-1.2.1-gcc13.patch b/widelands-1.2.1-gcc13.patch deleted file mode 100644 index 57956bb..0000000 --- a/widelands-1.2.1-gcc13.patch +++ /dev/null @@ -1,724 +0,0 @@ -diff -uNr widelands.orig/src/io/filesystem/zip_filesystem.h widelands/src/io/filesystem/zip_filesystem.h ---- widelands.orig/src/io/filesystem/zip_filesystem.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/io/filesystem/zip_filesystem.h 2025-02-16 12:16:38.737000000 +0100 -@@ -23,6 +23,7 @@ - - #include - #include -+#include - - #include "io/filesystem/filesystem.h" - #include "io/streamread.h" -diff -uNr widelands.orig/src/logic/addons.h widelands/src/logic/addons.h ---- widelands.orig/src/logic/addons.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/addons.h 2025-02-16 12:16:38.739000000 +0100 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_ADDONS_H - #define WL_LOGIC_ADDONS_H - -+#include - #include - #include - #include -diff -uNr widelands.orig/src/logic/ai_dna_handler.h widelands/src/logic/ai_dna_handler.h ---- widelands.orig/src/logic/ai_dna_handler.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/ai_dna_handler.h 2025-02-16 12:16:38.739000000 +0100 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_AI_DNA_HANDLER_H - #define WL_LOGIC_AI_DNA_HANDLER_H - -+#include -+ - #include "logic/player.h" - - namespace Widelands { -diff -uNr widelands.orig/src/logic/cmd_queue.h widelands/src/logic/cmd_queue.h ---- widelands.orig/src/logic/cmd_queue.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/cmd_queue.h 2025-02-16 12:16:38.739000000 +0100 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_CMD_QUEUE_H - #define WL_LOGIC_CMD_QUEUE_H - -+#include - #include - - #include "base/times.h" -diff -uNr widelands.orig/src/logic/game_controller.h widelands/src/logic/game_controller.h ---- widelands.orig/src/logic/game_controller.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/game_controller.h 2025-02-16 12:16:38.739000000 +0100 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_GAME_CONTROLLER_H - #define WL_LOGIC_GAME_CONTROLLER_H - -+#include - #include - - #include "base/times.h" -diff -uNr widelands.orig/src/logic/game.h widelands/src/logic/game.h ---- widelands.orig/src/logic/game.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/game.h 2025-02-16 12:16:38.739000000 +0100 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_GAME_H - #define WL_LOGIC_GAME_H - -+#include - #include - - #include "base/crypto.h" -diff -uNr widelands.orig/src/logic/game.h.orig widelands/src/logic/game.h.orig ---- widelands.orig/src/logic/game.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ widelands/src/logic/game.h.orig 2024-11-12 21:03:25.000000000 +0100 -@@ -0,0 +1,529 @@ -+/* -+ * Copyright (C) 2002-2024 by the Widelands Development Team -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2 -+ * of the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, see . -+ * -+ */ -+ -+#ifndef WL_LOGIC_GAME_H -+#define WL_LOGIC_GAME_H -+ -+#include -+ -+#include "base/crypto.h" -+#include "base/random.h" -+#include "economy/flag_job.h" -+#include "io/streamwrite.h" -+#include "logic/cmd_queue.h" -+#include "logic/detected_port_space.h" -+#include "logic/editor_game_base.h" -+#include "logic/map_objects/tribes/shipstates.h" -+#include "logic/save_handler.h" -+#include "logic/trade_agreement.h" -+#include "scripting/logic.h" -+ -+class InteractivePlayer; -+struct GameSettings; -+class GameController; -+ -+namespace Widelands { -+ -+/// How often are statistics to be sampled. -+constexpr Duration kStatisticsSampleTime(30 * 1000); -+// See forester_cache_ -+constexpr int16_t kInvalidForesterEntry = -1; -+ -+constexpr uint32_t kScenarioDifficultyNotSet = 0; -+ -+struct Flag; -+struct Path; -+struct PlayerImmovable; -+enum class IslandExploreDirection; -+class PortDock; -+enum class ScoutingDirection; -+struct Ship; -+class TrainingSite; -+#if 0 // TODO(Nordfriese): Re-add training wheels code after v1.0 -+class TrainingWheels; -+#endif -+enum class StockPolicy; -+ -+enum { -+ gs_notrunning = 0, // game is being prepared -+ gs_running, // game was fully prepared at some point and is now in-game -+ gs_ending -+}; -+ -+// The entry types that are written to the syncstream -+// The IDs are a number in the higher 4 bits and the length in bytes in the lower 4 bits -+// Keep this synchronized with utils/syncstream/syncexcerpt-to-text.py -+enum SyncEntry : uint8_t { -+ // Used in: -+ // game.cc Game::report_desync() -+ // Parameters: -+ // s32 id of desynced user, -1 when written on client -+ kDesync = 0x14, -+ // map_object.cc CmdDestroyMapObject::execute() -+ // u32 object serial -+ kDestroyObject = 0x24, -+ // economy.cc Economy::process_requests() -+ // u8 request type -+ // u8 request index -+ // u32 target serial -+ kProcessRequests = 0x36, -+ // economy.cc Economy::handle_active_supplies() -+ // u32 assignments size -+ kHandleActiveSupplies = 0x44, -+ // request.cc Request::start_transfer() -+ // u32 target serial -+ // u32 source(?) serial -+ kStartTransfer = 0x58, -+ // cmd_queue.cc CmdQueue::run_queue() -+ // u32 duetime -+ // u32 command id -+ kRunQueue = 0x68, -+ // game.h Game::logic_rand_seed() -+ // u32 random seed -+ kRandomSeed = 0x74, -+ // game.cc Game::logic_rand() -+ // u32 random value -+ kRandom = 0x84, -+ // map_object.cc CmdAct::execute() -+ // u32 object serial -+ // u8 object type (see map_object.h MapObjectType) -+ kCmdAct = 0x95, -+ // battle.cc Battle::Battle() -+ // u32 first soldier serial -+ // u32 second soldier serial -+ kBattle = 0xA8, -+ // bob.cc Bob::set_position() -+ // u32 bob serial -+ // s16 position x -+ // s16 position y -+ kBobSetPosition = 0xB8 -+}; -+ -+class PlayerCommand; -+class ReplayWriter; -+ -+/** class Game -+ * -+ * This class manages the entire lifetime of a game session, from creating the -+ * game and setting options, selecting maps to the actual playing phase and the -+ * final statistics screen(s). -+ */ -+ -+class Game : public EditorGameBase { -+public: -+ struct GeneralStats { -+ std::vector land_size; -+ std::vector nr_workers; -+ std::vector nr_buildings; -+ std::vector nr_wares; -+ std::vector productivity; -+ std::vector nr_casualties; -+ std::vector nr_kills; -+ std::vector nr_msites_lost; -+ std::vector nr_msites_defeated; -+ std::vector nr_civil_blds_lost; -+ std::vector nr_civil_blds_defeated; -+ std::vector miltary_strength; -+ std::vector nr_ships; -+ std::vector nr_naval_victories; -+ std::vector nr_naval_losses; -+ -+ std::vector custom_statistic; -+ }; -+ using GeneralStatsVector = std::vector; -+ -+ friend class CmdQueue; // this class handles the commands -+ friend struct GameClassPacket; -+ friend struct GamePlayerInfoPacket; -+ friend struct GameLoader; -+ -+ // TODO(kxq): The lifetime of game-instance is okay for this, but is this the right spot? -+ // TODO(kxq): I should find the place where LUA changes map, and clear this whenever that -+ // happens. -+ // TODO(kxq): When done, the x_check in worker.cc could be removed (or made more rare, and put -+ // under an assert as then mismatch would indicate the presence of a bug). -+ // TODO(k.halfmann): this shoud perhpas better be a map, it will be quite sparse? -+ -+ /** Qualitity of terrain for tree planting normalized to int16. -+ * -+ * Indexed by MapIndex. -1 is an ivalid entry. Shared between all tribes (on the same server) -+ * will be cleared when diffrences are detected. Presently, that can only happen if terrain -+ * is changed (lua scripting). The map is sparse, lookups are fast. -+ */ -+ std::vector forester_cache_; -+ -+ Game(); -+ ~Game() override; -+ -+ bool is_game() const override { -+ return true; -+ } -+ -+ // life cycle -+ void set_game_controller(std::shared_ptr); -+ GameController* game_controller(); -+ void set_write_replay(bool wr); -+ void set_write_syncstream(bool wr); -+ void save_syncstream(bool save); -+ void init_newgame(const GameSettings&); -+ void init_savegame(const GameSettings&); -+ -+ enum class StartGameType { kMap, kSinglePlayerScenario, kMultiPlayerScenario, kSaveGame }; -+ -+ bool run(StartGameType, const std::string& script_to_run, const std::string& prefix_for_replays); -+ -+ // Returns the upcasted lua interface. -+ LuaGameInterface& lua() override; -+ -+ // Run a single player scenario directly via --scenario on the cmdline. Will -+ // run the 'script_to_run' after any init scripts of the map. -+ // `list_of_scenarios` is list of this scenario and – if applicable – -+ // all the subsequent scenarios in the campaign. -+ // Returns the result of run(). -+ bool run_splayer_scenario_direct(const std::list& list_of_scenarios, -+ const std::string& script_to_run); -+ -+ // Run a single player loaded game directly via --loadgame on the cmdline. Will -+ // run the 'script_to_run' directly after the game was loaded. -+ // Returns the result of run(). -+ bool run_load_game(const std::string& filename, const std::string& script_to_run); -+ -+ bool run_replay(const std::string& filename, const std::string& script_to_run); -+ -+#if 0 // TODO(Nordfriese): Re-add training wheels code after v1.0 -+ bool acquire_training_wheel_lock(const std::string& objective); -+ void release_training_wheel_lock(); -+ void mark_training_wheel_as_solved(const std::string& objective); -+ void skip_training_wheel(const std::string& objective); -+ void run_training_wheel(const std::string& objective, bool force); -+ -+ bool training_wheels_wanted() const; -+ std::string active_training_wheel() const; -+#endif -+ -+ void postload() override; -+ void postload_addons_before_loading(); -+ -+ void think() override; -+ -+ ReplayWriter* get_replaywriter() { -+ return replaywriter_.get(); -+ } -+ -+ /** -+ * \return \c true if the game is completely loaded and running (or paused) -+ * or \c false otherwise. -+ */ -+ bool is_loaded() const { -+ return state_ == gs_running; -+ } -+ -+ void cleanup_for_load() override; -+ void full_cleanup() override; -+ -+ // in-game logic -+ const CmdQueue& cmdqueue() const { -+ return cmdqueue_; -+ } -+ CmdQueue& cmdqueue() { -+ return cmdqueue_; -+ } -+ const RNG& rng() const { -+ return rng_; -+ } -+ RNG& rng() { -+ return rng_; -+ } -+ -+ uint32_t logic_rand(); -+ -+ /// Generate a random location within radius from location. -+ Coords random_location(Coords location, uint8_t radius); -+ -+ void logic_rand_seed(uint32_t const seed) { -+ rng().seed(seed); -+ syncstream().unsigned_8(SyncEntry::kRandomSeed); -+ syncstream().unsigned_32(seed); -+ } -+ -+ StreamWrite& syncstream(); -+ void report_sync_request(); -+ void report_desync(int32_t playernumber); -+ crypto::MD5Checksum get_sync_hash() const; -+ -+ void enqueue_command(Command*); -+ -+ void send_player_command(Widelands::PlayerCommand*); -+ -+ void send_player_bulldoze(PlayerImmovable&, bool recurse = false); -+ void send_player_dismantle(PlayerImmovable&, bool keep_wares); -+ void send_player_build(int32_t, const Coords&, DescriptionIndex); -+ void send_player_build_flag(int32_t, const Coords&); -+ void send_player_build_road(int32_t, Path&); -+ void send_player_build_waterway(int32_t, Path&); -+ void send_player_flagaction(Flag&, FlagJob::Type); -+ void send_player_start_stop_building(Building&); -+ void send_player_toggle_infinite_production(Building&); -+ void send_player_set_soldier_preference(MapObject&, SoldierPreference preference); -+ void send_player_start_or_cancel_expedition(Building&); -+ void send_player_expedition_config(PortDock&, WareWorker, DescriptionIndex, bool); -+ -+ void send_player_enhance_building(Building&, DescriptionIndex, bool keep_wares); -+ void send_player_evict_worker(Worker&); -+ void send_player_set_stock_policy(Building&, WareWorker, DescriptionIndex, StockPolicy); -+ void send_player_set_ware_priority( -+ PlayerImmovable&, WareWorker, DescriptionIndex, const WarePriority&, bool is_cs = false); -+ void send_player_set_input_max_fill( -+ PlayerImmovable&, DescriptionIndex index, WareWorker type, uint32_t, bool is_cs = false); -+ void send_player_change_training_options(TrainingSite&, TrainingAttribute, int32_t); -+ void send_player_drop_soldier(MapObject&, int32_t); -+ void send_player_change_soldier_capacity(Building&, int32_t); -+ void send_player_enemyflagaction(const Flag&, -+ PlayerNumber, -+ const std::vector&, -+ bool allow_conquer); -+ void send_player_mark_object_for_removal(PlayerNumber, Immovable&, bool); -+ -+ void send_player_ship_scouting_direction(const Ship& ship, WalkingDir direction); -+ void send_player_ship_construct_port(const Ship& ship, Coords coords); -+ void send_player_ship_explore_island(const Ship& ship, IslandExploreDirection direction); -+ void send_player_ship_set_destination(const Ship& ship, const MapObject* dest); -+ void send_player_ship_set_destination(const Ship& ship, const DetectedPortSpace& dest); -+ void send_player_sink_ship(const Ship& ship); -+ void send_player_refit_ship(const Ship& ship, ShipType t); -+ void send_player_warship_command(const Ship& ship, -+ WarshipCommand cmd, -+ const std::vector& parameters); -+ void send_player_cancel_expedition_ship(const Ship&); -+ void send_player_propose_trade(const Trade& trade); -+ void send_player_toggle_mute(const Building&, bool all); -+ void send_player_diplomacy(PlayerNumber, DiplomacyAction, PlayerNumber); -+ void send_player_pinned_note( -+ PlayerNumber p, Coords pos, const std::string& text, const RGBColor& rgb, bool del); -+ void send_player_ship_port_name(PlayerNumber p, Serial s, const std::string& name); -+ void send_player_fleet_targets(PlayerNumber p, Serial i, Quantity q); -+ -+ InteractivePlayer* get_ipl(); -+ const InteractivePlayer* get_ipl() const; -+ -+ SaveHandler& save_handler() { -+ return savehandler_; -+ } -+ -+ uint32_t get_scenario_difficulty() const { -+ return scenario_difficulty_; -+ } -+ void set_scenario_difficulty(uint32_t d) { -+ assert(scenario_difficulty_ == kScenarioDifficultyNotSet); -+ assert(d != kScenarioDifficultyNotSet); -+ scenario_difficulty_ = d; -+ } -+ -+ // Statistics -+ const GeneralStatsVector& get_general_statistics() const { -+ return general_stats_; -+ } -+ -+ void read_statistics(FileRead& fr, uint16_t packet_version); -+ void write_statistics(FileWrite& fw); -+ -+ void sample_statistics(); -+ -+ const std::string& get_win_condition_displayname() const; -+ void set_win_condition_displayname(const std::string& name); -+ int32_t get_win_condition_duration() const; -+ void set_win_condition_duration(int32_t); -+ -+ bool is_replay() const { -+ return !replay_filename_.empty(); -+ } -+ const std::string& replay_filename() const { -+ assert(is_replay()); -+ return replay_filename_; -+ } -+ -+ bool is_ai_training_mode() const { -+ return ai_training_mode_; -+ } -+ -+ bool is_auto_speed() const { -+ return auto_speed_; -+ } -+ -+ void set_ai_training_mode(bool); -+ -+ void set_auto_speed(bool); -+ -+ /** -+ * Cause the game to proceed with this file directly after the current game ends. -+ * A .wgf file will be loaded as a singleplayer savegame this way; -+ * a map file will be loaded as a singleplayer scenario. -+ */ -+ void set_next_game_to_load(const std::string& file); -+ -+ const std::list& list_of_scenarios() const { -+ return list_of_scenarios_; -+ } -+ -+ // TODO(sirver,trading): document these functions once the interface settles. -+ int propose_trade(const Trade& trade); -+ void accept_trade(int trade_id); -+ void cancel_trade(int trade_id); -+ -+ struct PendingDiplomacyAction { -+ PlayerNumber sender; ///< The player who initiated the action. -+ DiplomacyAction action; ///< The action to perform. -+ PlayerNumber other; ///< The other player affected, if any. -+ -+ PendingDiplomacyAction(PlayerNumber p1, DiplomacyAction a, PlayerNumber p2) -+ : sender(p1), action(a), other(p2) { -+ } -+ -+ inline bool operator==(const PendingDiplomacyAction& pda) const { -+ return sender == pda.sender && action == pda.action && other == pda.other; -+ } -+ }; -+ const std::list& pending_diplomacy_actions() const { -+ return pending_diplomacy_actions_; -+ } -+ std::list& pending_diplomacy_actions() { -+ return pending_diplomacy_actions_; -+ } -+ -+ [[nodiscard]] bool diplomacy_allowed() const { -+ return diplomacy_allowed_; -+ } -+ void set_diplomacy_allowed(bool allow) { -+ diplomacy_allowed_ = allow; -+ } -+ -+ [[nodiscard]] bool naval_warfare_allowed() const { -+ return naval_warfare_allowed_; -+ } -+ void set_naval_warfare_allowed(bool allow) { -+ naval_warfare_allowed_ = allow; -+ } -+ -+private: -+ bool did_postload_addons_before_loading_{false}; -+ -+ void sync_reset(); -+ -+ crypto::MD5Checksummer synchash_; -+ -+ struct SyncWrapper : public StreamWrite { -+ SyncWrapper(Game& game, crypto::MD5Checksummer& target) : game_(game), target_(target) { -+ } -+ -+ ~SyncWrapper() override; -+ -+ /// Start dumping the entire syncstream into a file. -+ /// -+ /// Note that this file is deleted at the end of the game, unless -+ /// \ref syncstreamsave_ has been set. -+ void start_dump(const std::string& fname); -+ -+ void data(void const* data, size_t size) override; -+ -+ public: -+ Game& game_; -+ crypto::MD5Checksummer& target_; -+ uint32_t counter_{0U}; -+ uint32_t next_diskspacecheck_{0U}; -+ std::unique_ptr dump_; -+ std::string dumpfname_; -+ bool syncstreamsave_{false}; -+ // Use a cyclic buffer for storing parts of the syncstream -+ // Currently used buffer -+ size_t current_excerpt_id_{0U}; -+ // (Arbitrary) count of buffers -+ // Syncreports seem to be requested from the network clients every game second so this -+ // buffer should be big enough to store the last 32 seconds of the game actions leading -+ // up to the desync -+ static constexpr size_t kExcerptSize = 32; -+ // Array of byte buffers -+ // std::string is used as a binary buffer here -+ std::string excerpts_buffer_[kExcerptSize]; -+ } syncwrapper_; -+ -+ void delete_pending_player_commands(); -+ void do_send_player_command(PlayerCommand*); -+ std::shared_ptr ctrl_; -+ -+ /// Whether a replay writer should be created. -+ /// Defaults to \c true, and should only be set to \c false for playing back -+ /// replays. -+ bool writereplay_{true}; -+ -+ /// Whether a syncsteam file should be created. -+ /// Defaults to \c false, and can be set to true for network games. The file -+ /// is written only if \ref writereplay_ is true too. -+ bool writesyncstream_{false}; -+ -+ bool ai_training_mode_{false}; -+ bool auto_speed_{false}; -+ -+ int32_t state_{gs_notrunning}; -+ -+ RNG rng_; -+ -+ CmdQueue cmdqueue_; -+ std::deque pending_player_commands_; -+ -+ SaveHandler savehandler_; -+ -+ std::unique_ptr replaywriter_; -+ -+ uint32_t scenario_difficulty_{kScenarioDifficultyNotSet}; -+ -+ GeneralStatsVector general_stats_; -+ int next_trade_agreement_id_ = 1; -+ // Maps from trade agreement id to the agreement. -+ std::map trade_agreements_; -+ -+ std::list pending_diplomacy_actions_; -+ bool diplomacy_allowed_{true}; -+ bool naval_warfare_allowed_{false}; -+ -+ /// For save games and statistics generation -+ std::string win_condition_displayname_; -+ -+ int32_t win_condition_duration_{kDefaultWinConditionDuration}; -+ -+#if 0 // TODO(Nordfriese): Re-add training wheels code after v1.0 -+ std::unique_ptr training_wheels_; -+ bool training_wheels_wanted_{false}; -+#endif -+ -+ /** Filename of the replay represented by this game, or empty if this is not a replay. */ -+ std::string replay_filename_; -+ -+ std::string next_game_to_load_; -+ std::list list_of_scenarios_; -+}; -+ -+inline Coords Game::random_location(Coords location, uint8_t radius) { -+ const uint16_t s = radius * 2 + 1; -+ location.x += logic_rand() % s - radius; -+ location.y += logic_rand() % s - radius; -+ map().normalize_coords(location); -+ return location; -+} -+} // namespace Widelands -+ -+#endif // end of include guard: WL_LOGIC_GAME_H -diff -uNr widelands.orig/src/logic/game_settings.h widelands/src/logic/game_settings.h ---- widelands.orig/src/logic/game_settings.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/game_settings.h 2025-02-16 12:16:38.740000000 +0100 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_GAME_SETTINGS_H - #define WL_LOGIC_GAME_SETTINGS_H - -+#include - #include - #include - -diff -uNr widelands.orig/src/logic/mapastar.h widelands/src/logic/mapastar.h ---- widelands.orig/src/logic/mapastar.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/mapastar.h 2025-02-16 12:16:38.740000000 +0100 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_MAPASTAR_H - #define WL_LOGIC_MAPASTAR_H - -+#include - #include - - #include "logic/map.h" -diff -uNr widelands.orig/src/logic/map.h widelands/src/logic/map.h ---- widelands.orig/src/logic/map.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/map.h 2025-02-16 12:16:38.740000000 +0100 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_MAP_H - #define WL_LOGIC_MAP_H - -+#include - #include - #include - #include -diff -uNr widelands.orig/src/logic/maphollowregion.h widelands/src/logic/maphollowregion.h ---- widelands.orig/src/logic/maphollowregion.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/maphollowregion.h 2025-02-16 12:16:38.740000000 +0100 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_MAPHOLLOWREGION_H - #define WL_LOGIC_MAPHOLLOWREGION_H - -+#include -+ - #include "logic/map.h" - - namespace Widelands { -diff -uNr widelands.orig/src/logic/message_queue.h widelands/src/logic/message_queue.h ---- widelands.orig/src/logic/message_queue.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/message_queue.h 2025-02-16 12:16:38.740000000 +0100 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_MESSAGE_QUEUE_H - #define WL_LOGIC_MESSAGE_QUEUE_H - -+#include - #include - #include - -diff -uNr widelands.orig/src/logic/pathfield.h widelands/src/logic/pathfield.h ---- widelands.orig/src/logic/pathfield.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/pathfield.h 2025-02-16 12:16:38.740000000 +0100 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_PATHFIELD_H - #define WL_LOGIC_PATHFIELD_H - -+#include - #include - - #include "logic/cookie_priority_queue.h" -diff -uNr widelands.orig/src/logic/playercommand.h widelands/src/logic/playercommand.h ---- widelands.orig/src/logic/playercommand.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/playercommand.h 2025-02-16 12:16:38.740000000 +0100 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_PLAYERCOMMAND_H - #define WL_LOGIC_PLAYERCOMMAND_H - -+#include - #include - - #include "economy/flag.h" -diff -uNr widelands.orig/src/logic/player.h widelands/src/logic/player.h ---- widelands.orig/src/logic/player.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/player.h 2025-02-16 12:16:38.741000000 +0100 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_PLAYER_H - #define WL_LOGIC_PLAYER_H - -+#include - #include - #include - #include -diff -uNr widelands.orig/src/logic/replay_game_controller.h widelands/src/logic/replay_game_controller.h ---- widelands.orig/src/logic/replay_game_controller.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/replay_game_controller.h 2025-02-16 12:16:38.741000000 +0100 -@@ -19,6 +19,7 @@ - #ifndef WL_LOGIC_REPLAY_GAME_CONTROLLER_H - #define WL_LOGIC_REPLAY_GAME_CONTROLLER_H - -+#include - #include - - #include "logic/cmd_queue.h" -diff -uNr widelands.orig/src/logic/single_player_game_controller.h widelands/src/logic/single_player_game_controller.h ---- widelands.orig/src/logic/single_player_game_controller.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/single_player_game_controller.h 2025-02-16 12:16:38.741000000 +0100 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H - #define WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H - -+#include -+ - #include "ai/computer_player.h" - #include "logic/game_controller.h" - -diff -uNr widelands.orig/src/logic/single_player_game_settings_provider.h widelands/src/logic/single_player_game_settings_provider.h ---- widelands.orig/src/logic/single_player_game_settings_provider.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/single_player_game_settings_provider.h 2025-02-16 12:16:38.741000000 +0100 -@@ -19,6 +19,8 @@ - #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H - #define WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H - -+#include -+ - #include "logic/game_settings.h" - - /** diff --git a/widelands-1.2.1-gcc15.patch b/widelands-1.2.1-gcc15.patch deleted file mode 100644 index c6763e8..0000000 --- a/widelands-1.2.1-gcc15.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -uNr widelands.orig/src/base/format/abstract_node.h widelands/src/base/format/abstract_node.h ---- widelands.orig/src/base/format/abstract_node.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/base/format/abstract_node.h 2025-02-16 15:15:22.182000000 +0100 -@@ -19,6 +19,8 @@ - #ifndef WL_BASE_FORMAT_ABSTRACT_NODE_H - #define WL_BASE_FORMAT_ABSTRACT_NODE_H - -+#include -+ - namespace format_impl { - - enum Flags : uint8_t { -diff -uNr widelands.orig/src/logic/map_objects/tribes/requirements.h widelands/src/logic/map_objects/tribes/requirements.h ---- widelands.orig/src/logic/map_objects/tribes/requirements.h 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/logic/map_objects/tribes/requirements.h 2025-02-16 15:22:47.038000000 +0100 -@@ -20,6 +20,7 @@ - #define WL_LOGIC_MAP_OBJECTS_TRIBES_REQUIREMENTS_H - - #include -+#include - #include - #include - #include -diff -uNr widelands.orig/src/third_party/eris/eris.c widelands/src/third_party/eris/eris.c ---- widelands.orig/src/third_party/eris/eris.c 2024-11-12 21:03:25.000000000 +0100 -+++ widelands/src/third_party/eris/eris.c 2025-02-16 12:44:28.581000000 +0100 -@@ -27,13 +27,7 @@ - #include - #include - #include -- --/* Not using stdbool because Visual Studio lives in the past... */ --#ifndef __cplusplus --typedef int bool; --#define false 0 --#define true 1 --#endif -+#include - - /* Mark us as part of the Lua core to get access to what we need. */ - #define LUA_CORE diff --git a/widelands-1.3-build19-ppc64le.patch b/widelands-1.3-build19-ppc64le.patch new file mode 100644 index 0000000..b660b63 --- /dev/null +++ b/widelands-1.3-build19-ppc64le.patch @@ -0,0 +1,12 @@ +diff -uNr widelands-1.3.orig/CMakeLists.txt widelands-1.3/CMakeLists.txt +--- widelands-1.3.orig/CMakeLists.txt 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/CMakeLists.txt 2025-12-21 13:08:24.503000000 +0100 +@@ -292,7 +292,7 @@ + wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-disabled-macro-expansion") + endif() + elseif(MSVC) +- wl_add_flag(WL_GENERIC_CXX_FLAGS "/std:c++17") ++ wl_add_flag(WL_GENERIC_CXX_FLAGS "/std:gnu++17") + wl_add_flag(WL_GENERIC_C_LIBRARY_FLAGS "/std:c11") + # https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/ + # Disabled warnings that are overly verbose right now or just do not make sense. diff --git a/widelands-1.1-f37-sys-minizip-buildfix.patch b/widelands-1.3-f37-sys-minizip-buildfix.patch similarity index 62% rename from widelands-1.1-f37-sys-minizip-buildfix.patch rename to widelands-1.3-f37-sys-minizip-buildfix.patch index 8873993..bdafc73 100644 --- a/widelands-1.1-f37-sys-minizip-buildfix.patch +++ b/widelands-1.3-f37-sys-minizip-buildfix.patch @@ -1,7 +1,7 @@ -diff -up widelands-1.1/cmake/WlFunctions.cmake~ widelands-1.1/cmake/WlFunctions.cmake ---- widelands-1.1/cmake/WlFunctions.cmake~ 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/cmake/WlFunctions.cmake 2023-03-28 10:31:21.413196378 +0200 -@@ -77,7 +77,9 @@ macro(_common_compile_tasks) +diff -uNr widelands-1.3.orig/cmake/WlFunctions.cmake widelands-1.3/cmake/WlFunctions.cmake +--- widelands-1.3.orig/cmake/WlFunctions.cmake 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/cmake/WlFunctions.cmake 2025-12-21 13:32:50.138000000 +0100 +@@ -93,7 +93,9 @@ wl_include_directories(${NAME} ${CMAKE_SOURCE_DIR}/src) wl_include_directories(${NAME} ${CMAKE_BINARY_DIR}/src) if(MINIZIP_STATIC_LIBRARIES) diff --git a/widelands-1.3-gcc13.patch b/widelands-1.3-gcc13.patch new file mode 100644 index 0000000..b1ca776 --- /dev/null +++ b/widelands-1.3-gcc13.patch @@ -0,0 +1,180 @@ +diff -uNr widelands-1.3.orig/src/commands/cmd_queue.h widelands-1.3/src/commands/cmd_queue.h +--- widelands-1.3.orig/src/commands/cmd_queue.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/commands/cmd_queue.h 2025-12-21 13:22:54.968000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_COMMANDS_CMD_QUEUE_H + #define WL_COMMANDS_CMD_QUEUE_H + ++#include + #include + + #include "commands/command.h" +diff -uNr widelands-1.3.orig/src/io/filesystem/zip_filesystem.h widelands-1.3/src/io/filesystem/zip_filesystem.h +--- widelands-1.3.orig/src/io/filesystem/zip_filesystem.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/io/filesystem/zip_filesystem.h 2025-12-21 13:21:40.240000000 +0100 +@@ -23,6 +23,7 @@ + + #include + #include ++#include + + #include "io/filesystem/filesystem.h" + #include "io/streamread.h" +diff -uNr widelands-1.3.orig/src/logic/addons.h widelands-1.3/src/logic/addons.h +--- widelands-1.3.orig/src/logic/addons.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/addons.h 2025-12-21 13:22:00.559000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_ADDONS_H + #define WL_LOGIC_ADDONS_H + ++#include + #include + #include + #include +diff -uNr widelands-1.3.orig/src/logic/ai_dna_handler.h widelands-1.3/src/logic/ai_dna_handler.h +--- widelands-1.3.orig/src/logic/ai_dna_handler.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/ai_dna_handler.h 2025-12-21 13:22:21.467000000 +0100 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_AI_DNA_HANDLER_H + #define WL_LOGIC_AI_DNA_HANDLER_H + ++#include ++ + #include "logic/player.h" + + namespace Widelands { +diff -uNr widelands-1.3.orig/src/logic/game_controller.h widelands-1.3/src/logic/game_controller.h +--- widelands-1.3.orig/src/logic/game_controller.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/game_controller.h 2025-12-21 13:23:11.328000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GAME_CONTROLLER_H + #define WL_LOGIC_GAME_CONTROLLER_H + ++#include + #include + + #include "base/times.h" +diff -uNr widelands-1.3.orig/src/logic/game.h widelands-1.3/src/logic/game.h +--- widelands-1.3.orig/src/logic/game.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/game.h 2025-12-21 13:23:32.586000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GAME_H + #define WL_LOGIC_GAME_H + ++#include + #include + + #include "base/crypto.h" +diff -uNr widelands-1.3.orig/src/logic/game_settings.h widelands-1.3/src/logic/game_settings.h +--- widelands-1.3.orig/src/logic/game_settings.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/game_settings.h 2025-12-21 13:23:53.751000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_GAME_SETTINGS_H + #define WL_LOGIC_GAME_SETTINGS_H + ++#include + #include + #include + +diff -uNr widelands-1.3.orig/src/logic/mapastar.h widelands-1.3/src/logic/mapastar.h +--- widelands-1.3.orig/src/logic/mapastar.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/mapastar.h 2025-12-21 13:24:10.835000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MAPASTAR_H + #define WL_LOGIC_MAPASTAR_H + ++#include + #include + + #include "logic/map.h" +diff -uNr widelands-1.3.orig/src/logic/map.h widelands-1.3/src/logic/map.h +--- widelands-1.3.orig/src/logic/map.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/map.h 2025-12-21 13:24:25.286000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MAP_H + #define WL_LOGIC_MAP_H + ++#include + #include + #include + #include +diff -uNr widelands-1.3.orig/src/logic/maphollowregion.h widelands-1.3/src/logic/maphollowregion.h +--- widelands-1.3.orig/src/logic/maphollowregion.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/maphollowregion.h 2025-12-21 13:24:38.671000000 +0100 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_MAPHOLLOWREGION_H + #define WL_LOGIC_MAPHOLLOWREGION_H + ++#include ++ + #include "logic/map.h" + + namespace Widelands { +diff -uNr widelands-1.3.orig/src/logic/message_queue.h widelands-1.3/src/logic/message_queue.h +--- widelands-1.3.orig/src/logic/message_queue.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/message_queue.h 2025-12-21 13:24:53.770000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_MESSAGE_QUEUE_H + #define WL_LOGIC_MESSAGE_QUEUE_H + ++#include + #include + #include + +diff -uNr widelands-1.3.orig/src/logic/pathfield.h widelands-1.3/src/logic/pathfield.h +--- widelands-1.3.orig/src/logic/pathfield.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/pathfield.h 2025-12-21 13:25:10.868000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_PATHFIELD_H + #define WL_LOGIC_PATHFIELD_H + ++#include + #include + + #include "logic/cookie_priority_queue.h" +diff -uNr widelands-1.3.orig/src/logic/player.h widelands-1.3/src/logic/player.h +--- widelands-1.3.orig/src/logic/player.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/player.h 2025-12-21 13:27:20.228000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_PLAYER_H + #define WL_LOGIC_PLAYER_H + ++#include + #include + #include + #include +diff -uNr widelands-1.3.orig/src/logic/replay_game_controller.h widelands-1.3/src/logic/replay_game_controller.h +--- widelands-1.3.orig/src/logic/replay_game_controller.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/replay_game_controller.h 2025-12-21 13:28:10.806000000 +0100 +@@ -19,6 +19,7 @@ + #ifndef WL_LOGIC_REPLAY_GAME_CONTROLLER_H + #define WL_LOGIC_REPLAY_GAME_CONTROLLER_H + ++#include + #include + + #include "commands/command.h" +diff -uNr widelands-1.3.orig/src/logic/single_player_game_controller.h widelands-1.3/src/logic/single_player_game_controller.h +--- widelands-1.3.orig/src/logic/single_player_game_controller.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/single_player_game_controller.h 2025-12-21 13:28:30.527000000 +0100 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H + #define WL_LOGIC_SINGLE_PLAYER_GAME_CONTROLLER_H + ++#include ++ + #include "ai/computer_player.h" + #include "logic/game_controller.h" + +diff -uNr widelands-1.3.orig/src/logic/single_player_game_settings_provider.h widelands-1.3/src/logic/single_player_game_settings_provider.h +--- widelands-1.3.orig/src/logic/single_player_game_settings_provider.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/single_player_game_settings_provider.h 2025-12-21 13:28:46.109000000 +0100 +@@ -19,6 +19,8 @@ + #ifndef WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H + #define WL_LOGIC_SINGLE_PLAYER_GAME_SETTINGS_PROVIDER_H + ++#include ++ + #include "logic/game_settings.h" + + /** diff --git a/widelands-1.3-gcc15.patch b/widelands-1.3-gcc15.patch new file mode 100644 index 0000000..7f2478f --- /dev/null +++ b/widelands-1.3-gcc15.patch @@ -0,0 +1,29 @@ +diff -uNr widelands-1.3.orig/src/logic/map_objects/tribes/requirements.h widelands-1.3/src/logic/map_objects/tribes/requirements.h +--- widelands-1.3.orig/src/logic/map_objects/tribes/requirements.h 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/logic/map_objects/tribes/requirements.h 2025-12-21 13:36:41.437000000 +0100 +@@ -20,6 +20,7 @@ + #define WL_LOGIC_MAP_OBJECTS_TRIBES_REQUIREMENTS_H + + #include ++#include + #include + #include + #include +diff -uNr widelands-1.3.orig/src/third_party/eris/eris.c widelands-1.3/src/third_party/eris/eris.c +--- widelands-1.3.orig/src/third_party/eris/eris.c 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/third_party/eris/eris.c 2025-12-21 13:37:22.685000000 +0100 +@@ -27,13 +27,7 @@ + #include + #include + #include +- +-/* Not using stdbool because Visual Studio lives in the past... */ +-#ifndef __cplusplus +-typedef int bool; +-#define false 0 +-#define true 1 +-#endif ++#include + + /* Mark us as part of the Lua core to get access to what we need. */ + #define LUA_CORE diff --git a/widelands-1.0-make-sdl2-use-x11.patch b/widelands-1.3-make-sdl2-use-x11.patch similarity index 54% rename from widelands-1.0-make-sdl2-use-x11.patch rename to widelands-1.3-make-sdl2-use-x11.patch index 0c4deb2..80c3d65 100644 --- a/widelands-1.0-make-sdl2-use-x11.patch +++ b/widelands-1.3-make-sdl2-use-x11.patch @@ -1,7 +1,7 @@ -diff -up widelands-1.1/src/graphic/text/test/render_richtext.cc.orig widelands-1.1/src/graphic/text/test/render_richtext.cc ---- widelands-1.1/src/graphic/text/test/render_richtext.cc.orig 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/graphic/text/test/render_richtext.cc 2023-03-27 21:11:06.712405327 +0200 -@@ -114,6 +114,9 @@ int main(int argc, char** argv) { +diff -uNr widelands-1.3.orig/src/graphic/text/test/render_richtext.cc widelands-1.3/src/graphic/text/test/render_richtext.cc +--- widelands-1.3.orig/src/graphic/text/test/render_richtext.cc 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/graphic/text/test/render_richtext.cc 2025-12-21 13:16:33.279000000 +0100 +@@ -114,6 +114,9 @@ if (parse_arguments(argc, argv, &w, outname, inname, allowed_tags)) return 0; @@ -11,9 +11,9 @@ diff -up widelands-1.1/src/graphic/text/test/render_richtext.cc.orig widelands-1 if (SDL_Init(SDL_INIT_VIDEO) < 0) { std::cerr << "SDLInit did not succeed: " << SDL_GetError() << std::endl; return 1; -diff -up widelands-1.1/src/website/website_common.cc.orig widelands-1.1/src/website/website_common.cc ---- widelands-1.1/src/website/website_common.cc.orig 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/website/website_common.cc 2023-03-27 21:11:06.712405327 +0200 +diff -uNr widelands-1.3.orig/src/website/website_common.cc widelands-1.3/src/website/website_common.cc +--- widelands-1.3.orig/src/website/website_common.cc 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/website/website_common.cc 2025-12-21 13:17:16.715000000 +0100 @@ -18,6 +18,7 @@ #include "website/website_common.h" @@ -22,9 +22,9 @@ diff -up widelands-1.1/src/website/website_common.cc.orig widelands-1.1/src/webs #include #include "base/i18n.h" -@@ -33,6 +34,9 @@ void initialize() { +@@ -33,6 +34,9 @@ set_initializer_thread(); - i18n::set_locale("en"); + g_verbose = true; + // GLEW only supports glx atm, force use of X11 even under Wayland + // https://github.com/nigels-com/glew/issues/172 @@ -32,10 +32,10 @@ diff -up widelands-1.1/src/website/website_common.cc.orig widelands-1.1/src/webs if (SDL_Init(SDL_INIT_VIDEO) != 0) { // We sometimes run into a missing video driver in our CI environment, so we exit 0 to prevent // too frequent failures -diff -up widelands-1.1/src/wlapplication.cc.orig widelands-1.1/src/wlapplication.cc ---- widelands-1.1/src/wlapplication.cc.orig 2022-10-22 13:51:16.000000000 +0200 -+++ widelands-1.1/src/wlapplication.cc 2023-03-27 21:11:06.713405319 +0200 -@@ -404,6 +404,9 @@ WLApplication::WLApplication(int const a +diff -uNr widelands-1.3.orig/src/wlapplication.cc widelands-1.3/src/wlapplication.cc +--- widelands-1.3.orig/src/wlapplication.cc 2025-12-18 19:19:33.000000000 +0100 ++++ widelands-1.3/src/wlapplication.cc 2025-12-21 13:17:48.848000000 +0100 +@@ -401,6 +401,9 @@ #endif // Start the SDL core diff --git a/widelands.spec b/widelands.spec index 8e6d036..8dad192 100644 --- a/widelands.spec +++ b/widelands.spec @@ -2,8 +2,8 @@ %global fonts font(amiri) font(dejavusans) font(dejavusansmono) font(dejavuserif) font(widelands) font(gargi) font(wenquanyimicrohei) font(frankruehlclm) Name: widelands -Version: 1.2.1 -Release: 3%{?dist} +Version: 1.3 +Release: 1%{?dist} Summary: Open source realtime-strategy game # Automatically converted from old format: GPLv2+ - review is highly recommended. @@ -11,7 +11,7 @@ License: GPL-2.0-or-later URL: http://www.widelands.org Source0: https://github.com/widelands/widelands/archive/v%{version}/%{name}-%{version}.tar.gz # gnu++11 fix in CMakeLists.txt for PPC64 little-endian -Patch0: widelands-1.2-build19-ppc64le.patch +Patch0: widelands-1.3-build19-ppc64le.patch # Fix failures on s390x due to uninitialized variables Patch1: widelands-1.2-build20-gcc10.patch # widelands uses glew which atm is hardcoded to glx, see e.g.: @@ -19,11 +19,11 @@ Patch1: widelands-1.2-build20-gcc10.patch # This can be fixed cleaner by switching to glewContextInit once we are # at glew 2.3, or maybe backport: # https://github.com/nigels-com/glew/commit/715afa0ff56c0eb12c23938b80aa2813daa10d81 -Patch2: widelands-1.0-make-sdl2-use-x11.patch -Patch3: widelands-1.2.1-gcc13.patch -Patch4: widelands-1.1-f37-sys-minizip-buildfix.patch +Patch2: widelands-1.3-make-sdl2-use-x11.patch +Patch3: widelands-1.3-gcc13.patch +Patch4: widelands-1.3-f37-sys-minizip-buildfix.patch Patch5: widelands-1.2.1-disable-some-tests.patch -Patch6: widelands-1.2.1-gcc15.patch +Patch6: widelands-1.3-gcc15.patch BuildRequires: asio-devel BuildRequires: SDL2-devel @@ -35,7 +35,6 @@ BuildRequires: cmake BuildRequires: ctags BuildRequires: desktop-file-utils BuildRequires: libappstream-glib -BuildRequires: gettext BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: glew-devel @@ -70,7 +69,7 @@ perhaps will have a thought, what Widelands is all about. %build %cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DWL_INSTALL_BASEDIR=%{_prefix}/share/%{name} \ -DWL_INSTALL_DATADIR=%{_prefix}/share/%{name} \ -DOPTION_BUILD_WEBSITE_TOOLS=OFF \ @@ -89,7 +88,7 @@ mv $RPM_BUILD_ROOT%{_prefix}/games/%{name} \ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop # Validate appdata (provided by upstream) -appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_metainfodir}/*.appdata.xml +appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_metainfodir}/*.metainfo.xml pushd $RPM_BUILD_ROOT # Replace fonts with system fonts. We used to have symlinks directly from @@ -190,9 +189,9 @@ ln -s $(fc-match -f "%{file}" "widelands") \ # Scripting magic to add proper %%lang() markings to the locale files -find usr/share/widelands/locale/ -maxdepth 1 -type d -name \*_\* | sed -n 's#\(usr/share/widelands/locale/\(.*\)_.*\)#%lang(\2) /\1#p' > %{_builddir}/%{?buildsubdir}/%{name}.files -find usr/share/widelands/locale/ -maxdepth 1 -type d ! -name "*_*" | sed -n -e 's#\(usr/share/widelands/locale/\(.\+\)\)#%lang(\2) /\1#p' >> %{_builddir}/%{?buildsubdir}/%{name}.files -find usr/share/widelands/ -mindepth 1 -maxdepth 1 -not -name locale | sed -n 's#\(usr/share/widelands/*\)#/\1#p' >> %{_builddir}/%{?buildsubdir}/%{name}.files +find usr/share/widelands/i18n/translations/ -maxdepth 2 -type f -name \*_\*.po | sed -n 's#\(usr/share/widelands/i18n/translations/.*/\([^/]*\)_[^/]*\.po\)#%lang(\2) /\1#p' > %{_builddir}/%{?buildsubdir}/%{name}.files +find usr/share/widelands/i18n/translations/ -maxdepth 2 -type f -name \*.po -and ! -name "*_*.po" | sed -n -e 's#\(usr/share/widelands/i18n/translations/.*/\([^/]\+\)\.po\)#%lang(\2) /\1#p' >> %{_builddir}/%{?buildsubdir}/%{name}.files +find usr/share/widelands/ -mindepth 1 -maxdepth 1 -not -name i18n | sed -n 's#\(usr/share/widelands/*\)#/\1#p' >> %{_builddir}/%{?buildsubdir}/%{name}.files popd @@ -202,13 +201,21 @@ popd %{_mandir}/man6/widelands.6.gz %{_bindir}/%{name} %{_datadir}/icons/hicolor/*/apps/*.png -%{_metainfodir}/*.appdata.xml +%{_metainfodir}/*.metainfo.xml %{_datadir}/applications/*.desktop %dir %{_datadir}/%{name} -%dir %{_datadir}/%{name}/locale +%{_datadir}/%{name}/i18n/fonts.lua +%{_datadir}/%{name}/i18n/fonts +%{_datadir}/%{name}/i18n/locales.lua +%{_datadir}/%{name}/i18n/locales/*.json +%{_datadir}/%{name}/i18n/translation_stats.conf +%{_datadir}/%{name}/i18n/translations/*/*.pot %changelog +* Sun Dec 21 2025 Peter Hanecak - 1.3-1 +- New upstream release 1.3 (rhbz#2422054) + * Wed Aug 06 2025 František Zatloukal - 1.2.1-3 - Rebuilt for icu 77.1 From 47995133e6f52a67b1b2cc0f477d2332ff8d8c5b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 20:14:17 +0000 Subject: [PATCH 26/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index 8dad192..0847c3d 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open source realtime-strategy game # Automatically converted from old format: GPLv2+ - review is highly recommended. @@ -213,6 +213,9 @@ popd %changelog +* Sat Jan 17 2026 Fedora Release Engineering - 1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Sun Dec 21 2025 Peter Hanecak - 1.3-1 - New upstream release 1.3 (rhbz#2422054) From da0ace3cc185ecf7ae0a0c9b63eb05f767631a23 Mon Sep 17 00:00:00 2001 From: Peter Hanecak Date: Sun, 22 Feb 2026 13:18:25 +0100 Subject: [PATCH 27/29] New upstream release 1.3.1 (rhbz#2440036) --- .gitignore | 1 + sources | 2 +- widelands.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f78d0dd..a244285 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ Widelands-Build14-src.7z /widelands-1.2.tar.gz /widelands-1.2.1.tar.gz /widelands-1.3.tar.gz +/widelands-1.3.1.tar.gz diff --git a/sources b/sources index d7384c0..aa0d658 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (widelands-1.3.tar.gz) = 52bde9ecf69bf3f9a231e5d2934075a5965e8317e83a2abf47ba4e55eaca898258de61a8783324fed1ed330262897ec8daaa6db641ed4845ccc6bf59c227d859 +SHA512 (widelands-1.3.1.tar.gz) = 47d72aabac1dc873dd6f6fa86ba0bf2b0dd13c298f10df89b47654397ab5b3a55c06d4e8cf6a0da807e3402a7bff0839b7b0b18a6f8611ee83d252b8e0d61f15 diff --git a/widelands.spec b/widelands.spec index 0847c3d..51da05c 100644 --- a/widelands.spec +++ b/widelands.spec @@ -2,8 +2,8 @@ %global fonts font(amiri) font(dejavusans) font(dejavusansmono) font(dejavuserif) font(widelands) font(gargi) font(wenquanyimicrohei) font(frankruehlclm) Name: widelands -Version: 1.3 -Release: 2%{?dist} +Version: 1.3.1 +Release: 1%{?dist} Summary: Open source realtime-strategy game # Automatically converted from old format: GPLv2+ - review is highly recommended. @@ -213,6 +213,9 @@ popd %changelog +* Sun Feb 22 2026 Peter Hanecak - 1.3.1-1 +- New upstream release 1.3.1 (rhbz#2440036) + * Sat Jan 17 2026 Fedora Release Engineering - 1.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 32ca0a08679b1103dd664bc904a1f735d8170428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Mon, 8 Jun 2026 15:15:56 +0200 Subject: [PATCH 28/29] Rebuilt for icu 78.3 --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index 51da05c..9ee11ec 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.3.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open source realtime-strategy game # Automatically converted from old format: GPLv2+ - review is highly recommended. @@ -213,6 +213,9 @@ popd %changelog +* Mon Jun 08 2026 František Zatloukal - 1.3.1-2 +- Rebuilt for icu 78.3 + * Sun Feb 22 2026 Peter Hanecak - 1.3.1-1 - New upstream release 1.3.1 (rhbz#2440036) From 7be6d4532ffa10467d703998cba16697314991eb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 08:48:38 +0000 Subject: [PATCH 29/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- widelands.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/widelands.spec b/widelands.spec index 9ee11ec..538e782 100644 --- a/widelands.spec +++ b/widelands.spec @@ -3,7 +3,7 @@ Name: widelands Version: 1.3.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Open source realtime-strategy game # Automatically converted from old format: GPLv2+ - review is highly recommended. @@ -213,6 +213,9 @@ popd %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 1.3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Mon Jun 08 2026 František Zatloukal - 1.3.1-2 - Rebuilt for icu 78.3