commit aba6e67e68cbbc91b25274ac2255986942788907
Author: Dominik Mierzejewski <dominik(a)greysector.net>
Date: Sun Jun 9 13:06:50 2024 +0200
Update to 1.8.0
Drop obsolete patch
Fix linking with system libraries
HandBrake-no-contribs.patch | 81 ++++++++++----------------
HandBrake-no-fdk_aac.patch | 33 +++++------
HandBrake-remove-ambient-viewing-support.patch | 10 ++--
HandBrake-syslibs-link.patch | 30 ++++++++++
HandBrake-x265-link.patch | 13 -----
HandBrake.spec | 18 +++---
sources | 4 +-
7 files changed, 93 insertions(+), 96 deletions(-)
---
diff --git a/HandBrake-no-contribs.patch b/HandBrake-no-contribs.patch
index 83487ef..f07952b 100644
--- a/HandBrake-no-contribs.patch
+++ b/HandBrake-no-contribs.patch
@@ -1,65 +1,46 @@
-From: Sebastian Ramacher <sramacher(a)debian.org>
-Date: Fri, 1 Dec 2023 23:22:16 +0100
-Subject: Do not use contribs
-
----
- gtk/meson.build | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/gtk/meson.build b/gtk/meson.build
-index 6f41201..c072f50 100644
---- a/gtk/meson.build
-+++ b/gtk/meson.build
-@@ -22,8 +22,8 @@ if hb_dir == ''
+diff -up HandBrake-1.8.0/gtk/meson.build.orig HandBrake-1.8.0/gtk/meson.build
+--- HandBrake-1.8.0/gtk/meson.build.orig 2024-06-08 23:25:36.847621713 +0200
++++ HandBrake-1.8.0/gtk/meson.build 2024-06-09 10:47:41.354428601 +0200
+@@ -20,7 +20,7 @@ if hb_dir == ''
hb_dir = meson.current_build_dir() / '..'
endif
--hb_libdirs = [hb_dir / 'libhb', hb_dir / 'contrib/lib'] +
get_option('extra-libdirs')
-hb_incdirs = include_directories(hb_dir / 'libhb', hb_dir /
'contrib/include')
-+hb_libdirs = [hb_dir / 'libhb'] + get_option('extra-libdirs')
+hb_incdirs = include_directories(hb_dir / 'libhb')
# External dependencies (required)
ghb_deps = [
-@@ -33,7 +33,6 @@ ghb_deps = [
- cc.find_library('mp3lame', dirs: hb_libdirs),
- dependency('dvdnav'),
- dependency('dvdread'),
-- dependency('dav1d'),
- dependency('SvtAv1Enc'),
- dependency('fribidi'),
- dependency('glib-2.0', version: glib_min),
-@@ -63,7 +62,6 @@ ghb_deps = [
- dependency('vorbisenc'),
- dependency('vpx'),
- dependency('x264'),
-- dependency('zimg'),
- dependency('zlib'),
- ]
-
-diff -up HandBrake-1.7.3/libhb/module.defs.orig HandBrake-1.7.3/libhb/module.defs
---- HandBrake-1.7.3/libhb/module.defs.orig 2024-02-10 23:22:33.000000000 +0100
-+++ HandBrake-1.7.3/libhb/module.defs 2024-05-15 23:46:57.265752588 +0200
+diff -up HandBrake-1.8.0/libhb/module.defs.orig HandBrake-1.8.0/libhb/module.defs
+--- HandBrake-1.8.0/libhb/module.defs.orig 2024-05-19 16:06:45.000000000 +0200
++++ HandBrake-1.8.0/libhb/module.defs 2024-06-09 10:51:03.886266133 +0200
@@ -1,7 +1,7 @@
- __deps__ := A52DEC BZIP2 LIBVPX SVT-AV1 FFMPEG FREETYPE LAME LIBASS LIBDCA \
- LIBDVDREAD LIBDVDNAV LIBICONV LIBSAMPLERATE LIBTHEORA LIBVORBIS LIBOGG \
- LIBXML2 X264 X265 ZLIB LIBBLURAY FDKAAC LIBVPL LIBGNURX JANSSON \
+ __deps__ := BZIP2 LIBVPX SVT-AV1 FFMPEG FREETYPE LAME LIBASS \
+ LIBDVDREAD LIBDVDNAV LIBICONV LIBTHEORA LIBVORBIS LIBOGG \
+ X264 X265 ZLIB LIBBLURAY FDKAAC LIBVPL LIBGNURX JANSSON \
- HARFBUZZ LIBOPUS LIBSPEEX LIBDAV1D LIBJPEGTURBO LIBDOVI
+ HARFBUZZ LIBOPUS LIBSPEEX LIBJPEGTURBO LIBDOVI
ifeq (,$(filter $(HOST.system),darwin cygwin mingw))
__deps__ += FONTCONFIG
-diff -up HandBrake-1.7.3/test/module.defs.orig HandBrake-1.7.3/test/module.defs
---- HandBrake-1.7.3/test/module.defs.orig 2024-05-15 23:05:14.263979341 +0200
-+++ HandBrake-1.7.3/test/module.defs 2024-05-15 23:47:36.829590760 +0200
-@@ -16,8 +16,8 @@ TEST.libs = $(LIBHB.a)
- TEST.GCC.l = \
- ass avformat avfilter avcodec avutil swresample postproc mp3lame dvdnav \
- dvdread fribidi swscale vpx theoraenc theoradec vorbis vorbisenc ogg \
-- x264 bluray freetype xml2 bz2 z jansson harfbuzz opus speex lzma dav1d \
-- turbojpeg zimg SvtAv1Enc
-+ x264 bluray freetype xml2 bz2 z jansson harfbuzz opus speex lzma \
-+ turbojpeg SvtAv1Enc
+@@ -118,7 +118,7 @@ LIBHB.lib = $(LIBHB.build/)hb.lib
+ LIBHB.dll.libs = $(foreach n, \
+ ass avformat avfilter avcodec avutil swresample dvdnav dvdread \
+ freetype mp3lame swscale vpx theora vorbis vorbisenc ogg x264 \
+- bluray jansson harfbuzz opus speex dav1d turbojpeg zimg SvtAv1Enc, \
++ bluray jansson harfbuzz opus speex turbojpeg SvtAv1Enc, \
+ $(CONTRIB.build/)lib/lib$(n).a )
- ifeq (,$(filter $(HOST.system),darwin cygwin mingw))
- TEST.GCC.l += fontconfig
+ ifeq (1,$(FEATURE.fdk_aac))
+diff -up HandBrake-1.8.0/make/include/main.defs.orig
HandBrake-1.8.0/make/include/main.defs
+--- HandBrake-1.8.0/make/include/main.defs.orig 2024-05-19 16:06:45.000000000 +0200
++++ HandBrake-1.8.0/make/include/main.defs 2024-06-09 10:50:34.026098608 +0200
+@@ -48,9 +48,7 @@ ifeq (1,$(FEATURE.x265))
+ MODULES += contrib/x265_12bit
+ endif
+
+-MODULES += contrib/libdav1d
+ MODULES += contrib/svt-av1
+-MODULES += contrib/zimg
+ MODULES += contrib/ffmpeg
+ MODULES += contrib/libdvdread
+ MODULES += contrib/libdvdnav
diff --git a/HandBrake-no-fdk_aac.patch b/HandBrake-no-fdk_aac.patch
index 934f236..4d28923 100644
--- a/HandBrake-no-fdk_aac.patch
+++ b/HandBrake-no-fdk_aac.patch
@@ -1,7 +1,7 @@
-diff -up HandBrake-1.7.3/gtk/meson.build.orig HandBrake-1.7.3/gtk/meson.build
---- HandBrake-1.7.3/gtk/meson.build.orig 2024-02-10 23:22:33.000000000 +0100
-+++ HandBrake-1.7.3/gtk/meson.build 2024-05-15 22:54:38.645589239 +0200
-@@ -90,10 +90,6 @@ if get_option('libdovi').enabled()
+diff -up HandBrake-1.8.0/gtk/meson.build.orig HandBrake-1.8.0/gtk/meson.build
+--- HandBrake-1.8.0/gtk/meson.build.orig 2024-05-19 16:06:45.000000000 +0200
++++ HandBrake-1.8.0/gtk/meson.build 2024-06-08 23:22:38.059852545 +0200
+@@ -57,10 +57,6 @@ if get_option('libdovi').enabled()
ghb_deps += dependency('dovi')
endif
@@ -10,15 +10,12 @@ diff -up HandBrake-1.7.3/gtk/meson.build.orig
HandBrake-1.7.3/gtk/meson.build
-endif
-
if get_option('qsv').enabled()
- if host_machine.system() == 'windows'
- ghb_deps += cc.find_library('vpl', dirs: hb_libdirs)
-diff -up HandBrake-1.7.3/gtk/meson_options.txt.orig
HandBrake-1.7.3/gtk/meson_options.txt
---- HandBrake-1.7.3/gtk/meson_options.txt.orig 2024-02-10 23:22:33.000000000 +0100
-+++ HandBrake-1.7.3/gtk/meson_options.txt 2024-05-15 22:54:45.430561239 +0200
-@@ -3,11 +3,6 @@ option('extra-libdirs',
- value: [],
- description: 'Extra directories to search for libraries')
-
+ ghb_deps += dependency('vpl')
+ endif
+diff -up HandBrake-1.8.0/gtk/meson_options.txt.orig
HandBrake-1.8.0/gtk/meson_options.txt
+--- HandBrake-1.8.0/gtk/meson_options.txt.orig 2024-05-19 16:06:45.000000000 +0200
++++ HandBrake-1.8.0/gtk/meson_options.txt 2024-06-08 23:23:01.608085564 +0200
+@@ -1,8 +1,3 @@
-option('fdk-aac',
- type: 'feature',
- value: 'disabled',
@@ -27,11 +24,11 @@ diff -up HandBrake-1.7.3/gtk/meson_options.txt.orig
HandBrake-1.7.3/gtk/meson_op
option('flatpak',
type: 'boolean',
value: false,
-diff -up HandBrake-1.7.3/gtk/module.defs.orig HandBrake-1.7.3/gtk/module.defs
---- HandBrake-1.7.3/gtk/module.defs.orig 2024-02-10 23:22:33.000000000 +0100
-+++ HandBrake-1.7.3/gtk/module.defs 2024-05-15 22:54:53.795526719 +0200
-@@ -53,12 +53,6 @@ else
- GTK.CONFIGURE.extra += -Dgstreamer=disabled
+diff -up HandBrake-1.8.0/gtk/module.defs.orig HandBrake-1.8.0/gtk/module.defs
+--- HandBrake-1.8.0/gtk/module.defs.orig 2024-05-19 16:06:45.000000000 +0200
++++ HandBrake-1.8.0/gtk/module.defs 2024-06-08 23:23:25.867325618 +0200
+@@ -48,12 +48,6 @@ else
+ GTK.CONFIGURE.extra += -Db_lto=false
endif
-ifeq (1,$(FEATURE.fdk_aac))
diff --git a/HandBrake-remove-ambient-viewing-support.patch
b/HandBrake-remove-ambient-viewing-support.patch
index 0b97d23..fa4ea9f 100644
--- a/HandBrake-remove-ambient-viewing-support.patch
+++ b/HandBrake-remove-ambient-viewing-support.patch
@@ -13,15 +13,15 @@ diff --git a/libhb/encx265.c b/libhb/encx265.c
index 89f996d..b5356de 100644
--- a/libhb/encx265.c
+++ b/libhb/encx265.c
-@@ -308,14 +308,6 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
- param->bHighTier = 0;
+@@ -269,14 +269,6 @@ int encx265Init(hb_work_object_t *w, hb_
+ }
}
- if (job->ambient.ambient_illuminance.num &&
job->ambient.ambient_illuminance.den)
- {
-- param->ambientIlluminance = rescale(job->ambient.ambient_illuminance,
10000);
-- param->ambientLightX = rescale(job->ambient.ambient_light_x, 50000);
-- param->ambientLightY = rescale(job->ambient.ambient_light_y, 50000);
+- param->ambientIlluminance =
hb_rescale_rational(job->ambient.ambient_illuminance, 10000);
+- param->ambientLightX = hb_rescale_rational(job->ambient.ambient_light_x,
50000);
+- param->ambientLightY = hb_rescale_rational(job->ambient.ambient_light_y,
50000);
- param->bEmitAmbientViewingEnvironment = 1;
- }
-
diff --git a/HandBrake-syslibs-link.patch b/HandBrake-syslibs-link.patch
new file mode 100644
index 0000000..cc36264
--- /dev/null
+++ b/HandBrake-syslibs-link.patch
@@ -0,0 +1,30 @@
+diff -up HandBrake-1.8.0/test/module.defs.orig HandBrake-1.8.0/test/module.defs
+--- HandBrake-1.8.0/test/module.defs.orig 2024-05-19 16:06:45.000000000 +0200
++++ HandBrake-1.8.0/test/module.defs 2024-06-09 12:44:44.012169393 +0200
+@@ -22,6 +22,14 @@ TEST.pkgconfig_libs = libass libavformat
+
+ TEST.pkgconfig_libs += $(foreach m,$(MODULES.NAMES),$($m.OSL.libs))
+
++ifeq (1,$(FEATURE.qsv))
++ TEST.pkgconfig_libs += libva libva-drm vpl
++endif
++
++ifeq (1,$(FEATURE.x265))
++ TEST.pkgconfig_libs += x265
++endif
++
+ ifeq (1,$(FEATURE.flatpak))
+ TEST.pkgconfig_libs += glib-2.0
+ endif
+diff -up HandBrake-1.8.0/gtk/meson.build.orig HandBrake-1.8.0/gtk/meson.build
+--- HandBrake-1.8.0/gtk/meson.build.orig 2024-06-09 12:48:47.938685823 +0200
++++ HandBrake-1.8.0/gtk/meson.build 2024-06-09 12:52:51.685218843 +0200
+@@ -58,6 +58,8 @@ if get_option('libdovi').enabled()
+ endif
+
+ if get_option('qsv').enabled()
++ ghb_deps += dependency('libva')
++ ghb_deps += dependency('libva-drm')
+ ghb_deps += dependency('vpl')
+ endif
+
diff --git a/HandBrake.spec b/HandBrake.spec
index a835356..6fce0aa 100644
--- a/HandBrake.spec
+++ b/HandBrake.spec
@@ -15,8 +15,8 @@
%global desktop_id fr.handbrake.ghb
Name: HandBrake
-Version: 1.7.3
-Release: 2%{!?tag:.%{date}git%{shortcommit}}%{?dist}
+Version: 1.8.0
+Release: 1%{!?tag:.%{date}git%{shortcommit}}%{?dist}
Summary: An open-source multiplatform video transcoder
License: GPLv2+
URL:
https://handbrake.fr/
@@ -33,16 +33,14 @@ Source0:
https://github.com/%{name}/%{name}/archive/%{commit0}.tar.gz#/%{
%{?_without_ffmpeg:Source10:
https://libav.org/releases/libav-12.tar.gz}
-# Fix parsing of -DFOO from pkg-config --cflags libxml-2.0
-Patch0: %{name}-fix-cflags-parsing.patch
# Don't link with libva unnecessarily
Patch1: %{name}-no-libva.patch
# Don't link with fdk_aac unnecessarily
Patch2: %{name}-no-fdk_aac.patch
# Fix build on non-x86 (without nasm) and drop libtool requirement
Patch3: %{name}-no-libtool-nasm.patch
-# Patch from Gentoo
-Patch4: %{name}-x265-link.patch
+# Fix linking with system libraries
+Patch4: %{name}-syslibs-link.patch
# Patches from Debian
#
https://salsa.debian.org/multimedia-team/handbrake/-/raw/master/debian/pa...
Patch5: %{name}-no-contribs.patch
@@ -64,6 +62,7 @@ BuildRequires: freetype-devel >= 2.4.11
BuildRequires: fribidi-devel >= 0.19.4
BuildRequires: gcc-c++
BuildRequires: gstreamer1-plugins-base-devel
+BuildRequires: gtk4-devel
BuildRequires: intltool
BuildRequires: jansson-devel
BuildRequires: turbojpeg-devel
@@ -141,7 +140,6 @@ 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}}
-%patch -P0 -p1
%if 0%{!?_with_vpl}
%patch -P1 -p1
%endif
@@ -164,7 +162,6 @@ echo "DATE=$(date "+%Y-%m-%d %T" -d %{date})"
>> version.txt
echo "TAG=%{tag}" >> version.txt
echo "TAG_HASH=%{commit0}" >> version.txt
%endif
-sed -i -e 's/^\(GIT_TAG\)=\(.*\)/\1=%{version}/' gtk/data/version.sh
# This makes build stop if any download is attempted
export http_proxy=http://127.0.0.1
@@ -215,6 +212,11 @@ appstream-util validate-relax --nonet
%{buildroot}%{_metainfodir}/%{desktop_id}.
%{_bindir}/HandBrakeCLI
%changelog
+* Sat Jun 08 2024 Dominik 'Rathann' Mierzejewski <dominik(a)greysector.net> -
1.8.0-1
+- Update to 1.8.0
+- Drop obsolete patch
+- Fix linking with system libraries
+
* Sat Jun 01 2024 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.7.3-2
- Rebuild for svt-av1 2.1.0
diff --git a/sources b/sources
index 64c0173..044ef7e 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (HandBrake-1.7.3-source.tar.bz2) =
2a934ef3fef5c9d3a23976c6138a35cc1a098dc20b482259788ea58c5c3a581d772fc73c3e00bb1c6b605a050cbeef44ec8df181f6e3e9503aef458df629a927
-SHA512 (HandBrake-1.7.3-source.tar.bz2.sig) =
2b2307ae83b43ea3fed806d19b0f4a53d650ea8b50cdd5c2fa918d29f756f6b955dc9f5388de2cde31c63241da1115168657d855a5dbac6f400b0b7e3896b14b
+SHA512 (HandBrake-1.8.0-source.tar.bz2) =
9f1d0408500ee682525359c6444476eedf280b0913c0fbe6788586b2e05647e873388fdb533d9cf6fe9dd93ffb91ab464abdaaa7fed2de95ccb6d5d04f9b616c
+SHA512 (HandBrake-1.8.0-source.tar.bz2.sig) =
3757ed18ddb46724f5295680cea211a2724d027cbe3f82569efc8000c440ad8656e7df6889d339f0f5d1729744f7b847796c62585e6e5b0e601f7757f872928b