summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-03-22 11:44:24 -0400
committerIonen Wolkens <ionen@gentoo.org>2023-03-22 12:16:05 -0400
commit70624559be845a557e769ab88d3003a375b1e41e (patch)
treeb7f4d86d49c70c0ceaa8539a6ab435ed148762ed /games-action
parentdev-cpp/libxmlpp: Version bump to 5.0.3 (diff)
downloadgentoo-70624559be845a557e769ab88d3003a375b1e41e.tar.gz
gentoo-70624559be845a557e769ab88d3003a375b1e41e.tar.bz2
gentoo-70624559be845a557e769ab88d3003a375b1e41e.zip
games-action/dxx-rebirth: fix USE=editor with gcc12
Likely scarcely enabled given not reported yet, but bug #902463 enabled USE=editor and would've been the next issue ran into. Ideally this will probably need a new snapshot soon as this doesn't seem to be the only issue. Not that I plan to look into this package outside minor fixes (haven't even attempted to run, don't really know it). Bug: https://bugs.gentoo.org/902463 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-action')
-rw-r--r--games-action/dxx-rebirth/dxx-rebirth-0.61.0_pre20210623.ebuild1
-rw-r--r--games-action/dxx-rebirth/files/dxx-rebirth-0.61.0_pre20210623-gcc-12-editor.patch23
2 files changed, 24 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 f703b0ade70e..1dea43f4d04b 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
@@ -164,6 +164,7 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${P}-gcc-12.patch
+ "${FILESDIR}"/${P}-gcc-12-editor.patch
)
dxx_scons() {
diff --git a/games-action/dxx-rebirth/files/dxx-rebirth-0.61.0_pre20210623-gcc-12-editor.patch b/games-action/dxx-rebirth/files/dxx-rebirth-0.61.0_pre20210623-gcc-12-editor.patch
new file mode 100644
index 000000000000..fbb03cf8f334
--- /dev/null
+++ b/games-action/dxx-rebirth/files/dxx-rebirth-0.61.0_pre20210623-gcc-12-editor.patch
@@ -0,0 +1,23 @@
+With USE=editor and gcc12:
+
+ similar/main/piggy.cpp: In function 'void d2x::piggy_new_pigfile(char*)':
+ similar/main/piggy.cpp:870:62: error: '%u' directive output may be truncated writing between 1 and 10 bytes into a region of size between 7 and 19 [-Werror=format-truncation=]
+
+But the offending code is unused, so can just drop it.
+
+Backport from:
+https://github.com/dxx-rebirth/dxx-rebirth/commit/12cca97870efe419613462dc279963a77bc80d9a
+--- a/similar/main/piggy.cpp
++++ b/similar/main/piggy.cpp
+@@ -889,11 +889,8 @@ void piggy_new_pigfile(char *pigname)
+ }
+
+ for (fnum=0;fnum<nframes; fnum++) {
+- char tempname[20];
+ int SuperX;
+
+- snprintf(tempname, sizeof(tempname), "%s#%u", basename, fnum);
+-
+ //SuperX = (GameBitmaps[i+fnum].bm_flags&BM_FLAG_SUPER_TRANSPARENT)?254:-1;
+ SuperX = (GameBitmapFlags[i+fnum]&BM_FLAG_SUPER_TRANSPARENT)?254:-1;
+ //above makes assumption that supertransparent color is 254