diff --git a/_constraints b/_constraints
new file mode 100644
index 0000000..5dc7766
--- /dev/null
+++ b/_constraints
@@ -0,0 +1,7 @@
+
+
+
+ 12
+
+
+
diff --git a/gstreamer-plugins-rs.changes b/gstreamer-plugins-rs.changes
index 392e96f..b8dadda 100644
--- a/gstreamer-plugins-rs.changes
+++ b/gstreamer-plugins-rs.changes
@@ -1,3 +1,22 @@
+-------------------------------------------------------------------
+Thu Dec 24 13:28:20 UTC 2020 - Bjørn Lie
+
+- Enable build of dav1d plugin, do this via:
+ + Disable LTO via macro.
+ + Add clang and pkgconfig(dav1d) BuildRequires.
+ + No longer pass dav1d=disabled to meson, nor remove dav1d from
+ cargo.toml via sed call.
+- Add pkgconfig(libsodium) BuildRequires and pass sodium=system to
+ meson, do not use package internal version of sodium.
+- Drop pkgconfig(gtk+-3.0) BuildRequires, not needed.
+- Add pkgconfig(pango) BuildRequires: Mandatory, previously pulled
+ in by pkgconfig(gtk+-3.0), and add optional nasm BuildRequires.
+- Drop gcc-c++ BuildRequires, no longer needed, nor used.
+- Replace llvm-devel with llvm BuildRequires, this is sufficent.
+- Do general cleanup of spec, make package ready for submit to TW.
+ Use normal meson macros.
+- Add _constraints, ensure the build have enough harddisk space.
+
-------------------------------------------------------------------
Tue Dec 1 11:28:33 UTC 2020 - Antonio Larrosa
diff --git a/gstreamer-plugins-rs.spec b/gstreamer-plugins-rs.spec
index f1261ce..4bf55ae 100644
--- a/gstreamer-plugins-rs.spec
+++ b/gstreamer-plugins-rs.spec
@@ -16,8 +16,8 @@
#
-%global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
-%define gstreamer_req_version %(echo %{version} | sed -e "s/+.*//")
+# dav1d plugin fails to build with lto enabled
+%define _lto_cflags %{nil}
%define _name gstreamer-plugins-rs
%define gst_branch 1.0
@@ -29,28 +29,33 @@ Summary: GStreamer Streaming-Media Framework Plug-Ins
License: LGPL-2.1-or-later
Group: Productivity/Multimedia/Other
URL: https://gstreamer.freedesktop.org/
+
Source0: %{_name}-%{version}.tar.xz
Source1: vendor.tar.xz
Source2: cargo_config
Source3: gstreamer-plugins-rs.appdata.xml
Source99: baselibs.conf
+
BuildRequires: cargo
+BuildRequires: clang
BuildRequires: csound-devel
-BuildRequires: gcc-c++
-BuildRequires: llvm-devel
+BuildRequires: llvm
BuildRequires: meson >= 0.47.0
+BuildRequires: nasm
BuildRequires: pkgconfig
BuildRequires: rust >= 1.40
BuildRequires: rust-packaging
BuildRequires: rust-std
BuildRequires: pkgconfig(cairo) >= 1.10.0
-BuildRequires: pkgconfig(gstreamer-1.0) >= %{gstreamer_req_version}
-BuildRequires: pkgconfig(gstreamer-base-1.0) >= %{gstreamer_req_version}
-BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) >= %{gstreamer_req_version}
-BuildRequires: pkgconfig(gtk+-3.0) >= 3.15.0
+BuildRequires: pkgconfig(dav1d)
+BuildRequires: pkgconfig(gstreamer-1.0)
+BuildRequires: pkgconfig(gstreamer-base-1.0)
+BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
+BuildRequires: pkgconfig(libsodium)
BuildRequires: pkgconfig(openssl)
-Requires: gstreamer >= %{gstreamer_req_version}
-Requires: gstreamer-plugins-base >= %{gstreamer_req_version}
+BuildRequires: pkgconfig(pango)
+Requires: gstreamer
+Requires: gstreamer-plugins-base
Enhances: gstreamer
%description
@@ -58,7 +63,8 @@ GStreamer is a streaming media framework based on graphs of filters
that operate on media data. Applications using this library can do
anything media-related, from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
-processing capabilities can be added simply by installing new plug-ins.
+processing capabilities can be added simply by installing new
+plug-ins.
%prep
%autosetup -n %{_name}-%{version} -p1
@@ -67,30 +73,18 @@ processing capabilities can be added simply by installing new plug-ins.
%define cargo_registry $(pwd)/vendor
mkdir .cargo
cp %{SOURCE2} .cargo/config
-sed -i -e "/video\/dav1d/d" Cargo.toml
-
-
-
-#translation-update-upstream po gst-plugins-good-%%{gst_branch}
%build
-#export CARGO_HOME=$PWD/vendor
-export RUSTFLAGS=%{rustflags}
export CSOUND_LIB_DIR=%{_libdir}
%meson \
- -Dpackage-name='openSUSE GStreamer-plugins-rs package' \
- -Dpackage-origin='http://download.opensuse.org' \
- -Ddav1d=disabled
+ -Ddav1d=auto \
+ -Dsodium=system \
+ -Dcsound=auto \
%{nil}
-#/usr/bin/meson compile -C build -j1 --verbose
-cd %_vpath_builddir
-%{cargo_build}
+%meson_build
%install
-export RUSTFLAGS=%{rustflags}
-mkdir -p %{buildroot}%{_libdir}/gstreamer-%{gst_branch}/
-cp target/release/*.so %{buildroot}%{_libdir}/gstreamer-%{gst_branch}/
-
+%meson_install
mkdir -p %{buildroot}%{_datadir}/appdata
cp %{SOURCE3} %{buildroot}%{_datadir}/appdata/
@@ -101,6 +95,7 @@ cp %{SOURCE3} %{buildroot}%{_datadir}/appdata/
%{_libdir}/gstreamer-%{gst_branch}/libgstcdg.so
%{_libdir}/gstreamer-%{gst_branch}/libgstclaxon.so
%{_libdir}/gstreamer-%{gst_branch}/libgstcsound.so
+%{_libdir}/gstreamer-%{gst_branch}/libgstrsdav1d.so
%{_libdir}/gstreamer-%{gst_branch}/libgstfallbackswitch.so
%{_libdir}/gstreamer-%{gst_branch}/libgstgif.so
%{_libdir}/gstreamer-%{gst_branch}/libgstlewton.so
@@ -112,12 +107,10 @@ cp %{SOURCE3} %{buildroot}%{_datadir}/appdata/
%{_libdir}/gstreamer-%{gst_branch}/libgstrsflv.so
%{_libdir}/gstreamer-%{gst_branch}/libgstrspng.so
%{_libdir}/gstreamer-%{gst_branch}/libgstrstextwrap.so
-%{_libdir}/gstreamer-%{gst_branch}/libgstrstutorial.so
%{_libdir}/gstreamer-%{gst_branch}/libgstrusoto.so
%{_libdir}/gstreamer-%{gst_branch}/libgstsodium.so
%{_libdir}/gstreamer-%{gst_branch}/libgstthreadshare.so
%{_libdir}/gstreamer-%{gst_branch}/libgsttogglerecord.so
-
%dir %{_datadir}/appdata
%{_datadir}/appdata/gstreamer-plugins-rs.appdata.xml