diff --git a/srcpkgs/gst-plugins-rs1/patches/0002-dylib.patch b/srcpkgs/gst-plugins-rs1/patches/0002-dylib.patch new file mode 100644 index 00000000000..20f1aad179f --- /dev/null +++ b/srcpkgs/gst-plugins-rs1/patches/0002-dylib.patch @@ -0,0 +1,16 @@ +cargo-c defaults to static on musl, we want dynamic. + +Source: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/gst-plugins-rs/0002-dylib.patch + +diff --git a/cargo_wrapper.py b/cargo_wrapper.py +index 641edc8..4859b6b 100644 +--- a/cargo_wrapper.py ++++ b/cargo_wrapper.py +@@ -111,6 +111,7 @@ if __name__ == "__main__": + cargo_cmd += ['build'] + else: + cargo_cmd += ['cbuild'] ++ cargo_cmd += ['--library-type=cdylib'] + if not opts.disable_doc: + features += ['doc'] + if opts.target == 'release': diff --git a/srcpkgs/gst-plugins-rs1/template b/srcpkgs/gst-plugins-rs1/template new file mode 100644 index 00000000000..efdef8663ef --- /dev/null +++ b/srcpkgs/gst-plugins-rs1/template @@ -0,0 +1,26 @@ +# Template file for 'gst-plugins-rs1' +pkgname=gst-plugins-rs1 +version=0.13.4 +revision=1 +build_style=meson +build_helper=rust +configure_args="-Ddoc=disabled" +hostmakedepends="pkg-config gettext glib-devel cargo cargo-c" +makedepends="rust-std gstreamer1-devel gst-plugins-base1-devel gst-plugins-bad1-devel + openssl-devel libsodium-devel gtk4-devel pango-devel libwebp-devel libdav1d-devel" +short_desc="GStreamer plugins and elements written in the Rust programming language" +maintainer="oreo639 " +license="LGPL-2.1-or-later, MIT, Apache-2.0, MPL-2.0" +homepage="https://gstreamer.freedesktop.org" +distfiles="https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/archive/${version}/gst-plugins-rs-${version}.tar.gz" +checksum=547ac671c3c5ac4b7ee0b3c7ae5c89084abe15848ba4d15967f0fc38746bc06b +make_check=no # TODO: Meson check times-out while tests are compiling + +pre_configure() { + # Otherwise results in --sysroot being duplicated on cross-compile, which we don't want + vsed -i cargo_wrapper.py -e "s/env\['RUSTFLAGS'\] =.*//g" +} + +post_install() { + vlicense LICENSE-MIT +}