From cfb39f5d3e37aa9a1b6a26e547ba396a6e5c421b Mon Sep 17 00:00:00 2001 From: Nathan Owens Date: Sat, 7 Dec 2019 20:10:26 -0600 Subject: [PATCH] handbrake: update to 1.3.0 Signed-off-by: Nathan Owens --- .../patches/allow-disable-nvenc.patch | 15 ---- .../patches/fix-missing-x265-link-flag.patch | 27 ++++++ ...handbrake-fix-missing-x265-link-flag.patch | 13 --- srcpkgs/handbrake/patches/i686.patch | 32 +++++++ .../handbrake/patches/remove-dvdnav-dup.patch | 20 +++++ .../patches/remove-faac-dependency.patch | 84 +++++++++++++++++++ srcpkgs/handbrake/template | 20 ++--- 7 files changed, 173 insertions(+), 38 deletions(-) delete mode 100644 srcpkgs/handbrake/patches/allow-disable-nvenc.patch create mode 100644 srcpkgs/handbrake/patches/fix-missing-x265-link-flag.patch delete mode 100644 srcpkgs/handbrake/patches/handbrake-fix-missing-x265-link-flag.patch create mode 100644 srcpkgs/handbrake/patches/i686.patch create mode 100644 srcpkgs/handbrake/patches/remove-dvdnav-dup.patch create mode 100644 srcpkgs/handbrake/patches/remove-faac-dependency.patch diff --git a/srcpkgs/handbrake/patches/allow-disable-nvenc.patch b/srcpkgs/handbrake/patches/allow-disable-nvenc.patch deleted file mode 100644 index 734592ac4e9..00000000000 --- a/srcpkgs/handbrake/patches/allow-disable-nvenc.patch +++ /dev/null @@ -1,15 +0,0 @@ -This adds the option to disable nvenc, as for some reason it's not there. -It cannot be enabled on non-x86 platforms, yet the buildsystem forces it -for everything that is not freebsd and mac, which is wrong. - ---- make/configure.py -+++ make/configure.py -@@ -1328,7 +1328,7 @@ def createCLI(): - - h = IfHost( 'enable Nvidia NVEnc video encoder', '*-*-*', none=optparse.SUPPRESS_HELP ).value - grp.add_option( '--enable-nvenc', dest="enable_nvenc", default=not (host.match( '*-*-darwin*' ) or host.match( '*-*-freebsd*' )), action='store_true', help=h ) -- -+ grp.add_option( '--disable-nvenc', dest="enable_nvenc", action='store_false' ) - - cli.add_option_group( grp ) - diff --git a/srcpkgs/handbrake/patches/fix-missing-x265-link-flag.patch b/srcpkgs/handbrake/patches/fix-missing-x265-link-flag.patch new file mode 100644 index 00000000000..e4b04b3b2f1 --- /dev/null +++ b/srcpkgs/handbrake/patches/fix-missing-x265-link-flag.patch @@ -0,0 +1,27 @@ +diff --git a/gtk/configure.ac b/gtk/configure.ac +index 92aabcbe8..1f4a1df95 100644 +--- gtk/configure.ac ++++ gtk/configure.ac +@@ -199,7 +199,7 @@ PKG_CHECK_MODULES(GHB, [$GHB_PACKAGES]) + + GHB_CFLAGS="$HBINC $GHB_CFLAGS" + +-HB_LIBS="-lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lx264 -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -llzma" ++HB_LIBS="-lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lx264 -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -llzma -ldl" + + if test "x$use_fdk_aac" = "xyes" ; then + HB_LIBS="$HB_LIBS -lfdk-aac" +diff --git a/test/module.defs b/test/module.defs +index ffc00a8b2..62b01ffd5 100644 +--- test/module.defs ++++ test/module.defs +@@ -69,6 +69,9 @@ else ifeq ($(HOST.system),linux) + ifeq (1, $(FEATURE.numa)) + TEST.GCC.l += numa + endif ++ifeq (1, $(FEATURE.x265)) ++ TEST.GCC.l += x265 ++endif + else ifeq ($(HOST.system),kfreebsd) + TEST.GCC.l += pthread dl m + else ifeq ($(HOST.system),freebsd) diff --git a/srcpkgs/handbrake/patches/handbrake-fix-missing-x265-link-flag.patch b/srcpkgs/handbrake/patches/handbrake-fix-missing-x265-link-flag.patch deleted file mode 100644 index 9daa0ce857f..00000000000 --- a/srcpkgs/handbrake/patches/handbrake-fix-missing-x265-link-flag.patch +++ /dev/null @@ -1,13 +0,0 @@ -Written by: Peter Foley -Gentoo Bug: #552792 - ---- test/module.defs -+++ test/module.defs -@@ -25,6 +25,7 @@ - - ifeq (1,$(FEATURE.x265)) - TEST.GCC.D += USE_X265 -+ TEST.GCC.l += x265 - endif - - TEST.GCC.l += $(foreach m,$(MODULES.NAMES),$($m.OSL.libs)) diff --git a/srcpkgs/handbrake/patches/i686.patch b/srcpkgs/handbrake/patches/i686.patch new file mode 100644 index 00000000000..eb6b8adb31d --- /dev/null +++ b/srcpkgs/handbrake/patches/i686.patch @@ -0,0 +1,32 @@ +diff --git libhb/ports.c libhb/ports.c +index bb1733a..b6d0b38 100644 +--- libhb/ports.c ++++ libhb/ports.c +@@ -286,15 +286,15 @@ const char* hb_get_cpu_platform_name() + } + } + +-#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 + #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 ARCH_X86_64 || ARCH_X86_32 ++#if _ARCH_X86_64 || _ARCH_X86_32 + int eax, ebx, ecx, edx, family, model; + + cpuid(1, &eax, &ebx, &ecx, &edx); diff --git a/srcpkgs/handbrake/patches/remove-dvdnav-dup.patch b/srcpkgs/handbrake/patches/remove-dvdnav-dup.patch new file mode 100644 index 00000000000..fc20e5da877 --- /dev/null +++ b/srcpkgs/handbrake/patches/remove-dvdnav-dup.patch @@ -0,0 +1,20 @@ +--- libhb/dvdnav.c ++++ libhb/dvdnav.c +@@ -1225,16 +1225,7 @@ + { + for (kk = 0; kk < buttons; kk++) + { +- dvdnav_t *dvdnav_copy; +- +- result = dvdnav_dup( &dvdnav_copy, d->dvdnav ); +- if (result != DVDNAV_STATUS_OK) +- { +- hb_log("dvdnav dup failed: %s", dvdnav_err_to_string(d->dvdnav)); +- goto done; +- } +- title = try_button( dvdnav_copy, kk, list_title ); +- dvdnav_free_dup( dvdnav_copy ); ++ title = try_button( d->dvdnav, kk, list_title ); + + if ( title >= 0 ) + { diff --git a/srcpkgs/handbrake/patches/remove-faac-dependency.patch b/srcpkgs/handbrake/patches/remove-faac-dependency.patch new file mode 100644 index 00000000000..5f16bedb2d6 --- /dev/null +++ b/srcpkgs/handbrake/patches/remove-faac-dependency.patch @@ -0,0 +1,84 @@ +--- libhb/common.c ++++ libhb/common.c +@@ -243,7 +243,6 @@ + { + // legacy encoders, back to HB 0.9.4 whenever possible (disabled) + { { "", "dts", NULL, HB_ACODEC_DCA_PASS, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_DTS_PASS, }, +- { { "AAC (faac)", "faac", NULL, 0, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_AAC, }, + { { "AAC (ffmpeg)", "ffaac", NULL, HB_ACODEC_FFAAC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_AAC, }, + { { "AC3 (ffmpeg)", "ffac3", NULL, HB_ACODEC_AC3, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_AC3, }, + { { "MP3 (lame)", "lame", NULL, HB_ACODEC_LAME, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, HB_GID_ACODEC_MP3, }, +--- scripts/manicure.rb ++++ scripts/manicure.rb +@@ -349,7 +349,7 @@ + audioEncoders << "copy:dtshd" + when /AAC Pass/ + audioEncoders << "copy:aac" +- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)" ++ when "AAC (ffmpeg)", "AAC (avcodec)" + audioEncoders << "av_aac" + when "AAC (FDK)" + audioEncoders << "fdk_aac" +@@ -466,7 +466,7 @@ + case hash["AudioEncoderFallback"] + when /AC3/ + audioEncoderFallback << "ac3" +- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)" ++ when "AAC (ffmpeg)", "AAC (avcodec)" + audioEncoderFallback << "av_aac" + when "AAC (FDK)" + audioEncoderFallback << "fdk_aac" +@@ -753,7 +753,7 @@ + audioEncoders << "copy:dtshd" + when /AAC Pass/ + audioEncoders << "copy:aac" +- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)" ++ when "AAC (ffmpeg)", "AAC (avcodec)" + audioEncoders << "av_aac" + when "AAC (FDK)" + audioEncoders << "fdk_aac" +@@ -870,7 +870,7 @@ + case hash["AudioEncoderFallback"] + when /AC3/ + audioEncoderFallback << "ac3" +- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)" ++ when "AAC (ffmpeg)", "AAC (avcodec)" + audioEncoderFallback << "av_aac" + when "AAC (FDK)" + audioEncoderFallback << "fdk_aac" +@@ -1163,7 +1163,7 @@ + audioEncoders << "copy:dtshd" + when /AAC Pass/ + audioEncoders << "copy:aac" +- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)" ++ when "AAC (ffmpeg)", "AAC (avcodec)" + audioEncoders << "av_aac" + when "AAC (FDK)" + audioEncoders << "fdk_aac" +@@ -1298,7 +1298,7 @@ + case hash["AudioEncoderFallback"] + when /AC3/ + audioEncoderFallback << "ac3" +- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)" ++ when "AAC (ffmpeg)", "AAC (avcodec)" + audioEncoderFallback << "av_aac" + when "AAC (FDK)" + audioEncoderFallback << "fdk_aac" +@@ -1615,7 +1615,7 @@ + audioEncoders << "copy:dtshd" + when /AAC Pass/ + audioEncoders << "copy:aac" +- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)" ++ when "AAC (ffmpeg)", "AAC (avcodec)" + audioEncoders << "av_aac" + when "AAC (FDK)" + audioEncoders << "fdk_aac" +@@ -1732,7 +1732,7 @@ + case hash["AudioEncoderFallback"] + when /AC3/ + audioEncoderFallback << "ac3" +- when "AAC (ffmpeg)", "AAC (avcodec)", "AAC (faac)" ++ when "AAC (ffmpeg)", "AAC (avcodec)" + audioEncoderFallback << "av_aac" + when "AAC (FDK)" + audioEncoderFallback << "fdk_aac" diff --git a/srcpkgs/handbrake/template b/srcpkgs/handbrake/template index ddf510d982f..2617f81a240 100644 --- a/srcpkgs/handbrake/template +++ b/srcpkgs/handbrake/template @@ -1,22 +1,22 @@ # Template file for 'handbrake' pkgname=handbrake -version=1.2.2 -revision=5 +version=1.3.0 +revision=1 archs="i686* x86_64* ppc64*" wrksrc="HandBrake-${version}" -build_style=configure -configure_args="--prefix=/usr --force --disable-gtk-update-checks +build_style=gnu-configure +configure_args="--force --disable-gtk-update-checks $(vopt_enable fdk_aac fdk-aac) $(vopt_enable nvenc)" -make_build_args="-C build" -make_install_args="-C build" -hostmakedepends="automake libtool cmake pkg-config intltool - python yasm wget m4 gettext-devel glib-devel" +make_build_args="-C ${XBPS_TRIPLET}" +make_install_args="-C ${XBPS_TRIPLET}" +hostmakedepends="automake libtool cmake pkg-config python3 intltool + nasm wget m4 gettext-devel glib-devel meson" makedepends="zlib-devel bzip2-devel libnotify-devel gtk+3-devel ncurses-devel gst-plugins-base1-devel libgudev-devel x264-devel x265-devel dbus-glib-devel fribidi-devel libass-devel fontconfig-devel libxml2-devel libogg-devel libdvdnav-devel libdvdread-devel libtheora-devel lame-devel jansson-devel libsamplerate-devel libbluray-devel librsvg-devel libvpx-devel ffmpeg-devel - opus-devel speex-devel atk-devel $(vopt_if nvenc nv-codec-headers) + opus-devel speex-devel atk-devel libnuma-devel $(vopt_if nvenc nv-codec-headers) $(vopt_if fdk_aac fdk-aac-devel)" depends="gst-plugins-good1 desktop-file-utils hicolor-icon-theme" short_desc="Multithreaded video transcoder" @@ -24,7 +24,7 @@ maintainer="Enno Boland " license="GPL-2.0-only" homepage="https://handbrake.fr/" distfiles="https://download2.handbrake.fr/${version}/HandBrake-${version}-source.tar.bz2" -checksum=df6816f517d60ae8a6626aa731821af2d1966c155fa53b2b9a06c47f3c565e4c +checksum=a9a82eb5ca04a793705b3d7d11cefa29946694eeb13b40161446aaca35b31d96 build_options="fdk_aac nvenc"