games-emulation/rmg: fix rust compile failure

Upstream-Issue: https://github.com/Rosalie241/RMG/issues/436
Signed-off-by: orbea <orbea@riseup.net>
Part-of: https://github.com/gentoo/gentoo/pull/43795
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
orbea 2025-10-03 12:40:52 -07:00 committed by Sam James
parent 0094e3a7f5
commit faef4c4fc4
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
2 changed files with 21 additions and 0 deletions

View File

@ -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)?;

View File

@ -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