diff options
Diffstat (limited to 'games/jumpy/files')
-rw-r--r-- | games/jumpy/files/patch-gilrs-evdev | 81 | ||||
-rw-r--r-- | games/jumpy/files/patch-miniquad | 187 | ||||
-rw-r--r-- | games/jumpy/files/patch-quad-snd | 39 | ||||
-rw-r--r-- | games/jumpy/files/patch-quinn | 234 | ||||
-rw-r--r-- | games/jumpy/files/patch-wayland | 255 |
5 files changed, 489 insertions, 307 deletions
diff --git a/games/jumpy/files/patch-gilrs-evdev b/games/jumpy/files/patch-gilrs-evdev deleted file mode 100644 index d80c9802b7a2..000000000000 --- a/games/jumpy/files/patch-gilrs-evdev +++ /dev/null @@ -1,81 +0,0 @@ -https://gitlab.com/gilrs-project/gilrs/-/merge_requests/56 - ---- cargo-crates/gilrs-0.8.2/src/mapping/mod.rs.orig 1970-01-01 00:00:00 UTC -+++ cargo-crates/gilrs-0.8.2/src/mapping/mod.rs -@@ -24,14 +24,14 @@ use vec_map::VecMap; - use self::parser::{Error as ParserError, ErrorKind as ParserErrorKind, Parser, Token}; - - /// Platform name used by SDL mappings --#[cfg(target_os = "linux")] -+#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))] - const SDL_PLATFORM_NAME: &str = "Linux"; - #[cfg(target_os = "macos")] - const SDL_PLATFORM_NAME: &'static str = "Mac OS X"; - #[cfg(target_os = "windows")] - const SDL_PLATFORM_NAME: &'static str = "Windows"; - #[cfg(all( -- not(target_os = "linux"), -+ not(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd")), - not(target_os = "macos"), - not(target_os = "windows") - ))] ---- cargo-crates/gilrs-core-0.3.2/Cargo.toml.orig 1970-01-01 00:00:00 UTC -+++ cargo-crates/gilrs-core-0.3.2/Cargo.toml -@@ -54,16 +54,16 @@ optional = true - [target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-rs] - version = "0.2" - package = "wasm-bindgen" --[target."cfg(target_os = \"linux\")".dependencies.libc] -+[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\"))".dependencies.libc] - version = "0.2" - --[target."cfg(target_os = \"linux\")".dependencies.libudev-sys] -+[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\"))".dependencies.libudev-sys] - version = "0.1" - --[target."cfg(target_os = \"linux\")".dependencies.nix] -+[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\"))".dependencies.nix] - version = "0.23.1" - --[target."cfg(target_os = \"linux\")".dependencies.vec_map] -+[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\"))".dependencies.vec_map] - version = "0.8" - [target."cfg(target_os = \"macos\")".dependencies.core-foundation] - version = "0.6" ---- cargo-crates/gilrs-core-0.3.2/src/platform/linux/ff.rs.orig 1970-01-01 00:00:00 UTC -+++ cargo-crates/gilrs-core-0.3.2/src/platform/linux/ff.rs -@@ -104,10 +104,10 @@ impl Device { - - impl Drop for Device { - fn drop(&mut self) { -- #[cfg(target_pointer_width = "64")] -- let effect = self.effect as u64; -- #[cfg(target_pointer_width = "32")] -- let effect = self.effect as u32; -+ #[cfg(target_os = "linux")] -+ let effect = self.effect as ::libc::c_ulong; -+ #[cfg(not(target_os = "linux"))] -+ let effect = self.effect as ::libc::c_int; - - if let Err(err) = unsafe { ioctl::eviocrmff(self.file.as_raw_fd(), effect) } { - error!( ---- cargo-crates/gilrs-core-0.3.2/src/platform/mod.rs.orig 1970-01-01 00:00:00 UTC -+++ cargo-crates/gilrs-core-0.3.2/src/platform/mod.rs -@@ -21,7 +21,7 @@ - - pub use self::platform::*; - --#[cfg(target_os = "linux")] -+#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))] - #[path = "linux/mod.rs"] - mod platform; - -@@ -38,7 +38,7 @@ mod platform; - mod platform; - - #[cfg(all( -- not(target_os = "linux"), -+ not(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd")), - not(target_os = "macos"), - not(target_os = "windows"), - not(target_arch = "wasm32") diff --git a/games/jumpy/files/patch-miniquad b/games/jumpy/files/patch-miniquad deleted file mode 100644 index 61c3bbd17f3f..000000000000 --- a/games/jumpy/files/patch-miniquad +++ /dev/null @@ -1,187 +0,0 @@ -https://github.com/not-fl3/miniquad/pull/270 - -error[E0428]: the name `GL_TIME_ELAPSED` is defined multiple times - --> cargo-crates/sapp-dummy-0.1.5/src/gl.rs:1455:1 - | -922 | pub const GL_TIME_ELAPSED: u32 = 35007; - | --------------------------------------- previous definition of the value `GL_TIME_ELAPSED` here -... -1455 | pub const GL_TIME_ELAPSED: u32 = 35007; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `GL_TIME_ELAPSED` redefined here - | - = note: `GL_TIME_ELAPSED` must be defined only once in the value namespace of this module - ---- cargo-crates/miniquad-0.3.0-alpha.42/Cargo.toml.orig 1970-01-01 00:00:01 UTC -+++ cargo-crates/miniquad-0.3.0-alpha.42/Cargo.toml -@@ -32,7 +32,7 @@ version = "0.1" - default = ["sapp-linux"] - kms = ["sapp-kms"] - log-impl = [] --[target."cfg(not(any(target_os=\"linux\", target_os=\"macos\", target_os=\"android\", target_os=\"ios\", target_arch=\"wasm32\", windows)))".dependencies.sapp-dummy] -+[target."cfg(not(any(target_os=\"linux\", target_os=\"dragonfly\", target_os=\"freebsd\", target_os=\"netbsd\", target_os=\"openbsd\", target_os=\"macos\", target_os=\"android\", target_os=\"ios\", target_arch=\"wasm32\", windows)))".dependencies.sapp-dummy] - version = "=0.1.5" - [target."cfg(target_arch = \"wasm32\")".dependencies.sapp-wasm] - version = "=0.1.26" -@@ -40,11 +40,11 @@ version = "=0.1.26" - version = "=0.1.14" - [target."cfg(target_os = \"ios\")".dependencies.sapp-ios] - version = "=0.1.2" --[target."cfg(target_os = \"linux\")".dependencies.sapp-kms] -+[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"netbsd\", target_os = \"openbsd\"))".dependencies.sapp-kms] - version = "=0.1.1" - optional = true - --[target."cfg(target_os = \"linux\")".dependencies.sapp-linux] -+[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"netbsd\", target_os = \"openbsd\"))".dependencies.sapp-linux] - version = "=0.1.13" - optional = true - [target."cfg(target_os = \"macos\")".dependencies.sapp-darwin] ---- cargo-crates/miniquad-0.3.0-alpha.42/src/clipboard.rs.orig 1970-01-01 00:00:01 UTC -+++ cargo-crates/miniquad-0.3.0-alpha.42/src/clipboard.rs -@@ -2,7 +2,13 @@ - - use crate::Context; - --#[cfg(all(target_os = "linux", feature = "sapp-linux"))] -+#[cfg(all(feature = "sapp-linux", any( -+ target_os = "linux", -+ target_os = "dragonfly", -+ target_os = "freebsd", -+ target_os = "netbsd", -+ target_os = "openbsd", -+)))] - mod linux_x11 { - use crate::Context; - -@@ -53,7 +59,13 @@ mod windows { - } - - #[cfg(not(any( -- all(target_os = "linux", feature = "sapp-linux"), -+ all(feature = "sapp-linux", any( -+ target_os = "linux", -+ target_os = "dragonfly", -+ target_os = "freebsd", -+ target_os = "netbsd", -+ target_os = "openbsd", -+ )), - target_os = "windows", - target_arch = "wasm32" - )))] -@@ -68,12 +80,24 @@ mod dummy { - } - - #[cfg(not(any( -- all(target_os = "linux", feature = "sapp-linux"), -+ all(feature = "sapp-linux", any( -+ target_os = "linux", -+ target_os = "dragonfly", -+ target_os = "freebsd", -+ target_os = "netbsd", -+ target_os = "openbsd", -+ )), - target_os = "windows", - target_arch = "wasm32" - )))] - use dummy as clipboard; --#[cfg(all(target_os = "linux", feature = "sapp-linux"))] -+#[cfg(all(feature = "sapp-linux", any( -+ target_os = "linux", -+ target_os = "dragonfly", -+ target_os = "freebsd", -+ target_os = "netbsd", -+ target_os = "openbsd", -+)))] - use linux_x11 as clipboard; - #[cfg(target_arch = "wasm32")] - use wasm as clipboard; ---- cargo-crates/miniquad-0.3.0-alpha.42/src/lib.rs.orig 1970-01-01 00:00:01 UTC -+++ cargo-crates/miniquad-0.3.0-alpha.42/src/lib.rs -@@ -8,6 +8,10 @@ pub use sapp_android; - extern crate sapp_darwin as sapp; - #[cfg(not(any( - target_os = "linux", -+ target_os = "dragonfly", -+ target_os = "freebsd", -+ target_os = "netbsd", -+ target_os = "openbsd", - target_os = "macos", - target_os = "ios", - target_os = "android", -@@ -17,9 +21,21 @@ extern crate sapp_darwin as sapp; - extern crate sapp_dummy as sapp; - #[cfg(target_os = "ios")] - extern crate sapp_ios as sapp; --#[cfg(all(target_os = "linux", feature = "kms"))] -+#[cfg(all(feature = "kms", any( -+ target_os = "linux", -+ target_os = "dragonfly", -+ target_os = "freebsd", -+ target_os = "netbsd", -+ target_os = "openbsd", -+)))] - extern crate sapp_kms as sapp; --#[cfg(all(target_os = "linux", not(feature = "kms")))] -+#[cfg(all(not(feature = "kms"), any( -+ target_os = "linux", -+ target_os = "dragonfly", -+ target_os = "freebsd", -+ target_os = "netbsd", -+ target_os = "openbsd", -+)))] - extern crate sapp_linux as sapp; - - #[cfg(target_arch = "wasm32")] -@@ -139,7 +155,13 @@ impl Context { - pub fn set_mouse_cursor(&self, _cursor_icon: CursorIcon) { - #[cfg(any( - target_arch = "wasm32", -- all(target_os = "linux", not(feature = "kms")), -+ all(not(feature = "kms"), any( -+ target_os = "linux", -+ target_os = "dragonfly", -+ target_os = "freebsd", -+ target_os = "netbsd", -+ target_os = "openbsd", -+ )), - windows, - ))] - unsafe { -@@ -165,6 +187,10 @@ impl Context { - pub fn set_window_size(&self, new_width: u32, new_height: u32) { - #[cfg(not(any( - target_os = "linux", -+ target_os = "dragonfly", -+ target_os = "freebsd", -+ target_os = "netbsd", -+ target_os = "openbsd", - target_os = "macos", - target_os = "ios", - target_os = "android", -@@ -184,6 +210,10 @@ impl Context { - pub fn set_fullscreen(&self, fullscreen: bool) { - #[cfg(not(any( - target_os = "linux", -+ target_os = "dragonfly", -+ target_os = "freebsd", -+ target_os = "netbsd", -+ target_os = "openbsd", - target_os = "macos", - target_os = "ios", - target_os = "android", ---- cargo-crates/sapp-linux-0.1.13/build.rs.orig 1970-01-01 00:00:00 UTC -+++ cargo-crates/sapp-linux-0.1.13/build.rs -@@ -3,7 +3,12 @@ use std::env; - fn main() { - let target = env::var("TARGET").unwrap_or_else(|e| panic!("{}", e)); - -- if target.contains("linux") == false { -+ if target.contains("linux") == false -+ && target.contains("dragonfly") == false -+ && target.contains("freebsd") == false -+ && target.contains("netbsd") == false -+ && target.contains("openbsd") == false -+ { - panic!("sapp_linux support only linux target"); - } - diff --git a/games/jumpy/files/patch-quad-snd b/games/jumpy/files/patch-quad-snd deleted file mode 100644 index e2e079357ec6..000000000000 --- a/games/jumpy/files/patch-quad-snd +++ /dev/null @@ -1,39 +0,0 @@ -https://github.com/not-fl3/quad-snd/pull/36 - -error[E0432]: unresolved import `snd` - --> cargo-crates/quad-snd-0.2.3/src/lib.rs:32:9 - | -32 | pub use snd::{AudioContext, Sound}; - | ^^^ use of undeclared crate or module `snd` - | -help: there is a crate or module with a similar name - | -32 | pub use std::{AudioContext, Sound}; - | ~~~ - ---- cargo-crates/quad-snd-0.2.3/Cargo.toml.orig 1970-01-01 00:00:01 UTC -+++ cargo-crates/quad-snd-0.2.3/Cargo.toml -@@ -22,10 +22,10 @@ features = ["wav", "ogg_vorbis"] - default-features = false - [target."cfg(target_os = \"android\")".dependencies.audir-sles] - version = "0.1.0" --[target."cfg(target_os = \"linux\")".dependencies.libc] -+[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\"))".dependencies.libc] - version = "0.2" - --[target."cfg(target_os = \"linux\")".dependencies.quad-alsa-sys] -+[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\"))".dependencies.quad-alsa-sys] - version = "0.3.2" - [target."cfg(target_os = \"windows\")".dependencies.winapi] - version = "0.3.8" ---- cargo-crates/quad-snd-0.2.3/src/lib.rs.orig 1970-01-01 00:00:01 UTC -+++ cargo-crates/quad-snd-0.2.3/src/lib.rs -@@ -10,7 +10,7 @@ pub use error::Error; - #[path = "opensles_snd.rs"] - mod snd; - --#[cfg(target_os = "linux")] -+#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))] - #[path = "alsa_snd.rs"] - mod snd; - diff --git a/games/jumpy/files/patch-quinn b/games/jumpy/files/patch-quinn new file mode 100644 index 000000000000..262e64632259 --- /dev/null +++ b/games/jumpy/files/patch-quinn @@ -0,0 +1,234 @@ +https://github.com/quinn-rs/quinn/commit/166e0fb60a64 + +--- cargo-crates/quinn-0.9.1/src/connection.rs.orig 2006-07-24 01:21:28 UTC ++++ cargo-crates/quinn-0.9.1/src/connection.rs +@@ -146,6 +146,8 @@ impl Connecting { + /// Retrieving the local IP address is currently supported on the following + /// platforms: + /// - Linux ++ /// - FreeBSD ++ /// - macOS + /// + /// On all non-supported platforms the local IP address will not be available, + /// and the method will return `None`. +--- cargo-crates/quinn-0.9.1/src/tests.rs.orig 2006-07-24 01:21:28 UTC ++++ cargo-crates/quinn-0.9.1/src/tests.rs +@@ -462,7 +462,8 @@ fn run_echo(args: EchoArgs) { + // If `local_ip` gets available on additional platforms - which + // requires modifying this test - please update the list of supported + // platforms in the doc comments of the various `local_ip` functions. +- if cfg!(target_os = "linux") { ++ if cfg!(target_os = "linux") || cfg!(target_os = "freebsd") || cfg!(target_os = "macos") ++ { + let local_ip = incoming.local_ip().expect("Local IP must be available"); + assert!(local_ip.is_loopback()); + } else { +--- cargo-crates/quinn-udp-0.3.0/src/unix.rs.orig 2006-07-24 01:21:28 UTC ++++ cargo-crates/quinn-udp-0.3.0/src/unix.rs +@@ -68,7 +68,7 @@ fn init(io: SockRef<'_>) -> io::Result<()> { + + fn init(io: SockRef<'_>) -> io::Result<()> { + let mut cmsg_platform_space = 0; +- if cfg!(target_os = "linux") { ++ if cfg!(target_os = "linux") || cfg!(target_os = "freebsd") || cfg!(target_os = "macos") { + cmsg_platform_space += + unsafe { libc::CMSG_SPACE(mem::size_of::<libc::in6_pktinfo>() as _) as usize }; + } +@@ -159,13 +159,20 @@ fn init(io: SockRef<'_>) -> io::Result<()> { + if rc == -1 { + return Err(io::Error::last_os_error()); + } +- ++ } ++ } ++ #[cfg(any(target_os = "freebsd", target_os = "macos"))] ++ // IP_RECVDSTADDR == IP_SENDSRCADDR on FreeBSD ++ // macOS uses only IP_RECVDSTADDR, no IP_SENDSRCADDR on macOS ++ // macOS also supports IP_PKTINFO ++ { ++ if is_ipv4 { + let on: libc::c_int = 1; + let rc = unsafe { + libc::setsockopt( + io.as_raw_fd(), +- libc::IPPROTO_IPV6, +- libc::IPV6_RECVPKTINFO, ++ libc::IPPROTO_IP, ++ libc::IP_RECVDSTADDR, + &on as *const _ as _, + mem::size_of_val(&on) as _, + ) +@@ -175,12 +182,28 @@ fn init(io: SockRef<'_>) -> io::Result<()> { + } + } + } ++ ++ // IPV6_RECVPKTINFO is standardized + if !is_ipv4 { + let on: libc::c_int = 1; + let rc = unsafe { + libc::setsockopt( + io.as_raw_fd(), + libc::IPPROTO_IPV6, ++ libc::IPV6_RECVPKTINFO, ++ &on as *const _ as _, ++ mem::size_of_val(&on) as _, ++ ) ++ }; ++ if rc == -1 { ++ return Err(io::Error::last_os_error()); ++ } ++ ++ let on: libc::c_int = 1; ++ let rc = unsafe { ++ libc::setsockopt( ++ io.as_raw_fd(), ++ libc::IPPROTO_IPV6, + libc::IPV6_RECVTCLASS, + &on as *const _ as _, + mem::size_of_val(&on) as _, +@@ -195,11 +218,24 @@ fn send( + + #[cfg(not(any(target_os = "macos", target_os = "ios")))] + fn send( ++ #[allow(unused_variables)] // only used on Linux + state: &UdpState, + io: SockRef<'_>, + last_send_error: &mut Instant, + transmits: &[Transmit], + ) -> io::Result<usize> { ++ #[allow(unused_mut)] // only mutable on FeeBSD ++ let mut encode_src_ip = true; ++ #[cfg(target_os = "freebsd")] ++ { ++ let addr = io.local_addr()?; ++ let is_ipv4 = addr.family() == libc::AF_INET as libc::sa_family_t; ++ if is_ipv4 { ++ if let Some(socket) = addr.as_socket_ipv4() { ++ encode_src_ip = socket.ip() == &Ipv4Addr::UNSPECIFIED; ++ } ++ } ++ } + let mut msgs: [libc::mmsghdr; BATCH_SIZE] = unsafe { mem::zeroed() }; + let mut iovecs: [libc::iovec; BATCH_SIZE] = unsafe { mem::zeroed() }; + let mut cmsgs = [cmsg::Aligned([0u8; CMSG_LEN]); BATCH_SIZE]; +@@ -225,13 +261,13 @@ fn send( + &mut msgs[i].msg_hdr, + &mut iovecs[i], + &mut cmsgs[i], ++ encode_src_ip, + ); + } + let num_transmits = transmits.len().min(BATCH_SIZE); + + loop { +- let n = +- unsafe { libc::sendmmsg(io.as_raw_fd(), msgs.as_mut_ptr(), num_transmits as u32, 0) }; ++ let n = unsafe { libc::sendmmsg(io.as_raw_fd(), msgs.as_mut_ptr(), num_transmits as _, 0) }; + if n == -1 { + let e = io::Error::last_os_error(); + match e.kind() { +@@ -287,9 +323,18 @@ fn send( + let mut iov: libc::iovec = unsafe { mem::zeroed() }; + let mut ctrl = cmsg::Aligned([0u8; CMSG_LEN]); + let mut sent = 0; ++ + while sent < transmits.len() { + let addr = socket2::SockAddr::from(transmits[sent].destination); +- prepare_msg(&transmits[sent], &addr, &mut hdr, &mut iov, &mut ctrl); ++ prepare_msg( ++ &transmits[sent], ++ &addr, ++ &mut hdr, ++ &mut iov, ++ &mut ctrl, ++ // Only tested on macOS ++ cfg!(target_os = "macos"), ++ ); + let n = unsafe { libc::sendmsg(io.as_raw_fd(), &hdr, 0) }; + if n == -1 { + let e = io::Error::last_os_error(); +@@ -336,7 +381,7 @@ fn recv(io: SockRef<'_>, bufs: &mut [IoSliceMut<'_>], + libc::recvmmsg( + io.as_raw_fd(), + hdrs.as_mut_ptr(), +- bufs.len().min(BATCH_SIZE) as libc::c_uint, ++ bufs.len().min(BATCH_SIZE) as _, + 0, + ptr::null_mut(), + ) +@@ -396,6 +441,8 @@ fn prepare_msg( + hdr: &mut libc::msghdr, + iov: &mut libc::iovec, + ctrl: &mut cmsg::Aligned<[u8; CMSG_LEN]>, ++ #[allow(unused_variables)] // only used on FreeBSD & macOS ++ encode_src_ip: bool, + ) { + iov.iov_base = transmit.contents.as_ptr() as *const _ as *mut _; + iov.iov_len = transmit.contents.len(); +@@ -427,9 +474,10 @@ fn prepare_msg( + } + + if let Some(ip) = &transmit.src_ip { +- if cfg!(target_os = "linux") { +- match ip { +- IpAddr::V4(v4) => { ++ match ip { ++ IpAddr::V4(v4) => { ++ #[cfg(target_os = "linux")] ++ { + let pktinfo = libc::in_pktinfo { + ipi_ifindex: 0, + ipi_spec_dst: libc::in_addr { +@@ -439,16 +487,25 @@ fn prepare_msg( + }; + encoder.push(libc::IPPROTO_IP, libc::IP_PKTINFO, pktinfo); + } +- IpAddr::V6(v6) => { +- let pktinfo = libc::in6_pktinfo { +- ipi6_ifindex: 0, +- ipi6_addr: libc::in6_addr { +- s6_addr: v6.octets(), +- }, +- }; +- encoder.push(libc::IPPROTO_IPV6, libc::IPV6_PKTINFO, pktinfo); ++ #[cfg(any(target_os = "freebsd", target_os = "macos"))] ++ { ++ if encode_src_ip { ++ let addr = libc::in_addr { ++ s_addr: u32::from_ne_bytes(v4.octets()), ++ }; ++ encoder.push(libc::IPPROTO_IP, libc::IP_RECVDSTADDR, addr); ++ } + } + } ++ IpAddr::V6(v6) => { ++ let pktinfo = libc::in6_pktinfo { ++ ipi6_ifindex: 0, ++ ipi6_addr: libc::in6_addr { ++ s6_addr: v6.octets(), ++ }, ++ }; ++ encoder.push(libc::IPPROTO_IPV6, libc::IPV6_PKTINFO, pktinfo); ++ } + } + } + +@@ -499,11 +556,17 @@ fn decode_recv( + ecn_bits = cmsg::decode::<libc::c_int>(cmsg) as u8; + } + }, ++ #[cfg(target_os = "linux")] + (libc::IPPROTO_IP, libc::IP_PKTINFO) => { + let pktinfo = unsafe { cmsg::decode::<libc::in_pktinfo>(cmsg) }; + dst_ip = Some(IpAddr::V4(Ipv4Addr::from( + pktinfo.ipi_addr.s_addr.to_ne_bytes(), + ))); ++ } ++ #[cfg(any(target_os = "freebsd", target_os = "macos"))] ++ (libc::IPPROTO_IP, libc::IP_RECVDSTADDR) => { ++ let in_addr = unsafe { cmsg::decode::<libc::in_addr>(cmsg) }; ++ dst_ip = Some(IpAddr::V4(Ipv4Addr::from(in_addr.s_addr.to_ne_bytes()))); + } + (libc::IPPROTO_IPV6, libc::IPV6_PKTINFO) => { + let pktinfo = unsafe { cmsg::decode::<libc::in6_pktinfo>(cmsg) }; diff --git a/games/jumpy/files/patch-wayland b/games/jumpy/files/patch-wayland new file mode 100644 index 000000000000..7773dc8f6b31 --- /dev/null +++ b/games/jumpy/files/patch-wayland @@ -0,0 +1,255 @@ +https://github.com/bevyengine/bevy/issues/4106 + +--- Cargo.lock.orig 2022-12-14 03:55:03 UTC ++++ Cargo.lock +@@ -1177,6 +1177,16 @@ checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f471 + checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" + + [[package]] ++name = "calloop" ++version = "0.9.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "bf2eec61efe56aa1e813f5126959296933cf0700030e4314786c48779a66ab82" ++dependencies = [ ++ "log", ++ "nix 0.22.3", ++] ++ ++[[package]] + name = "cc" + version = "1.0.77" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -1646,6 +1656,15 @@ dependencies = [ + ] + + [[package]] ++name = "dlib" ++version = "0.5.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" ++dependencies = [ ++ "libloading", ++] ++ ++[[package]] + name = "downcast-rs" + version = "1.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -2785,6 +2804,15 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203 + checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + + [[package]] ++name = "memmap2" ++version = "0.3.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "00b6c2ebff6180198788f5db08d7ce3bc1d0b617176678831a7510825973e357" ++dependencies = [ ++ "libc", ++] ++ ++[[package]] + name = "memoffset" + version = "0.6.5" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -3019,6 +3047,7 @@ dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "libc", ++ "memoffset", + ] + + [[package]] +@@ -3847,6 +3876,12 @@ dependencies = [ + ] + + [[package]] ++name = "scoped-tls" ++version = "1.0.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" ++ ++[[package]] + name = "scopeguard" + version = "1.1.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -3999,6 +4034,25 @@ dependencies = [ + ] + + [[package]] ++name = "smithay-client-toolkit" ++version = "0.15.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8a28f16a97fa0e8ce563b2774d1e732dd5d4025d2772c5dba0a41a0f90a29da3" ++dependencies = [ ++ "bitflags", ++ "calloop", ++ "dlib", ++ "lazy_static", ++ "log", ++ "memmap2", ++ "nix 0.22.3", ++ "pkg-config", ++ "wayland-client", ++ "wayland-cursor", ++ "wayland-protocols", ++] ++ ++[[package]] + name = "socket2" + version = "0.4.7" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -4622,6 +4676,78 @@ checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608 + checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + + [[package]] ++name = "wayland-client" ++version = "0.29.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" ++dependencies = [ ++ "bitflags", ++ "downcast-rs", ++ "libc", ++ "nix 0.24.2", ++ "scoped-tls", ++ "wayland-commons", ++ "wayland-scanner", ++ "wayland-sys", ++] ++ ++[[package]] ++name = "wayland-commons" ++version = "0.29.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" ++dependencies = [ ++ "nix 0.24.2", ++ "once_cell", ++ "smallvec", ++ "wayland-sys", ++] ++ ++[[package]] ++name = "wayland-cursor" ++version = "0.29.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" ++dependencies = [ ++ "nix 0.24.2", ++ "wayland-client", ++ "xcursor", ++] ++ ++[[package]] ++name = "wayland-protocols" ++version = "0.29.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" ++dependencies = [ ++ "bitflags", ++ "wayland-client", ++ "wayland-commons", ++ "wayland-scanner", ++] ++ ++[[package]] ++name = "wayland-scanner" ++version = "0.29.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "xml-rs", ++] ++ ++[[package]] ++name = "wayland-sys" ++version = "0.29.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" ++dependencies = [ ++ "dlib", ++ "pkg-config", ++] ++ ++[[package]] + name = "web-sys" + version = "0.3.60" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -4934,7 +5060,10 @@ dependencies = [ + "parking_lot 0.11.2", + "percent-encoding", + "raw-window-handle", ++ "smithay-client-toolkit", + "wasm-bindgen", ++ "wayland-client", ++ "wayland-protocols", + "web-sys", + "winapi", + "x11-dl", +@@ -4964,10 +5093,25 @@ dependencies = [ + ] + + [[package]] ++name = "xcursor" ++version = "0.3.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" ++dependencies = [ ++ "nom", ++] ++ ++[[package]] + name = "xi-unicode" + version = "0.3.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" ++ ++[[package]] ++name = "xml-rs" ++version = "0.8.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" + + [[package]] + name = "yasna" +--- Cargo.toml.orig 2022-12-14 03:55:03 UTC ++++ Cargo.toml +@@ -17,6 +17,7 @@ render = [ + [features] + default = ["render"] + render = [ ++ "bevy/wayland", + "bevy/x11", + "bevy/png", + "bevy/filesystem_watcher", +@@ -77,6 +78,7 @@ features = [ + version = "0.8" + default-features = false + features = [ ++ "wayland", + "x11", + "png", + "filesystem_watcher", +--- cargo-crates/bevy-0.8.1/Cargo.toml.orig 1970-01-01 00:00:00 UTC ++++ cargo-crates/bevy-0.8.1/Cargo.toml +@@ -1511,6 +1511,7 @@ default = [ + "png", + "hdr", + "vorbis", ++ "wayland", + "x11", + "filesystem_watcher", + ] +--- cargo-crates/bevy_winit-0.8.1/Cargo.toml.orig 1970-01-01 00:00:00 UTC ++++ cargo-crates/bevy_winit-0.8.1/Cargo.toml +@@ -53,7 +53,7 @@ default-features = false + default-features = false + + [features] +-wayland = ["winit/wayland"] ++wayland = ["winit/wayland", "winit/wayland-dlopen"] + x11 = ["winit/x11"] + + [target."cfg(target_arch = \"wasm32\")".dependencies.crossbeam-channel] |