From e432195a3c4c466417da05a016b878e2e79f0839 Mon Sep 17 00:00:00 2001 From: vascom Date: Sun, 7 Feb 2021 11:10:55 +0300 Subject: [PATCH] Fix build with GCC 11. Remove gstreamer plugin since it is now in gstreamer1-plugins-bad-freeworld package. --- cmake.patch | 27 +++++++++++++++++++++++++++ svt-hevc-build.patch | 34 ---------------------------------- svt-hevc.spec | 31 +++++++------------------------ 3 files changed, 34 insertions(+), 58 deletions(-) create mode 100644 cmake.patch delete mode 100644 svt-hevc-build.patch diff --git a/cmake.patch b/cmake.patch new file mode 100644 index 0000000..7f619f6 --- /dev/null +++ b/cmake.patch @@ -0,0 +1,27 @@ +diff -uNdr SVT-HEVC-1.5.0_old/CMakeLists.txt SVT-HEVC-1.5.0_new/CMakeLists.txt +--- SVT-HEVC-1.5.0_old/CMakeLists.txt 2020-08-04 00:57:25.000000000 +0300 ++++ SVT-HEVC-1.5.0_new/CMakeLists.txt 2021-02-07 10:58:15.333859295 +0300 +@@ -100,11 +100,9 @@ + -Wformat-security + -fPIE + -fPIC +- -D_FORTIFY_SOURCE=2 +- /GS +- /sdl) ++ -D_FORTIFY_SOURCE=2) + if(MSVC) +- list(APPEND flags_to_test /MP) ++ list(APPEND flags_to_test /MP /GS /sdl) + else() + option(NATIVE "Build for native performance (march=native)") + list(INSERT flags_to_test 0 -Wall) +@@ -119,8 +117,7 @@ + endif() + endif() + set(release_flags_to_test +- -O2 +- -O3) ++ -O2) + set(debug_flags_to_test + -O0) + diff --git a/svt-hevc-build.patch b/svt-hevc-build.patch deleted file mode 100644 index a972876..0000000 --- a/svt-hevc-build.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -uNdr SVT-HEVC-1.4.3_orig/CMakeLists.txt SVT-HEVC-1.4.3/CMakeLists.txt ---- SVT-HEVC-1.4.3_orig/CMakeLists.txt 2019-12-14 23:28:40.000000000 +0300 -+++ SVT-HEVC-1.4.3/CMakeLists.txt 2019-12-30 11:09:01.437899907 +0300 -@@ -119,8 +119,7 @@ - endif() - endif() - set(release_flags_to_test -- -O2 -- -O3) -+ -O2) - set(debug_flags_to_test - -O0) - -diff -uNdr SVT-HEVC-1.4.3_orig/gstreamer-plugin/meson.build SVT-HEVC-1.4.3/gstreamer-plugin/meson.build ---- SVT-HEVC-1.4.3_orig/gstreamer-plugin/meson.build 2019-12-14 23:28:40.000000000 +0300 -+++ SVT-HEVC-1.4.3/gstreamer-plugin/meson.build 2019-12-30 11:09:01.446899587 +0300 -@@ -17,7 +17,6 @@ - plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir')) - - # common meson configuration --svthevcenc_dep = dependency('SvtHevcEnc') - - cc = meson.get_compiler('c') - cc_flags = [ -@@ -47,7 +46,7 @@ - - gstSvtHevcEnc = library('gstsvthevcenc', - 'gstsvthevcenc.c', -- dependencies: [gstbase_dep, gstpbutils_dep , gstvideo_dep, svthevcenc_dep], -- install: true, -+ dependencies: [gstbase_dep, gstpbutils_dep , gstvideo_dep], -+ install: true, include_directories : include_directories('../Source/API'), link_args : '-lSvtHevcEnc', - install_dir: plugins_install_dir - ) diff --git a/svt-hevc.spec b/svt-hevc.spec index 4dc384c..31483f6 100644 --- a/svt-hevc.spec +++ b/svt-hevc.spec @@ -2,21 +2,19 @@ Name: svt-hevc Version: 1.5.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Scalable Video Technology for HEVC Encoder License: BSD-2-Clause-Patent URL: https://github.com/OpenVisualCloud/SVT-HEVC Source0: %url/archive/v%{version}/SVT-HEVC-%{version}.tar.gz -# Correct build flags and gstreamer plugin -Patch0: svt-hevc-build.patch +# Correct build flags +Patch0: cmake.patch BuildRequires: gcc BuildRequires: cmake BuildRequires: yasm BuildRequires: meson -BuildRequires: gstreamer1-devel -BuildRequires: gstreamer1-plugins-base-devel Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -41,13 +39,6 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel Include files and mandatory libraries for development svt-hevc. -%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. - %prep %autosetup -p1 -n SVT-HEVC-%{version} @@ -60,18 +51,9 @@ This package provides %{name}-based GStreamer plug-in. %ninja_build -C %{_target_platform} -pushd gstreamer-plugin - export LIBRARY_PATH="$PWD/../Bin/Release:$LIBRARY_PATH" - %meson - %meson_build -popd - %install %ninja_install -C %{_target_platform} -pushd gstreamer-plugin - %meson_install -popd %files %{_bindir}/SvtHevcEncApp @@ -86,10 +68,11 @@ popd %{_libdir}/libSvtHevcEnc.so %{_libdir}/pkgconfig/*.pc -%files -n gstreamer1-%{name} -%{_libdir}/gstreamer-1.0/libgstsvthevcenc.so - %changelog +* Sun Feb 07 2021 Vasiliy Glazov - 1.5.0-4 +- Fix build for GCC 11 +- Remove gstreamer plugin + * Thu Feb 04 2021 RPM Fusion Release Engineering - 1.5.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild