git: 915aa2b76381 - main - multimedia/handbrake: update to 1.6.0

From: Fernando Apesteguía <fernape_at_FreeBSD.org>
Date: Sat, 14 Jan 2023 17:24:57 UTC
The branch main has been updated by fernape:

URL: https://cgit.FreeBSD.org/ports/commit/?id=915aa2b7638106156ba4d7946da44ef1b88ec3c3

commit 915aa2b7638106156ba4d7946da44ef1b88ec3c3
Author:     uichiro NAITO <naito.yuichiro@gmail.com>
AuthorDate: 2023-01-13 09:27:01 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-01-14 17:20:41 +0000

    multimedia/handbrake: update to 1.6.0
    
    ChangeLog: https://handbrake.fr/news.php?article=49
    
    PR:             268925
    Reported by:    naito.yuichiro@gmail.com (maintainer)
---
 multimedia/handbrake/Makefile                      | 22 ++++++-------
 multimedia/handbrake/distinfo                      | 36 ++++++++++++----------
 .../files/P00-freebsd-libavutil-x86-asm-h.patch    | 11 -------
 .../handbrake/files/P01-freebsd-ifo_types.h.patch  | 11 -------
 .../files/patch-contrib_ffmpeg_module.defs         | 18 +++++++++++
 .../files/patch-contrib_x265__10bit_module.defs    |  8 ++---
 .../files/patch-contrib_x265__12bit_module.defs    |  8 ++---
 multimedia/handbrake/files/patch-libhb_module.defs | 15 ---------
 multimedia/handbrake/files/patch-libhb_nlmeans.c   | 22 ++++++-------
 .../handbrake/files/patch-libhb_nlmeans__x86.c     |  8 ++---
 multimedia/handbrake/pkg-plist                     |  4 +++
 11 files changed, 74 insertions(+), 89 deletions(-)

diff --git a/multimedia/handbrake/Makefile b/multimedia/handbrake/Makefile
index bca0f9a98f98..4e0ffdd5068a 100644
--- a/multimedia/handbrake/Makefile
+++ b/multimedia/handbrake/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	handbrake
-DISTVERSION=	1.5.1
-PORTREVISION=	3
+DISTVERSION=	1.6.0
 CATEGORIES=	multimedia
 MASTER_SITES=	https://github.com/HandBrake/HandBrake/releases/download/${DISTVERSION}/
 MASTER_SITES+=	https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/:contrib
@@ -45,14 +44,15 @@ LIB_DEPENDS=	libdbus-1.so:devel/dbus \
 USES=		autoreconf:build compiler:c11 gmake iconv libtool:build \
 		localbase:ldflags ninja:build pkgconfig python:3.6+,build
 
-CONTRIB_FILES=	fdk-aac-2.0.1.tar.gz \
-		ffmpeg-4.4.1.tar.bz2 \
-		libbluray-1.3.0.tar.bz2 \
+CONTRIB_FILES=	SVT-AV1-v1.4.1.tar.gz \
+		fdk-aac-2.0.2.tar.gz \
+		ffmpeg-5.1.2.tar.bz2 \
+		libbluray-1.3.4.tar.bz2 \
 		libdvdnav-6.1.1.tar.bz2 \
-		libdvdread-6.1.1.tar.bz2 \
-		dav1d-0.9.2.tar.bz2 \
-		x265_3.5.tar.gz \
-		zimg-3.0.3.tar.gz
+		libdvdread-6.1.3.tar.bz2 \
+		dav1d-1.0.0.tar.bz2 \
+		x265-snapshot-20221130-12747.tar.gz \
+		zimg-3.0.4.tar.gz
 
 .if !defined(PACKAGE_BUILDING)
 # DVDCSS version hardcoded in contrib/libdvdread/libdvdread-5.0.0-6-gcb1ae87/src/dvd_input.c (dlopen'ed)
@@ -121,9 +121,7 @@ pre-configure:
 	cd ${DISTDIR}/${DIST_SUBDIR} && \
 	    ${INSTALL_DATA} ${CONTRIB_FILES} \
 	    ${WRKSRC}/download
-# Following patches reduces warnings with clang.
-	${CP} ${FILESDIR}/P00-freebsd-libavutil-x86-asm-h.patch ${WRKSRC}/contrib/ffmpeg
-	${CP} ${FILESDIR}/P01-freebsd-ifo_types.h.patch ${WRKSRC}/contrib/libdvdread
+
 # for powerpc64
 # picked from multimedia/ffmpeg/files/patch-libswscale_ppc_yuv2rgb__altivec.c
 	${CP} ${FILESDIR}/P02-freebsd-ppc-libswscale.patch ${WRKSRC}/contrib/ffmpeg
diff --git a/multimedia/handbrake/distinfo b/multimedia/handbrake/distinfo
index aa033bbf2775..85cfe77bde73 100644
--- a/multimedia/handbrake/distinfo
+++ b/multimedia/handbrake/distinfo
@@ -1,19 +1,21 @@
-TIMESTAMP = 1642516070
-SHA256 (handbrake/HandBrake-1.5.1-source.tar.bz2) = 3999fe06d5309c819799a73a968a8ec3840e7840c2b64af8f5cdb7fd8c9430f0
-SIZE (handbrake/HandBrake-1.5.1-source.tar.bz2) = 16137974
-SHA256 (handbrake/fdk-aac-2.0.1.tar.gz) = a4142815d8d52d0e798212a5adea54ecf42bcd4eec8092b37a8cb615ace91dc6
-SIZE (handbrake/fdk-aac-2.0.1.tar.gz) = 2488373
-SHA256 (handbrake/ffmpeg-4.4.1.tar.bz2) = 8fc9f20ac5ed95115a9e285647add0eedd5cc1a98a039ada14c132452f98ac42
-SIZE (handbrake/ffmpeg-4.4.1.tar.bz2) = 11494996
-SHA256 (handbrake/libbluray-1.3.0.tar.bz2) = e2dbaf99e84e0a9725f4985bcb85d41e52c2261cc651d8884b1b790b5ef016f9
-SIZE (handbrake/libbluray-1.3.0.tar.bz2) = 754069
+TIMESTAMP = 1672386383
+SHA256 (handbrake/HandBrake-1.6.0-source.tar.bz2) = 7f23c76038b7bf329089d0eb33c14898400fcc0426e310e87dc11e538c103cda
+SIZE (handbrake/HandBrake-1.6.0-source.tar.bz2) = 15968851
+SHA256 (handbrake/SVT-AV1-v1.4.1.tar.gz) = e3f7fc194afc6c90b43e0b80fa24c09940cb03bea394e0e1f5d1ded18e9ab23f
+SIZE (handbrake/SVT-AV1-v1.4.1.tar.gz) = 10105880
+SHA256 (handbrake/fdk-aac-2.0.2.tar.gz) = 7812b4f0cf66acda0d0fe4302545339517e702af7674dd04e5fe22a5ade16a90
+SIZE (handbrake/fdk-aac-2.0.2.tar.gz) = 2506597
+SHA256 (handbrake/ffmpeg-5.1.2.tar.bz2) = 39a0bcc8d98549f16c570624678246a6ac736c066cebdb409f9502e915b22f2b
+SIZE (handbrake/ffmpeg-5.1.2.tar.bz2) = 12074437
+SHA256 (handbrake/libbluray-1.3.4.tar.bz2) = 478ffd68a0f5dde8ef6ca989b7f035b5a0a22c599142e5cd3ff7b03bbebe5f2b
+SIZE (handbrake/libbluray-1.3.4.tar.bz2) = 756323
 SHA256 (handbrake/libdvdnav-6.1.1.tar.bz2) = c191a7475947d323ff7680cf92c0fb1be8237701885f37656c64d04e98d18d48
 SIZE (handbrake/libdvdnav-6.1.1.tar.bz2) = 367606
-SHA256 (handbrake/libdvdread-6.1.1.tar.bz2) = 3e357309a17c5be3731385b9eabda6b7e3fa010f46022a06f104553bf8e21796
-SIZE (handbrake/libdvdread-6.1.1.tar.bz2) = 392134
-SHA256 (handbrake/dav1d-0.9.2.tar.bz2) = 0d198c4fe63fe7f0395b1b17de75b21c8c4508cd3204996229355759efa30ef8
-SIZE (handbrake/dav1d-0.9.2.tar.bz2) = 833722
-SHA256 (handbrake/x265_3.5.tar.gz) = e70a3335cacacbba0b3a20ec6fecd6783932288ebc8163ad74bcc9606477cae8
-SIZE (handbrake/x265_3.5.tar.gz) = 1537044
-SHA256 (handbrake/zimg-3.0.3.tar.gz) = 5e002992bfe8b9d2867fdc9266dc84faca46f0bfd931acc2ae0124972b6170a7
-SIZE (handbrake/zimg-3.0.3.tar.gz) = 326585
+SHA256 (handbrake/libdvdread-6.1.3.tar.bz2) = ce35454997a208cbe50e91232f0e73fb1ac3471965813a13b8730a8f18a15369
+SIZE (handbrake/libdvdread-6.1.3.tar.bz2) = 395439
+SHA256 (handbrake/dav1d-1.0.0.tar.bz2) = 4a4eb6cecbc8c26916ef58886d478243de8bcc46710b369c04d6891b0155ac0f
+SIZE (handbrake/dav1d-1.0.0.tar.bz2) = 960470
+SHA256 (handbrake/x265-snapshot-20221130-12747.tar.gz) = 1a2418fd757a3d92928acacef2ae8ddb71f7aecc8803890eacb55f6e3a62bba5
+SIZE (handbrake/x265-snapshot-20221130-12747.tar.gz) = 1615531
+SHA256 (handbrake/zimg-3.0.4.tar.gz) = 219d1bc6b7fde1355d72c9b406ebd730a4aed9c21da779660f0a4c851243e32f
+SIZE (handbrake/zimg-3.0.4.tar.gz) = 326578
diff --git a/multimedia/handbrake/files/P00-freebsd-libavutil-x86-asm-h.patch b/multimedia/handbrake/files/P00-freebsd-libavutil-x86-asm-h.patch
deleted file mode 100644
index 84338221317a..000000000000
--- a/multimedia/handbrake/files/P00-freebsd-libavutil-x86-asm-h.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libavutil/x86/asm.h.orig	2018-04-14 08:34:28.000000000 +0900
-+++ b/libavutil/x86/asm.h	2018-06-23 22:34:29.258291000 +0900
-@@ -72,7 +72,7 @@
- typedef int x86_reg;
- #endif
- 
--#define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE))
-+#define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE && !defined(__clang__)))
- #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE))
- 
- #if ARCH_X86_64 && defined(PIC)
diff --git a/multimedia/handbrake/files/P01-freebsd-ifo_types.h.patch b/multimedia/handbrake/files/P01-freebsd-ifo_types.h.patch
deleted file mode 100644
index a9bd0d46b218..000000000000
--- a/multimedia/handbrake/files/P01-freebsd-ifo_types.h.patch
+++ /dev/null
@@ -1,11 +0,0 @@
----  a/src/dvdread/ifo_types.h.orig	2015-06-27 19:35:59.043370000 +0200
-+++  b/src/dvdread/ifo_types.h	2015-06-27 19:37:10.885577000 +0200
-@@ -32,7 +32,7 @@
- 
- #if defined(__GNUC__)
- #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
--#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && !defined(__clang__)
- #define ATTRIBUTE_PACKED __attribute__ ((packed,gcc_struct))
- #else
- #define ATTRIBUTE_PACKED __attribute__ ((packed))
diff --git a/multimedia/handbrake/files/patch-contrib_ffmpeg_module.defs b/multimedia/handbrake/files/patch-contrib_ffmpeg_module.defs
new file mode 100644
index 000000000000..bc0f471efe37
--- /dev/null
+++ b/multimedia/handbrake/files/patch-contrib_ffmpeg_module.defs
@@ -0,0 +1,18 @@
+Disable vulkan support.
+Handbrake doesn't require Vulkan but if it is installed in build environment
+(for other ports like QT5),  It fails to build Handbrake, because following
+definitions has been removed since vulkan-headers-1.3.238.
+
+* VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME
+* VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME
+
+--- contrib/ffmpeg/module.defs.orig	2022-12-28 08:43:46 UTC
++++ contrib/ffmpeg/module.defs
+@@ -37,6 +37,7 @@ FFMPEG.CONFIGURE.extra = \
+     --enable-libzimg \
+     --disable-hwaccels \
+     --disable-vdpau \
++    --disable-vulkan \
+     --disable-encoders \
+     --enable-libmp3lame \
+     --enable-encoder=aac \
diff --git a/multimedia/handbrake/files/patch-contrib_x265__10bit_module.defs b/multimedia/handbrake/files/patch-contrib_x265__10bit_module.defs
index a73eb577e907..97a275e16f8b 100644
--- a/multimedia/handbrake/files/patch-contrib_x265__10bit_module.defs
+++ b/multimedia/handbrake/files/patch-contrib_x265__10bit_module.defs
@@ -1,8 +1,8 @@
---- contrib/x265_10bit/module.defs.orig	2020-01-25 15:34:39 UTC
-+++ contrib/x265_10bit/module.defs
-@@ -19,6 +19,10 @@ X265_10.CONFIGURE.static      =
+--- contrib/x265_10bit/module.defs.orig	2022-12-28 17:43:46.000000000 +0900
++++ contrib/x265_10bit/module.defs	2022-12-30 15:14:26.792279000 +0900
+@@ -16,6 +16,10 @@
  X265_10.CONFIGURE.shared      = -DENABLE_SHARED=OFF
- X265_10.CONFIGURE.extra       = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF
+ X265_10.CONFIGURE.extra       = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DCMAKE_ASM_NASM_FLAGS=-w-macro-params-legacy
  
 +ifneq (x86_64,$(BUILD.machine))
 +    X265_10.CONFIGURE.extra       += -DENABLE_ASSEMBLY=0
diff --git a/multimedia/handbrake/files/patch-contrib_x265__12bit_module.defs b/multimedia/handbrake/files/patch-contrib_x265__12bit_module.defs
index 2ba4e68fd2a1..0c8707c9b66e 100644
--- a/multimedia/handbrake/files/patch-contrib_x265__12bit_module.defs
+++ b/multimedia/handbrake/files/patch-contrib_x265__12bit_module.defs
@@ -1,8 +1,8 @@
---- contrib/x265_12bit/module.defs.orig	2020-01-25 15:34:39 UTC
-+++ contrib/x265_12bit/module.defs
-@@ -19,6 +19,10 @@ X265_12.CONFIGURE.static      =
+--- contrib/x265_12bit/module.defs.orig	2022-12-28 17:43:46.000000000 +0900
++++ contrib/x265_12bit/module.defs	2022-12-30 15:15:35.013585000 +0900
+@@ -16,6 +16,10 @@
  X265_12.CONFIGURE.shared      = -DENABLE_SHARED=OFF
- X265_12.CONFIGURE.extra       = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DMAIN12=ON
+ X265_12.CONFIGURE.extra       = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DMAIN12=ON -DCMAKE_ASM_NASM_FLAGS=-w-macro-params-legacy
  
 +ifneq (x86_64,$(BUILD.machine))
 +    X265_12.CONFIGURE.extra       += -DENABLE_ASSEMBLY=0
diff --git a/multimedia/handbrake/files/patch-libhb_module.defs b/multimedia/handbrake/files/patch-libhb_module.defs
deleted file mode 100644
index 43f46e6260c5..000000000000
--- a/multimedia/handbrake/files/patch-libhb_module.defs
+++ /dev/null
@@ -1,15 +0,0 @@
---- libhb/module.defs.orig	2022-01-10 19:11:37 UTC
-+++ libhb/module.defs
-@@ -46,7 +46,11 @@ LIBHB.GCC.D += __LIBHB__ USE_PTHREAD
- LIBHB.GCC.I += $(LIBHB.build/) $(CONTRIB.build/)include
- 
- ifeq (1,$(FEATURE.qsv))
--    LIBHB.GCC.I += $(CONTRIB.build/)include/vpl
-+    ifeq ($(HOST.system),freebsd))
-+        LIBHB.GCC.I += $(LOCALBASE)/include/vpl
-+    else
-+        LIBHB.GCC.I += $(CONTRIB.build/)include/vpl
-+    endif
- endif
- 
- ifneq (,$(filter $(HOST.system),freebsd netbsd))
diff --git a/multimedia/handbrake/files/patch-libhb_nlmeans.c b/multimedia/handbrake/files/patch-libhb_nlmeans.c
index 312da052a922..31247216dbac 100644
--- a/multimedia/handbrake/files/patch-libhb_nlmeans.c
+++ b/multimedia/handbrake/files/patch-libhb_nlmeans.c
@@ -1,11 +1,11 @@
---- libhb/nlmeans.c.orig	2018-06-17 04:23:34 UTC
-+++ libhb/nlmeans.c
-@@ -898,7 +898,7 @@ static int nlmeans_init(hb_filter_object_t *filter,
-     NLMeansFunctions *functions = &pv->functions;
- 
-     functions->build_integral = build_integral_scalar;
--#if defined(ARCH_X86)
-+#if defined(ARCH_X86) && defined(__X86_64)
-     nlmeans_init_x86(functions);
- #endif
- 
+--- libhb/nlmeans.c.orig	2022-12-28 17:43:46.000000000 +0900
++++ libhb/nlmeans.c	2022-12-30 17:08:30.322878000 +0900
+@@ -241,7 +241,7 @@
+             pv->nlmeans_prefilter     = nlmeans_prefilter_8;
+             pv->nlmeans_deborder      = nlmeans_deborder_8;
+             pv->nlmeans_plane         = nlmeans_plane_8;
+-        #if defined(ARCH_X86)
++        #if defined(ARCH_X86_64)
+             nlmeans_init_x86(functions);
+         #endif
+             break;
diff --git a/multimedia/handbrake/files/patch-libhb_nlmeans__x86.c b/multimedia/handbrake/files/patch-libhb_nlmeans__x86.c
index 6baf7c01576a..2c5049ed62db 100644
--- a/multimedia/handbrake/files/patch-libhb_nlmeans__x86.c
+++ b/multimedia/handbrake/files/patch-libhb_nlmeans__x86.c
@@ -1,11 +1,11 @@
---- libhb/nlmeans_x86.c.orig	2017-10-05 21:17:34 UTC
-+++ libhb/nlmeans_x86.c
+--- libhb/nlmeans_x86.c.orig	2022-12-28 17:43:46.000000000 +0900
++++ libhb/nlmeans_x86.c	2022-12-30 15:25:11.147350000 +0900
 @@ -10,7 +10,7 @@
  
- #include "hb.h"     // needed for ARCH_X86
+ #include "handbrake/handbrake.h"     // needed for ARCH_X86
  
 -#if defined(ARCH_X86)
-+#if defined(ARCH_X86) && defined(__X86_64)
++#if defined(ARCH_X86_64)
  
  #include <emmintrin.h>
  
diff --git a/multimedia/handbrake/pkg-plist b/multimedia/handbrake/pkg-plist
index bed618e8dcb6..c185d647a973 100644
--- a/multimedia/handbrake/pkg-plist
+++ b/multimedia/handbrake/pkg-plist
@@ -33,4 +33,8 @@ bin/HandBrakeCLI
 %%X11%%share/locale/uk_UA/LC_MESSAGES/ghb.mo
 %%X11%%share/locale/zh_CN/LC_MESSAGES/ghb.mo
 %%X11%%share/locale/zh_TW/LC_MESSAGES/ghb.mo
+%%X11%%share/locale/bg/LC_MESSAGES/ghb.mo
+%%X11%%share/locale/ca/LC_MESSAGES/ghb.mo
+%%X11%%share/locale/fi/LC_MESSAGES/ghb.mo
+%%X11%%share/locale/ka/LC_MESSAGES/ghb.mo
 %%X11%%share/metainfo/fr.handbrake.ghb.metainfo.xml