aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video')
-rw-r--r--media-video/handbrake/Manifest7
-rw-r--r--media-video/handbrake/files/handbrake-0.10.3-nolibav.patch76
-rw-r--r--media-video/handbrake/files/handbrake-9999-fix-missing-x265-link-flag.patch13
-rw-r--r--media-video/handbrake/files/handbrake-9999-remove-dvdnav-dup.patch20
-rw-r--r--media-video/handbrake/files/handbrake-9999-remove-faac-dependency.patch84
-rw-r--r--media-video/handbrake/handbrake-1.0.7.ebuild156
-rw-r--r--media-video/handbrake/metadata.xml18
7 files changed, 374 insertions, 0 deletions
diff --git a/media-video/handbrake/Manifest b/media-video/handbrake/Manifest
new file mode 100644
index 0000000..0d923f1
--- /dev/null
+++ b/media-video/handbrake/Manifest
@@ -0,0 +1,7 @@
+AUX handbrake-0.10.3-nolibav.patch 2821 BLAKE2B 78294506e6b3efe71d7d14537c2e605d10067fd9e637f06ff3b01a9d8e6bea34dfb2c871bb2558e35310bebdb4922ae99f63d9f7911f7236a28ea1a4dc3d6832 SHA512 88a0b5df6cc198a8383a2d1dcf6d4c71f24445ea71e29dac570a2b3987cdaa0a563b56c7cccd291b58099dbdb15130bdcc0cd4527bdaeb442aefe4fa06455ec7
+AUX handbrake-9999-fix-missing-x265-link-flag.patch 281 BLAKE2B 623f902bb31586513a51db95a63841e6234d4841d6332d2be9a6a0d7fd07f3e9cc694eb8945bebf718e10538fa390bbaa9dcbea81ba5324cbf20bd64bc582fdb SHA512 30d457258dd287cae3df66e7899b66480be2212a3969fe3a4e4f99ed383740e8f597fa7cf869922f29f501f100313b7efd78ebe09e2949ed4c235e2df22d22e5
+AUX handbrake-9999-remove-dvdnav-dup.patch 809 BLAKE2B 16cde838dcf59753e5438df0d2c2b81f45667058bd0687a7368c528f61bd2a2fedc4462894daad58c3acb5c51bdd53df3b30e28adba93a0fb2838416e4226217 SHA512 e2005155adf29e8253f4313d209b2ccc642fb1d7f63256d3bdf675ddd0e6b0e15bc6bffd98e19aa7dab3907e161e29c5268dc5656590ce9254b12a91ac3ff6b0
+AUX handbrake-9999-remove-faac-dependency.patch 3697 BLAKE2B b0f7d0a1c4d464d3287ab233b756f5036d6ffa7e9e59a2f98a8ffb2ae59e46d25e56edb3e5bf9c04a16330f3dc50f4c2426f252b35834b7c9c9e6b4904244368 SHA512 9d070e50a9b7d4b8ac25b7d56bd341aca6dc979ba506c84f4b95109909f70020723915cd120bed24e84a8fc242ee3c3a5775f43a78b7995e53cd499444c9f6dc
+DIST handbrake-1.0.7.tar.bz2 12650549 BLAKE2B 54fa6f4ee053de3ce1840695e66b0fef5ac09aed79f61755f146dbf990c624608e9acf2f81e69871ece85daf5a3f09780a75f43567c5b08afc55863495958ec7 SHA512 bacc5ff105893a0fdea95174839663e00027c87a13f00fb67d39c347b55e35869c0b998ec52181389b98cc2cc358d221e41d729e76952e4cb21fe8d12ee5a44a
+EBUILD handbrake-1.0.7.ebuild 3524 BLAKE2B 26efd30bd6f2e359fb5059aa2713645b7b7a3a1ae929b5492fb4589d2b76f454653994d88d8bbb875212080cc75933bf1cb8a90b1443022de0e7e2a7c0476786 SHA512 b519a8842dbd5a1420e1b3bd4256b2edbf5b1163c0a2eac90a6386798d86af63cdf18aa519f4244b51042a38a14a10cfae6fbf3211dbd9e1c981f730011dfb99
+MISC metadata.xml 842 BLAKE2B c494d233f5eb83c6ad5f1eb02e332a8335cf908019942bd0526b45fd9186f300676474a7d814dcf221c8379e6d196f3eb9f14aba04ec10065c12b334176dba1c SHA512 d503d78aefd9a994d3197093f97dd3f958fb8347e6eff7598d9d5ef11a5eb17e0088bac4bb676dfa617dd0377ee185e2d0e80fe91feecd53e5257cbf9adc5f0e
diff --git a/media-video/handbrake/files/handbrake-0.10.3-nolibav.patch b/media-video/handbrake/files/handbrake-0.10.3-nolibav.patch
new file mode 100644
index 0000000..8539186
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-0.10.3-nolibav.patch
@@ -0,0 +1,76 @@
+From 75549414927212d4d1666730133805b33447de79 Mon Sep 17 00:00:00 2001
+From: John Stebbins <jstebbins.hb@gmail.com>
+Date: Tue, 3 Nov 2015 10:16:01 -0800
+Subject: [PATCH] muxavformat: add support for mp4 fallback audio signalling
+
+---
+diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c
+index 0d70597..373c2ab 100644
+--- a/libhb/muxavformat.c
++++ b/libhb/muxavformat.c
+@@ -121,7 +121,7 @@ static int avformatInit( hb_mux_object_t * m )
+ hb_mux_data_t * track;
+ int meta_mux;
+ int max_tracks;
+- int ii, ret;
++ int ii, jj, ret;
+
+ int clock_min, clock_max, clock;
+ hb_video_framerate_get_limits(&clock_min, &clock_max, &clock);
+@@ -589,6 +589,56 @@ static int avformatInit( hb_mux_object_t * m )
+ }
+ }
+
++ // Check for audio track associations
++ for (ii = 0; ii < hb_list_count(job->list_audio); ii++)
++ {
++ audio = hb_list_item(job->list_audio, ii);
++ switch (audio->config.out.codec & HB_ACODEC_MASK)
++ {
++ case HB_ACODEC_FFAAC:
++ case HB_ACODEC_CA_AAC:
++ case HB_ACODEC_CA_HAAC:
++ case HB_ACODEC_FDK_AAC:
++ case HB_ACODEC_FDK_HAAC:
++ break;
++
++ default:
++ {
++ // Mark associated fallback audio tracks for any non-aac track
++ for(jj = 0; jj < hb_list_count( job->list_audio ); jj++ )
++ {
++ hb_audio_t * fallback;
++ int codec;
++
++ if (ii == jj) continue;
++
++ fallback = hb_list_item( job->list_audio, jj );
++ codec = fallback->config.out.codec & HB_ACODEC_MASK;
++ if (fallback->config.in.track == audio->config.in.track &&
++ (codec == HB_ACODEC_FFAAC ||
++ codec == HB_ACODEC_CA_AAC ||
++ codec == HB_ACODEC_CA_HAAC ||
++ codec == HB_ACODEC_FDK_AAC ||
++ codec == HB_ACODEC_FDK_HAAC))
++ {
++ hb_mux_data_t * fallback_track;
++ int * sd;
++
++ track = audio->priv.mux_data;
++ fallback_track = fallback->priv.mux_data;
++ sd = (int*)av_stream_new_side_data(track->st,
++ AV_PKT_DATA_FALLBACK_TRACK,
++ sizeof(int));
++ if (sd != NULL)
++ {
++ *sd = fallback_track->st->index;
++ }
++ }
++ }
++ } break;
++ }
++ }
++
+ char * subidx_fmt =
+ "size: %dx%d\n"
+ "org: %d, %d\n"
diff --git a/media-video/handbrake/files/handbrake-9999-fix-missing-x265-link-flag.patch b/media-video/handbrake/files/handbrake-9999-fix-missing-x265-link-flag.patch
new file mode 100644
index 0000000..a963fe0
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-fix-missing-x265-link-flag.patch
@@ -0,0 +1,13 @@
+Written by: Peter Foley <pefoley2@pefoley.com>
+Gentoo Bug: #552792
+
+--- a/test/module.defs
++++ b/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/media-video/handbrake/files/handbrake-9999-remove-dvdnav-dup.patch b/media-video/handbrake/files/handbrake-9999-remove-dvdnav-dup.patch
new file mode 100644
index 0000000..7dc1f69
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-remove-dvdnav-dup.patch
@@ -0,0 +1,20 @@
+--- a/libhb/dvdnav.c
++++ b/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/media-video/handbrake/files/handbrake-9999-remove-faac-dependency.patch b/media-video/handbrake/files/handbrake-9999-remove-faac-dependency.patch
new file mode 100644
index 0000000..7e8ab99
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-remove-faac-dependency.patch
@@ -0,0 +1,84 @@
+--- a/libhb/common.c
++++ b/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, },
+--- a/scripts/manicure.rb
++++ b/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/media-video/handbrake/handbrake-1.0.7.ebuild b/media-video/handbrake/handbrake-1.0.7.ebuild
new file mode 100644
index 0000000..0ce6364
--- /dev/null
+++ b/media-video/handbrake/handbrake-1.0.7.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils gnome2-utils python-any-r1
+
+if [[ ${PV} = *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/HandBrake/HandBrake.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ MY_P="HandBrake-${PV}"
+ SRC_URI="http://handbrake.fr/rotation.php?file=${MY_P}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/${MY_P}"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Open-source, GPL-licensed, multiplatform, multithreaded video transcoder"
+HOMEPAGE="http://handbrake.fr/"
+LICENSE="GPL-2"
+
+SLOT="0"
+IUSE="+fdk gstreamer gtk libav libav-aac x265"
+
+REQUIRED_USE="^^ ( fdk libav-aac )"
+
+RDEPEND="
+ dev-libs/jansson
+ media-libs/a52dec
+ media-libs/libass:=
+ >=media-libs/libbluray-1.0
+ media-libs/libdvdnav
+ media-libs/libdvdread
+ media-libs/libsamplerate
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/libvpx
+ media-libs/opus
+ media-libs/x264:=
+ media-sound/lame
+ sys-libs/zlib
+ libav? ( >=media-video/libav-10.1:0=[fdk?] )
+ !libav? ( >=media-video/ffmpeg-2.3:0=[fdk?] )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ media-libs/gst-plugins-good:1.0
+ media-libs/gst-plugins-bad:1.0
+ media-libs/gst-plugins-ugly:1.0
+ media-plugins/gst-plugins-a52dec:1.0
+ media-plugins/gst-plugins-libav:1.0
+ media-plugins/gst-plugins-x264:1.0
+ )
+ gtk? (
+ >=x11-libs/gtk+-3.10
+ dev-libs/dbus-glib
+ dev-libs/glib:2
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/libnotify
+ x11-libs/pango
+ virtual/libgudev:=
+ )
+ fdk? ( media-libs/fdk-aac )
+ x265? ( >=media-libs/x265-1.7:0= )
+ "
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/yasm
+ dev-util/intltool
+ sys-devel/automake"
+
+PATCHES=(
+ # Remove libdvdnav duplication and call it on the original instead.
+ # It may work this way; if not, we should try to mimic the duplication.
+ "${FILESDIR}/${PN}-9999-remove-dvdnav-dup.patch"
+
+ # Remove faac dependency; TODO: figure out if we need to do this at all.
+ "${FILESDIR}/${PN}-9999-remove-faac-dependency.patch"
+
+ # Fix missing x265 link flag
+ "${FILESDIR}/${PN}-9999-fix-missing-x265-link-flag.patch"
+)
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Get rid of leftover bundled library build definitions,
+ sed -i 's:.*\(/contrib\|contrib/\).*::g' \
+ "${S}"/make/include/main.defs \
+ || die "Contrib removal failed."
+
+ default
+
+ # Get rid of libav specific code when using ffmpeg
+ use libav || eapply -R "${FILESDIR}/${PN}-0.10.3-nolibav.patch"
+
+ cd "${S}/gtk"
+ # Don't run autogen.sh.
+ sed -i '/autogen.sh/d' module.rules || die "Removing autogen.sh call failed"
+ eautoreconf
+}
+
+src_configure() {
+ ./configure \
+ --force \
+ --verbose \
+ --prefix="${EPREFIX}/usr" \
+ --disable-gtk-update-checks \
+ $(use_enable libav-aac) \
+ $(use_enable fdk fdk-aac) \
+ $(use_enable gtk) \
+ $(usex !gstreamer --disable-gst) \
+ $(use_enable x265) || die "Configure failed."
+}
+
+src_compile() {
+ emake -C build
+
+ # TODO: Documentation building is currently broken, try to fix it.
+ #
+ # if use doc ; then
+ # emake -C build doc
+ # fi
+}
+
+src_install() {
+ emake -C build DESTDIR="${D}" install
+
+ dodoc README.markdown AUTHORS.markdown NEWS.markdown THANKS.markdown
+}
+
+pkg_postinst() {
+ einfo "For the CLI version of HandBrake, you can use \`HandBrakeCLI\`."
+
+ if use gtk ; then
+ einfo ""
+ einfo "For the GTK+ version of HandBrake, you can run \`ghb\`."
+ fi
+
+ gnome2_icon_cache_update
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/media-video/handbrake/metadata.xml b/media-video/handbrake/metadata.xml
new file mode 100644
index 0000000..1c5819c
--- /dev/null
+++ b/media-video/handbrake/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>thev00d00@gentoo.org</email>
+ <name>Ian Whyman</name>
+ </maintainer>
+ <longdescription>
+ Open-source, GPL-licensed, multiplatform, multithreaded video transcoder.
+ </longdescription>
+ <use>
+ <flag name="gstreamer">Support for the streaming media framework from <pkg>media-libs/gstreamer</pkg>.</flag>
+ <flag name="gtk">Install the GTK UI, ghb.</flag>
+ <flag name="fdk">Support for encoding AAC using <pkg>media-libs/fdk-aac</pkg>.</flag>
+ <flag name="libav-aac">Support for encoding AAC using <pkg>media-video/libav</pkg>'s internal encoder.</flag>
+ <flag name="x265">Support for encoding h265 using <pkg>media-libs/x265</pkg>.</flag>
+ </use>
+</pkgmetadata>