1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-18 03:46:03 +00:00

multimedia/handbrake: update to 1.4.0

Differential revision: https://reviews.freebsd.org/D31252
Submitted by: naito.yuichiro@gmail.com (maintainer)
This commit is contained in:
Piotr Kubaj 2021-07-21 20:10:14 +00:00
parent 632a8e8205
commit 2b3e3f3310
15 changed files with 46 additions and 1540 deletions

View File

@ -1,8 +1,7 @@
# Created by: Andrew Thompson <andy@fud.org.nz>
PORTNAME= handbrake
DISTVERSION= 1.3.3
PORTREVISION= 4
DISTVERSION= 1.4.0
CATEGORIES= multimedia
DIST_SUBDIR= ${PORTNAME}
@ -19,10 +18,12 @@ BUILD_DEPENDS= bash:shells/bash \
cmake:devel/cmake \
meson:devel/meson
LIB_DEPENDS= libdbus-1.so:devel/dbus \
libgudev-1.0.so:devel/libgudev \
libharfbuzz.so:print/harfbuzz \
libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2 \
libfribidi.so:converters/fribidi \
libturbojpeg.so:graphics/libjpeg-turbo \
libxml2.so:textproc/libxml2 \
libass.so:multimedia/libass \
libspeex.so:audio/speex \
@ -41,12 +42,13 @@ 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.2.3.tar.bz2 \
libbluray-1.1.2.tar.bz2 \
libdvdnav-6.0.1.tar.bz2 \
libdvdread-6.0.2.tar.bz2 \
dav1d-0.5.1.tar.bz2 \
x265_3.2.1.tar.gz
ffmpeg-4.4.tar.bz2 \
libbluray-1.3.0.tar.bz2 \
libdvdnav-6.1.1.tar.bz2 \
libdvdread-6.1.1.tar.bz2 \
dav1d-0.9.0.tar.bz2 \
x265_3.5.tar.gz \
zimg-3.0.1.tar.gz
MASTER_SITES+= https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/:contrib
@ -126,9 +128,6 @@ pre-configure:
# 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_swscale__altivec.c
${CP} ${FILESDIR}/P02-freebsd-ppc-libswscale.patch ${WRKSRC}/contrib/ffmpeg
post-install-X11-on:
${LN} -sf ghb ${STAGEDIR}${PREFIX}/bin/HandBrake

View File

