* [gentoo-commits] repo/gentoo:master commit in: games-emulation/rmg/, games-emulation/rmg/files/
@ 2024-11-26 5:57 Eli Schwartz
0 siblings, 0 replies; 3+ messages in thread
From: Eli Schwartz @ 2024-11-26 5:57 UTC (permalink / raw
To: gentoo-commits
commit: 7bc023597be06c8b4eaa6a9f5ee8bf9347f0a4a7
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Oct 20 16:38:36 2024 +0000
Commit: Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Tue Nov 26 05:03:32 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bc02359
games-emulation/rmg: fix -Wstrict-aliasing warnings
Upstream-Issue: https://github.com/gonetz/GLideN64/issues/2877
Upstream-PR: https://github.com/gonetz/GLideN64/pull/2884
Upstream-Commit: https://github.com/gonetz/GLideN64/commit/a1320da566c03503ea755447458bb2b79a610cb5
Upstream-Commit: https://github.com/Rosalie241/RMG/commit/e68483fce2a977c07fee38e1d8d8f8dc22bb6072
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/39058
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>
...upen64plus-video-GLideN64-strict-aliasing.patch | 207 +++++++++++++++++++++
.../rmg/{rmg-9999.ebuild => rmg-0.6.6-r2.ebuild} | 15 +-
games-emulation/rmg/rmg-9999.ebuild | 9 +-
3 files changed, 215 insertions(+), 16 deletions(-)
diff --git a/games-emulation/rmg/files/rmg-0.6.6-mupen64plus-video-GLideN64-strict-aliasing.patch b/games-emulation/rmg/files/rmg-0.6.6-mupen64plus-video-GLideN64-strict-aliasing.patch
new file mode 100644
index 000000000000..4b8686a69021
--- /dev/null
+++ b/games-emulation/rmg/files/rmg-0.6.6-mupen64plus-video-GLideN64-strict-aliasing.patch
@@ -0,0 +1,207 @@
+https://github.com/gonetz/GLideN64/issues/2877
+https://github.com/gonetz/GLideN64/pull/2884
+https://github.com/gonetz/GLideN64/commit/a1320da566c03503ea755447458bb2b79a610cb5
+https://github.com/Rosalie241/RMG/commit/e68483fce2a977c07fee38e1d8d8f8dc22bb6072
+
+From a1320da566c03503ea755447458bb2b79a610cb5 Mon Sep 17 00:00:00 2001
+From: Sergey Lipskiy <gonetz@ngs.ru>
+Date: Sat, 19 Oct 2024 16:18:29 +0700
+Subject: [PATCH] Fix -Wstrict-aliasing warnings
+
+---
+ Source/3rdParty/mupen64plus-video-GLideN64/src/Textures.cpp | 56 ++++++++++++++++++++++++------------------------
+ 1 file changed, 28 insertions(+), 28 deletions(-)
+
+diff --git a/Source/3rdParty/mupen64plus-video-GLideN64/src/Textures.cpp b/Source/3rdParty/mupen64plus-video-GLideN64/src/Textures.cpp
+index 4739ec31c..22edf608d 100644
+--- a/Source/3rdParty/mupen64plus-video-GLideN64/src/Textures.cpp
++++ b/Source/3rdParty/mupen64plus-video-GLideN64/src/Textures.cpp
+@@ -52,9 +52,9 @@ u32 GetCI4IA_RGBA4444(u16 offset, u16 x, u16 i, u8 palette)
+ const u8 color4B = Get4BitPaletteColor(offset, x, i);
+
+ if (x & 1)
+- return IA88_RGBA4444(*(u16*)&TMEM[(0x100 + (palette << 4) + (color4B & 0x0F)) & 0x1FF]);
++ return IA88_RGBA4444(static_cast<u16>(TMEM[(0x100 + (palette << 4) + (color4B & 0x0F)) & 0x1FF] & 0xFFFF));
+ else
+- return IA88_RGBA4444(*(u16*)&TMEM[(0x100 + (palette << 4) + (color4B >> 4)) & 0x1FF]);
++ return IA88_RGBA4444(static_cast<u16>(TMEM[(0x100 + (palette << 4) + (color4B >> 4)) & 0x1FF] & 0xFFFF));
+ }
+
+ u32 GetCI4IA_RGBA8888(u16 offset, u16 x, u16 i, u8 palette)
+@@ -62,9 +62,9 @@ u32 GetCI4IA_RGBA8888(u16 offset, u16 x, u16 i, u8 palette)
+ const u8 color4B = Get4BitPaletteColor(offset, x, i);
+
+ if (x & 1)
+- return IA88_RGBA8888(*(u16*)&TMEM[(0x100 + (palette << 4) + (color4B & 0x0F)) & 0x1FF]);
++ return IA88_RGBA8888(static_cast<u16>(TMEM[(0x100 + (palette << 4) + (color4B & 0x0F)) & 0x1FF] & 0xFFFF));
+ else
+- return IA88_RGBA8888(*(u16*)&TMEM[(0x100 + (palette << 4) + (color4B >> 4)) & 0x1FF]);
++ return IA88_RGBA8888(static_cast<u16>(TMEM[(0x100 + (palette << 4) + (color4B >> 4)) & 0x1FF] & 0xFFFF));
+ }
+
+ u32 GetCI4RGBA_RGBA5551(u16 offset, u16 x, u16 i, u8 palette)
+@@ -72,9 +72,9 @@ u32 GetCI4RGBA_RGBA5551(u16 offset, u16 x, u16 i, u8 palette)
+ const u8 color4B = Get4BitPaletteColor(offset, x, i);
+
+ if (x & 1)
+- return RGBA5551_RGBA5551(*(u16*)&TMEM[(0x100 + (palette << 4) + (color4B & 0x0F)) & 0x1FF]);
++ return RGBA5551_RGBA5551(static_cast<u16>(TMEM[(0x100 + (palette << 4) + (color4B & 0x0F)) & 0x1FF] & 0xFFFF));
+ else
+- return RGBA5551_RGBA5551(*(u16*)&TMEM[(0x100 + (palette << 4) + (color4B >> 4)) & 0x1FF]);
++ return RGBA5551_RGBA5551(static_cast<u16>(TMEM[(0x100 + (palette << 4) + (color4B >> 4)) & 0x1FF] & 0xFFFF));
+ }
+
+ u32 GetCI4RGBA_RGBA8888(u16 offset, u16 x, u16 i, u8 palette)
+@@ -82,9 +82,9 @@ u32 GetCI4RGBA_RGBA8888(u16 offset, u16 x, u16 i, u8 palette)
+ const u8 color4B = Get4BitPaletteColor(offset, x, i);
+
+ if (x & 1)
+- return RGBA5551_RGBA8888(*(u16*)&TMEM[(0x100 + (palette << 4) + (color4B & 0x0F)) & 0x1FF]);
++ return RGBA5551_RGBA8888(static_cast<u16>(TMEM[(0x100 + (palette << 4) + (color4B & 0x0F)) & 0x1FF] & 0xFFFF));
+ else
+- return RGBA5551_RGBA8888(*(u16*)&TMEM[(0x100 + (palette << 4) + (color4B >> 4)) & 0x1FF]);
++ return RGBA5551_RGBA8888(static_cast<u16>(TMEM[(0x100 + (palette << 4) + (color4B >> 4)) & 0x1FF] & 0xFFFF));
+ }
+
+ u32 GetIA31_RGBA8888(u16 offset, u16 x, u16 i, u8 palette)
+@@ -120,25 +120,25 @@ inline u8 Get8BitPaletteColor(u16 offset, u16 x, u16 i)
+ u32 GetCI8IA_RGBA4444(u16 offset, u16 x, u16 i, u8 palette)
+ {
+ const u8 color = Get8BitPaletteColor(offset, x, i);
+- return IA88_RGBA4444(*(u16*)&TMEM[(0x100 + color) & 0x1FF]);
++ return IA88_RGBA4444(static_cast<u16>(TMEM[(0x100 + color) & 0x1FF] & 0xFFFF));
+ }
+
+ u32 GetCI8IA_RGBA8888(u16 offset, u16 x, u16 i, u8 palette)
+ {
+ const u8 color = Get8BitPaletteColor(offset, x, i);
+- return IA88_RGBA8888(*(u16*)&TMEM[(0x100 + color) & 0x1FF]);
++ return IA88_RGBA8888(static_cast<u16>(TMEM[(0x100 + color) & 0x1FF] & 0xFFFF));
+ }
+
+ u32 GetCI8RGBA_RGBA5551(u16 offset, u16 x, u16 i, u8 palette)
+ {
+ const u8 color = Get8BitPaletteColor(offset, x, i);
+- return RGBA5551_RGBA5551(*(u16*)&TMEM[(0x100 + color) & 0x1FF]);
++ return RGBA5551_RGBA5551(static_cast<u16>(TMEM[(0x100 + color) & 0x1FF] & 0xFFFF));
+ }
+
+ u32 GetCI8RGBA_RGBA8888(u16 offset, u16 x, u16 i, u8 palette)
+ {
+ const u8 color = Get8BitPaletteColor(offset, x, i);
+- return RGBA5551_RGBA8888(*(u16*)&TMEM[(0x100 + color) & 0x1FF]);
++ return RGBA5551_RGBA8888(static_cast<u16>(TMEM[(0x100 + color) & 0x1FF] & 0xFFFF));
+ }
+
+ u32 GetIA44_RGBA8888(u16 offset, u16 x, u16 i, u8 palette)
+@@ -193,7 +193,7 @@ u32 GetI16_RGBA4444(u16 offset, u16 x, u16 i, u8 palette)
+ u32 GetCI16IA_RGBA8888(u16 offset, u16 x, u16 i, u8 palette)
+ {
+ const u16 tex = Get16BitColor(offset, x, i);
+- const u16 col = (*(u16*)&TMEM[0x100 + (tex & 0xFF)]);
++ const u16 col = (static_cast<u16>(TMEM[0x100 + (tex & 0xFF)] & 0xFFFF));
+ const u16 c = col >> 8;
+ const u16 a = col & 0xFF;
+ return (a << 24) | (c << 16) | (c << 8) | c;
+@@ -202,7 +202,7 @@ u32 GetCI16IA_RGBA8888(u16 offset, u16 x, u16 i, u8 palette)
+ u32 GetCI16IA_RGBA4444(u16 offset, u16 x, u16 i, u8 palette)
+ {
+ const u16 tex = Get16BitColor(offset, x, i);
+- const u16 col = (*(u16*)&TMEM[0x100 + (tex & 0xFF)]);
++ const u16 col = (static_cast<u16>(TMEM[0x100 + (tex & 0xFF)] & 0xFFFF));
+ const u16 c = col >> 12;
+ const u16 a = col & 0x0F;
+ return (a << 12) | (c << 8) | (c << 4) | c;
+@@ -303,9 +303,9 @@ u32 GetCI4IA_RGBA4444_BG(u64 *src, u16 x, u16 i, u8 palette)
+ u8 color4B = ((u8*)src)[(x >> 1) ^ (i << 1)];
+
+ if (x & 1)
+- return IA88_RGBA4444(*(u16*)&TMEM[256 + (palette << 4) + (color4B & 0x0F)]);
++ return IA88_RGBA4444(static_cast<u16>(TMEM[256 + (palette << 4) + (color4B & 0x0F)] & 0xFFFF));
+ else
+- return IA88_RGBA4444(*(u16*)&TMEM[256 + (palette << 4) + (color4B >> 4)]);
++ return IA88_RGBA4444(static_cast<u16>(TMEM[256 + (palette << 4) + (color4B >> 4)] & 0xFFFF));
+ }
+
+ u32 GetCI4IA_RGBA8888_BG(u64 *src, u16 x, u16 i, u8 palette)
+@@ -313,9 +313,9 @@ u32 GetCI4IA_RGBA8888_BG(u64 *src, u16 x, u16 i, u8 palette)
+ u8 color4B = ((u8*)src)[(x >> 1) ^ (i << 1)];
+
+ if (x & 1)
+- return IA88_RGBA8888(*(u16*)&TMEM[256 + (palette << 4) + (color4B & 0x0F)]);
++ return IA88_RGBA8888(static_cast<u16>(TMEM[256 + (palette << 4) + (color4B & 0x0F)] & 0xFFFF));
+ else
+- return IA88_RGBA8888(*(u16*)&TMEM[256 + (palette << 4) + (color4B >> 4)]);
++ return IA88_RGBA8888(static_cast<u16>(TMEM[256 + (palette << 4) + (color4B >> 4)] & 0xFFFF));
+ }
+
+ u32 GetCI4RGBA_RGBA5551_BG(u64 *src, u16 x, u16 i, u8 palette)
+@@ -323,9 +323,9 @@ u32 GetCI4RGBA_RGBA5551_BG(u64 *src, u16 x, u16 i, u8 palette)
+ u8 color4B = ((u8*)src)[(x >> 1) ^ (i << 1)];
+
+ if (x & 1)
+- return RGBA5551_RGBA5551(*(u16*)&TMEM[256 + (palette << 4) + (color4B & 0x0F)]);
++ return RGBA5551_RGBA5551(static_cast<u16>(TMEM[256 + (palette << 4) + (color4B & 0x0F)] & 0xFFFF));
+ else
+- return RGBA5551_RGBA5551(*(u16*)&TMEM[256 + (palette << 4) + (color4B >> 4)]);
++ return RGBA5551_RGBA5551(static_cast<u16>(TMEM[256 + (palette << 4) + (color4B >> 4)] & 0xFFFF));
+ }
+
+ u32 GetCI4RGBA_RGBA8888_BG(u64 *src, u16 x, u16 i, u8 palette)
+@@ -333,9 +333,9 @@ u32 GetCI4RGBA_RGBA8888_BG(u64 *src, u16 x, u16 i, u8 palette)
+ u8 color4B = ((u8*)src)[(x >> 1) ^ (i << 1)];
+
+ if (x & 1)
+- return RGBA5551_RGBA8888(*(u16*)&TMEM[256 + (palette << 4) + (color4B & 0x0F)]);
++ return RGBA5551_RGBA8888(static_cast<u16>(TMEM[256 + (palette << 4) + (color4B & 0x0F)] & 0xFFFF));
+ else
+- return RGBA5551_RGBA8888(*(u16*)&TMEM[256 + (palette << 4) + (color4B >> 4)]);
++ return RGBA5551_RGBA8888(static_cast<u16>(TMEM[256 + (palette << 4) + (color4B >> 4)] & 0xFFFF));
+ }
+
+ u32 GetIA31_RGBA8888_BG(u64 *src, u16 x, u16 i, u8 palette)
+@@ -368,22 +368,22 @@ u32 GetI4_RGBA4444_BG(u64 *src, u16 x, u16 i, u8 palette)
+
+ u32 GetCI8IA_RGBA4444_BG(u64 *src, u16 x, u16 i, u8 palette)
+ {
+- return IA88_RGBA4444(*(u16*)&TMEM[256 + ((u8*)src)[x ^ (i << 1)]]);
++ return IA88_RGBA4444(static_cast<u16>(TMEM[256 + ((u8*)src)[x ^ (i << 1)]] & 0xFFFF));
+ }
+
+ u32 GetCI8IA_RGBA8888_BG(u64 *src, u16 x, u16 i, u8 palette)
+ {
+- return IA88_RGBA8888(*(u16*)&TMEM[256 + ((u8*)src)[x ^ (i << 1)]]);
++ return IA88_RGBA8888(static_cast<u16>(TMEM[256 + ((u8*)src)[x ^ (i << 1)]] & 0xFFFF));
+ }
+
+ u32 GetCI8RGBA_RGBA5551_BG(u64 *src, u16 x, u16 i, u8 palette)
+ {
+- return RGBA5551_RGBA5551(*(u16*)&TMEM[256 + ((u8*)src)[x ^ (i << 1)]]);
++ return RGBA5551_RGBA5551(static_cast<u16>(TMEM[256 + ((u8*)src)[x ^ (i << 1)]] & 0xFFFF));
+ }
+
+ u32 GetCI8RGBA_RGBA8888_BG(u64 *src, u16 x, u16 i, u8 palette)
+ {
+- return RGBA5551_RGBA8888(*(u16*)&TMEM[256 + ((u8*)src)[x ^ (i << 1)]]);
++ return RGBA5551_RGBA8888(static_cast<u16>(TMEM[256 + ((u8*)src)[x ^ (i << 1)]] & 0xFFFF));
+ }
+
+ u32 GetIA44_RGBA8888_BG(u64 *src, u16 x, u16 i, u8 palette)
+@@ -429,7 +429,7 @@ u32 GetI16_RGBA4444_BG(u64 *src, u16 x, u16 i, u8 palette)
+ u32 GetCI16IA_RGBA8888_BG(u64 *src, u16 x, u16 i, u8 palette)
+ {
+ const u16 tex = ((u16*)src)[x^i];
+- const u16 col = (*(u16*)&TMEM[256 + (tex & 0xFF)]);
++ const u16 col = (static_cast<u16>(TMEM[256 + (tex & 0xFF)] & 0xFFFF));
+ const u16 c = col >> 8;
+ const u16 a = col & 0xFF;
+ return (a << 24) | (c << 16) | (c << 8) | c;
+@@ -438,7 +438,7 @@ u32 GetCI16IA_RGBA8888_BG(u64 *src, u16 x, u16 i, u8 palette)
+ u32 GetCI16IA_RGBA4444_BG(u64 *src, u16 x, u16 i, u8 palette)
+ {
+ const u16 tex = ((u16*)src)[x^i];
+- const u16 col = (*(u16*)&TMEM[256 + (tex & 0xFF)]);
++ const u16 col = (static_cast<u16>(TMEM[256 + (tex & 0xFF)] & 0xFFFF));
+ const u16 c = col >> 12;
+ const u16 a = col & 0x0F;
+ return (a << 12) | (c << 8) | (c << 4) | c;
diff --git a/games-emulation/rmg/rmg-9999.ebuild b/games-emulation/rmg/rmg-0.6.6-r2.ebuild
similarity index 90%
copy from games-emulation/rmg/rmg-9999.ebuild
copy to games-emulation/rmg/rmg-0.6.6-r2.ebuild
index bd56ccdd299f..a4725fab7f32 100644
--- a/games-emulation/rmg/rmg-9999.ebuild
+++ b/games-emulation/rmg/rmg-0.6.6-r2.ebuild
@@ -27,7 +27,7 @@ CRATES="
winapi@0.3.9
"
-inherit cargo cmake flag-o-matic toolchain-funcs xdg
+inherit cargo cmake toolchain-funcs xdg
MY_PN="${PN^^}"
MY_P="${MY_PN}-${PV}"
@@ -76,6 +76,12 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-0.5.6-parallel-rdp-standalone-musl.patch
+ # Use pkg-config(1) for SDL2 and don't depend on which(1)
+ "${FILESDIR}"/${P}-mupen64plus-core-sdl-pkgconfig.patch
+ # https://bugs.gentoo.org/941889
+ "${FILESDIR}"/${P}-mupen64plus-input-raphnetraw-pkgconfig.patch
+ # https://github.com/gonetz/GLideN64/issues/2877
+ "${FILESDIR}"/${P}-mupen64plus-video-GLideN64-strict-aliasing.patch
)
pkg_setup() {
@@ -118,13 +124,6 @@ src_prepare() {
}
src_configure() {
- # -Werror=strict-aliasing
- # https://github.com/gonetz/GLideN64/issues/2877
- #
- # Disable strict-aliasing until its handled upstream.
- append-flags -fno-strict-aliasing
- filter-lto
-
export PKG_CONFIG="$(tc-getPKG_CONFIG)"
export PKG_CONFIG_ALLOW_CROSS=1
diff --git a/games-emulation/rmg/rmg-9999.ebuild b/games-emulation/rmg/rmg-9999.ebuild
index bd56ccdd299f..090054fff76d 100644
--- a/games-emulation/rmg/rmg-9999.ebuild
+++ b/games-emulation/rmg/rmg-9999.ebuild
@@ -27,7 +27,7 @@ CRATES="
winapi@0.3.9
"
-inherit cargo cmake flag-o-matic toolchain-funcs xdg
+inherit cargo cmake toolchain-funcs xdg
MY_PN="${PN^^}"
MY_P="${MY_PN}-${PV}"
@@ -118,13 +118,6 @@ src_prepare() {
}
src_configure() {
- # -Werror=strict-aliasing
- # https://github.com/gonetz/GLideN64/issues/2877
- #
- # Disable strict-aliasing until its handled upstream.
- append-flags -fno-strict-aliasing
- filter-lto
-
export PKG_CONFIG="$(tc-getPKG_CONFIG)"
export PKG_CONFIG_ALLOW_CROSS=1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-emulation/rmg/, games-emulation/rmg/files/
@ 2024-11-26 5:57 Eli Schwartz
0 siblings, 0 replies; 3+ messages in thread
From: Eli Schwartz @ 2024-11-26 5:57 UTC (permalink / raw
To: gentoo-commits
commit: 285f56412358d866d9dc9e021276f9d6f5ae3032
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Oct 21 14:14:43 2024 +0000
Commit: Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Tue Nov 26 05:03:32 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=285f5641
games-emulation/rmg: use pkg-config for SDL2
Also removes undocumented dependency on which(1).
Upstream-PR: https://github.com/mupen64plus/mupen64plus-core/pull/1093
Upstream-Commit: https://github.com/mupen64plus/mupen64plus-core/commit/966a5df3165afede21204610c396dba1ed8a5bf3
Upstream-Commit: https://github.com/mupen64plus/mupen64plus-core/commit/b007759b9ed9d1473c732b4f3abcd9257165c65c
Upstream-Commit: https://github.com/Rosalie241/RMG/commit/4cd4f4c6ea37c82cdda6b0a57e79af1b71df17fe
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>
.../rmg-0.6.6-mupen64plus-core-sdl-pkgconfig.patch | 59 ++++++++++++++++++++++
games-emulation/rmg/rmg-0.6.5-r1.ebuild | 1 +
games-emulation/rmg/rmg-0.6.6-r1.ebuild | 2 +
3 files changed, 62 insertions(+)
diff --git a/games-emulation/rmg/files/rmg-0.6.6-mupen64plus-core-sdl-pkgconfig.patch b/games-emulation/rmg/files/rmg-0.6.6-mupen64plus-core-sdl-pkgconfig.patch
new file mode 100644
index 000000000000..5b4fa24ce481
--- /dev/null
+++ b/games-emulation/rmg/files/rmg-0.6.6-mupen64plus-core-sdl-pkgconfig.patch
@@ -0,0 +1,59 @@
+https://github.com/mupen64plus/mupen64plus-core/pull/1093
+https://github.com/mupen64plus/mupen64plus-core/commit/966a5df3165afede21204610c396dba1ed8a5bf3
+https://github.com/mupen64plus/mupen64plus-core/commit/b007759b9ed9d1473c732b4f3abcd9257165c65c
+https://github.com/Rosalie241/RMG/commit/4cd4f4c6ea37c82cdda6b0a57e79af1b71df17fe
+
+From: orbea <orbea@riseup.net>
+Date: Mon, 21 Oct 2024 09:10:57 -0700
+Subject: [PATCH 3/3] build: drop SDL1 support
+
+SDL1 is unmaintained upstream and using it only leads to a degraded
+experience. Especially when it recives far less testing.
+
+build: use pkg-config for SDL2
+
+SDL2 hasn't required suing sdl2-config in a long time and using
+pkg-config can have better results for distros.
+---
+ projects/unix/Makefile | 28 ++++++++++------------------
+ 1 file changed, 10 insertions(+), 18 deletions(-)
+
+--- a/Source/3rdParty/mupen64plus-core/projects/unix/Makefile
++++ b/Source/3rdParty/mupen64plus-core/projects/unix/Makefile
+@@ -351,26 +351,18 @@ endif
+
+ # test for presence of SDL
+ ifeq ($(origin SDL_CFLAGS) $(origin SDL_LDLIBS), undefined undefined)
+- SDL_CONFIG = $(CROSS_COMPILE)sdl2-config
+- ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),)
+- SDL_CONFIG = $(CROSS_COMPILE)sdl-config
+- ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),)
+- $(error No SDL development libraries found!)
+- else
+- ifeq ($(NETPLAY), 1)
+- SDL_LDLIBS += -lSDL_net
+- endif
+- # SDL1 doesn't support vulkan
+- VULKAN = 0
+- $(warning Using SDL 1.2 libraries)
+- endif
+- else
+- ifeq ($(NETPLAY), 1)
+- SDL_LDLIBS += -lSDL2_net
++ ifeq ($(shell $(PKG_CONFIG) --modversion sdl2 2>/dev/null),)
++ $(error No SDL2 development libraries found!)
++ endif
++ ifeq ($(NETPLAY), 1)
++ ifeq ($(shell $(PKG_CONFIG) --modversion SDL2_net 2>/dev/null),)
++ $(error No SDL2_net development libraries found!)
+ endif
++ SDL_CFLAGS += $(shell $(PKG_CONFIG) --cflags SDL2_net)
++ SDL_LDLIBS += $(shell $(PKG_CONFIG) --libs SDL2_net)
+ endif
+- SDL_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
+- SDL_LDLIBS += $(shell $(SDL_CONFIG) --libs)
++ SDL_CFLAGS += $(shell $(PKG_CONFIG) --cflags sdl2)
++ SDL_LDLIBS += $(shell $(PKG_CONFIG) --libs sdl2)
+ endif
+ CFLAGS += $(SDL_CFLAGS)
+ LDLIBS += $(SDL_LDLIBS)
diff --git a/games-emulation/rmg/rmg-0.6.5-r1.ebuild b/games-emulation/rmg/rmg-0.6.5-r1.ebuild
index eed49326ebd4..aade8a991244 100644
--- a/games-emulation/rmg/rmg-0.6.5-r1.ebuild
+++ b/games-emulation/rmg/rmg-0.6.5-r1.ebuild
@@ -69,6 +69,7 @@ DEPEND="
"
RDEPEND="${DEPEND}"
BDEPEND="
+ sys-apps/which
virtual/pkgconfig
dynarec? ( dev-lang/nasm )
rust-plugin? ( ${RUST_DEPEND} )
diff --git a/games-emulation/rmg/rmg-0.6.6-r1.ebuild b/games-emulation/rmg/rmg-0.6.6-r1.ebuild
index eed49326ebd4..0ce9716765c4 100644
--- a/games-emulation/rmg/rmg-0.6.6-r1.ebuild
+++ b/games-emulation/rmg/rmg-0.6.6-r1.ebuild
@@ -76,6 +76,8 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-0.5.6-parallel-rdp-standalone-musl.patch
+ # Use pkg-config(1) for SDL2 and don't depend on which(1)
+ "${FILESDIR}"/${P}-mupen64plus-core-sdl-pkgconfig.patch
)
pkg_setup() {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-emulation/rmg/, games-emulation/rmg/files/
@ 2025-10-04 0:55 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2025-10-04 0:55 UTC (permalink / raw
To: gentoo-commits
commit: faef4c4fc403cd0073604844d078b8266c91d217
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Oct 3 19:40:52 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 4 00:54:34 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faef4c4f
games-emulation/rmg: fix rust compile failure
Upstream-Issue: https://github.com/Rosalie241/RMG/issues/436
Signed-off-by: orbea <orbea <AT> riseup.net>
Part-of: https://github.com/gentoo/gentoo/pull/43795
Signed-off-by: Sam James <sam <AT> gentoo.org>
games-emulation/rmg/files/rmg-0.8.3-rust.patch | 16 ++++++++++++++++
games-emulation/rmg/rmg-9999.ebuild | 5 +++++
2 files changed, 21 insertions(+)
diff --git a/games-emulation/rmg/files/rmg-0.8.3-rust.patch b/games-emulation/rmg/files/rmg-0.8.3-rust.patch
new file mode 100644
index 000000000000..ab3eb3675d66
--- /dev/null
+++ b/games-emulation/rmg/files/rmg-0.8.3-rust.patch
@@ -0,0 +1,16 @@
+https://github.com/Rosalie241/RMG/issues/436
+https://github.com/flathub/com.github.Rosalie241.RMG/blob/bcdd90974b35c7a09a4d9102ac4c89b12da69454/patches/rust-compile.patch
+
+diff --git a/Source/3rdParty/mupen64plus-input-gca/src/adapter.rs b/Source/3rdParty/mupen64plus-input-gca/src/adapter.rs
+index 142211bde..cf7d9cf4c 100644
+--- a/Source/3rdParty/mupen64plus-input-gca/src/adapter.rs
++++ b/Source/3rdParty/mupen64plus-input-gca/src/adapter.rs
+@@ -71,7 +71,7 @@ impl GcAdapter {
+ })
+ .ok_or(rusb::Error::NoDevice)?;
+
+- let handle = device.open()?;
++ let mut handle = device.open()?;
+
+ if handle.kernel_driver_active(0).unwrap_or(false) {
+ handle.detach_kernel_driver(0)?;
diff --git a/games-emulation/rmg/rmg-9999.ebuild b/games-emulation/rmg/rmg-9999.ebuild
index 883bfd3f6e4c..d631d747096b 100644
--- a/games-emulation/rmg/rmg-9999.ebuild
+++ b/games-emulation/rmg/rmg-9999.ebuild
@@ -75,6 +75,11 @@ BDEPEND="
rust-plugin? ( ${RUST_DEPEND} )
"
+PATCHES=(
+ # https://github.com/Rosalie241/RMG/issues/436
+ "${FILESDIR}"/${PN}-0.8.3-rust.patch
+)
+
pkg_setup() {
QA_FLAGS_IGNORED="/usr/$(get_libdir)/RMG/Plugin/Input/libmupen64plus_input_gca.so"
use rust-plugin && rust_pkg_setup
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-04 0:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-04 0:55 [gentoo-commits] repo/gentoo:master commit in: games-emulation/rmg/, games-emulation/rmg/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-11-26 5:57 Eli Schwartz
2024-11-26 5:57 Eli Schwartz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox