public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/svt-av1] epel9-next: Conditionally restore the gstreamer plugin for RHEL
@ 2026-07-20 16:12 Neal Gompa
  0 siblings, 0 replies; only message in thread
From: Neal Gompa @ 2026-07-20 16:12 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/svt-av1
            Branch : epel9-next
            Commit : 0b8bbd13b50fb6a338dae852da386ef361753a7e
            Author : Neal Gompa <ngompa@fedoraproject.org>
            Date   : 2025-01-10T11:40:35-05:00
            Stats  : +47/-0 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/svt-av1/c/0b8bbd13b50fb6a338dae852da386ef361753a7e?branch=epel9-next

            Log:
            Conditionally restore the gstreamer plugin for RHEL

The plugin isn't part of GStreamer shipped in RHEL, so it still
needs to be built for that case.

---
diff --git a/svt-av1.spec b/svt-av1.spec
index d0c75b0..7caff85 100644
--- a/svt-av1.spec
+++ b/svt-av1.spec
@@ -1,3 +1,5 @@
+%bcond gst_plugin %[0%{?rhel}]
+
 %global _description %{expand:
 The Scalable Video Technology for AV1 Encoder (SVT-AV1 Encoder) is an
 AV1-compliant encoder library core. The SVT-AV1 development is a
@@ -27,6 +29,11 @@ BuildRequires:  gcc-c++
 BuildRequires:  help2man
 BuildRequires:  meson
 BuildRequires:  nasm
+%if %{with gst_plugin}
+BuildRequires:  pkgconfig(gstreamer-1.0)
+BuildRequires:  pkgconfig(gstreamer-base-1.0)
+BuildRequires:  pkgconfig(gstreamer-video-1.0)
+%endif
 
 Requires:       %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
 
@@ -34,7 +41,9 @@ Requires:       %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
 
 %package    libs
 Summary:    SVT-AV1 libraries
+%if ! %{with gst_plugin}
 Obsoletes:  gstreamer1-%{name} < %{?epoch:%{epoch}:}%{version}-%{release}
+%endif
 
 %description libs %_description
 
@@ -57,14 +66,39 @@ BuildArch:  noarch
 
 This package contains the documentation for development of SVT-AV1.
 
+%if %{with gst_plugin}
+%package -n     gstreamer1-%{name}
+Summary:        GStreamer 1.0 %{name}-based plug-in
+Requires:       gstreamer1-plugins-base%{?_isa}
+
+%description -n gstreamer1-%{name}
+This package provides %{name}-based GStreamer plug-in.
+%endif
+
 %prep
 %autosetup -p1 -n SVT-AV1-v%{version}
 
+%if %{with gst_plugin}
+# Patch build gstreamer plugin
+sed -e "s|install: true,|install: true, include_directories : [ include_directories('../Source/API') ], link_args : '-lSvtAv1Enc',|" \
+-e "/svtav1enc_dep =/d" -e 's|, svtav1enc_dep||' -e "s|svtav1enc_dep.found()|true|" -i gstreamer-plugin/meson.build
+%endif
+
+
 %build
 %cmake \
         -DCMAKE_BUILD_TYPE=RelWithDebInfo
 %cmake_build
 
+%if %{with gst_plugin}
+export LIBRARY_PATH="$LIBRARY_PATH:$(pwd)/Bin/RelWithDebInfo"
+pushd gstreamer-plugin
+%meson
+%meson_build
+popd
+%endif
+
+
 %install
 %cmake_install
 rm -f %{buildroot}%{_libdir}/*.{a,la}
@@ -74,6 +108,13 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir}
 help2man -N --help-option=-help --version-string=%{version} %{buildroot}%{_bindir}/SvtAv1DecApp > %{buildroot}%{_mandir}/man1/SvtAv1DecApp.1
 help2man -N --help-option=-help --no-discard-stderr --version-string=%{version} %{buildroot}%{_bindir}/SvtAv1EncApp > %{buildroot}%{_mandir}/man1/SvtAv1EncApp.1
 
+%if %{with gst_plugin}
+pushd gstreamer-plugin
+%meson_install
+popd
+%endif
+
+
 %files
 %{_bindir}/SvtAv1DecApp
 %{_bindir}/SvtAv1EncApp
@@ -97,5 +138,11 @@ help2man -N --help-option=-help --no-discard-stderr --version-string=%{version} 
 %license LICENSE.md PATENTS.md
 %doc Docs
 
+%if %{with gst_plugin}
+%files -n gstreamer1-%{name}
+%license LICENSE.md PATENTS.md
+%{_libdir}/gstreamer-1.0/libgstsvtav1enc.so
+%endif
+
 %changelog
 %autochangelog

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-20 16:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-20 16:12 [rpms/svt-av1] epel9-next: Conditionally restore the gstreamer plugin for RHEL Neal Gompa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox