commit b779778a84cc5f2fc73fadb6f63304ad8244135d
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Tue Feb 15 16:02:22 2022 +0000
Fix
HandBrake-ffmpeg-5.0.patch | 40 ++++++++++++++++++++++++++++++++++++++++
HandBrake-x265-link.patch | 13 +++++++++++++
HandBrake.spec | 6 ++++++
3 files changed, 59 insertions(+)
---
diff --git a/HandBrake-ffmpeg-5.0.patch b/HandBrake-ffmpeg-5.0.patch
new file mode 100644
index 0000000..6436050
--- /dev/null
+++ b/HandBrake-ffmpeg-5.0.patch
@@ -0,0 +1,40 @@
+#
https://git.exherbo.org/media.git/commit/?id=b7a022928103184b7528d0e40ad0...
+
+From 8a9d11e96b771422247c458ae6b07f3a13848f3a Mon Sep 17 00:00:00 2001
+From: Timo Gurr <timo.gurr(a)gmail.com>
+Date: Sat, 15 Jan 2022 20:44:53 +0100
+Subject: [PATCH] FFmpeg deprecations fixes for FFmpeg >= 5
+
+avcodec.h stopped including bsf.h per FFmpeg commit
+57b5ec6ba7df [1]. Fixes compilation error against
+FFmpeg later than the mentioned commit.
+[1]
https://github.com/FFmpeg/FFmpeg/commit/57b5ec6ba7df442caebc401c4a7ef3ebc...
+---
+ libhb/decavcodec.c | 1 +
+ libhb/muxavformat.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
+index 372f86f82cf..e7a63289c0f 100644
+--- a/libhb/decavcodec.c
++++ b/libhb/decavcodec.c
+@@ -41,6 +41,7 @@
+ #include "handbrake/handbrake.h"
+ #include "handbrake/hbffmpeg.h"
+ #include "handbrake/hbavfilter.h"
++#include "libavcodec/bsf.h"
+ #include "libavfilter/avfilter.h"
+ #include "libavfilter/buffersrc.h"
+ #include "libavfilter/buffersink.h"
+diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c
+index 232edd0942a..ad8e2a1d8fa 100644
+--- a/libhb/muxavformat.c
++++ b/libhb/muxavformat.c
+@@ -8,6 +8,7 @@
+ */
+
+ #include <ogg/ogg.h>
++#include "libavcodec/bsf.h"
+ #include "libavformat/avformat.h"
+ #include "libavutil/avstring.h"
+ #include "libavutil/intreadwrite.h"
diff --git a/HandBrake-x265-link.patch b/HandBrake-x265-link.patch
new file mode 100644
index 0000000..6a14645
--- /dev/null
+++ b/HandBrake-x265-link.patch
@@ -0,0 +1,13 @@
+--- a/test/module.defs 2020-06-13 15:05:35.000000000 +0100
++++ a/test/module.defs 2020-07-03 11:15:53.951205608 +0100
+@@ -30,6 +30,10 @@
+ endif
+ endif
+
++ifeq (1,$(FEATURE.x265))
++ TEST.GCC.l += x265
++endif
++
+ ifeq (1,$(FEATURE.flatpak))
+ TEST.GCC.l += glib-2.0
+ endif
diff --git a/HandBrake.spec b/HandBrake.spec
index 8997b2f..e62a644 100644
--- a/HandBrake.spec
+++ b/HandBrake.spec
@@ -50,6 +50,9 @@ Patch6: %{name}-no-nasm.patch
# rhel gettext is too old to support metainfo
#
https://github.com/HandBrake/HandBrake/pull/2884
Patch7: %{name}-no-metainfo.patch
+# Patch from Gentoo
+Patch8: %{name}-ffmpeg-5.0.patch
+Patch9: %{name}-x265-link.patch
BuildRequires: a52dec-devel >= 0.7.4
BuildRequires: cmake3
@@ -161,6 +164,9 @@ gpgv2 --keyring %{S:2} %{S:1} %{S:0}
%if 0%{?rhel}
%patch7 -p1
%endif
+%patch8 -p1
+%patch9 -p1
+
mkdir -p download
%{?_without_ffmpeg:cp -p %{SOURCE10} download}