mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
handbrake: update to 1.8.1
Switch to using Handbrake's downloaded ffmpeg7. There is a bug https://github.com/HandBrake/HandBrake/issues/6178 that Handbrake's patches fix, but it is for ffmpeg7 and touches a lot which may affect how other packages function. Downpatching the patch or Handbrake for ffmpeg6 is messy. Closes: #51706 [via git-merge-pr]
This commit is contained in:
parent
1930aaf75f
commit
10a2e9fb67
6 changed files with 33 additions and 94 deletions
|
@ -1,15 +1,3 @@
|
||||||
--- a/gtk/configure.ac
|
|
||||||
+++ b/gtk/configure.ac
|
|
||||||
@@ -203,7 +203,7 @@
|
|
||||||
|
|
||||||
AM_CONDITIONAL([MINGW], [test "x$mingw_flag" = "xyes"])
|
|
||||||
|
|
||||||
-HB_LIBS="$HB_LIBS -lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -lturbojpeg -llzma -lzimg -lSvtAv1Enc"
|
|
||||||
+HB_LIBS="$HB_LIBS -lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -lturbojpeg -llzma -lzimg -lSvtAv1Enc -ldl"
|
|
||||||
HB_CPPFLAGS="$HB_CPPFLAGS $HBINC"
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES([x264], [x264], sys_x264=yes, sys_x264=no)
|
|
||||||
|
|
||||||
--- a/test/module.defs
|
--- a/test/module.defs
|
||||||
+++ b/test/module.defs
|
+++ b/test/module.defs
|
||||||
@@ -69,6 +69,9 @@
|
@@ -69,6 +69,9 @@
|
||||||
|
|
11
srcpkgs/handbrake/patches/gtk-meson.patch
Normal file
11
srcpkgs/handbrake/patches/gtk-meson.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/gtk/meson.build
|
||||||
|
+++ b/gtk/meson.build
|
||||||
|
@@ -20,7 +20,7 @@
|
||||||
|
hb_dir = meson.current_build_dir() / '..'
|
||||||
|
endif
|
||||||
|
|
||||||
|
-hb_incdirs = include_directories(hb_dir / 'libhb', hb_dir / 'contrib/include')
|
||||||
|
+hb_incdirs = include_directories(hb_dir / 'libhb')
|
||||||
|
|
||||||
|
# External dependencies (required)
|
||||||
|
ghb_deps = [
|
|
@ -1,32 +1,11 @@
|
||||||
diff --git libhb/ports.c libhb/ports.c
|
|
||||||
index bb1733a..b6d0b38 100644
|
|
||||||
--- a/libhb/ports.c
|
--- a/libhb/ports.c
|
||||||
+++ b/libhb/ports.c
|
+++ b/libhb/ports.c
|
||||||
@@ -286,15 +286,15 @@ const char* hb_get_cpu_platform_name()
|
@@ -281,7 +281,7 @@
|
||||||
}
|
hb_cpu_info.count = init_cpu_count();
|
||||||
}
|
hb_cpu_info.platform = HB_CPU_PLATFORM_UNSPECIFIED;
|
||||||
|
|
||||||
-#if ARCH_X86_64
|
|
||||||
+#if _ARCH_X86_64
|
|
||||||
# define REG_b "rbx"
|
|
||||||
# define REG_S "rsi"
|
|
||||||
-#elif ARCH_X86_32
|
|
||||||
+#elif _ARCH_X86_32
|
|
||||||
# define REG_b "ebx"
|
|
||||||
# define REG_S "esi"
|
|
||||||
#endif // ARCH_X86_32
|
|
||||||
|
|
||||||
-#if ARCH_X86_64 || ARCH_X86_32
|
-#if ARCH_X86_64 || ARCH_X86_32
|
||||||
+#if _ARCH_X86_64 || _ARCH_X86_32
|
+#if _ARCH_X86_64 || _ARCH_X86_32
|
||||||
#define cpuid(index, eax, ebx, ecx, edx) \
|
|
||||||
__asm__ volatile ( \
|
|
||||||
"mov %%"REG_b", %%"REG_S" \n\t" \
|
|
||||||
@@ -312,7 +312,7 @@ static void init_cpu_info()
|
|
||||||
|
|
||||||
if (av_get_cpu_flags() & AV_CPU_FLAG_SSE)
|
if (av_get_cpu_flags() & AV_CPU_FLAG_SSE)
|
||||||
{
|
{
|
||||||
-#if ARCH_X86_64 || ARCH_X86_32
|
|
||||||
+#if _ARCH_X86_64 || _ARCH_X86_32
|
|
||||||
int eax, ebx, ecx, edx, family, model;
|
int eax, ebx, ecx, edx, family, model;
|
||||||
|
|
||||||
cpuid(1, &eax, &ebx, &ecx, &edx);
|
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
--- a/libhb/module.defs 2023-01-22 11:36:49.000000000 -0500
|
--- a/libhb/module.defs
|
||||||
+++ b/libhb/module.defs 2023-04-03 22:37:52.395467010 -0400
|
+++ b/libhb/module.defs
|
||||||
@@ -46,11 +46,7 @@
|
@@ -52,11 +52,7 @@
|
||||||
LIBHB.GCC.I += $(LIBHB.build/) $(CONTRIB.build/)include
|
LIBHB.GCC.I += $(LIBHB.build/) $(CONTRIB.build/)include
|
||||||
|
|
||||||
ifeq (1,$(FEATURE.qsv))
|
ifeq (1,$(FEATURE.qsv))
|
||||||
- ifeq ($(HOST.system),freebsd))
|
- ifeq ($(HOST.system),freebsd)
|
||||||
- LIBHB.GCC.I += $(LOCALBASE)/include/vpl
|
- LIBHB.GCC.I += $(LOCALBASE)/include/vpl
|
||||||
- else
|
- else
|
||||||
- LIBHB.GCC.I += $(CONTRIB.build/)include/vpl
|
- LIBHB.GCC.I += $(CONTRIB.build/)include/vpl
|
||||||
- endif
|
- endif
|
||||||
+ LIBHB.GCC.I += /usr/include/vpl
|
+ LIBHB.GCC.I += /usr/include/vpl
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter $(HOST.system),freebsd netbsd openbsd))
|
ifneq (,$(filter $(HOST.system),freebsd netbsd openbsd))
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
--- /dev/null 1970-01-01 00:00:00 UTC
|
|
||||||
+++ b/contrib/ffmpeg/A90-libvpx-1.5.0.patch
|
|
||||||
@@ -0,0 +1,39 @@
|
|
||||||
+commit 6540fe0
|
|
||||||
+Author: James Zern <jzern@google.com>
|
|
||||||
+Date: Mon Oct 19 22:44:11 2015 -0700
|
|
||||||
+
|
|
||||||
+ libvpxenc: remove some unused ctrl id mappings
|
|
||||||
+
|
|
||||||
+ VP8E_UPD_ENTROPY, VP8E_UPD_REFERENCE, VP8E_USE_REFERENCE were removed
|
|
||||||
+ from libvpx and the remaining values were never used here
|
|
||||||
+
|
|
||||||
+ Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
|
|
||||||
+ Signed-off-by: James Zern <jzern@google.com>
|
|
||||||
+---
|
|
||||||
+ libavcodec/libvpxenc.c | 8 --------
|
|
||||||
+ 1 file changed, 8 deletions(-)
|
|
||||||
+
|
|
||||||
+diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
|
|
||||||
+index 5f39783..992122c 100644
|
|
||||||
+--- a/libavcodec/libvpxenc.c
|
|
||||||
++++ b/libavcodec/libvpxenc.c
|
|
||||||
+@@ -104,19 +104,11 @@ typedef struct VP8EncoderContext {
|
|
||||||
+
|
|
||||||
+ /** String mappings for enum vp8e_enc_control_id */
|
|
||||||
+ static const char *const ctlidstr[] = {
|
|
||||||
+- [VP8E_UPD_ENTROPY] = "VP8E_UPD_ENTROPY",
|
|
||||||
+- [VP8E_UPD_REFERENCE] = "VP8E_UPD_REFERENCE",
|
|
||||||
+- [VP8E_USE_REFERENCE] = "VP8E_USE_REFERENCE",
|
|
||||||
+- [VP8E_SET_ROI_MAP] = "VP8E_SET_ROI_MAP",
|
|
||||||
+- [VP8E_SET_ACTIVEMAP] = "VP8E_SET_ACTIVEMAP",
|
|
||||||
+- [VP8E_SET_SCALEMODE] = "VP8E_SET_SCALEMODE",
|
|
||||||
+ [VP8E_SET_CPUUSED] = "VP8E_SET_CPUUSED",
|
|
||||||
+ [VP8E_SET_ENABLEAUTOALTREF] = "VP8E_SET_ENABLEAUTOALTREF",
|
|
||||||
+ [VP8E_SET_NOISE_SENSITIVITY] = "VP8E_SET_NOISE_SENSITIVITY",
|
|
||||||
+- [VP8E_SET_SHARPNESS] = "VP8E_SET_SHARPNESS",
|
|
||||||
+ [VP8E_SET_STATIC_THRESHOLD] = "VP8E_SET_STATIC_THRESHOLD",
|
|
||||||
+ [VP8E_SET_TOKEN_PARTITIONS] = "VP8E_SET_TOKEN_PARTITIONS",
|
|
||||||
+- [VP8E_GET_LAST_QUANTIZER] = "VP8E_GET_LAST_QUANTIZER",
|
|
||||||
+ [VP8E_SET_ARNR_MAXFRAMES] = "VP8E_SET_ARNR_MAXFRAMES",
|
|
||||||
+ [VP8E_SET_ARNR_STRENGTH] = "VP8E_SET_ARNR_STRENGTH",
|
|
||||||
+ [VP8E_SET_ARNR_TYPE] = "VP8E_SET_ARNR_TYPE",
|
|
|
@ -1,20 +1,20 @@
|
||||||
# Template file for 'handbrake'
|
# Template file for 'handbrake'
|
||||||
pkgname=handbrake
|
pkgname=handbrake
|
||||||
version=1.6.1
|
version=1.8.1
|
||||||
revision=3
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--force --disable-gtk-update-checks --disable-df-fetch --harden
|
configure_args="--force --disable-df-fetch --harden
|
||||||
$(vopt_enable fdk_aac fdk-aac) $(vopt_enable nvenc) $(vopt_enable qsv)"
|
$(vopt_enable fdk_aac fdk-aac) $(vopt_enable nvenc) $(vopt_enable qsv)"
|
||||||
make_build_args="-C ${XBPS_TRIPLET}"
|
make_build_args="-C ${XBPS_TRIPLET}"
|
||||||
make_install_args="-C ${XBPS_TRIPLET}"
|
make_install_args="-C ${XBPS_TRIPLET}"
|
||||||
hostmakedepends="automake cmake gettext-devel glib-devel intltool libtool m4 meson nasm pkg-config python3"
|
hostmakedepends="automake cmake gettext-devel glib-devel intltool libtool m4 meson nasm pkg-config python3"
|
||||||
makedepends="bzip2-devel ffmpeg6-devel gst-plugins-base1-devel gtk+3-devel
|
makedepends="bzip2-devel gst-plugins-base1-devel gtk4-devel
|
||||||
jansson-devel lame-devel libass-devel libbluray-devel libdav1d-devel
|
jansson-devel lame-devel libass-devel libbluray-devel libdav1d-devel
|
||||||
libdvdnav-devel libdvdread-devel libgudev-devel libnuma-devel
|
libdvdnav-devel libdvdread-devel libgudev-devel libnuma-devel
|
||||||
libsamplerate-devel libtheora-devel libvorbis-devel libvpx-devel libxml2-devel
|
libsamplerate-devel libtheora-devel libvorbis-devel libvpx-devel libxml2-devel
|
||||||
opus-devel speex-devel x264-devel x265-devel zimg-devel libsvt-av1-devel
|
opus-devel speex-devel x264-devel x265-devel zimg-devel libsvt-av1-devel
|
||||||
$(vopt_if fdk_aac fdk-aac-devel)
|
$(vopt_if fdk_aac fdk-aac-devel)
|
||||||
$(vopt_if qsv 'libva-devel libdrm-devel oneVPL-devel')
|
$(vopt_if qsv 'libva-devel oneVPL-devel')
|
||||||
$(vopt_if nvenc nv-codec-headers)"
|
$(vopt_if nvenc nv-codec-headers)"
|
||||||
depends="desktop-file-utils gst-plugins-good1 hicolor-icon-theme"
|
depends="desktop-file-utils gst-plugins-good1 hicolor-icon-theme"
|
||||||
short_desc="Multithreaded video transcoder"
|
short_desc="Multithreaded video transcoder"
|
||||||
|
@ -23,7 +23,7 @@ license="GPL-2.0-only"
|
||||||
homepage="https://handbrake.fr/"
|
homepage="https://handbrake.fr/"
|
||||||
changelog="https://github.com/HandBrake/HandBrake/releases"
|
changelog="https://github.com/HandBrake/HandBrake/releases"
|
||||||
distfiles="https://github.com/HandBrake/HandBrake/releases/download/${version}/HandBrake-${version}-source.tar.bz2"
|
distfiles="https://github.com/HandBrake/HandBrake/releases/download/${version}/HandBrake-${version}-source.tar.bz2"
|
||||||
checksum=94ccfe03db917a91650000c510f7fd53f844da19f19ad4b4be1b8f6bc31a8d4c
|
checksum=f411d54b1760b61b2361343ffa8f9d857f228cd477f885659e0322b619adee90
|
||||||
nocross=yes
|
nocross=yes
|
||||||
|
|
||||||
build_options="fdk_aac nvenc qsv"
|
build_options="fdk_aac nvenc qsv"
|
||||||
|
@ -32,6 +32,7 @@ case "$XBPS_TARGET_MACHINE" in
|
||||||
x86_64*)
|
x86_64*)
|
||||||
CFLAGS="-msse"
|
CFLAGS="-msse"
|
||||||
build_options_default="nvenc qsv"
|
build_options_default="nvenc qsv"
|
||||||
|
LDFLAGS="-Wl,--copy-dt-needed-entries" # libva bs
|
||||||
;;
|
;;
|
||||||
i686*)
|
i686*)
|
||||||
CFLAGS="-msse"
|
CFLAGS="-msse"
|
||||||
|
@ -40,9 +41,11 @@ esac
|
||||||
|
|
||||||
pre_configure() {
|
pre_configure() {
|
||||||
# use system libraries, don't download them
|
# use system libraries, don't download them
|
||||||
rm -rf contrib/
|
mv contrib/ffmpeg bkffmpeg
|
||||||
for module in fdk-aac ffmpeg libbluray libdav1d libdvdnav libdvdread nvenc \
|
rm -rf contrib/*
|
||||||
x265 zimg svt-av1 libvpl; do
|
mv bkffmpeg contrib/ffmpeg
|
||||||
|
for module in fdk-aac libbluray libdav1d libdvdnav libdvdread nvenc \
|
||||||
|
x264 x265 zimg svt-av1 libvpl; do
|
||||||
vsed -i "/MODULES += contrib\/${module}/d" make/include/main.defs
|
vsed -i "/MODULES += contrib\/${module}/d" make/include/main.defs
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue