summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-03-10 07:39:28 +0000
committerSam James <sam@gentoo.org>2023-03-10 07:45:40 +0000
commitef781b2e02df4142141a43ee8da72738c42c67c3 (patch)
tree1adbbc0f81fbc5d4ca75e66acb2155df84072c12 /games-action
parentsys-process/htop: Stabilize 3.2.2 arm64, #900641 (diff)
downloadgentoo-ef781b2e02df4142141a43ee8da72738c42c67c3.tar.gz
gentoo-ef781b2e02df4142141a43ee8da72738c42c67c3.tar.bz2
gentoo-ef781b2e02df4142141a43ee8da72738c42c67c3.zip
games-action/dxx-rebirth: fix build w/ gcc 12
Closes: https://bugs.gentoo.org/894678 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-action')
-rw-r--r--games-action/dxx-rebirth/dxx-rebirth-0.61.0_pre20210623.ebuild4
-rw-r--r--games-action/dxx-rebirth/files/dxx-rebirth-0.61.0_pre20210623-gcc-12.patch25
2 files changed, 29 insertions, 0 deletions
diff --git a/games-action/dxx-rebirth/dxx-rebirth-0.61.0_pre20210623.ebuild b/games-action/dxx-rebirth/dxx-rebirth-0.61.0_pre20210623.ebuild
index 853ff1d1f770..f703b0ade70e 100644
--- a/games-action/dxx-rebirth/dxx-rebirth-0.61.0_pre20210623.ebuild
+++ b/games-action/dxx-rebirth/dxx-rebirth-0.61.0_pre20210623.ebuild
@@ -162,6 +162,10 @@ BDEPEND="virtual/pkgconfig"
# and therefore requires a rebuild when changed.
#IUSE_RUNTIME="flac l10n_de midi mp3 opl3-musicpack sc55-musicpack vorbis"
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc-12.patch
+)
+
dxx_scons() {
# Always build profile `m`. If use editor, also build profile `e`.
# Set most variables in the default anonymous profile. Only
diff --git a/games-action/dxx-rebirth/files/dxx-rebirth-0.61.0_pre20210623-gcc-12.patch b/games-action/dxx-rebirth/files/dxx-rebirth-0.61.0_pre20210623-gcc-12.patch
new file mode 100644
index 000000000000..3681385976a6
--- /dev/null
+++ b/games-action/dxx-rebirth/files/dxx-rebirth-0.61.0_pre20210623-gcc-12.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/894678
+https://github.com/dxx-rebirth/dxx-rebirth/commit/092daecb6118b3c072c71a8bea24f119e300bd49
+
+From 092daecb6118b3c072c71a8bea24f119e300bd49 Mon Sep 17 00:00:00 2001
+From: Kp <kp@valhallalegends.com>
+Date: Sat, 28 May 2022 21:04:37 +0000
+Subject: [PATCH] Use static_cast<> to convert player_marker_num to
+ game_marker_index
+
+gcc-12 rejects the list initialization syntax. Switch to static_cast<>,
+which generates equivalent code.
+
+Reported-by: dbermond <https://github.com/dxx-rebirth/dxx-rebirth/issues/638>
+--- a/similar/main/automap.cpp
++++ b/similar/main/automap.cpp
+@@ -370,7 +370,7 @@ game_marker_index convert_player_marker_index_to_game_marker_index(const game_mo
+ return static_cast<game_marker_index>((player_num * MAX_DROP_MULTI_COOP) + static_cast<unsigned>(player_marker_num));
+ if (game_mode & GM_MULTI)
+ return static_cast<game_marker_index>((player_num * MAX_DROP_MULTI_COMPETITIVE) + static_cast<unsigned>(player_marker_num));
+- return game_marker_index{player_marker_num};
++ return static_cast<game_marker_index>(player_marker_num);
+ }
+
+ unsigned d_marker_state::get_markers_per_player(const game_mode_flags game_mode, const unsigned max_numplayers)
+