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

Reply via email to