commit db71ecd76b646b38bb0b02f5e8d90e4cb0280a11
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Thu Jan 5 10:50:42 2023 +0100
Updated to version 1.6.0.
.gitignore | 2 +
HandBrake-ffmpeg-5.0.patch | 40 ----------------
HandBrake-ffmpeg-5.1.patch | 109 ------------------------------------------
HandBrake-fix-wformat.patch | 61 +++++++++++++++++++++++
HandBrake-no-libvpl.patch | 84 --------------------------------
HandBrake-no-metainfo.patch | 30 ------------
HandBrake-no-nasm.patch | 11 -----
HandBrake-no_clip_id.patch | 14 ------
HandBrake-nostrip.patch | 2 +-
HandBrake-system-OpenCL.patch | 12 -----
HandBrake.spec | 104 ++++++++++++----------------------------
sources | 3 +-
12 files changed, 96 insertions(+), 376 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cab2526..4b96a27 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,5 @@
/HandBrake-1.4.2-source.tar.bz2.sig
/HandBrake-1.5.1-source.tar.bz2
/HandBrake-1.5.1-source.tar.bz2.sig
+/HandBrake-1.6.0-source.tar.bz2
+/HandBrake-1.6.0-source.tar.bz2.sig
diff --git a/HandBrake-fix-wformat.patch b/HandBrake-fix-wformat.patch
new file mode 100644
index 0000000..b5d742e
--- /dev/null
+++ b/HandBrake-fix-wformat.patch
@@ -0,0 +1,61 @@
+From fa9e4bfd3a5be0b433d1a67cd4058d27fea9a061 Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos(a)foutrelis.com>
+Date: Wed, 28 Dec 2022 22:23:50 +0200
+Subject: [PATCH] LinGUI: fix build with -Werror=format-security
+
+Add missing format strings where needed.
+
+Fixes: f6c0971c0042 ("Added XDG color-scheme implementation")
+Fixes: 3c71841d7716 ("LinGUI: Add warning color to dialog buttons")
+Fixes: 23f067ef4186 ("LinGUI: Add subtitle and audio track names to queue")
+---
+ gtk/src/callbacks.c | 2 +-
+ gtk/src/color-scheme.c | 2 +-
+ gtk/src/queuehandler.c | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
+index d815e10e22e..eed9a45103b 100644
+--- a/gtk/src/callbacks.c
++++ b/gtk/src/callbacks.c
+@@ -3790,7 +3790,7 @@ ghb_title_message_dialog(GtkWindow *parent, GtkMessageType type,
const gchar *ti
+ type, GTK_BUTTONS_NONE,
+ "%s", title);
+ if (message)
+- gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), message);
++ gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
"%s", message);
+
+ gtk_dialog_add_buttons(GTK_DIALOG(dialog),
+ no, GTK_RESPONSE_NO,
+diff --git a/gtk/src/color-scheme.c b/gtk/src/color-scheme.c
+index 6fbf65e7159..0816d6808b4 100644
+--- a/gtk/src/color-scheme.c
++++ b/gtk/src/color-scheme.c
+@@ -173,7 +173,7 @@ DesktopColorScheme color_scheme_get_desktop_scheme (void)
+ DBUS_TIMEOUT, NULL, &error);
+ if (!result)
+ {
+- g_debug(error->message);
++ g_debug("%s", error->message);
+ return DESKTOP_NO_PREFERENCE;
+ }
+
+diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c
+index db186fbe3c2..a2b3e96aa1e 100644
+--- a/gtk/src/queuehandler.c
++++ b/gtk/src/queuehandler.c
+@@ -682,12 +682,12 @@ queue_update_summary(GhbValue * queueDict, signal_user_data_t *ud)
+ def = ghb_dict_get_bool(subsettings, "Default");
+ name = ghb_dict_get_string(subsettings, "Name");
+
+- g_string_append_printf(str, sep);
++ g_string_append_printf(str, "%s", sep);
+ if (name)
+ {
+ g_string_append_printf(str, "%s - ", name);
+ }
+- g_string_append_printf(str, desc);
++ g_string_append_printf(str, "%s", desc);
+ free(desc);
+ if (force)
+ {
diff --git a/HandBrake-nostrip.patch b/HandBrake-nostrip.patch
index 9377325..b03dcc6 100644
--- a/HandBrake-nostrip.patch
+++ b/HandBrake-nostrip.patch
@@ -1,6 +1,6 @@
--- a/gtk/module.rules
+++ b/gtk/module.rules
-@@ -21,6 +21,7 @@ $(GTK.CONFIGURE.stamp): $(GTK.src/)confi
+@@ -21,6 +21,7 @@ $(GTK.CONFIGURE.stamp): $(GTK.src/)configure.ac
$(GTK.src/)src/Makefile.am
CXX="$(GCC.gxx)" \
CFLAGS="$(call fn.ARGS,GTK.GCC,.g .O *D *W ?extra)" \
LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O ?extra.exe)" \
diff --git a/HandBrake.spec b/HandBrake.spec
index 19aa617..f3db42e 100644
--- a/HandBrake.spec
+++ b/HandBrake.spec
@@ -1,5 +1,5 @@
-%global commit0 a8bc2549b3de632e2597cb133bc3aa20ca8a3629
-%global date 20210930
+%global commit0 9951c73a797b9c22814a1cfcbb0341d66853a262
+%global date 20221228
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
%global tag %{version}
@@ -11,14 +11,14 @@
%ifarch i686 x86_64
%global _with_asm 1
-%global _with_mfx 1
+%global _with_vpl 1
%endif
%global desktop_id fr.handbrake.ghb
Name: HandBrake
-Version: 1.5.1
-Release: 4%{!?tag:.%{date}git%{shortcommit0}}%{?dist}
+Version: 1.6.0
+Release: 1%{!?tag:.%{date}git%{shortcommit0}}%{?dist}
Summary: An open-source multiplatform video transcoder
License: GPLv2+
URL:
http://handbrake.fr/
@@ -34,35 +34,21 @@ BuildRequires: gnupg2
Source0:
https://github.com/%{name}/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{s...
%endif
-%{?_without_ffmpeg:Source10:
https://libav.org/releases/libav-12.tar.gz}
-
-# Build with unpatched libbluray (
https://github.com/HandBrake/HandBrake/pull/458)
-# can be dropped with libbluray-1.0.0
-Patch1: %{name}-no_clip_id.patch
# Pass strip tool override to gtk/configure
Patch3: %{name}-nostrip.patch
# Don't link with libva unnecessarily
Patch4: %{name}-no-libva.patch
-# Fix build on non-x86 (without nasm)
-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
-# keep using MediaSDK
-Patch10: %{name}-no-libvpl.patch
-Patch11:
https://github.com/%{name}/%{name}/commit/7c92fda45573425fb3873b48919f9de...
+#
https://github.com/HandBrake/HandBrake/commit/fa9e4bfd3a5be0b433d1a67cd40...
+Patch11: %{name}-fix-wformat.patch
BuildRequires: a52dec-devel >= 0.7.4
-BuildRequires: cmake3
+BuildRequires: cmake
BuildRequires: dbus-glib-devel
BuildRequires: desktop-file-utils
-%if 0%{?fedora}
BuildRequires: libappstream-glib
-%endif
-%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel >= 3.5}
+BuildRequires: ffmpeg-devel >= 3.5
# Should be >= 2.6:
BuildRequires: freetype-devel >= 2.4.11
# Should be >= 0.19.7:
@@ -84,8 +70,9 @@ BuildRequires: libdvdread-devel >= 5.0.0
# FDK is non-free
%{?_with_fdk:BuildRequires: fdk-aac-devel >= 0.1.4}
BuildRequires: libgudev-devel
-%if 0%{?_with_mfx:1}
-BuildRequires: libmfx-devel >= 1.23-1
+%if 0%{?_with_vpl:1}
+BuildRequires: intel-mediasdk-devel
+BuildRequires: oneVPL-devel
BuildRequires: libva-devel
%endif
BuildRequires: libmpeg2-devel >= 0.5.1
@@ -99,16 +86,13 @@ BuildRequires: libvorbis-devel
BuildRequires: libvpx-devel >= 1.3
BuildRequires: make
BuildRequires: meson
-%if 0%{?_with_asm:1}
BuildRequires: nasm
-%endif
-%ifnarch %{arm}
BuildRequires: numactl-devel
-%endif
BuildRequires: nv-codec-headers
BuildRequires: opus-devel
BuildRequires: python3
BuildRequires: speex-devel
+BuildRequires: svt-av1-devel
BuildRequires: x264-devel >= 0.148
BuildRequires: x265-devel >= 1.9
BuildRequires: xz-devel
@@ -151,28 +135,15 @@ This package contains the main program with a graphical interface.
gpgv2 --keyring %{S:2} %{S:1} %{S:0}
%endif
%setup -q %{!?tag:-n %{name}-%{commit0}}
-%if 0%{?rhel}
-%patch1 -p1
-%endif
%patch3 -p1
-%if 0%{!?_with_mfx}
+%if 0%{!?_with_vpl}
%patch4 -p1
-%else
-%patch10 -p1
-%endif
-%patch6 -p1
-%if 0%{?rhel}
-%patch7 -p1
%endif
-%patch8 -p1
%patch9 -p1
%patch11 -p1
-mkdir -p download
-%{?_without_ffmpeg:cp -p %{SOURCE10} download}
-
# Use system libraries in place of bundled ones
-for module in a52dec %{?_with_fdk:fdk-aac} %{!?_without_ffmpeg:ffmpeg} libdav1d libdvdnav
libdvdread libbluray %{?_with_mfx:libmfx libvpl} nvenc libvpx x265; do
+for module in a52dec %{?_with_fdk:fdk-aac} ffmpeg libdav1d libdvdnav libdvdread libbluray
%{?_with_vpl:libmfx libvpl} nvenc libvpx svt-av1 x265; do
sed -i -e "/MODULES += contrib\/$module/d" make/include/main.defs
done
@@ -194,7 +165,7 @@ export http_proxy=http://127.0.0.1
# By default the project is built with optimizations for speed and no debug.
# Override configure settings by passing RPM_OPT_FLAGS and disabling preset
# debug options.
-echo "GCC.args.O.speed = %{optflags} -I%{_includedir}/ffmpeg -ldl -lx265
%{?_with_fdk:-lfdk-aac} %{?_with_mfx:-lmfx}" > custom.defs
+echo "GCC.args.O.speed = %{optflags} -I%{_includedir}/ffmpeg -ldl -lx265
%{?_with_fdk:-lfdk-aac} %{?_with_vpl:-lmfx -lvpl}" > custom.defs
echo "GCC.args.g.none = " >> custom.defs
# Not an autotools configure script.
@@ -213,7 +184,7 @@ echo "GCC.args.g.none = " >> custom.defs
--disable-numa \
%endif
%{?_with_fdk:--enable-fdk-aac} \
- %{?_with_mfx:--enable-qsv}
+ %{?_with_vpl:--enable-qsv}
%make_build -C build V=1
@@ -221,45 +192,25 @@ echo "GCC.args.g.none = " >> custom.defs
%make_install -C build
# Desktop file, icons and AppStream metadata from FlatPak build (more complete)
-rm -f %{buildroot}/%{_datadir}/applications/ghb.desktop \
- %{buildroot}/%{_datadir}/icons/hicolor/scalable/apps/hb-icon.svg
+rm -f %{buildroot}%{_datadir}/applications/ghb.desktop \
+ %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/hb-icon.svg
install -D -p -m 644 gtk/src/%{desktop_id}.desktop \
- %{buildroot}/%{_datadir}/applications/%{desktop_id}.desktop
+ %{buildroot}%{_datadir}/applications/%{desktop_id}.desktop
install -D -p -m 644 gtk/src/%{desktop_id}.svg \
- %{buildroot}/%{_datadir}/icons/hicolor/scalable/apps/%{desktop_id}.svg
-
-desktop-file-validate %{buildroot}/%{_datadir}/applications/%{desktop_id}.desktop
-
-%if 0%{?fedora}
-appstream-util validate-relax --nonet
%{buildroot}%{_metainfodir}/%{desktop_id}.metainfo.xml
-%endif
+ %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{desktop_id}.svg
%find_lang ghb
-%if 0%{?rhel} && 0%{?rhel} <= 7
-%post gui
-touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-/usr/bin/update-desktop-database &> /dev/null || :
-
-%postun gui
-if [ $1 -eq 0 ] ; then
- touch --no-create %{_datadir}/icons/hicolor &>/dev/null
- gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-fi
-/usr/bin/update-desktop-database &> /dev/null || :
-
-%posttrans gui
-gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-%endif
+%check
+desktop-file-validate %{buildroot}%{_datadir}/applications/%{desktop_id}.desktop
+appstream-util validate-relax --nonet
%{buildroot}%{_metainfodir}/%{desktop_id}.metainfo.xml
%files -f ghb.lang gui
%license COPYING
%doc AUTHORS.markdown NEWS.markdown README.markdown THANKS.markdown
%{_bindir}/ghb
-%if 0%{?fedora}
%{_metainfodir}/%{desktop_id}.metainfo.xml
-%endif
%{_datadir}/applications/%{desktop_id}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{desktop_id}.svg
@@ -269,6 +220,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null ||
:
%{_bindir}/HandBrakeCLI
%changelog
+* Thu Jan 05 2023 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.6.0-1
+- Updated to version 1.6.0.
+- Switched to intel-mediasdk-devel and oneVPL-devel as required by upstream.
+- Install metainfo manifest on EPEL too.
+- Removed the legacy scriptlets.
+- Added check section.
+
* Sat Aug 06 2022 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
1.5.1-4
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg
5.1
diff --git a/sources b/sources
index 26bc0fc..573c5a9 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-SHA512 (HandBrake-1.5.1-source.tar.bz2) =
63c5933f77d417a89512abd278a1d844f2b7a36ec9f8ab664c1a1348fd228ee389fc8e349b2df6cbf5d617b912d4634457ebea86490ff5ed4930f39a90dc7568
-SHA512 (HandBrake-1.5.1-source.tar.bz2.sig) =
8638f5a2a592213efaedcb76570bf960b6c01c05fc34b472685b4b8d7d067a96745c07e9fe1c01e7f20b193870d502cf2240096e49380b89606ad6c33f31c1b4
+SHA512 (HandBrake-1.6.0-source.tar.bz2) =
1984bff578037efd48e2f37175b958994bef19364547ded14f71f64a9843c936e621760ee3123a6d8d730baba617988da6710272c8e912ca528a92dc02ae8ffd