File project.diff of Package ffmpeg-5

--- ffmpeg-5.spec.orig
+++ ffmpeg-5.spec
@@ -43,6 +43,9 @@
 %preamble_string ffmpeg-private-devel %comparator %conflicts_version \
 %nil
 
+# enable all ffmpeg codecs
+%define BUILD_ORIG 1
+
 %if 0%{?BUILD_ORIG}
 %bcond_without amf_sdk
 %bcond_without cuda_sdk
@@ -130,11 +133,18 @@ Patch98:        ffmpeg-Templatify-ff_gau
 Patch99:        ffmpeg-CVE-2023-50009.patch
 Patch100:       ffmpeg-CVE-2023-50010.patch
 %if %{with amf_sdk}
+%if ( ! 0%{?is_opensuse} ) || 0%{?sle_version} >= 150300
 BuildRequires:  AMF-devel
 %endif
+%endif
 BuildRequires:  ladspa-devel
+%if 0%{?is_opensuse}
 BuildRequires:  libgsm-devel
 BuildRequires:  libmp3lame-devel
+%else
+BuildRequires:  gsm-devel
+BuildRequires:  lame-devel
+%endif
 %if %{with mysofa}
 BuildRequires:  libmysofa-devel
 %endif
@@ -151,9 +161,11 @@ BuildRequires:  pkgconfig(bzip2)
 %if %{with codec2}
 BuildRequires:  pkgconfig(codec2)
 %endif
-%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
+%if ( ! 0%{?is_opensuse} ) || 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
+%ifnarch %ix86
 BuildRequires:  pkgconfig(dav1d)
 %endif
+%endif
 BuildRequires:  pkgconfig(ffnvcodec)
 BuildRequires:  pkgconfig(fontconfig) >= 2.4.2
 BuildRequires:  pkgconfig(freetype2)
@@ -177,10 +189,14 @@ BuildRequires:  pkgconfig(libssh)
 BuildRequires:  pkgconfig(libva) >= 0.35.0
 BuildRequires:  pkgconfig(libva-drm)
 BuildRequires:  pkgconfig(libva-x11)
+%if %{with vmaf}
 BuildRequires:  pkgconfig(libvmaf) >= 1.3.9
+%endif
 BuildRequires:  pkgconfig(libwebp) >= 0.4
 BuildRequires:  pkgconfig(libxml-2.0)
+%ifnarch %ix86
 BuildRequires:  pkgconfig(libzmq)
+%endif
 BuildRequires:  pkgconfig(lilv-0)
 BuildRequires:  pkgconfig(ogg)
 BuildRequires:  pkgconfig(opus)
@@ -474,7 +490,6 @@ This subpackage contains the headers for
 Summary:        FFmpeg software resampling library
 Group:          System/Libraries
 Requires:       libavutil57 = %version-%release
-Obsoletes:      libswresample4 < %version-%release
 
 %description -n libswresample4_ff5
 The libswresample library performs audio conversion between different
@@ -549,13 +564,15 @@ break compatibility without any notice.
 %ifarch %ix86 %arm
 %define _lto_cflags %nil
 %endif
+%if 0%{?fedora}
+%define _lto_cflags %nil
+%endif
 %if "%_lto_cflags" != ""
 %global _lto_cflags %_lto_cflags -ffat-lto-objects
 %endif
 CFLAGS="%optflags" \
-%if %suse_version > 1500
-%ifarch %ix86
-%else
+%if 0%{?is_opensuse} && 0%{?suse_version} > 1500
+%ifnarch %ix86
 LDFLAGS="%_lto_cflags" \
 %endif
 %endif
@@ -571,6 +588,10 @@ LDFLAGS="%_lto_cflags" \
 	--disable-stripping \
 	--enable-shared \
 	--disable-static \
+%if 0%{?fedora}
+    --extra-ldflags="%{?__global_ldflags}" \
+	--disable-debug \
+%endif
 	--enable-gpl \
 	--enable-version3 \
 %if %{with smbclient}
@@ -596,9 +617,11 @@ LDFLAGS="%_lto_cflags" \
 %if %{with codec2}
 	--enable-libcodec2 \
 %endif
-%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
+%if ( ! 0%{?is_opensuse} ) || 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
+%ifnarch %ix86
 	--enable-libdav1d \
 %endif
+%endif
 	--enable-libdc1394 \
 	--enable-libdrm \
 	--enable-libfontconfig \
@@ -638,17 +661,20 @@ LDFLAGS="%_lto_cflags" \
 %if %{with vidstab}
 	--enable-libvidstab \
 %endif
+%if %{with vmaf}
 	--enable-libvmaf \
+%endif
 	--enable-libvorbis \
 	--enable-libvpx \
 	--enable-libwebp \
 	--enable-libxml2 \
 	--enable-libzimg \
+%ifnarch %ix86
 	--enable-libzmq \
+%endif
 	--enable-libzvbi \
 %if 0%{?suse_version} > 1500
-%ifarch %ix86
-%else
+%ifnarch %ix86
 	--enable-lto \
 %endif
 %endif
@@ -719,14 +745,22 @@ for i in libavformat/options_table.h lib
 	cp -a $i "$b/%_includedir/ffmpeg/private/$i"
 done
 
-%ldconfig_scriptlets -n libavcodec59
-%ldconfig_scriptlets -n libavdevice59
-%ldconfig_scriptlets -n libavfilter8
-%ldconfig_scriptlets -n libavformat59
-%ldconfig_scriptlets -n libavutil57
-%ldconfig_scriptlets -n libpostproc56
-%ldconfig_scriptlets -n libswresample4_ff5
-%ldconfig_scriptlets -n libswscale6
+%post   -n libavcodec59 -p /sbin/ldconfig
+%postun -n libavcodec59 -p /sbin/ldconfig
+%post   -n libavdevice59 -p /sbin/ldconfig
+%postun -n libavdevice59 -p /sbin/ldconfig
+%post   -n libavfilter8 -p /sbin/ldconfig
+%postun -n libavfilter8 -p /sbin/ldconfig
+%post   -n libavformat59 -p /sbin/ldconfig
+%postun -n libavformat59 -p /sbin/ldconfig
+%post   -n libavutil57 -p /sbin/ldconfig
+%postun -n libavutil57 -p /sbin/ldconfig
+%post   -n libpostproc56 -p /sbin/ldconfig
+%postun -n libpostproc56 -p /sbin/ldconfig
+%post   -n libswresample4_ff5 -p /sbin/ldconfig
+%postun -n libswresample4_ff5 -p /sbin/ldconfig
+%post   -n libswscale6 -p /sbin/ldconfig
+%postun -n libswscale6 -p /sbin/ldconfig
 
 %files
 %doc Changelog CREDITS README.md
openSUSE Build Service is sponsored by