summaryrefslogtreecommitdiff
path: root/x11/awww/files
diff options
context:
space:
mode:
Diffstat (limited to 'x11/awww/files')
-rw-r--r--x11/awww/files/patch-daemon_src_wallpaper.rs63
-rw-r--r--x11/awww/files/patch-doc_gen.sh11
2 files changed, 74 insertions, 0 deletions
diff --git a/x11/awww/files/patch-daemon_src_wallpaper.rs b/x11/awww/files/patch-daemon_src_wallpaper.rs
new file mode 100644
index 0000000..b24020b
--- /dev/null
+++ b/x11/awww/files/patch-daemon_src_wallpaper.rs
@@ -0,0 +1,63 @@
+--- daemon/src/wallpaper.rs.orig 2026-04-25 17:08:32 UTC
++++ daemon/src/wallpaper.rs
+@@ -312,25 +312,42 @@ impl Wallpaper {
+ cache.resize, cache.filter, cache.img_path
+ );
+ common::log::debug!("{}", cmd);
+- match unsafe { rustix::runtime::kernel_fork() } {
+- Ok(rustix::runtime::Fork::Child(_)) => {
+- let args: [*const u8; 4] = [
+- c"sh".as_ptr().cast(),
+- c"-c".as_ptr().cast(),
+- cmd.as_ptr(),
+- core::ptr::null(),
+- ];
+- let err = unsafe {
+- rustix::runtime::execve(
+- c"/bin/sh",
+- args.as_ptr(),
+- environ as *const _,
+- )
+- };
+- panic!("execve failed: {err}");
++ #[cfg(target_os = "linux")]
++ {
++ match unsafe { rustix::runtime::kernel_fork() } {
++ Ok(rustix::runtime::Fork::Child(_)) => {
++ let args: [*const u8; 4] = [
++ c"sh".as_ptr().cast(),
++ c"-c".as_ptr().cast(),
++ cmd.as_ptr(),
++ core::ptr::null(),
++ ];
++ let err = unsafe {
++ rustix::runtime::execve(
++ c"/bin/sh",
++ args.as_ptr(),
++ environ as *const _,
++ )
++ };
++ panic!("execve failed: {err}");
++ }
++ Ok(rustix::runtime::Fork::ParentOf(_)) => (),
++ Err(e) => error!("fork failed: {e}"),
+ }
+- Ok(rustix::runtime::Fork::ParentOf(_)) => (),
+- Err(e) => error!("fork failed: {e}"),
++ }
++ #[cfg(not(target_os = "linux"))]
++ {
++ use std::process::Command;
++
++ let cmd_str = cmd.trim_end_matches('\0');
++ match Command::new("/bin/sh")
++ .arg("-c")
++ .arg(cmd_str)
++ .spawn()
++ {
++ Ok(_) => {}
++ Err(e) => error!("fork/exec failed: {e}"),
++ }
+ }
+ }
+ Ok(None) => break 'brk,
diff --git a/x11/awww/files/patch-doc_gen.sh b/x11/awww/files/patch-doc_gen.sh
new file mode 100644
index 0000000..f22fe7c
--- /dev/null
+++ b/x11/awww/files/patch-doc_gen.sh
@@ -0,0 +1,11 @@
+--- doc/gen.sh.orig 2026-04-25 17:08:32 UTC
++++ doc/gen.sh
+@@ -18,7 +18,7 @@ for FILE in "$DIR"/*scd; do
+ fi
+
+ for FILE in "$DIR"/*scd; do
+- GEN="$GEN_DIR"/"$(basename -s .scd "$FILE")"
++ GEN="$GEN_DIR"/"$(basename "$FILE" .scd)"
+ printf "generating %s..." "$GEN"
+ scdoc < "$FILE" > "$GEN"
+ printf " ...done!\n"