summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Wijsman <tomwij@gentoo.org>2013-05-05 17:33:52 +0000
committerTom Wijsman <tomwij@gentoo.org>2013-05-05 17:33:52 +0000
commit8f696108f8e00cf7addf793cd8362a550baee565 (patch)
treeebced3561be7c0fd47f69eec57c37c94175391d1 /media-video/handbrake
parentStable for alpha, wrt bug #467152 (diff)
downloadgentoo-2-8f696108f8e00cf7addf793cd8362a550baee565.tar.gz
gentoo-2-8f696108f8e00cf7addf793cd8362a550baee565.tar.bz2
gentoo-2-8f696108f8e00cf7addf793cd8362a550baee565.zip
Added handbrake; an open-source, GPL-licensed, multiplatform, multithreaded video transcoder. Thanks to all contributors of bug #89432. Stepping up as its maintainer, help is welcome. 0.9.9 will no longer require one to use bundled libraries therefore handbrake can now reside in the Portage tree; once 0.9.9 is released and ffmpeg-1.2 is no longer masked, we can unmask handbrake.
(Portage version: 2.1.11.63/cvs/Linux x86_64, signed Manifest commit with key 6D34E57D)
Diffstat (limited to 'media-video/handbrake')
-rw-r--r--media-video/handbrake/ChangeLog20
-rw-r--r--media-video/handbrake/Manifest11
-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.patch73
-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.patch203
-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.9.9_pre5441.ebuild157
-rw-r--r--media-video/handbrake/handbrake-9999.ebuild157
-rw-r--r--media-video/handbrake/metadata.xml16
11 files changed, 706 insertions, 0 deletions
diff --git a/media-video/handbrake/ChangeLog b/media-video/handbrake/ChangeLog
new file mode 100644
index 000000000000..699263df4a45
--- /dev/null
+++ b/media-video/handbrake/ChangeLog
@@ -0,0 +1,20 @@
+# ChangeLog for media-video/handbrake
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/handbrake/ChangeLog,v 1.1 2013/05/05 17:33:51 tomwij Exp $
+
+*handbrake-0.9.9_pre5441 (05 May 2013)
+*handbrake-9999 (05 May 2013)
+
+ 05 May 2013; Tom Wijsman <TomWij@gentoo.org>
+ +files/handbrake-9999-expand-MK_SUBTITLE_PGS.patch,
+ +files/handbrake-9999-fix-compilation-with-mp4v2-v1.9.1.patch,
+ +files/handbrake-9999-remove-dvdnav-dup.patch,
+ +files/handbrake-9999-remove-faac-dependency.patch,
+ +files/handbrake-9999-use-older-libmkv.patch,
+ +files/handbrake-9999-use-unpatched-a52.patch,
+ +handbrake-0.9.9_pre5441.ebuild, +handbrake-9999.ebuild, +metadata.xml:
+ Added handbrake; an open-source, GPL-licensed, multiplatform, multithreaded
+ video transcoder. Thanks to all contributors of bug #89432. Stepping up as its
+ maintainer, help is welcome. 0.9.9 will no longer require one to use bundled
+ libraries therefore handbrake can now reside in the Portage tree; once 0.9.9
+ is released and ffmpeg-1.2 is no longer masked, we can unmask handbrake.
diff --git a/media-video/handbrake/Manifest b/media-video/handbrake/Manifest
new file mode 100644
index 000000000000..efef4b0705ae
--- /dev/null
+++ b/media-video/handbrake/Manifest
@@ -0,0 +1,11 @@
+AUX handbrake-9999-expand-MK_SUBTITLE_PGS.patch 313 SHA256 f0773915acacdb7e88404895914ce497250d83cb5687923034cbbfcdb90b8bb2 SHA512 28948c231d05f8bf13758d079e73a83a9c2ab62c57e4b20053d84764e36e8946cd4191857a14ae926335152363897a95b0331093fdbb061c5afdbb1326fdbd7f WHIRLPOOL dd5e02f557e0d515c03291956a457ba7c5df9b467e15317510315b5c6ee51ba3f16eb3d23e4d4aa7eace048894bea8d115872eeb2b3faaf2bea917a3b0aceb34
+AUX handbrake-9999-fix-compilation-with-mp4v2-v1.9.1.patch 2213 SHA256 99e9cbc302a8ab0bf3714894de293267875af5373917ce9a1cfa6ce304acfbbf SHA512 f316cd54468dd960913aed7cbf79fe57df4c3e07112149ee3591886e0c03be55a999e94f9524d1415689f93da7c7f840fc78b25c7277c95c40153d5cc22b12f2 WHIRLPOOL debfb3e6bc7767898ab2ef4881dfe5997f6b92844079b6fb03eb4030b14effa47fe411e7b2683d6a39b3c66dea4cbe9862e89abf3563477a14b90f331c43658f
+AUX handbrake-9999-remove-dvdnav-dup.patch 879 SHA256 cdfa247f00ad5b75af115618b789cc4708342366d430b93f0859c337f2255bdf SHA512 8f00e52866f392c9a52016da01f9267d1a1d8723211931dc501eae639ca8250d3b839b2dd87db67a07448557ef9f905c46566233ae5d7bd687c2bf8a7ed31037 WHIRLPOOL a29c7a2392250b9bc14c098df45977e15b7430545cc25f13a7cfad86384252b7205c0bb2f40bdac04b722141deb1918e81fd316ce8b584a988ce624a7d620446
+AUX handbrake-9999-remove-faac-dependency.patch 7478 SHA256 dd8b096ee47dfdc2bb3d3c3a9bff3596f0d88b6d5bb428f775aff597c229d83a SHA512 6815ae03b0688df3aa4c7091c7fe2461abed2e1c5f7c72324b3cc677f7bf00e38ce7c28d8525fe79febe8689ee67ebd05e7cbb5eb5ab7c328a8e8972372f7497 WHIRLPOOL 9fa277f7e0f5b2e4efe8ae415509fd3e574e270bb51a8a76e639284f50c3d3b05a929b01cbdb8ad0b008aabbe47780161d600eca3a0f6aa12bf442b4421a1cd5
+AUX handbrake-9999-use-older-libmkv.patch 583 SHA256 17e15eccc630bf5dfcd66609d19bdcf57c731fba6c314af3a5a6d083de80ba7c SHA512 6ebcf55ffaab20301da1ceb2d993580a6b875676b65ee2d61d3fcaedf9e5a3b7e52128dae30363923218ba2e6f4510232c0e7738343e35c4c95048d35ff3933b WHIRLPOOL 075f604ec3c48345f435b3b2cd39b7d175c7df69600e5ca9438cd6d6a380673ff8848a2bf111cfe8fb3dff21ad33e822fbf7b45a3e547da8a0d9170a933e78d3
+AUX handbrake-9999-use-unpatched-a52.patch 944 SHA256 b8ccdecb0a70650af162fa649a323dd1c31268efe7c9ace58a89d70eab984c80 SHA512 aff9da64a434946600d1683f101bea1024319a418c57b0dbe9a8c287c72edf91d18102d51b817d9cea6e825d3a945741893956c55df16bf8f61b415a50dbeab4 WHIRLPOOL 97cf18bb453b435f88a60ed6417811eb8ce5c7af68f4e3d12316a72ac1594637f288511b54aee2b50fc04c356a0dba23dcf71b5712e9520371ab112f99b4f90f
+DIST handbrake-0.9.9_pre5441.tar.gz 5580422 SHA256 6a6b8348229c4ae820be329413418d2a50a023922f28119c5b6e5aa155e3ec22 SHA512 aa3faca48dc7fafa5e56c0388300c86b81084549228f20908351a878e737ed54609b98c557ded921e215e4f5ced84aa96a0d64c11a7e67a40ac7eba24f2701a4 WHIRLPOOL 6ad2c23b09414e6d5b15c8c8e0dfa9eac05040c0b1673549b94293c5c20f7f55b8a98d39920be9e6c980664fb861dbf23ee9704fe3bffb7b8facf9722a4e1cb3
+EBUILD handbrake-0.9.9_pre5441.ebuild 3515 SHA256 86247f012bfca3a961be24650c551b0ed9d6d101d5b4570a73950c880b6fc024 SHA512 16ae8f7ff5042f5b8689c310c2878f789351fffa78d3cfff19e6e33e013cc1cafbf9ed10f88976ad4285b3d00dc5f2f25cfa4aef1f511cda4c88428368cd5b82 WHIRLPOOL f099afe70b6cb0f0fee7f611015f32a9f8b2cfc8205f4808cf71c717fc9b9244e8132bfab0d11663909dee951f11793c98743364807794a767ef13d030eb5de7
+EBUILD handbrake-9999.ebuild 3515 SHA256 86247f012bfca3a961be24650c551b0ed9d6d101d5b4570a73950c880b6fc024 SHA512 16ae8f7ff5042f5b8689c310c2878f789351fffa78d3cfff19e6e33e013cc1cafbf9ed10f88976ad4285b3d00dc5f2f25cfa4aef1f511cda4c88428368cd5b82 WHIRLPOOL f099afe70b6cb0f0fee7f611015f32a9f8b2cfc8205f4808cf71c717fc9b9244e8132bfab0d11663909dee951f11793c98743364807794a767ef13d030eb5de7
+MISC ChangeLog 1024 SHA256 c8b2209bbb7e3bf7a4e2bc0513e45732ab617d0ecca16c4d9507ff3d3aefcc48 SHA512 66be0c120c488d4cab29c982c41516692723102d2a0c94947fc097bc957cfce6beb683d9479283d0dd0677473aaebd1f510859496a7953941a360caf442d7e94 WHIRLPOOL d3815ed30737d38a6987088b5bd5a250751ea2d5c6972da6aa260b21c0af3cd30840b7276e3065fbc765f4450a331a84a1a03d2bc6b1180b6d5d4705042d0152
+MISC metadata.xml 757 SHA256 d88151e937f3672bf0d01a372e46c2b69b18f105f400088019ffece963502e57 SHA512 22f30472114af87574c9f5be1b36b16568239914460622f8f37d24a10118e05cfa484b2992c5c48b87f13a1d7f6c05b48e7575908b4aaf7a75c4727224dc2c03 WHIRLPOOL 462509f7e1b793022a9af05e6649df7a753d4f670c35f94a88ad4201411faa28751f580e298e1a866bc0a8b05bc7a063ddf7b4a4976f62f8a786911037e125ae
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..c558d4398e07
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-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-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..e2726d28dda9
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-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-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.9.9_pre5441.ebuild b/media-video/handbrake/handbrake-0.9.9_pre5441.ebuild
new file mode 100644
index 000000000000..a17c7cfd8713
--- /dev/null
+++ b/media-video/handbrake/handbrake-0.9.9_pre5441.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/handbrake/handbrake-0.9.9_pre5441.ebuild,v 1.1 2013/05/05 17:33:51 tomwij Exp $
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_{5,6,7} )
+
+inherit eutils gnome2-utils python-single-r1
+
+if [[ ${PV} = *9999* ]]; then
+ ESVN_REPO_URI="svn://svn.handbrake.fr/HandBrake/trunk"
+ inherit subversion
+ KEYWORDS=""
+else
+ SRC_URI="http://dev.gentoo.org/~tomwij/files/dist/${P}.tar.gz"
+ S="${WORKDIR}"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Open-source, GPL-licensed, multiplatform, multithreaded video transcoder."
+HOMEPAGE="http://handbrake.fr/"
+LICENSE="GPL-2"
+
+SLOT="0"
+IUSE="gtk gst ffmpeg"
+
+# Use either ffmpeg or gst-plugins/mpeg2dec for decoding MPEG-2.
+REQUIRED_USE="!ffmpeg? ( gst )"
+
+RDEPEND="
+ media-libs/a52dec
+ media-libs/libass
+ media-libs/libbluray
+ media-libs/libdvdnav
+ media-libs/libdvdread
+ media-libs/libmpeg2
+ media-libs/libmp4v2:1
+ media-libs/libmkv
+ media-libs/libsamplerate
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/x264
+ media-sound/lame
+ ffmpeg? ( >=media-video/ffmpeg-1.2 )
+ sys-libs/glibc:2.2
+ sys-libs/zlib
+ gst? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base: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/udev-171[gudev]
+ )"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/yasm
+ sys-devel/automake"
+
+pkg_setup() {
+ python-single-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}"/handbrake-9999-expand-MK_SUBTITLE_PGS.patch
+
+ # Fix compilation against the released 1.9.1 version of mp4v2.
+ epatch "${FILESDIR}"/handbrake-9999-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}"/handbrake-9999-remove-dvdnav-dup.patch
+
+ # Remove faac dependency until its compilation errors can be resolved.
+ epatch "${FILESDIR}"/handbrake-9999-remove-faac-dependency.patch
+
+ # Make use of an older version of libmkv.
+ epatch "${FILESDIR}"/handbrake-9999-use-older-libmkv.patch
+
+ # Make use of an unpatched version of a52 that does not make a private field public.
+ epatch "${FILESDIR}"/handbrake-9999-use-unpatched-a52.patch
+}
+
+src_configure() {
+ local myconf=""
+
+ if ! use gtk ; then
+ myconf="${myconf} --disable-gtk"
+ fi
+
+ if ! use gst ; then
+ myconf="${myconf} --disable-gst"
+ fi
+
+ if use ffmpeg ; then
+ myconf="${myconf} --enable-ff-mpeg2"
+ fi
+
+ ./configure \
+ --force \
+ --prefix=/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
+} \ No newline at end of file
diff --git a/media-video/handbrake/handbrake-9999.ebuild b/media-video/handbrake/handbrake-9999.ebuild
new file mode 100644
index 000000000000..d611834d2c47
--- /dev/null
+++ b/media-video/handbrake/handbrake-9999.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/handbrake/handbrake-9999.ebuild,v 1.1 2013/05/05 17:33:51 tomwij Exp $
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_{5,6,7} )
+
+inherit eutils gnome2-utils python-single-r1
+
+if [[ ${PV} = *9999* ]]; then
+ ESVN_REPO_URI="svn://svn.handbrake.fr/HandBrake/trunk"
+ inherit subversion
+ KEYWORDS=""
+else
+ SRC_URI="http://dev.gentoo.org/~tomwij/files/dist/${P}.tar.gz"
+ S="${WORKDIR}"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Open-source, GPL-licensed, multiplatform, multithreaded video transcoder."
+HOMEPAGE="http://handbrake.fr/"
+LICENSE="GPL-2"
+
+SLOT="0"
+IUSE="gtk gst ffmpeg"
+
+# Use either ffmpeg or gst-plugins/mpeg2dec for decoding MPEG-2.
+REQUIRED_USE="!ffmpeg? ( gst )"
+
+RDEPEND="
+ media-libs/a52dec
+ media-libs/libass
+ media-libs/libbluray
+ media-libs/libdvdnav
+ media-libs/libdvdread
+ media-libs/libmpeg2
+ media-libs/libmp4v2:1
+ media-libs/libmkv
+ media-libs/libsamplerate
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/x264
+ media-sound/lame
+ ffmpeg? ( >=media-video/ffmpeg-1.2 )
+ sys-libs/glibc:2.2
+ sys-libs/zlib
+ gst? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base: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/udev-171[gudev]
+ )"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-lang/yasm
+ sys-devel/automake"
+
+pkg_setup() {
+ python-single-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}"/handbrake-9999-expand-MK_SUBTITLE_PGS.patch
+
+ # Fix compilation against the released 1.9.1 version of mp4v2.
+ epatch "${FILESDIR}"/handbrake-9999-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}"/handbrake-9999-remove-dvdnav-dup.patch
+
+ # Remove faac dependency until its compilation errors can be resolved.
+ epatch "${FILESDIR}"/handbrake-9999-remove-faac-dependency.patch
+
+ # Make use of an older version of libmkv.
+ epatch "${FILESDIR}"/handbrake-9999-use-older-libmkv.patch
+
+ # Make use of an unpatched version of a52 that does not make a private field public.
+ epatch "${FILESDIR}"/handbrake-9999-use-unpatched-a52.patch
+}
+
+src_configure() {
+ local myconf=""
+
+ if ! use gtk ; then
+ myconf="${myconf} --disable-gtk"
+ fi
+
+ if ! use gst ; then
+ myconf="${myconf} --disable-gst"
+ fi
+
+ if use ffmpeg ; then
+ myconf="${myconf} --enable-ff-mpeg2"
+ fi
+
+ ./configure \
+ --force \
+ --prefix=/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
+} \ No newline at end of file
diff --git a/media-video/handbrake/metadata.xml b/media-video/handbrake/metadata.xml
new file mode 100644
index 000000000000..4a8643aa966f
--- /dev/null
+++ b/media-video/handbrake/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>TomWij@gentoo.org</email>
+ <name>Tom Wijsman</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="gtk">Support for Gimp ToolKit + from <pkg>x11-libs/gtk+</pkg>, requirement for a GUI-based HandBrake.</flag>
+ <flag name="gst">Support for the streaming media framework from <pkg>media-libs/gstreamer</pkg>.</flag>
+ </use>
+</pkgmetadata>