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 0000000000000..ab3eb3675d666 --- /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 883bfd3f6e4c9..d631d747096b0 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