summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-07-19 07:01:10 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-07-19 07:49:12 -0400
commitf594b85a3282c5f399b1ca52cef3c27374d5392c (patch)
tree5bd0619fd711a806cbad3a7f8a62f9957d0194b2 /games-strategy/widelands
parentkde-apps/libkgapi: Disable failing tests (diff)
downloadgentoo-f594b85a3282c5f399b1ca52cef3c27374d5392c.tar.gz
gentoo-f594b85a3282c5f399b1ca52cef3c27374d5392c.tar.bz2
gentoo-f594b85a3282c5f399b1ca52cef3c27374d5392c.zip
games-strategy/widelands: fix build with gcc-12
Due to new gcc-12 warnings that die to -Werror=uninitialized, both adjust the variable and drop these -Werror= (upstream also disable -Werror with gcc-12 but for other reasons, see patch). Closes: https://bugs.gentoo.org/859277 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-strategy/widelands')
-rw-r--r--games-strategy/widelands/files/widelands-1.0-gcc12-werror.patch29
-rw-r--r--games-strategy/widelands/widelands-1.0.ebuild1
2 files changed, 30 insertions, 0 deletions
diff --git a/games-strategy/widelands/files/widelands-1.0-gcc12-werror.patch b/games-strategy/widelands/files/widelands-1.0-gcc12-werror.patch
new file mode 100644
index 000000000000..a00603a7969c
--- /dev/null
+++ b/games-strategy/widelands/files/widelands-1.0-gcc12-werror.patch
@@ -0,0 +1,29 @@
+Drop -Werror= (uninitialized cause issues from gcc-12) and also backport
+fix for the offending variable.
+
+Note: upstream changed how -Werror is handled next release, currently pass
+a hard non-specific -Werror and disables it for gcc-12 (review on bump, see
+commit/PR below).
+
+https://bugs.gentoo.org/859277
+https://github.com/widelands/widelands/pull/5415
+https://github.com/widelands/widelands/commit/e4da6d624
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -312,8 +312,2 @@
+ if(NOT MSVC)
+- # Turn some warnings into errors.
+- 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")
+-
+ wl_add_flag(WL_GENERIC_CXX_FLAGS "-std=c++11")
+--- a/src/editor/editorinteractive.h
++++ b/src/editor/editorinteractive.h
+@@ -87,4 +87,4 @@
+ EditorIncreaseResourcesTool increase_resources;
+- EditorSetPortSpaceTool set_port_space;
+ EditorUnsetPortSpaceTool unset_port_space;
++ EditorSetPortSpaceTool set_port_space;
+ EditorSetOriginTool set_origin;
diff --git a/games-strategy/widelands/widelands-1.0.ebuild b/games-strategy/widelands/widelands-1.0.ebuild
index 6d14e5f8e931..62799a6e424f 100644
--- a/games-strategy/widelands/widelands-1.0.ebuild
+++ b/games-strategy/widelands/widelands-1.0.ebuild
@@ -44,6 +44,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${P}-boost-1.77.patch
+ "${FILESDIR}"/${P}-gcc12-werror.patch
)
src_configure() {