From 612c485103ee7c13d34e822cbd59776a13dcdf8b Mon Sep 17 00:00:00 2001 From: "Jason E. Hale" Date: Thu, 14 Nov 2024 21:01:28 -0500 Subject: [PATCH] multimedia/gstreamer1-plugins-rust: Fix build on i386 Ring assumes SSE and SSE2 are available on i386. This workaround assumes the same, so the build will still fail on ancient hardware without these instruction sets. error[E0080]: evaluation of constant value failed --> /wrkdirs/usr/ports/multimedia/gstreamer1-plugins-rust/work/gst-plugins-rs-0.13.3/cargo-crates/ring-0.17.8/src/cpu/intel.rs:28:9 | 28 | assert!(cfg!(target_feature = "sse") && cfg!(target_feature = "sse2")); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: cfg!(target_feature = "sse") && cfg!(target_feature = "sse2")', /wrkdirs/usr/ports/multimedia/gstreamer1-plugins-rust/work/gst-plugins-rs-0.13.3/cargo-crates/ring-0.17.8/src/cpu/intel.rs:28:9 Reported by: pkg-fallout --- multimedia/gstreamer1-plugins-rust/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/multimedia/gstreamer1-plugins-rust/Makefile b/multimedia/gstreamer1-plugins-rust/Makefile index 44263e9d46d1..3e1a026f9629 100644 --- a/multimedia/gstreamer1-plugins-rust/Makefile +++ b/multimedia/gstreamer1-plugins-rust/Makefile @@ -41,6 +41,11 @@ LTO_UNSAFE= yes CARGO_ENV+= CARGO_PROFILE_RELEASE_LTO=false .endif +.if ${MACHINE_ARCH} == i386 +# https://github.com/briansmith/ring/issues/1832 +RUSTFLAGS+= -C target-feature=+sse,+sse2 +.endif + OPTIONS_DEFINE= ASM CAIRO CSOUND DAV1D GTK4 PANGO SODIUM WEBP OPTIONS_DEFAULT= ASM CAIRO CSOUND DAV1D GTK4 PANGO SODIUM WEBP OPTIONS_EXCLUDE_aarch64= CSOUND # https://github.com/neithanmo/csound-rs/commit/8962b89d7bda