commit 5d0d91fc714993ce3ddff82362cdbab63f51e736
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Mon Sep 5 01:05:59 2022 +0100
Switch to compat-ffmpeg4
fix_ffmpeg_suffix.patch | 11 +++++++++++
vcmi.spec | 7 ++++---
2 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/fix_ffmpeg_suffix.patch b/fix_ffmpeg_suffix.patch
new file mode 100644
index 0000000..a8f076d
--- /dev/null
+++ b/fix_ffmpeg_suffix.patch
@@ -0,0 +1,11 @@
+--- a/cmake_modules/FindFFmpeg.cmake
++++ b/cmake_modules/FindFFmpeg.cmake
+@@ -79,7 +79,7 @@ macro(find_component _component _pkgconf
+ ${PC_LIB${_component}_INCLUDEDIR}
+ ${PC_LIB${_component}_INCLUDE_DIRS}
+ PATH_SUFFIXES
+- ffmpeg
++ compat-ffmpeg4
+ )
+
+ find_library(${_component}_LIBRARIES NAMES ${_library}
diff --git a/vcmi.spec b/vcmi.spec
index 98af0c9..5d2a37b 100644
--- a/vcmi.spec
+++ b/vcmi.spec
@@ -26,6 +26,7 @@ Source2: %{name}.zip
# Boost 1.71+
Patch1:
https://github.com/vcmi/vcmi/commit/ac81d0f.patch
+Patch2: fix_ffmpeg_suffix.patch
# The Koji builder gets killed here, but I don't expect people to use this there
ExcludeArch: ppc64le
@@ -48,8 +49,7 @@ BuildRequires: boost-program-options >= 1.51
BuildRequires: boost-locale >= 1.51
BuildRequires: minizip-devel
BuildRequires: zlib-devel
-BuildRequires: ffmpeg-devel
-BuildRequires: ffmpeg-libs
+BuildRequires: compat-ffmpeg4-devel
BuildRequires: qt5-qtbase-devel
Requires: hicolor-icon-theme
@@ -87,6 +87,7 @@ mv vcmi/Mods/* Mods && rm -rf vcmi
dos2unix README.md license.txt AUTHORS ChangeLog
%patch1 -p1
+%patch2 -p1
# Don't show GITDIR-NOTFOUND in the window title
sed -i 's/GITDIR-NOTFOUND/%{scommit}/' cmake_modules/*
@@ -94,7 +95,7 @@ sed -i 's/GITDIR-NOTFOUND/%{scommit}/' cmake_modules/*
%build
# low effort fix of some cmake brokenness
-export CXXFLAGS="%{build_cxxflags} -I/usr/include/ffmpeg"
+export CXXFLAGS="%{build_cxxflags} -I/usr/include/compat-ffmpeg4"
%cmake \
-DENABLE_TEST=0 \