From 9e07ca75f4852baa544f52585362973316e362cc Mon Sep 17 00:00:00 2001 From: Daniel Martinez Date: Tue, 7 Nov 2023 08:16:32 -0500 Subject: [PATCH] New package: swww-0.9.1 --- srcpkgs/swww/patches/i686.patch | 60 +++++++++++++++++++++++++++++++++ srcpkgs/swww/template | 33 ++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 srcpkgs/swww/patches/i686.patch create mode 100644 srcpkgs/swww/template diff --git a/srcpkgs/swww/patches/i686.patch b/srcpkgs/swww/patches/i686.patch new file mode 100644 index 00000000000000..834f81659e38fe --- /dev/null +++ b/srcpkgs/swww/patches/i686.patch @@ -0,0 +1,60 @@ +diff --git a/utils/src/compression/comp/sse2.rs b/utils/src/compression/comp/sse2.rs +index 9c291dd..f69fd82 100644 +--- a/utils/src/compression/comp/sse2.rs ++++ b/utils/src/compression/comp/sse2.rs +@@ -4,6 +4,9 @@ + #[inline] + #[target_feature(enable = "sse2")] + unsafe fn count_equals(s1: &[u8], s2: &[u8], mut i: usize) -> usize { ++ #[cfg(target_arch = "x86")] ++ use std::arch::x86 as intr; ++ #[cfg(target_arch = "x86_64")] + use std::arch::x86_64 as intr; + let mut equals = 0; + while i + 15 < s1.len() { +@@ -39,6 +42,9 @@ unsafe fn count_equals(s1: &[u8], s2: &[u8], mut i: usize) -> usize { + #[inline] + #[target_feature(enable = "sse2")] + unsafe fn count_different(s1: &[u8], s2: &[u8], mut i: usize) -> usize { ++ #[cfg(target_arch = "x86")] ++ use std::arch::x86 as intr; ++ #[cfg(target_arch = "x86_64")] + use std::arch::x86_64 as intr; + let mut diff = 0; + while i + 15 < s1.len() { +diff --git a/utils/src/compression/cpu.rs b/utils/src/compression/cpu.rs +index 8113631..537124d 100644 +--- a/utils/src/compression/cpu.rs ++++ b/utils/src/compression/cpu.rs +@@ -30,7 +30,7 @@ pub(super) fn init() { + ONCE_INIT.call_once(|| unsafe { features::init() }); + } + +-#[cfg(target_arch = "x86_64")] ++#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] + pub mod features { + decl_feature!(SSE2, sse2); + decl_feature!(SSSE3, ssse3); +@@ -49,7 +49,7 @@ pub mod features { + } + } + +-#[cfg(not(target_arch = "x86_64"))] ++#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] + pub mod features { + + /// UNIMPLEMENTED!!! This function must exist so that the init function in super compiles on +diff --git a/utils/src/compression/decomp/ssse3.rs b/utils/src/compression/decomp/ssse3.rs +index 6b616fe..3992230 100644 +--- a/utils/src/compression/decomp/ssse3.rs ++++ b/utils/src/compression/decomp/ssse3.rs +@@ -1,6 +1,9 @@ + #[inline] + #[target_feature(enable = "ssse3")] + pub(super) unsafe fn unpack_bytes_4channels(buf: &mut [u8], diff: &[u8]) { ++ #[cfg(target_arch = "x86")] ++ use std::arch::x86 as intr; ++ #[cfg(target_arch = "x86_64")] + use std::arch::x86_64 as intr; + + // The final bytes are just padding to prevent us from going out of bounds diff --git a/srcpkgs/swww/template b/srcpkgs/swww/template new file mode 100644 index 00000000000000..ad0b414eb1b637 --- /dev/null +++ b/srcpkgs/swww/template @@ -0,0 +1,33 @@ +# Template file for 'swww' +pkgname=swww +version=0.9.1 +revision=1 +build_style=cargo +hostmakedepends="scdoc pkg-config" +makedepends="liblz4-devel" +short_desc="Solution to your Wayland Wallpaper Woes" +maintainer="Daniel Martinez " +license="GPL-3.0-only" +homepage="https://github.com/LGFae/swww" +changelog="https://raw.githubusercontent.com/LGFae/swww/v${version}/CHANGELOG.md" +distfiles="https://github.com/LGFae/swww/archive/refs/tags/v${version}.tar.gz" +checksum=c1f6cf2ccd4878e9cb5b6c6412494120535227516d3749694ac4e75ec68e0547 + +post_build() { + ./doc/gen.sh +} + +# overriding do_install(), since by default it will pointlessly rebuild the package again +do_install() { + + vbin target/${RUST_TARGET}/release/swww + vbin target/${RUST_TARGET}/release/swww-daemon + + for doc in doc/generated/*; do + vman $doc + done + + vcompletion completions/swww.bash bash + vcompletion completions/swww.fish fish + vcompletion completions/_swww zsh +}