@ -1,17 +1,19 @@
TIMESTAMP = 1592180378
TIMESTAMP = 1626703173
SHA256 (handbrake/fdk-aac-2.0.1.tar.gz) = a4142815d8d52d0e798212a5adea54ecf42bcd4eec8092b37a8cb615ace91dc6
SIZE (handbrake/fdk-aac-2.0.1.tar.gz) = 2488373
SHA256 (handbrake/ffmpeg-4.2.3.tar.bz2) = 217eb211c33303b37c5521a5abe1f0140854d6810c6a6ee399456cc96356795e
SIZE (handbrake/ffmpeg-4.2.3.tar.bz2) = 10957405
SHA256 (handbrake/libbluray-1.1.2.tar.bz2) = a3dd452239b100dc9da0d01b30e1692693e2a332a7d29917bf84bb10ea7c0b42
SIZE (handbrake/libbluray-1.1.2.tar.bz2) = 745779
SHA256 (handbrake/libdvdnav-6.0.1.tar.bz2) = e566a396f1950017088bfd760395b0565db44234195ada5413366c9d23926733
SIZE (handbrake/libdvdnav-6.0.1.tar.bz2) = 378491
SHA256 (handbrake/libdvdread-6.0.2.tar.bz2) = f91401af213b219cdde24b46c50a57f29301feb7f965678f1d7ed4632cc6feb0
SIZE (handbrake/libdvdread-6.0.2.tar.bz2) = 405298
SHA256 (handbrake/dav1d-0.5.1.tar.bz2) = 0214d201a338e8418f805b68f9ad277e33d79c18594dee6eaf6dcd74db2674a9
SIZE (handbrake/dav1d-0.5.1.tar.bz2) = 548584
SHA256 (handbrake/x265_3.2.1.tar.gz) = fb9badcf92364fd3567f8b5aa0e5e952aeea7a39a2b864387cec31e3b58cbbcc
SIZE (handbrake/x265_3.2.1.tar.gz) = 1426255
SHA256 (handbrake/HandBrake-HandBrake-1.3.3_GH0.tar.gz) = 4a004666cdf4570385c7e4d8da093f36b4baa86e32bb0814b4d14e267905e3b3
SIZE (handbrake/HandBrake-HandBrake-1.3.3_GH0.tar.gz) = 17925272
SHA256 (handbrake/ffmpeg-4.4.tar.bz2) = 42093549751b582cf0f338a21a3664f52e0a9fbe0d238d3c992005e493607d0e
SIZE (handbrake/ffmpeg-4.4.tar.bz2) = 11489948
SHA256 (handbrake/libbluray-1.3.0.tar.bz2) = e2dbaf99e84e0a9725f4985bcb85d41e52c2261cc651d8884b1b790b5ef016f9
SIZE (handbrake/libbluray-1.3.0.tar.bz2) = 754069
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.0.tar.bz2) = e0cb645f170e7a087bc76e501324177be51a8db21df22ad37b43d289d7d1f7b5
SIZE (handbrake/dav1d-0.9.0.tar.bz2) = 771739
SHA256 (handbrake/x265_3.5.tar.gz) = e70a3335cacacbba0b3a20ec6fecd6783932288ebc8163ad74bcc9606477cae8
SIZE (handbrake/x265_3.5.tar.gz) = 1537044
SHA256 (handbrake/zimg-3.0.1.tar.gz) = c50a0922f4adac4efad77427d13520ed89b8366eef0ef2fa379572951afcc73f
SIZE (handbrake/zimg-3.0.1.tar.gz) = 326304
SHA256 (handbrake/HandBrake-HandBrake-1.4.0_GH0.tar.gz) = 32e9bb9d30d17c5d503ad29049d8e2b04a1ed900cf7877650139b7d504b0a2b3
SIZE (handbrake/HandBrake-HandBrake-1.4.0_GH0.tar.gz) = 16787997

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +0,0 @@
--- contrib/ffmpeg/module.defs.orig 2020-06-13 14:05:35 UTC
+++ contrib/ffmpeg/module.defs
@@ -57,10 +57,11 @@ FFMPEG.CONFIGURE.extra = \
--disable-decoder=*_crystalhd \
--enable-libdav1d \
--enable-decoder=libdav1d \
+ --pkg-config-flags=--static \
--cc="$(FFMPEG.GCC.gcc)" \
--extra-ldflags="$(call fn.ARGS,FFMPEG.GCC,*archs *sysroot *minver ?extra) -L$(call fn.ABSOLUTE,$(CONTRIB.build/)lib)"
-ifeq (1-linux,$(FEATURE.qsv)-$(HOST.system))
+ifneq (,$(filter $(FEATURE.qsv)-$(HOST.system),1-linux 1-freebsd))
FFMPEG.CONFIGURE.extra += --enable-vaapi
FFMPEG.CONFIGURE.extra += --disable-xlib
else

View File

@ -1,13 +1,13 @@
--- contrib/x265_10bit/module.defs.orig 2018-06-17 04:23:34 UTC
--- 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 =
X265_10.CONFIGURE.shared = -DENABLE_SHARED=OFF
X265_10.CONFIGURE.extra = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=ON -DENABLE_LIBNUMA=OFF -DEXPORT_C_API=OFF
X265_10.CONFIGURE.extra = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF
+ifneq (x86_64,$(BUILD.machine))
+ X265_10.CONFIGURE.extra += -DENABLE_ASSEMBLY=0
+endif
+
ifneq (none,$(X265_10.GCC.g))
X265_10.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Debug
else
ifneq (1,$(FEATURE.numa))
X265_10.CONFIGURE.extra += -DENABLE_LIBNUMA=OFF
endif

View File

@ -1,13 +1,13 @@
--- contrib/x265_12bit/module.defs.orig 2018-06-17 04:23:34 UTC
--- 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 =
X265_12.CONFIGURE.shared = -DENABLE_SHARED=OFF
X265_12.CONFIGURE.extra = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=ON -DENABLE_LIBNUMA=OFF -DEXPORT_C_API=OFF -DMAIN12=ON
X265_12.CONFIGURE.extra = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DMAIN12=ON
+ifneq (x86_64,$(BUILD.machine))
+ X265_12.CONFIGURE.extra += -DENABLE_ASSEMBLY=0
+endif
+
ifneq (none,$(X265_12.GCC.g))
X265_12.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Debug
else
ifneq (1,$(FEATURE.numa))
X265_12.CONFIGURE.extra += -DENABLE_LIBNUMA=OFF
endif

View File

@ -1,12 +0,0 @@
--- gtk/configure.ac.orig 2019-11-09 20:44:32 UTC
+++ gtk/configure.ac
@@ -227,6 +227,9 @@ case $host in
;;
*-*-freebsd*)
HB_LIBS="$HB_LIBS -lpthread"
+ if test "x$use_qsv" = "xyes" ; then
+ HB_LIBS="$HB_LIBS -lva -lva-drm"
+ fi
;;
*-*-netbsd*)
HB_LIBS="$HB_LIBS -pthread"

View File

@ -1,36 +0,0 @@
--- libhb/handbrake/ports.h.orig 2019-11-09 20:44:32 UTC
+++ libhb/handbrake/ports.h
@@ -28,7 +28,7 @@
#if HB_PROJECT_FEATURE_QSV
#include "mfx/mfxstructures.h"
-#ifdef SYS_LINUX
+#if defined(SYS_LINUX) || defined(SYS_FREEBSD)
#include <va/va_drm.h>
#endif
#endif
@@ -36,9 +36,9 @@
/************************************************************************
* HW accel display
***********************************************************************/
-#ifdef SYS_LINUX
+#if defined(SYS_LINUX) || defined(SYS_FREEBSD)
extern const char* DRM_INTEL_DRIVER_NAME;
-#endif // SYS_LINUX
+#endif // SYS_LINUX || SYS_FREEBSD
typedef struct
{
@@ -46,10 +46,10 @@ typedef struct
#if HB_PROJECT_FEATURE_QSV
mfxHandleType mfxType;
-#ifdef SYS_LINUX
+#if defined(SYS_LINUX) || defined(SYS_FREEBSD)
int vaFd;
VADisplay vaDisplay;
-#endif // SYS_LINUX
+#endif // SYS_LINUX || SYS_FREEBSD
#endif
} hb_display_t;

View File

@ -1,41 +0,0 @@
--- libhb/ports.c.orig 2019-11-09 20:44:32 UTC
+++ libhb/ports.c
@@ -28,7 +28,11 @@
#if defined(SYS_DARWIN) || defined(SYS_FREEBSD)
#include <sys/types.h>
#include <sys/sysctl.h>
+#if HB_PROJECT_FEATURE_QSV && defined(SYS_FREEBSD)
+#include <libdrm/drm.h>
+#include <fcntl.h>
#endif
+#endif
#ifdef SYS_OPENBSD
#include <sys/param.h>
@@ -1518,7 +1522,7 @@ char * hb_strndup(const char * src, size_t len)
}
#if HB_PROJECT_FEATURE_QSV
-#ifdef SYS_LINUX
+#if defined(SYS_LINUX) || defined(SYS_FREEBSD)
#define MAX_NODES 16
#define DRI_RENDER_NODE_START 128
@@ -1676,7 +1680,7 @@ void hb_display_close(hb_display_t ** _d)
*_d = NULL;
}
-#else // !SYS_LINUX
+#else // !SYS_LINUX && !SYS_FREEBSD
hb_display_t * hb_display_init(const char * driver_name,
const char * const * interface_names)
@@ -1689,7 +1693,7 @@ void hb_display_close(hb_display_t ** _d)
(void)_d;
}
-#endif // SYS_LINUX
+#endif // SYS_LINUX || SYS_FREEBSD
#else // !HB_PROJECT_FEATURE_QSV
hb_display_t * hb_display_init(const char * driver_name,

View File

@ -1,20 +0,0 @@
--- libhb/qsv_common.c.orig 2019-11-09 20:44:32 UTC
+++ libhb/qsv_common.c
@@ -678,7 +678,7 @@ int hb_qsv_info_init()
*/
mfxSession session;
mfxVersion version = { .Major = 1, .Minor = 0, };
-#ifdef SYS_LINUX
+#if defined(SYS_LINUX) || defined(SYS_FREEBSD)
mfxIMPL hw_preference = MFX_IMPL_VIA_ANY;
#else
mfxIMPL hw_preference = MFX_IMPL_VIA_D3D11;
@@ -738,7 +738,7 @@ int hb_qsv_info_init()
}
else
{
-#ifndef SYS_LINUX
+#if !defined(SYS_LINUX) && !defined(SYS_FREEBSD)
// Windows only: After D3D11 we will try D3D9
if (hw_preference == MFX_IMPL_VIA_D3D11)
hw_preference = MFX_IMPL_VIA_D3D9;

View File

@ -1,29 +0,0 @@
--- make/configure.py.orig 2019-11-09 20:44:32 UTC
+++ make/configure.py
@@ -1413,7 +1413,7 @@ def createCLI( cross = None ):
grp.add_argument( '--enable-nvenc', dest="enable_nvenc", default=IfHost( True, '*-*-linux*', '*-*-mingw*', none=False).value, action='store_true', help=(( 'enable %s' %h ) if h != argparse.SUPPRESS else h) )
grp.add_argument( '--disable-nvenc', dest="enable_nvenc", action='store_false', help=(( 'disable %s' %h ) if h != argparse.SUPPRESS else h) )
- h = IfHost( 'Intel QSV video encoder/decoder', '*-*-linux*', '*-*-mingw*', none=argparse.SUPPRESS).value
+ h = IfHost( 'Intel QSV video encoder/decoder', '*-*-linux*', '*-*-freebsd*', '*-*-mingw*', none=argparse.SUPPRESS).value
grp.add_argument( '--enable-qsv', dest="enable_qsv", default=IfHost(True, "*-*-mingw*", none=False).value, action='store_true', help=(( 'enable %s' %h ) if h != argparse.SUPPRESS else h) )
grp.add_argument( '--disable-qsv', dest="enable_qsv", action='store_false', help=(( 'disable %s' %h ) if h != argparse.SUPPRESS else h) )
@@ -1684,7 +1684,7 @@ try:
none=False).value
and options.enable_x265)
# Disable QSV on unsupported platforms
- options.enable_qsv = IfHost(options.enable_qsv, '*-*-linux*',
+ options.enable_qsv = IfHost(options.enable_qsv, '*-*-linux*', '*-*-freebsd*',
'*-*-mingw*', none=False).value
# Disable VCE on unsupported platforms
options.enable_vce = IfHost(options.enable_vce, '*-*-linux*', '*-*-mingw*',
@@ -2124,7 +2124,7 @@ int main()
stdout.write( 'Enable NVENC: %s' % options.enable_nvenc )
stdout.write( ' (%s)\n' % note_unsupported ) if not (host_tuple.system == 'linux' or host_tuple.system == 'mingw') else stdout.write( '\n' )
stdout.write( 'Enable QSV: %s' % options.enable_qsv )
- stdout.write( ' (%s)\n' % note_unsupported ) if not (host_tuple.system == 'linux' or host_tuple.system == 'mingw') else stdout.write( '\n' )
+ stdout.write( ' (%s)\n' % note_unsupported ) if not (host_tuple.system == 'linux' or host_tuple.system == 'freebsd' or host_tuple.system == 'mingw') else stdout.write( '\n' )
stdout.write( 'Enable VCE: %s' % options.enable_vce )
stdout.write( ' (%s)\n' % note_unsupported ) if not (host_tuple.system == 'linux' or host_tuple.system == 'mingw') else stdout.write( '\n' )

View File

@ -1,12 +0,0 @@
--- make/include/main.defs.orig 2019-11-09 20:44:32 UTC
+++ make/include/main.defs
@@ -53,7 +53,9 @@ MODULES += contrib/libdvdnav
MODULES += contrib/libbluray
ifeq (1,$(FEATURE.qsv))
+ifeq (,$(filter $(HOST.system),freebsd))
MODULES += contrib/libmfx
+endif
endif
ifeq (1,$(FEATURE.vce))

View File

@ -1,11 +0,0 @@
--- test/module.defs.orig 2019-11-09 20:44:32 UTC
+++ test/module.defs
@@ -25,7 +25,7 @@ endif
ifeq (1,$(FEATURE.qsv))
TEST.GCC.l += mfx
-ifeq ($(HOST.system),linux)
+ifneq (,$(filter $(HOST.system),linux freebsd))
TEST.GCC.l += va va-drm
endif
endif

View File

@ -1,9 +1,9 @@
URL=https://github.com/HandBrake/HandBrake.git
HASH=012a0f15dfab1383899a6a04f7c84a336b578d70
SHORTHASH=012a0f15d
TAG=1.3.3
TAG_HASH=012a0f15dfab1383899a6a04f7c84a336b578d70
HASH=a91adfa02ce544c84aa34e758b85f0967d005aa7
SHORTHASH=a91adfa02
TAG=1.3.2
TAG_HASH=a91adfa02ce544c84aa34e758b85f0967d005aa7
REV=0
BRANCH=
REMOTE=https://github.com/HandBrake/HandBrake.git
DATE=2020-06-13 15:05:35 +0100
DATE=2020-05-03 12:12:08 -0400

View File

@ -11,6 +11,7 @@ bin/HandBrakeCLI
%%X11%%share/locale/es/LC_MESSAGES/ghb.mo
%%X11%%share/locale/eu/LC_MESSAGES/ghb.mo
%%X11%%share/locale/fr/LC_MESSAGES/ghb.mo
%%X11%%share/locale/he/LC_MESSAGES/ghb.mo
%%X11%%share/locale/hr/LC_MESSAGES/ghb.mo
%%X11%%share/locale/it/LC_MESSAGES/ghb.mo
%%X11%%share/locale/ja/LC_MESSAGES/ghb.mo
@ -22,10 +23,13 @@ bin/HandBrakeCLI
%%X11%%share/locale/pt_BR/LC_MESSAGES/ghb.mo
%%X11%%share/locale/ro/LC_MESSAGES/ghb.mo
%%X11%%share/locale/ru/LC_MESSAGES/ghb.mo
%%X11%%share/locale/si/LC_MESSAGES/ghb.mo
%%X11%%share/locale/sk/LC_MESSAGES/ghb.mo
%%X11%%share/locale/sl_SI/LC_MESSAGES/ghb.mo
%%X11%%share/locale/sv/LC_MESSAGES/ghb.mo
%%X11%%share/locale/th/LC_MESSAGES/ghb.mo
%%X11%%share/locale/tr/LC_MESSAGES/ghb.mo
%%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/metainfo/fr.handbrake.ghb.metainfo.xml