summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-video/handbrake
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-video/handbrake')
-rw-r--r--media-video/handbrake/Manifest3
-rw-r--r--media-video/handbrake/files/handbrake-0.9.9-add-gmodule-to-gtk-configure.patch11
-rw-r--r--media-video/handbrake/files/handbrake-0.9.9-fix-compilation-with-mp4v2-v1.9.1.patch73
-rw-r--r--media-video/handbrake/files/handbrake-0.9.9-remove-faac-dependency.patch203
-rw-r--r--media-video/handbrake/files/handbrake-9999-expand-MK_SUBTITLE_PGS.patch9
-rw-r--r--media-video/handbrake/files/handbrake-9999-fix-compilation-with-mp4v2-v1.9.1.patch75
-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/files/handbrake-9999-use-older-libmkv.patch14
-rw-r--r--media-video/handbrake/files/handbrake-9999-use-unpatched-a52.patch26
-rw-r--r--media-video/handbrake/handbrake-0.10.0-r1.ebuild148
-rw-r--r--media-video/handbrake/handbrake-0.10.1.ebuild148
-rw-r--r--media-video/handbrake/handbrake-0.9.9-r1.ebuild185
-rw-r--r--media-video/handbrake/handbrake-9999.ebuild148
-rw-r--r--media-video/handbrake/metadata.xml18
15 files changed, 1165 insertions, 0 deletions
diff --git a/media-video/handbrake/Manifest b/media-video/handbrake/Manifest
new file mode 100644
index 000000000000..7ada6bbef898
--- /dev/null
+++ b/media-video/handbrake/Manifest
@@ -0,0 +1,3 @@
+DIST handbrake-0.10.0.tar.bz2 10370718 SHA256 a91042da3cc08454844f7c171ee2fde4f0ed08176407fc0328d5118227ed4114 SHA512 e1793bf11aae384a63bdbb055b7b8998e13053d4519890ef6b6eb73988c5fb88c18e394e6c8f0af92cf7ba62a19ee83d908701a1f376adc2804c31192584d590 WHIRLPOOL 04379fd65000282c7472539aa6621ac668970529c3349f55c1ce5d60a6d96047a3a7e2d5d0d97ec002970769c7b8228ae67ac5623e814c3b2b27192351d8546b
+DIST handbrake-0.10.1.tar.bz2 10441776 SHA256 7ea42031fd4d5efd04903a9aae79c952c50fd43b6f7bf08fd1a93f6b358a23f5 SHA512 8e51a8d141749467a51bc781f3f961d507f693d3081b55964c4cb5a04407fd43331739db3a61c290c35c6da51003705e0e8fafe4c2c157c7a25c9c62df49856d WHIRLPOOL a735fcacf9b157cb2959d351d3fdb043c222ec664893fbd249dbebfceebd9951aabf757cd8c1a19c8911504591c22e67b20ae555dcb07d3cff6140f8f58ffdce
+DIST handbrake-0.9.9.tar.bz2 9315199 SHA256 a71dd774104cda00cfb51a813550351d638253791f2f419d04a66f3158a835b3 SHA512 c891e78f5fbc62fd46055bf6cd62e631bc181a2a21167dcf3fe18cbc4b57bb36c11d52dcf39b3c923b807160e79fb2b1f3c36d60f3024149206a86e7bd6d5b68 WHIRLPOOL edcb7758ba68e35b70700bbf484ac7794739a14302d205c080ad4fdf3151b460ee54b0c8dfffd68bca2ccb1a7d4379c9bbb7c3a9939c6bd6a06e1be95f09169e
diff --git a/media-video/handbrake/files/handbrake-0.9.9-add-gmodule-to-gtk-configure.patch b/media-video/handbrake/files/handbrake-0.9.9-add-gmodule-to-gtk-configure.patch
new file mode 100644
index 000000000000..e6f7c44e8517
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-0.9.9-add-gmodule-to-gtk-configure.patch
@@ -0,0 +1,11 @@
+--- HandBrake-0.9.9.orig/gtk/configure.ac 2013-09-01 12:13:06.684612296 +0300
++++ HandBrake-0.9.9/gtk/configure.ac 2013-09-01 20:09:35.446706059 +0300
+@@ -96,7 +96,7 @@ case $host in
+ pkg_gudev="gudev-1.0"
+ ;;
+ esac
+- GHB_PACKAGES="gthread-2.0 gio-2.0 libnotify dbus-glib-1 $pkg_gudev"
++ GHB_PACKAGES="gthread-2.0 gmodule-2.0 gio-2.0 libnotify dbus-glib-1 $pkg_gudev"
+ mingw_flag=no
+ ;;
+ esac
diff --git a/media-video/handbrake/files/handbrake-0.9.9-fix-compilation-with-mp4v2-v1.9.1.patch b/media-video/handbrake/files/handbrake-0.9.9-fix-compilation-with-mp4v2-v1.9.1.patch
new file mode 100644
index 000000000000..c558d4398e07
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-0.9.9-fix-compilation-with-mp4v2-v1.9.1.patch
@@ -0,0 +1,73 @@
+https://github.com/rbrito/pkg-handbrake/blob/master/debian/patches/0005-libhb-Fix-compilation-with-mp4v2-v1.9.1.patch
+
+From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito@ime.usp.br>
+Date: Sun, 22 Apr 2012 05:34:40 -0300
+Subject: libhb: Fix compilation with mp4v2 v1.9.1.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Forwarded: no
+Last-Update: 2012-05-15
+Reviewed-by: Rogério Theodoro de Brito <rbrito@ime.usp.br>
+Signed-off-by: Rogério Theodoro de Brito <rbrito@ime.usp.br>
+---
+ libhb/decmetadata.c | 4 ++--
+ libhb/muxmp4.c | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+--- a/libhb/decmetadata.c
++++ b/libhb/decmetadata.c
+@@ -13,7 +13,7 @@
+ MP4FileHandle input_file;
+ hb_deep_log( 2, "Got an MP4 input, read the metadata");
+
+- input_file = MP4Read( title->path, 0 );
++ input_file = MP4Read(title->path);
+
+ if( input_file != MP4_INVALID_FILE_HANDLE )
+ {
+@@ -92,7 +92,7 @@
+ }
+ }
+
+- MP4Close( input_file );
++ MP4Close(input_file, 0);
+ }
+ }
+
+--- a/libhb/muxmp4.c
++++ b/libhb/muxmp4.c
+@@ -93,13 +93,13 @@
+ if (job->largeFileSize)
+ /* Use 64-bit MP4 file */
+ {
+- m->file = MP4Create( job->file, MP4_DETAILS_ERROR, MP4_CREATE_64BIT_DATA );
++ m->file = MP4Create( job->file, MP4_CREATE_64BIT_DATA );
+ hb_deep_log( 2, "muxmp4: using 64-bit MP4 formatting.");
+ }
+ else
+ /* Limit MP4s to less than 4 GB */
+ {
+- m->file = MP4Create( job->file, MP4_DETAILS_ERROR, 0 );
++ m->file = MP4Create( job->file, 0 );
+ }
+
+ if (m->file == MP4_INVALID_FILE_HANDLE)
+@@ -1331,14 +1331,14 @@
+ MP4TagsFree( tags );
+ }
+
+- MP4Close( m->file );
++ MP4Close( m->file, 0 );
+
+ if ( job->mp4_optimize )
+ {
+ hb_log( "muxmp4: optimizing file" );
+ char filename[1024]; memset( filename, 0, 1024 );
+ snprintf( filename, 1024, "%s.tmp", job->file );
+- MP4Optimize( job->file, filename, MP4_DETAILS_ERROR );
++ MP4Optimize( job->file, filename );
+ remove( job->file );
+ rename( filename, job->file );
+ }
diff --git a/media-video/handbrake/files/handbrake-0.9.9-remove-faac-dependency.patch b/media-video/handbrake/files/handbrake-0.9.9-remove-faac-dependency.patch
new file mode 100644
index 000000000000..e2726d28dda9
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-0.9.9-remove-faac-dependency.patch
@@ -0,0 +1,203 @@
+Forward ported version of https://github.com/rbrito/pkg-handbrake/blob/master/debian/patches/0010-Remove-FAAC-dependency.patch
+
+diff -ur a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
+--- a/gtk/src/audiohandler.c 2013-05-05 15:39:27.715401407 +0200
++++ b/gtk/src/audiohandler.c 2013-05-05 15:42:09.312067074 +0200
+@@ -70,10 +70,7 @@
+ if (hb_audio_encoders[ii].encoder == fallback &&
+ !(hb_audio_encoders[ii].muxers & mux))
+ {
+- if ( mux == HB_MUX_MKV )
+- fallback = HB_ACODEC_LAME;
+- else
+- fallback = HB_ACODEC_FAAC;
++ fallback = HB_ACODEC_LAME;
+ break;
+ }
+ }
+@@ -130,7 +127,7 @@
+ return HB_ACODEC_LAME;
+
+ case HB_ACODEC_AAC_PASS:
+- return HB_ACODEC_FAAC;
++ return HB_ACODEC_FFAAC;
+
+ case HB_ACODEC_AC3_PASS:
+ return HB_ACODEC_AC3;
+diff -ur a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
+--- a/gtk/src/hb-backend.c 2013-05-05 15:39:27.738734740 +0200
++++ b/gtk/src/hb-backend.c 2013-05-05 15:43:13.702066676 +0200
+@@ -3767,7 +3767,7 @@
+ gint
+ ghb_get_default_acodec()
+ {
+- return HB_ACODEC_FAAC;
++ return HB_ACODEC_LAME;
+ }
+
+ static void
+@@ -4505,13 +4505,9 @@
+ {
+ codec = HB_ACODEC_AC3;
+ }
+- else if (mux == HB_MUX_MKV)
+- {
+- codec = HB_ACODEC_LAME;
+- }
+ else
+ {
+- codec = HB_ACODEC_FAAC;
++ codec = HB_ACODEC_LAME;
+ }
+ value = ghb_lookup_acodec_value(codec);
+ ghb_settings_take_value(asettings, "AudioEncoder", value);
+@@ -4525,7 +4521,7 @@
+ if (codec == HB_ACODEC_VORBIS)
+ {
+ a_unsup = "Vorbis";
+- codec = HB_ACODEC_FAAC;
++ codec = HB_ACODEC_LAME;
+ }
+ }
+ if (a_unsup)
+diff -ur a/gtk/src/preset_xlat.c b/gtk/src/preset_xlat.c
+--- a/gtk/src/preset_xlat.c 2013-05-05 15:39:27.775401407 +0200
++++ b/gtk/src/preset_xlat.c 2013-05-05 15:43:34.888733211 +0200
+@@ -260,7 +260,6 @@
+
+ static value_map_t acodec_xlat[] =
+ {
+- {"AAC (faac)", "faac"},
+ {"AC3 Passthru", "ac3"},
+ {"MP3 (lame)", "lame"},
+ {"Vorbis (vorbis)", "vorbis"},
+diff -ur a/gtk/src/presets.c b/gtk/src/presets.c
+--- a/gtk/src/presets.c 2013-05-05 15:39:27.778734740 +0200
++++ b/gtk/src/presets.c 2013-05-05 15:43:59.888733056 +0200
+@@ -2029,8 +2029,6 @@
+
+ static value_map_t acodec_xlat_compat[] =
+ {
+- {"AAC (CoreAudio)", "faac"},
+- {"HE-AAC (CoreAudio)", "faac"},
+ {"AC3 (ffmpeg)", "ac3"},
+ {"AC3", "ac3"},
+ {"MP3 Passthru", "mp3pass"},
+diff -ur a/libhb/common.c b/libhb/common.c
+--- a/libhb/common.c 2013-05-05 15:39:27.788734740 +0200
++++ b/libhb/common.c 2013-05-05 15:45:02.782066001 +0200
+@@ -126,7 +126,6 @@
+ { "AAC (CoreAudio)", "ca_aac", HB_ACODEC_CA_AAC, HB_MUX_MP4|HB_MUX_MKV },
+ { "HE-AAC (CoreAudio)", "ca_haac", HB_ACODEC_CA_HAAC, HB_MUX_MP4|HB_MUX_MKV },
+ #endif
+- { "AAC (faac)", "faac", HB_ACODEC_FAAC, HB_MUX_MP4|HB_MUX_MKV },
+ #ifdef USE_FDK_AAC
+ { "AAC (FDK)", "fdk_aac", HB_ACODEC_FDK_AAC, HB_MUX_MP4|HB_MUX_MKV },
+ { "HE-AAC (FDK)", "fdk_haac", HB_ACODEC_FDK_HAAC, HB_MUX_MP4|HB_MUX_MKV },
+diff -ur a/libhb/common.h b/libhb/common.h
+--- a/libhb/common.h 2013-05-05 15:39:27.788734740 +0200
++++ b/libhb/common.h 2013-05-05 15:45:23.358732540 +0200
+@@ -945,7 +945,6 @@
+ extern hb_work_object_t hb_decavcodeca;
+ extern hb_work_object_t hb_decavcodecv;
+ extern hb_work_object_t hb_declpcm;
+-extern hb_work_object_t hb_encfaac;
+ extern hb_work_object_t hb_enclame;
+ extern hb_work_object_t hb_encvorbis;
+ extern hb_work_object_t hb_muxer;
+diff -ur a/libhb/encfaac.c b/libhb/encfaac.c
+--- a/libhb/encfaac.c 2013-05-05 15:39:27.802068073 +0200
++++ b/libhb/encfaac.c 2013-05-05 15:45:51.798732364 +0200
+@@ -1,3 +1,4 @@
++#if 0
+ /* encfaac.c
+
+ Copyright (c) 2003-2013 HandBrake Team
+@@ -287,3 +288,4 @@
+ return HB_WORK_OK;
+ }
+
++#endif /* 0 */
+\ No newline at end of file
+diff -ur a/libhb/hb.c b/libhb/hb.c
+--- a/libhb/hb.c 2013-05-05 15:39:27.805401407 +0200
++++ b/libhb/hb.c 2013-05-05 15:46:21.548732180 +0200
+@@ -487,7 +487,6 @@
+ hb_register( &hb_decavcodeca );
+ hb_register( &hb_decavcodecv );
+ hb_register( &hb_declpcm );
+- hb_register( &hb_encfaac );
+ hb_register( &hb_enclame );
+ hb_register( &hb_encvorbis );
+ hb_register( &hb_muxer );
+@@ -588,7 +587,6 @@
+ hb_register( &hb_decavcodeca );
+ hb_register( &hb_decavcodecv );
+ hb_register( &hb_declpcm );
+- hb_register( &hb_encfaac );
+ hb_register( &hb_enclame );
+ hb_register( &hb_encvorbis );
+ hb_register( &hb_muxer );
+diff -ur a/libhb/internal.h b/libhb/internal.h
+--- a/libhb/internal.h 2013-05-05 15:39:27.805401407 +0200
++++ b/libhb/internal.h 2013-05-05 15:46:28.215398806 +0200
+@@ -409,7 +409,6 @@
+ WORK_DECAVCODEC,
+ WORK_DECAVCODECV,
+ WORK_DECLPCM,
+- WORK_ENCFAAC,
+ WORK_ENCLAME,
+ WORK_ENCVORBIS,
+ WORK_ENC_CA_AAC,
+diff -ur a/libhb/module.defs b/libhb/module.defs
+--- a/libhb/module.defs 2013-05-05 15:39:27.808734740 +0200
++++ b/libhb/module.defs 2013-05-05 15:46:41.458732057 +0200
+@@ -1,4 +1,4 @@
+-__deps__ := A52DEC BZIP2 FAAC FFMPEG FONTCONFIG FREETYPE LAME LIBASS LIBDCA \
++__deps__ := A52DEC BZIP2 FFMPEG FONTCONFIG FREETYPE LAME LIBASS LIBDCA \
+ LIBDVDREAD LIBDVDNAV LIBICONV LIBMKV LIBOGG LIBSAMPLERATE LIBTHEORA LIBVORBIS LIBXML2 \
+ MP4V2 MPEG2DEC PTHREADW32 X264 ZLIB LIBBLURAY FDKAAC
+
+@@ -95,7 +95,7 @@
+ LIBHB.lib = $(LIBHB.build/)hb.lib
+
+ LIBHB.dll.libs = $(foreach n, \
+- a52 ass avcodec avformat avutil avresample dvdnav dvdread faac \
++ a52 ass avcodec avformat avutil avresample dvdnav dvdread \
+ fontconfig freetype mkv mpeg2 mp3lame mp4v2 \
+ ogg samplerate swscale theora vorbis vorbisenc x264 xml2 bluray, \
+ $(CONTRIB.build/)lib/lib$(n).a )
+diff -ur a/libhb/muxmkv.c b/libhb/muxmkv.c
+--- a/libhb/muxmkv.c 2013-05-05 15:39:27.808734740 +0200
++++ b/libhb/muxmkv.c 2013-05-05 15:47:03.052065256 +0200
+@@ -256,7 +256,6 @@
+ }
+ track->codecID = MK_ACODEC_FLAC;
+ break;
+- case HB_ACODEC_FAAC:
+ case HB_ACODEC_FFAAC:
+ case HB_ACODEC_CA_AAC:
+ case HB_ACODEC_CA_HAAC:
+diff -ur a/libhb/work.c b/libhb/work.c
+--- a/libhb/work.c 2013-05-05 15:39:27.818734740 +0200
++++ b/libhb/work.c 2013-05-05 15:47:14.658731851 +0200
+@@ -135,7 +135,6 @@
+ switch (codec)
+ {
+ case HB_ACODEC_AC3: return hb_get_work(WORK_ENCAVCODEC_AUDIO);
+- case HB_ACODEC_FAAC: return hb_get_work(WORK_ENCFAAC);
+ case HB_ACODEC_LAME: return hb_get_work(WORK_ENCLAME);
+ case HB_ACODEC_VORBIS: return hb_get_work(WORK_ENCVORBIS);
+ case HB_ACODEC_CA_AAC: return hb_get_work(WORK_ENC_CA_AAC);
+diff -ur a/test/module.defs b/test/module.defs
+--- a/test/module.defs 2013-05-05 15:39:27.975401406 +0200
++++ b/test/module.defs 2013-05-05 15:47:35.322065057 +0200
+@@ -14,7 +14,7 @@
+ TEST.libs = $(LIBHB.a)
+
+ TEST.GCC.l = \
+- a52 ass avcodec avformat avutil avresample dvdnav dvdread faac \
++ a52 ass avcodec avformat avutil avresample dvdnav dvdread \
+ fontconfig freetype fribidi mkv mpeg2 mp3lame mp4v2 ogg \
+ samplerate swscale theoraenc theoradec vorbis vorbisenc x264 \
+ bluray xml2 bz2 z
diff --git a/media-video/handbrake/files/handbrake-9999-expand-MK_SUBTITLE_PGS.patch b/media-video/handbrake/files/handbrake-9999-expand-MK_SUBTITLE_PGS.patch
new file mode 100644
index 000000000000..27faeb172ef4
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-expand-MK_SUBTITLE_PGS.patch
@@ -0,0 +1,9 @@
+--- a/trunk/libhb/muxmkv.c
++++ b/trunk/libhb/muxmkv.c
+@@ -348,5 +348,5 @@
+ track->codecPrivate = NULL;
+ track->codecPrivateSize = 0;
+- track->codecID = MK_SUBTITLE_PGS;
++ track->codecID = "S_HDMV/PGS";
+ break;
+ case SSASUB: \ No newline at end of file
diff --git a/media-video/handbrake/files/handbrake-9999-fix-compilation-with-mp4v2-v1.9.1.patch b/media-video/handbrake/files/handbrake-9999-fix-compilation-with-mp4v2-v1.9.1.patch
new file mode 100644
index 000000000000..daec03f7e4d8
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-fix-compilation-with-mp4v2-v1.9.1.patch
@@ -0,0 +1,75 @@
+https://github.com/rbrito/pkg-handbrake/blob/master/debian/patches/0005-libhb-Fix-compilation-with-mp4v2-v1.9.1.patch
+
+Forward ported by Tom Wijsman <TomWij@gentoo.org>.
+
+From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito@ime.usp.br>
+Date: Sun, 22 Apr 2012 05:34:40 -0300
+Subject: libhb: Fix compilation with mp4v2 v1.9.1.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Forwarded: no
+Last-Update: 2012-05-15
+Reviewed-by: Rogério Theodoro de Brito <rbrito@ime.usp.br>
+Signed-off-by: Rogério Theodoro de Brito <rbrito@ime.usp.br>
+---
+ libhb/decmetadata.c | 4 ++--
+ libhb/muxmp4.c | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+--- a/libhb/decmetadata.c
++++ b/libhb/decmetadata.c
+@@ -13,7 +13,7 @@
+ MP4FileHandle input_file;
+ hb_deep_log( 2, "Got an MP4 input, read the metadata");
+
+- input_file = MP4Read( title->path, 0 );
++ input_file = MP4Read(title->path);
+
+ if( input_file != MP4_INVALID_FILE_HANDLE )
+ {
+@@ -92,7 +92,7 @@
+ }
+ }
+
+- MP4Close( input_file );
++ MP4Close(input_file, 0);
+ }
+ }
+
+--- a/libhb/muxmp4.c
++++ b/libhb/muxmp4.c
+@@ -93,13 +93,13 @@
+ if (job->largeFileSize)
+ /* Use 64-bit MP4 file */
+ {
+- m->file = MP4Create(m->path, MP4_DETAILS_ERROR, MP4_CREATE_64BIT_DATA);
++ m->file = MP4Create(m->path, MP4_CREATE_64BIT_DATA);
+ hb_deep_log( 2, "muxmp4: using 64-bit MP4 formatting.");
+ }
+ else
+ /* Limit MP4s to less than 4 GB */
+ {
+- m->file = MP4Create(m->path, MP4_DETAILS_ERROR, 0);
++ m->file = MP4Create(m->path, 0);
+ }
+
+ if (m->file == MP4_INVALID_FILE_HANDLE)
+@@ -1331,14 +1331,14 @@
+ MP4TagsFree( tags );
+ }
+
+- MP4Close( m->file );
++ MP4Close( m->file, 0 );
+
+ if ( job->mp4_optimize )
+ {
+ hb_log( "muxmp4: optimizing file" );
+ char filename[1024]; memset( filename, 0, 1024 );
+ snprintf(filename, 1024, "%s.tmp", m->path);
+- MP4Optimize(m->path, filename, MP4_DETAILS_ERROR);
++ MP4Optimize(m->path, filename);
+ remove(m->path);
+ rename(filename, m->path);
+ }
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 000000000000..be96bf22c661
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-remove-dvdnav-dup.patch
@@ -0,0 +1,20 @@
+--- libhb/dvdnav.c 2013-05-05 16:14:10.265388521 +0200
++++ libhb/dvdnav.c.2 2013-05-05 16:14:18.325388471 +0200
+@@ -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 000000000000..7e8ab99730a8
--- /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/files/handbrake-9999-use-older-libmkv.patch b/media-video/handbrake/files/handbrake-9999-use-older-libmkv.patch
new file mode 100644
index 000000000000..8c25415a9656
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-use-older-libmkv.patch
@@ -0,0 +1,14 @@
+https://github.com/rbrito/pkg-handbrake/blob/master/debian/patches/0016-use-older-libmkv.patch
+
+--- a/libhb/muxmkv.c
++++ b/libhb/muxmkv.c
+@@ -289,8 +289,7 @@
+ {
+ // For HE-AAC, write outputSamplingFreq too
+ // samplingFreq is half of outputSamplingFreq
+- track->extra.audio.outputSamplingFreq = (float)audio->config.out.samplerate;
+- track->extra.audio.samplingFreq = track->extra.audio.outputSamplingFreq / 2.;
++ track->extra.audio.samplingFreq = audio->config.out.samplerate / 2.;
+ }
+ else
+ { \ No newline at end of file
diff --git a/media-video/handbrake/files/handbrake-9999-use-unpatched-a52.patch b/media-video/handbrake/files/handbrake-9999-use-unpatched-a52.patch
new file mode 100644
index 000000000000..a50d22d9d5d9
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-use-unpatched-a52.patch
@@ -0,0 +1,26 @@
+https://github.com/rbrito/pkg-handbrake/blob/master/debian/patches/0014-Use-unpatched-a52.patch
+
+Author: Reinhard Tartler <siretart@tauware.de>
+Description: Use unpatched a52
+
+In upstream liba52, the state field is private.
+
+Forwarded: no
+--- a/libhb/deca52.c
++++ b/libhb/deca52.c
+@@ -387,12 +387,15 @@ static hb_buffer_t* Decode(hb_work_objec
+ pv->channel_layout,
+ pv->nchannels);
+ }
++#if 0
++ // FIXME: debian uses an unpatched liba52
+ if (pv->use_mix_levels)
+ {
+ hb_audio_resample_set_mix_levels(pv->resample,
+ (double)pv->state->slev,
+ (double)pv->state->clev);
+ }
++#endif
+ if (hb_audio_resample_update(pv->resample))
+ {
+ hb_log("deca52: hb_audio_resample_update() failed"); \ No newline at end of file
diff --git a/media-video/handbrake/handbrake-0.10.0-r1.ebuild b/media-video/handbrake/handbrake-0.10.0-r1.ebuild
new file mode 100644
index 000000000000..6e2a245155ec
--- /dev/null
+++ b/media-video/handbrake/handbrake-0.10.0-r1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils gnome2-utils python-any-r1
+
+if [[ ${PV} = *9999* ]]; then
+ ESVN_REPO_URI="svn://svn.handbrake.fr/HandBrake/trunk"
+ inherit subversion
+ KEYWORDS=""
+else
+ SRC_URI="http://handbrake.fr/rotation.php?file=HandBrake-${PV}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/HandBrake-${PV}"
+ 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"
+
+REQUIRED_USE="^^ ( fdk libav-aac )"
+
+RDEPEND="
+ dev-libs/jansson
+ media-libs/a52dec
+ media-libs/libass
+ media-libs/libbluray
+ media-libs/libdvdnav
+ media-libs/libdvdread
+ media-libs/libsamplerate
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/libvpx
+ media-libs/x264:=
+ media-sound/lame
+ sys-libs/zlib
+ libav? ( >=media-video/libav-10.1:0= )
+ !libav? ( >=media-video/ffmpeg-2.3:0= )
+ 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.4 )
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/yasm
+ dev-util/intltool
+ sys-devel/automake"
+
+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."
+
+ # Remove libdvdnav duplication and call it on the original instead.
+ # It may work this way; if not, we should try to mimic the duplication.
+ epatch "${FILESDIR}"/${PN}-9999-remove-dvdnav-dup.patch
+
+ # Remove faac dependency; TODO: figure out if we need to do this at all.
+ epatch "${FILESDIR}"/${PN}-9999-remove-faac-dependency.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) \
+ --disable-x265 || die "Configure failed."
+ # $(use_enable x265) \
+}
+
+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 AUTHORS CREDITS NEWS THANKS TRANSLATIONS
+}
+
+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
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/media-video/handbrake/handbrake-0.10.1.ebuild b/media-video/handbrake/handbrake-0.10.1.ebuild
new file mode 100644
index 000000000000..6e2a245155ec
--- /dev/null
+++ b/media-video/handbrake/handbrake-0.10.1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils gnome2-utils python-any-r1
+
+if [[ ${PV} = *9999* ]]; then
+ ESVN_REPO_URI="svn://svn.handbrake.fr/HandBrake/trunk"
+ inherit subversion
+ KEYWORDS=""
+else
+ SRC_URI="http://handbrake.fr/rotation.php?file=HandBrake-${PV}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/HandBrake-${PV}"
+ 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"
+
+REQUIRED_USE="^^ ( fdk libav-aac )"
+
+RDEPEND="
+ dev-libs/jansson
+ media-libs/a52dec
+ media-libs/libass
+ media-libs/libbluray
+ media-libs/libdvdnav
+ media-libs/libdvdread
+ media-libs/libsamplerate
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/libvpx
+ media-libs/x264:=
+ media-sound/lame
+ sys-libs/zlib
+ libav? ( >=media-video/libav-10.1:0= )
+ !libav? ( >=media-video/ffmpeg-2.3:0= )
+ 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.4 )
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/yasm
+ dev-util/intltool
+ sys-devel/automake"
+
+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."
+
+ # Remove libdvdnav duplication and call it on the original instead.
+ # It may work this way; if not, we should try to mimic the duplication.
+ epatch "${FILESDIR}"/${PN}-9999-remove-dvdnav-dup.patch
+
+ # Remove faac dependency; TODO: figure out if we need to do this at all.
+ epatch "${FILESDIR}"/${PN}-9999-remove-faac-dependency.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) \
+ --disable-x265 || die "Configure failed."
+ # $(use_enable x265) \
+}
+
+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 AUTHORS CREDITS NEWS THANKS TRANSLATIONS
+}
+
+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
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/media-video/handbrake/handbrake-0.9.9-r1.ebuild b/media-video/handbrake/handbrake-0.9.9-r1.ebuild
new file mode 100644
index 000000000000..9a579e8b3bdf
--- /dev/null
+++ b/media-video/handbrake/handbrake-0.9.9-r1.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils gnome2-utils python-any-r1
+
+if [[ ${PV} = *9999* ]]; then
+ ESVN_REPO_URI="svn://svn.handbrake.fr/HandBrake/trunk"
+ inherit subversion
+ KEYWORDS=""
+else
+ SRC_URI="http://handbrake.fr/rotation.php?file=HandBrake-${PV}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/HandBrake-${PV}"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Open-source, GPL-licensed, multiplatform, multithreaded video transcoder"
+HOMEPAGE="http://handbrake.fr/"
+LICENSE="GPL-2"
+
+SLOT="0"
+IUSE="fdk ffmpeg gstreamer gtk"
+
+# Use either ffmpeg or gst-plugins/mpeg2dec for decoding MPEG-2.
+REQUIRED_USE="!ffmpeg? ( gstreamer )"
+
+RDEPEND="
+ media-libs/a52dec
+ media-libs/libass
+ media-libs/libbluray
+ media-libs/libdvdnav
+ media-libs/libdvdread
+ media-libs/libmpeg2
+ media-libs/libmp4v2:0
+ media-libs/libmkv
+ media-libs/libsamplerate
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/x264:=
+ media-sound/lame
+ ffmpeg? ( || ( >=media-video/libav-9 >=media-video/ffmpeg-1.2.1:0 ) )
+ sys-libs/zlib
+ 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
+ !ffmpeg? ( media-plugins/gst-plugins-mpeg2dec:1.0 )
+ )
+ gtk? (
+ x11-libs/gtk+:3
+ 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 )
+ "
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/yasm
+ dev-util/intltool
+ sys-devel/automake"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Get rid of leftover bundled library build definitions,
+ # the version 0.9.9 supports the use of system libraries.
+ sed -i 's:.*\(/contrib\|contrib/\).*::g' \
+ "${S}"/make/include/main.defs \
+ || die "Contrib removal failed."
+
+ # Instead of adding a #define to libmkv, we expand it in place.
+ epatch "${FILESDIR}"/${PN}-9999-expand-MK_SUBTITLE_PGS.patch
+
+ # Fix compilation against the released 1.9.1 version of mp4v2.
+ epatch "${FILESDIR}"/${P}-fix-compilation-with-mp4v2-v1.9.1.patch
+
+ # Remove libdvdnav duplication and call it on the original instead.
+ # It may work this way; if not, we should try to mimic the duplication.
+ epatch "${FILESDIR}"/${PN}-9999-remove-dvdnav-dup.patch
+
+ # Remove faac dependency until its compilation errors can be resolved.
+ epatch "${FILESDIR}"/${P}-remove-faac-dependency.patch
+ sed -i 's/-lfaac//' gtk/configure.ac || die
+
+ # Make use of an older version of libmkv.
+ epatch "${FILESDIR}"/${PN}-9999-use-older-libmkv.patch
+
+ # Make use of an unpatched version of a52 that does not make a private field public.
+ epatch "${FILESDIR}"/${PN}-9999-use-unpatched-a52.patch
+
+ # Add gmodule to the linker command line for bug #482674.
+ epatch "${FILESDIR}"/${P}-add-gmodule-to-gtk-configure.patch
+
+ # Fixup configure.ac with newer automake
+ cd "${S}/gtk"
+ sed -i \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \
+ -e 's:AM_PROG_CC_STDC:AC_PROG_CC:g' \
+ -e 's:am_cv_prog_cc_stdc:ac_cv_prog_cc_stdc:g' \
+ configure.ac || die "Fixing up configure.ac failed"
+
+ # Don't run autogen.sh
+ sed -i '/autogen.sh/d' module.rules || die "Removing autogen.sh call failed"
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=""
+
+ if ! use gtk ; then
+ myconf+=" --disable-gtk"
+ fi
+
+ if ! use gstreamer ; then
+ myconf+=" --disable-gst"
+ fi
+
+ if use ffmpeg ; then
+ myconf+=" --enable-ff-mpeg2"
+ fi
+
+ if use fdk ; then
+ myconf+=" --enable-fdk-aac"
+ fi
+
+ ./configure \
+ --force \
+ --prefix="${EPREFIX}/usr" \
+ --disable-gtk-update-checks \
+ ${myconf} || die "Configure failed."
+}
+
+src_compile() {
+ emake -C build
+
+ # Documentation building is currently broken.
+ #
+ # if use doc ; then
+ # emake -C build doc
+ # fi
+}
+
+src_install() {
+ emake -C build DESTDIR="${D}" install
+
+ dodoc AUTHORS CREDITS NEWS THANKS TRANSLATIONS
+}
+
+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
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/media-video/handbrake/handbrake-9999.ebuild b/media-video/handbrake/handbrake-9999.ebuild
new file mode 100644
index 000000000000..6e2a245155ec
--- /dev/null
+++ b/media-video/handbrake/handbrake-9999.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils gnome2-utils python-any-r1
+
+if [[ ${PV} = *9999* ]]; then
+ ESVN_REPO_URI="svn://svn.handbrake.fr/HandBrake/trunk"
+ inherit subversion
+ KEYWORDS=""
+else
+ SRC_URI="http://handbrake.fr/rotation.php?file=HandBrake-${PV}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/HandBrake-${PV}"
+ 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"
+
+REQUIRED_USE="^^ ( fdk libav-aac )"
+
+RDEPEND="
+ dev-libs/jansson
+ media-libs/a52dec
+ media-libs/libass
+ media-libs/libbluray
+ media-libs/libdvdnav
+ media-libs/libdvdread
+ media-libs/libsamplerate
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/libvpx
+ media-libs/x264:=
+ media-sound/lame
+ sys-libs/zlib
+ libav? ( >=media-video/libav-10.1:0= )
+ !libav? ( >=media-video/ffmpeg-2.3:0= )
+ 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.4 )
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/yasm
+ dev-util/intltool
+ sys-devel/automake"
+
+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."
+
+ # Remove libdvdnav duplication and call it on the original instead.
+ # It may work this way; if not, we should try to mimic the duplication.
+ epatch "${FILESDIR}"/${PN}-9999-remove-dvdnav-dup.patch
+
+ # Remove faac dependency; TODO: figure out if we need to do this at all.
+ epatch "${FILESDIR}"/${PN}-9999-remove-faac-dependency.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) \
+ --disable-x265 || die "Configure failed."
+ # $(use_enable x265) \
+}
+
+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 AUTHORS CREDITS NEWS THANKS TRANSLATIONS
+}
+
+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
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+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 000000000000..dd004ba8b99c
--- /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>
+ <email>thev00d00@gentoo.org</email>
+ <name>Ian Whyman</name>
+ </maintainer>
+ <longdescription>
+ Open-source, GPL-licensed, multiplatform, multithreaded video transcoder.
+ </longdescription>
+ <use>
+ <flag name="ffmpeg">Use FFmpeg from <pkg>media-video/ffmpeg</pkg> to decode MPEG-2 instead of <pkg>media-plugins/gst-plugins-mpeg2dec</pkg>.</flag>
+ <flag name="gstreamer">Support for the streaming media framework from <pkg>media-libs/gstreamer</pkg>.</flag>
+ <flag name="gtk">Support for Gimp ToolKit + from <pkg>x11-libs/gtk+</pkg>, requirement for a GUI-based HandBrake.</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-libs/libav</pkg>'s internal encoder.</flag>
+ </use>
+</pkgmetadata>