Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89432 - media-video/handbrake - Open-source, GPL-licensed, multiplatform, multithreaded video transcoder.
Summary: media-video/handbrake - Open-source, GPL-licensed, multiplatform, multithread...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 26 votes (vote)
Assignee: Tom Wijsman (TomWij) (RETIRED)
URL: http://handbrake.fr/
Whiteboard:
Keywords: InVCS
: 107393 112718 407347 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-17 10:00 UTC by Zhenzhi
Modified: 2016-05-13 20:00 UTC (History)
70 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The ebuild itself. (handbrake-20050629.ebuild,843 bytes, application/octet-stream)
2005-06-29 13:54 UTC, Kamil Burzynski
Details
Patch for amd64 (amd64-20050629.patch,1.12 KB, patch)
2005-06-29 13:54 UTC, Kamil Burzynski
Details | Diff
CVS snapshot for 2005-06-29 (handbrake-20050629.tar.bz2,1.47 MB, application/octet-stream)
2005-06-29 13:56 UTC, Kamil Burzynski
Details
x264 library (handbrake_x264-20050629.tar.gz,242.68 KB, application/octet-stream)
2005-06-29 13:57 UTC, Kamil Burzynski
Details
xvidcore library (handbrake_xvidcore-20050629.tar.gz,696.93 KB, application/octet-stream)
2005-06-29 13:57 UTC, Kamil Burzynski
Details
Manifest file (Manifest,209 bytes, text/plain)
2005-06-29 13:58 UTC, Kamil Burzynski
Details
Digest file (digest-handbrake-20050629,226 bytes, text/plain)
2005-06-29 13:58 UTC, Kamil Burzynski
Details
Log file: emerge handbrake (hb_amd64.log,53.45 KB, text/plain)
2005-06-29 22:34 UTC, Marc Hildebrand (RETIRED)
Details
The ebuild itself. (handbrake-20050629.ebuild,935 bytes, text/plain)
2005-06-30 09:12 UTC, Kamil Burzynski
Details
Manifest file (Manifest,209 bytes, text/plain)
2005-06-30 09:12 UTC, Kamil Burzynski
Details
An ebuild for version 0.7.1 (amd64) (handbrake-0.7.1.ebuild,1.10 KB, text/plain)
2006-11-02 13:29 UTC, stathis
Details
Patch for configure script (handbrake-gentoo-configure-amd64-0.7.1.patch,382 bytes, patch)
2006-11-02 13:31 UTC, stathis
Details | Diff
Patch for Jamfile (handbrake-gentoo-Jamfile-amd64-0.7.1.patch,1.32 KB, patch)
2006-11-02 13:33 UTC, stathis
Details | Diff
Patch so that libhba/encx264.c will compile against recent versions of x264 (handbrake-gentoo-encx264-0.7.1.patch,338 bytes, patch)
2007-02-01 21:14 UTC, Owen Berry
Details | Diff
failed emerge of handbrake (emergehandbrake.log,4.48 KB, text/plain)
2007-03-15 23:13 UTC, Kevin Winter
Details
Ebuild for HB 0.9.0 (handbrake-0.9.0.ebuild,1.16 KB, text/plain)
2007-09-22 14:48 UTC, Kamil Burzynski
Details
media-video/handbrake-0.9.1 (handbrake-0.9.1.ebuild,7.75 KB, text/plain)
2007-11-28 12:22 UTC, Nathan Caldwell
Details
files/handbrake-0.9.1-Jamfile-nocontrib.patch (handbrake-0.9.1-Jamfile-nocontrib.patch,235 bytes, patch)
2007-11-28 12:23 UTC, Nathan Caldwell
Details | Diff
files/handbrake-0.9.1-system-libs.patch (handbrake-0.9.1-system-libs.patch,6.12 KB, patch)
2007-11-28 12:24 UTC, Nathan Caldwell
Details | Diff
files/handbrake-0.9.1-system-libs-noaotuv.patch (handbrake-0.9.1-system-libs-noaotuv.patch,6.40 KB, patch)
2007-11-28 12:25 UTC, Nathan Caldwell
Details | Diff
Error compiling Handbrake-0.9.1 (handbrake.log,382.37 KB, text/plain)
2008-04-27 22:41 UTC, J.C. Wren
Details
handbrake-svn ebuild (handbrake-svn-9999.ebuild,1.75 KB, text/plain)
2008-05-09 20:10 UTC, Mathy Vanvoorden
Details
disable wget patch (handbrake-svn-wget.patch,297 bytes, patch)
2008-05-09 20:10 UTC, Mathy Vanvoorden
Details | Diff
media-video/handbrake-0.9.3 (handbrake-0.9.3.ebuild,2.12 KB, text/plain)
2009-03-13 19:58 UTC, Kyle Evans
Details
handbrake-0.9.3.ebuild (handbrake-0.9.3.ebuild,2.70 KB, text/plain)
2009-06-14 21:32 UTC, Tony Vroon
Details
0.9.3-no-wget-ktnxbye.patch (0.9.3-no-wget-ktnxbye.patch,321 bytes, patch)
2009-06-14 21:33 UTC, Tony Vroon
Details | Diff
handbrake-9999.ebuild (handbrake-9999.ebuild,1.40 KB, text/plain)
2009-08-24 22:04 UTC, Travis Hansen
Details
handbrake-0.9.4.ebuild (handbrake-0.9.4.ebuild,1.41 KB, text/plain)
2009-11-24 23:30 UTC, Andrew Brouwers
Details
handbrake-0.9.4.ebuild (handbrake-0.9.4.ebuild,1.32 KB, text/plain)
2009-11-27 17:19 UTC, Andrew Brouwers
Details
updated ebuild (handbrake-0.9.4.ebuild,1.35 KB, text/plain)
2010-04-27 15:04 UTC, Scott Alfter
Details
tool to create a complete tarball with contrib sources (create_tarball.sh,1.40 KB, text/plain)
2010-09-30 09:00 UTC, Travis Hansen
Details
handbrake-9999.ebuild (handbrake-9999.ebuild,1.46 KB, text/plain)
2010-09-30 09:40 UTC, Travis Hansen
Details
tool to create a complete tarball with contrib sources (create_tarball.sh,1.32 KB, text/plain)
2010-09-30 10:03 UTC, Travis Hansen
Details
adds automake 1.4* dependency (automake-1.4.patch,553 bytes, text/plain)
2010-10-15 11:50 UTC, Ming-Wei
Details
handbrake-9999.ebuild (handbrake-9999.ebuild,1.34 KB, text/plain)
2010-10-15 16:42 UTC, Travis Hansen
Details
handbrake-9999.ebuild (handbrake-9999.ebuild,1.39 KB, text/plain)
2010-12-16 16:53 UTC, Travis Hansen
Details
handbrake-0.9.5.ebuild: hb 0.9.5 + recent-~amd64-compat. ebuild (still wget-encumbered) (handbrake-0.9.5.ebuild,1.57 KB, text/plain)
2011-03-28 15:55 UTC, Greg Turner
Details
0.9.5-backport-lib-fixes.patch (0.9.5-backport-lib-fixes.patch,1.12 KB, patch)
2011-03-28 16:02 UTC, Greg Turner
Details | Diff
handbrake-0.9.5-dbus-glib.patch (handbrake-0.9.5-dbus-glib.patch,641 bytes, patch)
2011-05-09 18:33 UTC, Andrey Ovcharov
Details | Diff
handbrake-0.9.5-libnotify-0.7.patch (handbrake-0.9.5-libnotify-0.7.patch,898 bytes, patch)
2011-05-09 18:35 UTC, Andrey Ovcharov
Details | Diff
handbrake-0.9.5.ebuild (handbrake-0.9.5.ebuild,1.61 KB, text/plain)
2011-05-09 18:37 UTC, Andrey Ovcharov
Details
handbrake-0.9.5.ebuild more portage-friendly (handbrake-0.9.5.ebuild,2.64 KB, application/octet-stream)
2011-06-11 06:07 UTC, Steve Dibb (RETIRED)
Details
handbrake-0.9.5_p4039.ebuild (handbrake-0.9.5_p4039.ebuild,2.51 KB, text/plain)
2011-06-11 15:39 UTC, Steve Dibb (RETIRED)
Details
handbrake ebuild (handbrake-0.9.5_p4039.ebuild,3.96 KB, text/plain)
2011-07-08 13:17 UTC, Sławomir Nizio
Details
handbrake-9999.ebuild (handbrake-9999.ebuild,1.35 KB, text/plain)
2012-02-18 21:41 UTC, vik
Details
To assist with the libass fatal error: glib.h (amd64 arch only, please use pkg-config --cflags-only-I fribidi for other architectures). (GNUmakefile.custom.defs,568 bytes, application/octet-stream)
2012-07-03 06:41 UTC, vik
Details
handbrake-0.9.6 ebuild, tested on amd64 (handbrake-0.9.6.ebuild,4.97 KB, text/plain)
2012-07-04 08:29 UTC, vik
Details
handbrake-9999 ebuild, tested on amd64 (handbrake-9999.ebuild,3.49 KB, text/plain)
2012-07-08 03:48 UTC, vik
Details
handbrake-0.9.6 ebuild (handbrake-0.9.6.ebuild,5.83 KB, text/plain)
2012-07-10 17:40 UTC, Dominique Michel
Details
handbrake-0.9.6 ebuild (handbrake-0.9.6.ebuild,5.65 KB, text/plain)
2012-07-10 17:46 UTC, Dominique Michel
Details
handbrake-9999 ebuild (handbrake-9999.ebuild,1.59 KB, text/plain)
2012-07-10 19:14 UTC, Dominique Michel
Details
handbrake-9999 ebuild (handbrake-9999.ebuild,1.58 KB, text/plain)
2012-07-10 19:23 UTC, Dominique Michel
Details
handbrake-0.9.8.ebuild (handbrake-0.9.8.ebuild,5.55 KB, text/plain)
2012-07-27 12:05 UTC, Sławomir Nizio
Details
failed_build.log (failed_build.log,26.83 KB, text/plain)
2013-01-10 04:10 UTC, Chris Slycord
Details
environment (environment,152.04 KB, text/plain)
2013-01-10 04:12 UTC, Chris Slycord
Details
emerge info for 0.9.8 (emerge.info.log,5.46 KB, text/plain)
2013-03-13 14:56 UTC, Michal Plichta
Details
build log for 0.9.8 (build.log,1.75 KB, text/plain)
2013-03-13 14:58 UTC, Michal Plichta
Details
Obsoleting old attachments. (file_89432.txt,27 bytes, text/plain)
2013-05-05 17:14 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
handbrake build failure info (handbrake-failure.txt,20.39 KB, text/plain)
2013-05-15 18:26 UTC, Mark Knecht
Details
build.log (handbrake.build.log,15.78 KB, text/plain)
2013-05-15 18:42 UTC, Mark Knecht
Details
environment (handbrake.environment,132.00 KB, text/plain)
2013-05-15 18:43 UTC, Mark Knecht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zhenzhi 2005-04-17 10:00:16 UTC
HandBrake is a GPL'd multiplatform, multithreaded DVD to MPEG-4 ripper/converter. HandBrake was originally available on the BeOS, but now has been ported over to MacOS X and to GNU/Linux.

    *  Supported sources:
          o Any DVD-like source: VIDEO_TS folder, DVD image or real DVD (even encrypted)
          o PAL or NTSC
          o AC-3, LPCM or MPEG audio tracks
    * Outputs:
          o File format: MP4, AVI or OGM
          o Video: MPEG-4 or H.264 (1 or 2 passes or constant quantizer encoding)
          o Audio: AAC, MP3, Vorbis or AC-3 pass-through (supports encoding of several audio tracks)
    * Misc features
          o Chapter selection
          o Basic subtitle support (burned into the picture)
          o Integrated bitrate calculator
          o Picture deinterlacing, cropping and scaling
          o Grayscale encoding


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Marcin Kurek 2005-05-08 03:57:40 UTC
Yeah. IMHO this program is realy good. A nice goodie for Gentoo portage. 
Comment 2 Chris White (RETIRED) gentoo-dev 2005-06-27 12:15:46 UTC
Kamil will be working on this ebuild as part of new dev training. 
Comment 3 Kamil Burzynski 2005-06-29 13:53:37 UTC
The ebuild and all necessary files can be found in attachments.
Comment 4 Kamil Burzynski 2005-06-29 13:54:24 UTC
Created attachment 62266 [details]
The ebuild itself.
Comment 5 Kamil Burzynski 2005-06-29 13:54:48 UTC
Created attachment 62267 [details, diff]
Patch for amd64
Comment 6 Kamil Burzynski 2005-06-29 13:56:35 UTC
Created attachment 62268 [details]
CVS snapshot for 2005-06-29
Comment 7 Kamil Burzynski 2005-06-29 13:57:14 UTC
Created attachment 62269 [details]
x264 library
Comment 8 Kamil Burzynski 2005-06-29 13:57:52 UTC
Created attachment 62270 [details]
xvidcore library
Comment 9 Kamil Burzynski 2005-06-29 13:58:22 UTC
Created attachment 62271 [details]
Manifest file
Comment 10 Kamil Burzynski 2005-06-29 13:58:35 UTC
Created attachment 62272 [details]
Digest file
Comment 11 Marc Hildebrand (RETIRED) gentoo-dev 2005-06-29 22:34:49 UTC
Created attachment 62299 [details]
Log file: emerge handbrake

Hi!
Tried and failed on adm64.
I attatched the log of the screen-session I emerged handbrake in.
I have both wxGTK-2.4.2 and -2.6.0 installed, could that cause trouble?
Cheers,
Marc
Comment 12 Kamil Burzynski 2005-06-29 23:49:31 UTC
It seems, that I overlooked some depedencies - here is some output from your log:
./version.sh: line 2: svnversion: command not found
make: yasm: Command not found

Please 'emerge yasm subversion' first and I'll correct ebuild to include
depedencies.
Comment 13 Kamil Burzynski 2005-06-30 09:12:22 UTC
Created attachment 62336 [details]
The ebuild itself.

Added nasm/yasm depedencies as in dev-util/xvid.
Comment 14 Kamil Burzynski 2005-06-30 09:12:54 UTC
Created attachment 62337 [details]
Manifest file
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2005-06-30 12:04:04 UTC
Kamil, just FYI -  we don't need manifests and digests, those are generated
automatically. ;)
Comment 16 lain 2005-11-09 08:45:22 UTC
Has any progress on this ebuild been made since June? 0.7.0 is out.
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2005-11-16 11:23:15 UTC
*** Bug 112718 has been marked as a duplicate of this bug. ***
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2005-11-16 11:23:41 UTC
*** Bug 107393 has been marked as a duplicate of this bug. ***
Comment 19 Alexander Hsia 2006-01-25 19:32:56 UTC
New version 0.7.0 is out now
Comment 20 Sebastian Krämer 2006-03-16 14:23:28 UTC
(In reply to comment #19)
> New version 0.7.0 is out now

>What's new?
>2006/02/24: 0.7.1 released
Comment 21 stathis 2006-11-02 13:29:52 UTC
Created attachment 101082 [details]
An ebuild for version 0.7.1 (amd64)

I created this ebuild for the new version, it works great on my system (amd64). Note that the GUI of handbrake seems to have become obsolete. This is only for building the command line. What I did is to patch the configure scripts so that it compiles against gentoo shared libraries, rather than download and build everything statically from scratch. I hope this works for others and it eventually gets added to the portage tree.

please correct my clumsy ebuild if possible.
Comment 22 stathis 2006-11-02 13:31:39 UTC
Created attachment 101084 [details, diff]
Patch for configure script

This patches the configure script. It removes the static dependencies and links against gentoo shared libs.
Comment 23 stathis 2006-11-02 13:33:21 UTC
Created attachment 101085 [details, diff]
Patch for Jamfile

This patches the Jamfile. Removes the need to compile the required libs.
Comment 24 Owen Berry 2007-02-01 21:14:51 UTC
Created attachment 108892 [details, diff]
Patch so that libhba/encx264.c will compile against recent versions of x264

This patch is needed for it to compile. As far as I can tell, there was a change in one of the x264 structures and this change maps the same functionality to the new attribute. I'll try to follow up with the x264 developers and will post back.
Comment 25 Kevin Winter 2007-03-15 23:13:32 UTC
Created attachment 113419 [details]
failed emerge of handbrake
Comment 26 Kevin Winter 2007-03-15 23:15:31 UTC
(In reply to comment #21)
> Created an attachment (id=101082) [edit]
> An ebuild for version 0.7.1 (amd64)
> 
> I created this ebuild for the new version, it works great on my system (amd64).
> Note that the GUI of handbrake seems to have become obsolete. This is only for
> building the command line. What I did is to patch the configure scripts so that
> it compiles against gentoo shared libraries, rather than download and build
> everything statically from scratch. I hope this works for others and it
> eventually gets added to the portage tree.
> 
> please correct my clumsy ebuild if possible.
> 


(In reply to comment #25)
> Created an attachment (id=113419) [edit]
> failed emerge of handbrake
> 


I used the above ebuild with the supplied patches and added the above attachment as my failed attempt to build handbrake.  I would like to add that when i downloaded handbrakes source from their site and tried by hand, i received similar results (after much more compilation of associated libraries).  Not knowing jam, i'm not sure how to debug.
Comment 27 Owen Berry 2007-03-17 02:41:40 UTC
(In reply to comment #26)
> I used the above ebuild with the supplied patches and added the above
> attachment as my failed attempt to build handbrake.  I would like to add that
> when i downloaded handbrakes source from their site and tried by hand, i
> received similar results (after much more compilation of associated libraries).
>  Not knowing jam, i'm not sure how to debug.

My guess from looking at the output is that the patch I supplied was not applied. Did you put it in $PORTDIR_OVERLAY/media-video/handbrake/files/ and add it to the ebuild under the src_unpack function? For example:

  src_unpack() {
    unpack HandBrake-${PV}.tar.gz

    cd ${S}
    epatch ${FILESDIR}/handbrake-gentoo-configure-x86-${PV}.patch
    epatch ${FILESDIR}/handbrake-gentoo-Jamfile-x86-${PV}.patch
+   epatch ${FILESDIR}/handbrake-gentoo-encx264-0.7.1.patch
  }
Comment 28 Kevin Winter 2007-03-19 04:07:01 UTC
(In reply to comment #27)

> My guess from looking at the output is that the patch I supplied was not
> applied. Did you put it in $PORTDIR_OVERLAY/media-video/handbrake/files/ and
> add it to the ebuild under the src_unpack function? For example:

Quite right - as soon as i added it, Handbrake compiled quite nicely.  I'll have a chance to better test it tomorrow - but from an ebuild standpoint, i'd say it's top-notch :)

Comment 29 Pandor 2007-09-22 12:48:38 UTC
This bugreport dead?
upstream currently at version 0.9.0.
Comment 30 Kevin Winter 2007-09-22 13:06:06 UTC
(In reply to comment #29)
> This bugreport dead?
> upstream currently at version 0.9.0.
> 

Well, as I mentioned in #28, the given ebuild and patches make it work for me.

I wasn't able to manually bump it to the new version because the patches don't cleanly apply and I was too lazy to see if I could hack it manually.

Without a dev to adopt it, I think this ebuild is the best we're going to get...

Comment 31 Kamil Burzynski 2007-09-22 14:48:06 UTC
Created attachment 131602 [details]
Ebuild for HB 0.9.0

This is ebuild for 0.9.0. I have removed patches for configure/jamfile, so it builds against static libs again (probably list of deps is too long now).
It should be possible to add dynamic libs again, though in order to do it cleanly, a lot of work may be necessary (as HB author obviously ignores most of common practices in *nix world).

Please note that I have only build HB using this ebuild, not tested it. If you encounter any problems, give a comment here.
Comment 32 Nathan Caldwell 2007-11-28 12:19:29 UTC
(In reply to comment #31)
> Created an attachment (id=131602) [edit]
> Ebuild for HB 0.9.0
> 
> This is ebuild for 0.9.0. I have removed patches for configure/jamfile, so it
> builds against static libs again (probably list of deps is too long now).
> It should be possible to add dynamic libs again, though in order to do it
> cleanly, a lot of work may be necessary (as HB author obviously ignores most of
> common practices in *nix world).
> 

Actually this is because we (the HB devs) patch some of the contrib libraries to add extra functionality. For most of them there is no way upstream would accept the patch, or there is noone to submit the patch to.
Comment 33 Nathan Caldwell 2007-11-28 12:22:35 UTC
Created attachment 137214 [details]
media-video/handbrake-0.9.1

Here's an updated ebuild that offers both static libs, and (some) dynamic libs. The patched libs are always built as static because this would disable some pretty major functionality (Dolby Pro Logic audio, ipod compliant MP4s).
Comment 34 Nathan Caldwell 2007-11-28 12:23:46 UTC
Created attachment 137216 [details, diff]
files/handbrake-0.9.1-Jamfile-nocontrib.patch

This patch disables building of the contrib packages because it's handled by the ebuild.
Comment 35 Nathan Caldwell 2007-11-28 12:24:39 UTC
Created attachment 137217 [details, diff]
files/handbrake-0.9.1-system-libs.patch

Enables the use of dynamic libs, except for aotuv vorbis.
Comment 36 Nathan Caldwell 2007-11-28 12:25:36 UTC
Created attachment 137219 [details, diff]
files/handbrake-0.9.1-system-libs-noaotuv.patch

Enables dynamic libs, including vorbis (no aotuv in that case).
Comment 37 Nathan Caldwell 2007-11-28 12:31:03 UTC
You can find the distfile listed in the above ebuild at

http://saintdevelopment.com/files/HandBrake-complete-0.9.1.tar.bz2

I did this to prevent downloading files in the middle of the src_compile, and because otherwise you end up with an unmanageable set of directories in WORKDIR (read ebuild for more info).
Comment 38 Anthony Mutiso 2008-01-29 21:03:53 UTC
Tried the ebuild from #33 with the patches with the associated patches. It faild to build both on a ~x86 and ~amd64 workstations.

The ebuild produced repeated errors until killed.

util/testnasm.sh: line 8: test: =: unary operator expected
util/testnasm.sh: line 8: test: =: unary operator expected
util/testnasm.sh: line 8: test: =: unary operator expected
Comment 39 Nathan Caldwell 2008-01-29 21:17:24 UTC
(In reply to comment #38)
> Tried the ebuild from #33 with the patches with the associated patches. It
> faild to build both on a ~x86 and ~amd64 workstations.
> 
> The ebuild produced repeated errors until killed.
> 
> util/testnasm.sh: line 8: test: =: unary operator expected
> util/testnasm.sh: line 8: test: =: unary operator expected
> util/testnasm.sh: line 8: test: =: unary operator expected
> 
This is a problem with the mpeg4ip and xvid configure scripts and nasm 2.00.
We've fixed it in our subversion, and it will be fixed in the next release.
For now you can either downgrade to < nasm-2.00. I'll try to get an updated ebuild with the patch together in the meantime.
Comment 40 Anthony Mutiso 2008-01-30 14:50:21 UTC
(In reply to comment #39)
> (In reply to comment #38)
> > Tried the ebuild from #33 with the patches with the associated patches. It
> > faild to build both on a ~x86 and ~amd64 workstations.
> > 
> > The ebuild produced repeated errors until killed.
> > 
> > util/testnasm.sh: line 8: test: =: unary operator expected
> > util/testnasm.sh: line 8: test: =: unary operator expected
> > util/testnasm.sh: line 8: test: =: unary operator expected
> > 
> This is a problem with the mpeg4ip and xvid configure scripts and nasm 2.00.
> We've fixed it in our subversion, and it will be fixed in the next release.
> For now you can either downgrade to < nasm-2.00. I'll try to get an updated
> ebuild with the patch together in the meantime.
> 

Thanks!

Got it to build and install by doing a "USE=-docs emerge -va =dev-lang/nasm-0.98.39-r3 handbrake && emerge dev-lang/nasm". The -docs was needed since latex docs install broke and failed the install.
Comment 41 J.C. Wren 2008-04-27 22:38:24 UTC
I was attempting to build handbrake.  Grabbed the 0.9.1 build, the 3 patch files, and used the build line from #40.  It looks like it got a good ways through, but blew up with this:

(/usr/share/texmf/tex/latex/base/omsenc.dfu)
(/usr/share/texmf/tex/latex/base/ts1enc.dfu))) (./doxygen.sty
(/usr/share/texmf/tex/latex/tools/calc.sty)
(/usr/share/texmf/tex/latex/tools/array.sty))
(/usr/share/texmf/tex/latex/base/fontenc.sty
(/usr/share/texmf/tex/latex/base/t1enc.def)kpathsea: Running mktextfm ecrm1000
ACCESS DENIED  mkdir:     /var/cache/fonts/tfm
mkdir: cannot create directory `././var/cache/fonts/tfm': Permission denied
mktextfm: mktexdir /var/cache/fonts/tfm/jknappen/ec failed.
kpathsea: Appending font creation commands to missfont.log.

! Font T1/cmr/m/n/10=ecrm1000 at 10.0pt not loadable: Metric (TFM) file not fou
nd.
<to be read again>
                   relax
l.100 \fontencoding\encodingdefault\selectfont

?  

------

At the question mark it appeared to be waiting for input.  Any ideas here?
Comment 42 J.C. Wren 2008-04-27 22:41:58 UTC
Created attachment 151196 [details]
Error compiling Handbrake-0.9.1

Result of USE=-docs emerge -va =dev-lang/nasm-0.98.39-r3 handbrake && emerge dev-lang/nas
Comment 43 Mathy Vanvoorden 2008-05-09 20:08:38 UTC
I created a new ebuild that builds against subversion, with static libraries. I made it so that the necessary contrib libraries are pulled in by portage, not by the compile process, so they are stored inside distfiles. You also need the patch to make jam copy the files over instead of wgetting them.

Because of this it is necessary to regenerate the digests when the used library changes in HandBrake. I added a check in the ebuild that warns you when the library versions have changed.

If you want you can of course replace this method with any of the proposed suggestions. I just added this because I don't want to hammer the HandBrake servers everytime I update.

I didn't add the -jX stuff because currently the compile seems to fail if you use multiple processes.

PS: it's been a while since my last ebuild, so go easy on me ;-)
Comment 44 Mathy Vanvoorden 2008-05-09 20:10:01 UTC
Created attachment 152689 [details]
handbrake-svn ebuild
Comment 45 Mathy Vanvoorden 2008-05-09 20:10:28 UTC
Created attachment 152691 [details, diff]
disable wget patch
Comment 46 Mathy Vanvoorden 2008-05-09 22:04:19 UTC
I just found out that apparently libhb.a does not link against the static libraries so it is actually useless that it is installed.
Comment 47 Mike Weissman 2008-05-14 18:57:35 UTC
Built fine under x86, except you get blocked if you already have dev-util/jam installed.  

Suggestions (only my opinion, won't get offended if you say no thanks!):

Maybe rename ebuild to something like handbrake-svn-0.9.2.ebuild?

Also what about adding a test that the developers have:

cp ../libhb/libhb.so .
gcc -I../libhb -L. -lhb test.c -o test -lz -lpthread

Validate that the test Binary is really using the shared library

Also you could add the ability to compile the qt4 binary also, maybe add an X use flag?
  and then something like:

    cd "${S}"/qt4
    einfo "Building X Binary"
    qmake || die "qmake failed"
    emake || die "emake failed"
    einfo "Sandbox handle"
    addpredict /usr/bin/
    addread /usr/bin/
    dobin qtHB
    fperms a+x /usr/bin/qtHB

-Mike
 
Comment 48 Nathan Caldwell 2008-05-14 20:13:46 UTC
(In reply to comment #43)
> I didn't add the -jX stuff because currently the compile seems to fail if you
> use multiple processes.
> 

This is because jam attempts to build the contrib binaries at the same time it's building the files that use them. The only way I've so far figured out to get around this is to build everything in contrib with -j1, but have the Jamfile pass -jX on to the current contrib being built. I still haven't figured out a good way to to this so you can just do "jam -jX" from the root and have it handled automatically, so I haven't included it in the Jamfiles.


(In reply to comment #47)
> Also what about adding a test that the developers have:
> 
> cp ../libhb/libhb.so .
> gcc -I../libhb -L. -lhb test.c -o test -lz -lpthread
> 
> Validate that the test Binary is really using the shared library

The shared library isn't used. In fact it fails to link on X86_64 because nothing is compiled with PIC.

> Also you could add the ability to compile the qt4 binary also, maybe add an X
use flag?

The QT4 GUI is _USELESS_! It is in no way complete, about all you can do with it is scan a DVD, and encode with some hard-coded settings. There is really no reason to even build it, unless you plan on working on it.
Comment 49 Matias Korhonen 2008-11-25 23:10:10 UTC
There is now a new release (0.9.3) which includes an official GUI with, what I assume is, decent functionality.  More at http://handbrake.fr

Binaries are available, but only for Ubuntu 8.10.
Comment 50 Mieszko Ślusarczyk 2008-11-28 13:41:00 UTC
(In reply to comment #33)
> Created an attachment (id=137214) [edit]
> media-video/handbrake-0.9.1
> 
> Here's an updated ebuild that offers both static libs, and (some) dynamic libs.
> The patched libs are always built as static because this would disable some
> pretty major functionality (Dolby Pro Logic audio, ipod compliant MP4s).
> 

emerge: there are no ebuilds to satisfy "dev-util/jam".
(dependency required by "media-video/handbrake-0.9.1" [ebuild])
Comment 51 Samuli Suominen gentoo-dev 2008-11-28 14:07:59 UTC
(In reply to comment #50)
> (In reply to comment #33)
> > Created an attachment (id=137214) [edit]
> > media-video/handbrake-0.9.1
> > 
> > Here's an updated ebuild that offers both static libs, and (some) dynamic libs.
> > The patched libs are always built as static because this would disable some
> > pretty major functionality (Dolby Pro Logic audio, ipod compliant MP4s).
> > 
> 
> emerge: there are no ebuilds to satisfy "dev-util/jam".
> (dependency required by "media-video/handbrake-0.9.1" [ebuild])
> 

Use ftjam.
Comment 52 A. Person 2008-12-05 17:14:33 UTC
I get:

# ebuild handbrake-svn-9999.ebuild manifest
!!! /usr/local/portage/media-video/handbrake/handbrake-svn-9999.ebuild does not seem to have a valid PORTDIR structure.

Can anyone help?
Comment 53 A. Person 2008-12-05 18:09:34 UTC
Fixed this by renaming the ebuild to subversion-9999.ebuild and removing the "svn" portion.  Do people have it working with the original filename?

I have a new compile error unfortunately:

...failed Cc libhb/decmetadata.o ...
...skipped libhb.a for lack of libhb.a(hb.o)...
Cc test/test.o 
test/test.c: In function 'HandleEvents':
test/test.c:1019: warning: statement with no effect
test/test.c: At top level:
test/test.c:60: warning: 'default_arate' defined but not used
test/test.c:91: warning: 'cfr' defined but not used
Cc test/parsecsv.o 
...skipped HandBrakeCLI for lack of libhb.a...
...failed updating 35 target(s)...
...skipped 22 target(s)...
...updated 22 target(s)...
 * 
 * ERROR: media-video/handbrake-9999 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2137:  Called die
 * The specific snippet of code:
 *       jam || die "jam failed"
 *  The die message:
 *   jam failed
Comment 54 DaggyStyle 2008-12-10 18:58:30 UTC
here is the output of digesting the ebuild

ebuild /usr/local/portage/media-video/handbrake/handbrake-9999.ebuild digest
Password:
cat: /usr/portage/distfiles/svn-src/HandBrake/trunk/contrib/version*.txt: No such file or directory
>>> Creating Manifest for /usr/local/portage/media-video/handbrake

can anyone explain to why this ebuild is trying to access something that wasn't downloaded yet?
Comment 55 Mieszko Ślusarczyk 2008-12-16 10:37:03 UTC
With ebuild from  comment #33

libhb/hb.c:3:28: error: ffmpeg/avcodec.h: Nie ma takiego pliku ani katalogu
libhb/hb.c:4:28: error: ffmpeg/swscale.h: Nie ma takiego pliku ani katalogu
libhb/hb.c: In function 'hb_init_real':
libhb/hb.c:75: warning: implicit declaration of function 'av_log_set_level'
libhb/hb.c:75: error: 'AV_LOG_DEBUG' undeclared (first use in this function)
libhb/hb.c:75: error: (Each undeclared identifier is reported only once
libhb/hb.c:75: error: for each function it appears in.)
libhb/hb.c:125: warning: implicit declaration of function 'avcodec_init'
libhb/hb.c:126: warning: implicit declaration of function 'avcodec_register_all'
libhb/hb.c:127: warning: implicit declaration of function 'av_register_codec_parser'
libhb/hb.c:127: error: 'mpegaudio_parser' undeclared (first use in this function)
libhb/hb.c: In function 'hb_init_dl':
libhb/hb.c:157: error: 'AV_LOG_DEBUG' undeclared (first use in this function)
libhb/hb.c: In function 'hb_get_preview':
libhb/hb.c:321: error: 'AVPicture' undeclared (first use in this function)
libhb/hb.c:321: error: expected ';' before 'pic_in'
libhb/hb.c:329: warning: implicit declaration of function 'avpicture_fill'
libhb/hb.c:329: error: 'pic_in' undeclared (first use in this function)
libhb/hb.c:329: error: 'PIX_FMT_YUV420P' undeclared (first use in this function)
libhb/hb.c:331: error: 'pic_deint' undeclared (first use in this function)
libhb/hb.c:333: error: 'pic_scale' undeclared (first use in this function)
libhb/hb.c:335: error: 'pic_preview' undeclared (first use in this function)
libhb/hb.c:335: error: 'PIX_FMT_RGBA32' undeclared (first use in this function)
libhb/hb.c:358: warning: implicit declaration of function 'avpicture_deinterlace'
libhb/hb.c:359: warning: implicit declaration of function 'av_picture_crop'
libhb/hb.c:359: error: 'pic_crop' undeclared (first use in this function)
libhb/hb.c:368: warning: implicit declaration of function 'sws_getContext'
libhb/hb.c:372: error: 'SWS_LANCZOS' undeclared (first use in this function)
libhb/hb.c:372: error: 'SWS_ACCURATE_RND' undeclared (first use in this function)
libhb/hb.c:372: warning: assignment makes pointer from integer without a cast
libhb/hb.c:375: warning: implicit declaration of function 'sws_scale'
libhb/hb.c:381: warning: implicit declaration of function 'sws_freeContext'
libhb/hb.c:386: warning: assignment makes pointer from integer without a cast
libhb/hb.c:423: warning: implicit declaration of function 'avpicture_free'

gcc -c -o libhb/hb.o -Wall -g -I./contrib/include -O3 -funroll-loops -DSYS_LINUX -DUSE_PTHREAD -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHB_VERSION=\"0.9.1\" -DHB_BUILD=2007100800 -D__LIBHB__ -Ilibhb libhb/hb.c

...failed Cc libhb/hb.o ...
libhb/ipodutil.cpp: In constructor 'IPodUUIDAtom::IPodUUIDAtom()':
libhb/ipodutil.cpp:22: warning: deprecated conversion from string constant to 'char*'
...skipped libhb.a for lack of libhb.a(hb.o)...
...failed updating 1 target(s)...
...skipped 1 target(s)...
...updated 2 target(s)...
Comment 56 DaggyStyle 2008-12-20 18:11:47 UTC
anyone has an ebuild for version 0.9.3?
Comment 57 Jeremy Olexa (darkside) (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2009-01-20 16:30:54 UTC
(this is an automated message based on filtering criteria that matched this bug)
'EBUILD' is in the KEYWORDS which should mean that there is a ebuild attached 
to this bug.
This bug is assigned to maintainer-wanted which means that it is not in the 
main tree.

Hello, The Gentoo Team would like to firstly thank you for your ebuild 
submission. We also apologize for not being able to accommodate you in a timely
manner. There are simply too many new packages.

Allow me to use this opportunity to introduce you to Gentoo Sunrise. The 
sunrise overlay[1] is a overlay for Gentoo which we allow trusted users to 
commit to and all users can have ebuilds reviewed by Gentoo devs for entry 
into the overlay. So, the sunrise team is suggesting that you look into this 
and submit your ebuild to the overlay where even *you* can commit to. =)

Because this is a mass message, we are also asking you to be patient with us. 
We anticipate a large number of requests in a short time. 

Thanks,
On behalf of the Gentoo Sunrise Team,
Jeremy.

[1]: http://www.gentoo.org/proj/en/sunrise/
[2]: http://overlays.gentoo.org/proj/sunrise/wiki/SunriseFaq
Comment 58 Avuton Olrich 2009-02-16 16:39:52 UTC
I don't think this ebuild as is would ever make it into Gentoo due to the bundled libraries and upstream's lack of willingness to use system libraries.
Comment 59 Nathan Caldwell 2009-02-16 20:03:04 UTC
(In reply to comment #58)
> I don't think this ebuild as is would ever make it into Gentoo due to the
> bundled libraries and upstream's lack of willingness to use system libraries.
> 

And why would that stop anything. There are other ebuilds already in the portage tree that use their own libraries (blender).

And it's not unwillingness, we patch some of the libraries to offer features that we find useful. Sure, for some of the libraries we could use system libraries (libtheora, libogg, LAME, libdvdread, faac). The other devs disagree with me on that point, so it probably won't happen, but it's possible without any major complications. Other libraries there are specific reasons we use them (liba52 and libdts are patched to offer Dolby ProLogic output, we use aoTuV libvorbis, x264 is statically linked so that we don't have the PIC performance hit, libmp4v2 a couple of developers actually forked because we were adding so many features not to mention mpeg4ip officially closed shop)
Comment 60 Avuton Olrich 2009-02-17 17:51:43 UTC
(In reply to comment #59)
> And why would that stop anything. There are other ebuilds already in the
> portage tree that use their own libraries (blender).

I don't act like I speak for any Gentoo developers, they speak for themselves, but this kinda thing makes maintenance a nightmare and no one will likely pick it up. You can see bugzilla is already riddled with bugs to remove bundled libraries for other ebuilds and they don't have half the bundled libraries, nor do they accept other bad practices like having the build system download the libraries to bundle. And as for your example, you can find bugs on here to remove those bundled libraries in blender.

Comment 61 Kyle Evans 2009-03-13 19:58:21 UTC
Created attachment 184913 [details]
media-video/handbrake-0.9.3

Be easy on me, this is my first ebuild. You will have to manually download the source, I couldn't get around that. I also couldn't get the qt4 gui to build...

qhandbrake.cpp: In member function ‘void QHandBrake::encode()’:
qhandbrake.cpp:116: error: ‘struct hb_job_s’ has no member named ‘acodec’
qhandbrake.cpp:117: error: ‘struct hb_job_s’ has no member named ‘audios’
make: *** [qhandbrake.o] Error 1
 *
 * ERROR: media-video/handbrake-0.9.3 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2204:  Called die
 * The specific snippet of code:
 *           make || die "make qtHB failed";
 *  The die message:
 *   make qtHB failed


I agree that having the bundled libraries download during the build process is a pain, but only if you have to re-emerge, which I did a lot of ;(
Comment 62 Ian Whyman (thev00d00) gentoo-dev 2009-05-19 12:48:12 UTC
Maybe it is worth looking into creating a ebuild based on a SVN snapshot? Upstream seems to have moved to autotools, so may be more friendly than the jam based system in 0.9.3.

Looks like they are still bundling libs however.
Comment 63 Nathan Caldwell 2009-05-19 17:39:47 UTC
(In reply to comment #62)
> Maybe it is worth looking into creating a ebuild based on a SVN snapshot?
> Upstream seems to have moved to autotools, so may be more friendly than the jam
> based system in 0.9.3.
> 

Actually it's a custom build system that uses python for the configure script and make.
Comment 64 Tony Vroon gentoo-dev 2009-06-14 21:32:51 UTC
Created attachment 194705 [details]
handbrake-0.9.3.ebuild

Initial go at an ebuild without fetch restrictions. We should probably await a release that doesn't have such a horrendous build system, but here's something for you to build on.
This downloads everything that's required, and infiltrates the wget logic to work for us rather then against us. The dirname logic breaks, so if you want to fix it, start there.
I'm taking the liberty of culling the older ebuilds as none of them would have made it into the portage tree.
Comment 65 Tony Vroon gentoo-dev 2009-06-14 21:33:56 UTC
Created attachment 194707 [details, diff]
0.9.3-no-wget-ktnxbye.patch

This "jam file" will need more work, the dirname logic currently breaks. I'm having trouble figuring out what they're trying to do.
Comment 66 Nathan Caldwell 2009-06-15 00:32:20 UTC
(In reply to comment #65)
> Created an attachment (id=194707) [edit]
> 0.9.3-no-wget-ktnxbye.patch
> 
> This "jam file" will need more work, the dirname logic currently breaks. I'm
> having trouble figuring out what they're trying to do.
> 

Tony, nice job. As for what any part of the Jam build system was attempting to do you would have to ask titer. None of the current devs really understood it that well, we would just add bits and pieces to it, and hope it didn't break.

I do think it would be a better idea for you to work off svn trunk, however. We completely redid the build system, and ditched the convoluted POS that was Jam. I would hate to see all your effort go into making an ebuild for a build system that will just be gone next release. 
Comment 67 Tony Vroon gentoo-dev 2009-06-15 10:59:59 UTC
(In reply to comment #66)
> I do think it would be a better idea for you to work off svn trunk, however. We
> completely redid the build system, and ditched the convoluted POS that was Jam.
> I would hate to see all your effort go into making an ebuild for a build system
> that will just be gone next release. 

Talking about releases, is the next one to be expected within weeks or days (as opposed to months) please? I'm not really a fan of adding SVN snapshots, as versioning will become messy if 0.9.4 is then released later (because 20090615 > 0.9.4).

Comment 68 srunni 2009-06-21 04:04:38 UTC
Has anyone thought of making a media-video/handbrake-bin ebuild that could be used until this mess is sorted out?
Comment 69 Joe Stroller 2009-08-11 21:24:43 UTC
I would really love to see an ebuild for this in the tree, as HandbrakeCLI seems to be the best command-line ripper available for Linux. I think I have tried all the other command-line rippers in the Portage tree & they all fall short compared to its simplicity.

FWIW I'm currently testing the media-video/handbrake ebuild from the "Voyageur" overlay:
http://gentoo-overlays.zugaina.org/voyageur/portage/media-video/handbrake/handbrake-0.9.3.ebuild
http://cafarelli.fr/websvn/listing.php?repname=voyageur-overlay

I used -gtk because I only needed the command-line version (`HandbrakeCLI`). It has compiled & installed fine, and so far does nice transcoding. 
Comment 70 Travis Hansen 2009-08-18 15:36:34 UTC
I've put together an svn build of handbrake.  If the maintainers of the already mentioned overlays (or someone in contact with them) would like to upload them I'm perfectly happy doing so.  Otherwise if folks are interested I can make my overlay available.
Comment 71 Tony Vroon gentoo-dev 2009-08-18 21:30:13 UTC
(In reply to comment #70)
> I've put together an svn build of handbrake. 

I want a regular versioned tarball release for the portage tree. It has been confirmed by the upstream developers that the current build system is unusable. I should not have to go through the extra work of rolling SVN snapshots just to add a new package to the tree.
Ping me when a release is available, not before.
Comment 72 Travis Hansen 2009-08-24 22:04:55 UTC
Created attachment 202205 [details]
handbrake-9999.ebuild

After working with upstream it appears this thing will now build/install without any patches.  I'm uploading my current svn ebuild for any who would like to use it.  Please note that most of the dependencies are not versioned so if you run into issues please let me know and I'll update them.
Comment 73 Mike 2009-09-15 09:28:11 UTC
It took me a while to figure out how to get this to compile on my server with...
a) a hardened toolchain (gcc 3.4.6).
b) a quad-core cpu.

The svn ebuild won't compile with 3.4.6. Use the 0.9.3 ebuild above.

1) Had to switch to 3.4.6-vanilla with gcc-config.
2) Had to use MAKEOPTS="-j1" because one package would not compile without it (normally it is -j5, because of the quad-core cpu).
3) I didn't try to build gui; USE="-gtk"; I put it in /etc/portage/package.use

so then...

MAKEOPTS="-j1" emerge -av handbrake

Comment 74 Travis Hansen 2009-09-16 17:04:03 UTC
(In reply to comment #73)
> It took me a while to figure out how to get this to compile on my server
> with...
> a) a hardened toolchain (gcc 3.4.6).

This may be an issue for sure.  I don't have any hardened boxes to test :(

> b) a quad-core cpu.
> 
> The svn ebuild won't compile with 3.4.6. Use the 0.9.3 ebuild above.
> 
> 1) Had to switch to 3.4.6-vanilla with gcc-config.
> 2) Had to use MAKEOPTS="-j1" because one package would not compile without it
> (normally it is -j5, because of the quad-core cpu).

I run -j5 myself so this is probably related to an older gcc

> 3) I didn't try to build gui; USE="-gtk"; I put it in /etc/portage/package.use
> 
> so then...
> 
> MAKEOPTS="-j1" emerge -av handbrake
> 

Glad you were able to actually get it installed at any rate :)
Comment 75 Nathan Caldwell 2009-09-17 02:37:51 UTC
(In reply to comment #73)
> It took me a while to figure out how to get this to compile on my server
> with...
> a) a hardened toolchain (gcc 3.4.6).

Mike, we would like to have a look at what fails with hardened, see if it's fixable. Could you get us a build log (best would be to join #handbrake on FreeNode)?
Comment 76 Andy Baker 2009-09-19 22:15:27 UTC
(In reply to comment #75)
> (In reply to comment #73)
> > It took me a while to figure out how to get this to compile on my server
> > with...
> > a) a hardened toolchain (gcc 3.4.6).
> 
> Mike, we would like to have a look at what fails with hardened, see if it's
> fixable. Could you get us a build log (best would be to join #handbrake on
> FreeNode)?
> 

The hardened toolchain generates an executable which generates the following warning:

libdvdread: Using libdvdcss version 1.2.10 for DVD access
Compiler did not align stack variables. Libavcodec has been miscompiled
and may be very slow or crash. This is not a bug in libavcodec,
but in the compiler. You may try recompiling using gcc >= 4.2.
Do not report crashes to FFmpeg developers.
No accelerated IMDCT transform found
Encoding: task 1 of 1, 0.00 %MP4ERROR: 
ERROR: muxmp4.c: MP4AddVideoTrack failed!

...and doesn't seem to produce anything useful.

Incidently, I tried the version for SVN which still downloads it source seperately and doesnt not use installed libraries. It failed on the compile of libfaad2:

make[3]: Entering directory `/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build/contrib/faad2/faad2-2.7/libfaad'
/bin/sh ../libtool --tag=CC --mode=compile /usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I..    -iquote ../include  -c -o bits.lo bits.c
 /usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -iquote ../include -c bits.c -o bits.o
gcc: ../include: linker input file unused because linking not done
cc1: error: unrecognized command line option "-iquote"
cc1: ../include: No such file or directory
make[3]: *** [bits.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build/contrib/faad2/faad2-2.7/libfaad'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build/contrib/faad2/faad2-2.7'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build/contrib/faad2/faad2-2.7'
make: *** [contrib/faad2/.stamp.build] Error 2

I modified the Makefile to remove -iquotes and it built, however it was not usable, but thats to do with compiler selection. I'll attempt a vanilla build to see if that fixes it.
Comment 77 Andy Baker 2009-09-22 11:13:25 UTC
> I modified the Makefile to remove -iquotes and it built, however it was not
> usable, but thats to do with compiler selection. I'll attempt a vanilla build
> to see if that fixes it.
> 
The vanilla compiler successfully built HandBrakeCLI. I still get the error with regards to "Compiler did not align stack variables. Libavcodec has been miscompiled and may be very slow or crash.". Handbrake itself appears to function fine, although I haven't done a byte-to-byte comparison with the output from a version without the warning.
Comment 78 Jason Huebel 2009-09-24 04:31:39 UTC
(In reply to comment #72)
> Created an attachment (id=202205) [edit]
> handbrake-9999.ebuild

You SVN ebuild worked great for me. Here's my emerge --info:

Portage 2.2_rc40 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.10.1-r0, 2.6.31-gentoo x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-gentoo-2.0.1
Timestamp of tree: Sun, 20 Sep 2009 04:30:01 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.4.4-r13, 2.5.4-r3, 2.6.2-r1, 3.1
dev-python/pycrypto: 2.0.1-r8
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.1
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo http://mirror.usu.edu/mirrors/gentoo/ http://mirror.utdlug.org/linux/distributions/gentoo/ "
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/jhuebel/prog/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac accessibility acl additions alsa amd64 apache2 arts bash-completion berkdb bzip2 cdparanoia cgi cli cracklib crypt ctype cups curl dbus doc dri dvd dvdr dvdread encode expat fastcgi ffmpeg filter flac fortran gd gdbm gnutls gpm gtk iconv iproute2 isdnlog jadetex jpeg kde kdeenablefinal mjpeg mmx mng mp3 mpeg mudflap multilib mysql ncurses network nls nptl nptlonly nsplugin ogg opengl openmp pam pcntl pcre pdf pdo perl plasma png pppd python qt3 qt3support qt4 quicktime rdesktop readline reflection rss ruby samba session simplexml soap sockets spl sql sqlite sse sse2 ssl subversion svg sysfs tcpd theora threads tk truetype unicode urandom vhosts vnc vorbis webdav webinterface webkit x264 xml xmlrpc xorg xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fbdev vga vesa nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 79 PM 2009-09-28 16:47:02 UTC
It builds fine for me, but 'ghb' only gives me an error:

Unable to create ghb.

Internal error. Could not parse UI description.

What's this? 

Comment 80 Mike 2009-10-06 16:20:14 UTC
Do you want any more info from me, or is Andy's info enough? I'm sort of glad that I couldn't compile the SVN version, because HandBrake's developers have dropped support for AVI, OGM and XviD. HandBrake is the fastest XviD encoder I've ever found.
Comment 81 Andy Baker 2009-10-07 11:40:57 UTC
FWIW, my emerge --info:

Portage 2.1.6.13 (hardened/linux/x86/10.0, gcc-3.4.6-vanilla, glibc-2.9_p20081201-r2, 2.6.28-hardened-r9 i686)
=================================================================
System uname: Linux-2.6.28-hardened-r9-i686-Intel-R-_Atom-TM-_CPU_330_@_1.60GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 05 Oct 2009 17:30:01 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r3, 2.6.2-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo http://gentoo.virginmedia.com/sites/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi apache2 berkdb bzip2 cdr cli cracklib crypt cups dbus dri dvd faac faad ffmpeg flac gdbm gnome gpm gtk hal hardened howl iconv id3tag ipv6 isdnlog jpeg libmms lm_sensors mmx modules mono mp3 mudflap mysql ncurses nls no-epiphany no-seamonkey nptl nptlonly nsplugin ogg opengl pam pcre pdf perl pic pmu png pppd python readline reflection samba session spl sse ssl stream svg sysfs tcpd truetype type1 unicode urandom vhosts vorbis wma x86 xft xmlreader xmlwriter xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 	emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m 	maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" USERLAND="GNU" VIDEO_CARDS="i915"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 82 Andy Baker 2009-10-22 14:01:49 UTC
Upgraded to GCC 4.3.4. Get an error similar to that described in:
http://forum.doom9.org/archive/index.php/t-123967.html

/usr/bin/gcc -DHAVE_AV_CONFIG_H -I. -I"/var/tmp/portage/media-video/handbrake-9999/work/handbrak
e-9999/build/contrib/ffmpeg/ffmpeg-r19067" -O2 -march=prescott -pipe -D_ISOC99_SOURCE -D_POSIX_C
_SOURCE=200112 -I/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build/contrib/i
nclude -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fomit-frame-pointer -pthread -g -Wde
claration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-
decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -f
no-signed-zeros        -c -o libavcodec/x86/dsputil_mmx.o libavcodec/x86/dsputil_mmx.c
libavcodec/x86/h264dsp_mmx.c: In function 'h264_h_loop_filter_luma_mmx2':
libavcodec/x86/dsputil_mmx.c:705: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
libavcodec/x86/dsputil_mmx.c:705: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
libavcodec/x86/dsputil_mmx.c:705: error: 'asm' operand has impossible constraints
libavcodec/x86/dsputil_mmx.c:705: error: 'asm' operand has impossible constraints
libavcodec/x86/dsputil_mmx.c:705: error: 'asm' operand has impossible constraints
libavcodec/x86/dsputil_mmx.c:705: error: 'asm' operand has impossible constraints
libavcodec/x86/h264dsp_mmx.c:633: error: 'asm' operand has impossible constraints
libavcodec/x86/dsputil_mmx.c:705: error: 'asm' operand has impossible constraints
libavcodec/x86/dsputil_mmx.c:705: error: 'asm' operand has impossible constraints
libavcodec/x86/dsputil_mmx.c:705: error: 'asm' operand has impossible constraints
libavcodec/x86/dsputil_mmx.c:705: error: 'asm' operand has impossible constraints
libavcodec/x86/dsputil_mmx.c:705: error: 'asm' operand has impossible constraints
libavcodec/x86/dsputil_mmx.c:705: error: 'asm' operand has impossible constraints
libavcodec/x86/h264dsp_mmx.c:633: error: 'asm' operand has impossible constraints
libavcodec/x86/dsputil_mmx.c:705: error: 'asm' operand has impossible constraints
libavcodec/x86/dsputil_mmx.c:705: error: 'asm' operand has impossible constraints

Had to add '-fno-PIC' to the offending makefile to allow for the download ffmpeg to compile.
Comment 83 Tony Vroon gentoo-dev 2009-10-22 14:15:54 UTC
Upstream fails to make a new release in a timely fashion and this is turning into a user support centre instead of a package bug. Lost interest.
Comment 84 Patrick Haak 2009-11-08 14:10:04 UTC
Hey together!

I tried to install the 0.9.3 version with the patch and get following error when i try to compile:
http://pastebin.com/f11f9cf51

My emerge --info gives:

Portage 2.1.6.13 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P9400_@_2.40GHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 08 Nov 2009 00:15:01 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -msse4.1 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=native -msse4.1 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.uni-kl.de/pub/linux/gentoo/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi adns alsa amd64 audiofile avi berkdb bitmap-fonts bluetooth bmp branding bzip2 cairo cdinstall cdr cli cracklib crypt cups dbus dga dri dvd dvdr dvdread encode firefox fortran gdbm gif gpm gps iconv imagemagick imap imlib ipv6 java6 jpeg libg++ libwww mad mmx modules mp3 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin ogg oggvorbis opengl openmp pam pcre pdf pdflib perl png pppd python qt quicktime readline reflection sdl session sndfile spl sse sse2 ssl symlink sysfs tcpd tiff truetype unicode usb wifi xorg xpm xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Any idea? I dont see it. I will try the latest version here too. :)
Comment 85 Andrew Brouwers 2009-11-24 23:30:05 UTC
Created attachment 211115 [details]
handbrake-0.9.4.ebuild

Attached is a 0.9.4 build script; this will work for end users, but still downloads the individual tarballs.

If the intention is to get this into portage, rather than downloading all of the tarballs with SRC_URI, it would be easiest to host a pre-generated tarball with all of the the contrib-tarballs already included.  This can be done REALLY easily:

$ cd HandBrake-0.9.4
$ ./configure
$ make contrib.fetch

This will grab everything needed; you can then drop the wget/curl dep from DEPEND in my script.
Comment 86 Jason Wigg 2009-11-26 07:44:44 UTC
The SRC_URI needs to be adjusted as the download location has changed.

It's now: http://handbrake.fr/rotation.php?file=HandBrake-0.9.4.tar.bz2

That might make it a little more awkward for fetching, I'm not sure if there's an easy way to handle php download links, just that wget will save it as rotation.php?file=HandBrake-0.9.4.tar.bz2.
Comment 87 Andrew Brouwers 2009-11-27 17:19:23 UTC
Created attachment 211344 [details]
handbrake-0.9.4.ebuild

OK, a few minor tweaks for 0.9.4:
- fixed SRC_URI to use php mirror rotation
- fixed doc building / installation
- removed a couple "cd" arguments, and pass -C build to make instead
Comment 88 Fabio Bonfante 2009-11-29 21:25:02 UTC
FYI compile and work on my 2 amd64 systems, tnx for the ebuild. I hope in the future the build system could be more 'standard', or anyway support to use system libraries...
Comment 89 Bill Krueger 2009-11-30 13:32:32 UTC
(In reply to comment #87)
> Created an attachment (id=211344) [details]
> handbrake-0.9.4.ebuild
> 
> OK, a few minor tweaks for 0.9.4:
> - fixed SRC_URI to use php mirror rotation
> - fixed doc building / installation
> - removed a couple "cd" arguments, and pass -C build to make instead
> 

I'm having trouble building with USE="gtk". I'm getting an error that says:
libtool: link: cannot find the library `/usr/lib/libGL.la' or unhandled argument `/usr/lib/libGL.la'

I did an equery belongs libGL.la and get the following output:

media-libs/mesa-7.5.2 (/usr/lib/opengl/xorg-x11/lib/libGL.la)
x11-drivers/nvidia-drivers-173.14.20 (/usr/lib/opengl/nvidia/lib/libGL.la)

but nothing in /usr/lib. Is there some way to direct the ebuild to use one of these alternate locations for this file?
Thanks
Bill

Comment 90 Adam Bowers 2009-11-30 13:59:38 UTC
(In reply to comment #89)
> (In reply to comment #87)
> > Created an attachment (id=211344) [details] [details]
> > handbrake-0.9.4.ebuild
> > 
> > OK, a few minor tweaks for 0.9.4:
> > - fixed SRC_URI to use php mirror rotation
> > - fixed doc building / installation
> > - removed a couple "cd" arguments, and pass -C build to make instead
> > 
> 
> I'm having trouble building with USE="gtk". I'm getting an error that says:
> libtool: link: cannot find the library `/usr/lib/libGL.la' or unhandled
> argument `/usr/lib/libGL.la'
> 
> I did an equery belongs libGL.la and get the following output:
> 
> media-libs/mesa-7.5.2 (/usr/lib/opengl/xorg-x11/lib/libGL.la)
> x11-drivers/nvidia-drivers-173.14.20 (/usr/lib/opengl/nvidia/lib/libGL.la)
> 
> but nothing in /usr/lib. Is there some way to direct the ebuild to use one of
> these alternate locations for this file?
> Thanks
> Bill
> 

You might want to try emerging lafilefixer.  Run it with the --justfixit option.
Comment 91 Dan Reidy 2010-01-02 22:16:28 UTC
Opened: 2005-04-17 10:00 

almost 5 years, and it's still not in portage? Im not generally one to complain but that is a god awful long time for this ebuild to be sitting here, when it could be in the portage tree so people can actually use it. I know it's install is very messy, but there has to be someone with the skill level who can fix or patch it so it "just works".
Comment 92 Ben de Groot (RETIRED) gentoo-dev 2010-01-02 22:58:03 UTC
(In reply to comment #91)

Skilled people we have. But we are all volunteers and apparently nobody is interested in maintaining this package, especially if upstream is not interested in cooperating. See comments #58 and #60 above. In its current form this is highly unlikely to ever make it into portage.

Comment 93 Travis Hansen 2010-01-03 00:54:07 UTC
I worked with upstream before creating the 9999 ebuild (which has worked wonderfully for months) and they added a number of patches to make it work correctly.

In my opinion not including in portage simply because a build system downloads external files (although it it is abnormal) is silly.

Other apps also have their own libraries too (xbmc has in the past and maybe still does, others?) which hasn't posed a problem for entry into portage either.

Anyway, maybe we could/should shove them into sunrise or something for a while?

I'd be willing to commit some more time/resources.
Comment 94 Matt 2010-01-04 14:35:55 UTC
# ebuild /opt/portage/media-video/handbrake-0.9.4.ebuild digest
Appending /opt to PORTDIR_OVERLAY...
!!! /opt/portage/media-video/handbrake-0.9.4.ebuild does not seem to have a valid PORTDIR structure.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


# emerge --info
Portage 2.2_rc61 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.32-tuxonice i686)
=================================================================                                         
System uname: Linux-2.6.32-tuxonice-i686-Intel-R-_Core-TM-2_Duo_CPU_P8600_@_2.40GHz-with-gentoo-2.0.1     
Timestamp of tree: Mon, 04 Jan 2010 01:45:01 +0000                                                        
app-shells/bash:     4.0_p35                                                                              
dev-java/java-config: 2.1.9-r2                                                                            
dev-lang/python:     2.6.4                                                                                
dev-util/cmake:      2.6.4-r3                                                                             
sys-apps/baselayout: 2.0.1                                                                                
sys-apps/openrc:     0.6.0                                                                                
sys-apps/sandbox:    2.2                                                                                  
sys-devel/autoconf:  2.63-r1                                                                              
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                                                 
sys-devel/binutils:  2.18-r3                                                                              
sys-devel/gcc-config: 1.4.1                                                                               
sys-devel/libtool:   2.2.6b                                                                               
virtual/os-headers:  2.6.27-r2                                                                            
ACCEPT_KEYWORDS="x86"                                                                                     
ACCEPT_LICENSE="* -@EULA"                                                                                 
CBUILD="i686-pc-linux-gnu"                                                                                
CFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer -w"                                                    
CHOST="i686-pc-linux-gnu"                                                                                 
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"              
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"                         
CXXFLAGS="-O2 -march=i686 -pipe -ftracer -fomit-frame-pointer -w"                                                   
DISTDIR="/usr/portage/distfiles"                                                                                    
EMERGE_DEFAULT_OPTS=" --keep-going "                                                                                
FEATURES="assume-digests candy distlocks fixpackages metadata-transfer news noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv"                                   
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com http://distfiles.gentoo.org"                                         
LANG="en_US"                                                                                                        
LC_ALL="en_US"                                                                                                      
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags -Wl,--warn-once"                     
LINGUAS="en en_US"                                                                                                  
MAKEOPTS="-j4"                                                                                                      
PKGDIR="/usr/portage/packages"                                                                                      
PORTAGE_COMPRESS="bzip2"                                                                                            
PORTAGE_CONFIGROOT="/"                                                                                              
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/opt/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac aalib acl acpi adns ads aiglx alsa amr apache2 audacious audit autoipd bash-completion berkdb blender-game bonjour branding bzip2 cairo cdda cdparanoia cdr chardet clamav cli colordiff consolekit cracklib crypt css cups custom-cflags custom-cxxflags custom-optimization cxx dbus dell devil dga dhcp directfb disk-partition dmx dri dts dv dvb dvd dvdr eds emboss encode evo exif fam fbcon fbcondecor fbsplash ffmpeg firefox flac fortran gdbm geoip gif gimp glib glibc-omitfp glitz gmp gnutls gpm gtk hal icecast iconv idn imagemagick insecure-savers ipv6 irda isc java jbig jfs john jpeg jpeg2k kde kerberos kipi ladspa lame laptop lcms ldap libcaca libnotify logrotate lzo mad mbrola md5sum midi mikmod mmx mmxext mng modules mp3 mp4 mpeg mudflap ncurses network nis nls nptl nptlonly nsplugin ntfs ntlm oav offensive ofx ogg opengl openmp openntpd pam pcre pdf perl perlsuid plugins png policykit ppds pppd python qt3support qt4 quicktime rar rdp readline reflection reiserfs samba sasl scanner sdl session sftplogging slp smp sndfile sox speex spell spl sse sse2 sse3 ssl ssse3 startup-notification svg symlink sysfs tcpd theora threads thumbnail thunar tidy tiff toolbar tools truetype unicode unsupported usb userlocales utempter v4l v4l2 vcd vhosts vidix vorbis wavpack webkit wifi win32codecs winbind wma wmf x264 x86 xcomposite xfs xinerama xml xorg xpm xrandr xscreensaver xulrunner xv xvid xvmc yv12 zeroconf zip zlib" ALSA_CARDS="hda-intel intel8x0 intel8x0m" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958         ioplug ladspa lfloat linear meter mulaw multi null rate dsnoop extplug file hooks         ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="adc65 agfa_cl20 aox barbie canon casio_qv clicksmart310 digigr8 digita dimagev         dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 kodak_dc120         kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica largan lg_gsm         mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859         pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3         samsung sierra sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55         soundvision spca50x sq905 stv0674 stv0680 sx330z toshiba_pdrm11 konica_qm150 sipix_blink" ELIBC="glibc" INPUT_DEVICES="evdev joystick keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" LIRC_DEVICES="all" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev vesa vga"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 95 Peng Liu 2010-01-04 19:11:48 UTC
Hi Matt, the ebuild file need put into its own directory and I believe it need to be the exact name like handbrake/handbrake-0.9.4

(In reply to comment #94)
> # ebuild /opt/portage/media-video/handbrake-0.9.4.ebuild digest
> Appending /opt to PORTDIR_OVERLAY...
> !!! /opt/portage/media-video/handbrake-0.9.4.ebuild does not seem to have a
> valid PORTDIR structure.
> 
 
 
Comment 96 Andrew Brouwers 2010-01-09 19:28:19 UTC
(In reply to comment #95)
> Hi Matt, the ebuild file need put into its own directory and I believe it need
> to be the exact name like handbrake/handbrake-0.9.4
> 
> (In reply to comment #94)
> > # ebuild /opt/portage/media-video/handbrake-0.9.4.ebuild digest
> > Appending /opt to PORTDIR_OVERLAY...
> > !!! /opt/portage/media-video/handbrake-0.9.4.ebuild does not seem to have a
> > valid PORTDIR structure.
> > 
> 
> 

Exactly - according your emerge --info, it's expecting "/opt/portage/media-video/handbrake/handbrake-0.9.4.ebuild"  - try that, you're just missing the higher-level "handbrake" sub-category.

Comment 97 Andrew Brouwers 2010-01-10 16:04:58 UTC
(In reply to comment #92)
> (In reply to comment #91)
> 
> Skilled people we have. But we are all volunteers and apparently nobody is
> interested in maintaining this package, especially if upstream is not
> interested in cooperating. See comments #58 and #60 above. In its current form
> this is highly unlikely to ever make it into portage.
> 

I have to disagree here.  I do think that the policy sucks about downloading tarballs during install; however, a gentoo dev can *easily* generate a tarball and stick it on a gentoo server.  I actually outlined the 2 or 3 commands needed to do this!  And, at the rate of ~ 1-2 releases / year, I doubt it would be too challenging to keep up.

Anyway, the stubborness again kinda sucks, as the result is that gentoo users do NOT get access to a pretty awesome program.  The work is already done, even.
Comment 98 Thomas 2010-02-22 20:10:23 UTC
Why don't the devs simply open a forum thread and ask users if they want it in portage?
I think they would see that there are a lot of people out there waiting for it.
Comment 99 Samuli Suominen gentoo-dev 2010-02-22 20:17:21 UTC
I'd add this right away, but upstream is bundling all these libs which is unacceptable. It needs to use the system (external) libs, before that, there's not a slightest chance this will go to portage.
Comment 100 Ben de Groot (RETIRED) gentoo-dev 2010-02-22 21:18:21 UTC
(In reply to comment #98)
> Why don't the devs simply open a forum thread and ask users if they want it in
> portage?
> I think they would see that there are a lot of people out there waiting for it.
 
See my comment #92 above. It is not about users wanting this package. That we know, one just needs to look at the number of comments here. It is about finding a developer willing to maintain this package. As long as nobody is willing to do so, you will have to wait. Or do it yourself. Or pay somebody to do it. Or convince upstream to comply with our policy of using system libs instead of bundled libs.
Comment 101 Travis Hansen 2010-02-22 23:41:52 UTC
This 'bundled libs' argument for non-inclusion seems silly to me.  I've already mentioned other packages do/have use bundled lib.  XBMC, chromium, etc.  We also have binary packages in the tree.  Would it make everyone feel better if we made a -bin version of this package?

I simply fail to see the difference is all...
Comment 102 Luca Barbato gentoo-dev 2010-02-23 10:45:21 UTC
(In reply to comment #101)
> This 'bundled libs' argument for non-inclusion seems silly to me.  I've already
> mentioned other packages do/have use bundled lib.  XBMC, chromium, etc.  We
> also have binary packages in the tree.  Would it make everyone feel better if
> we made a -bin version of this package?
> 
> I simply fail to see the difference is all...

chromium is unbundled at the best of our possibilities and that takes time... lots of time.

Comment 103 Andrew Brouwers 2010-02-25 02:26:38 UTC
(In reply to comment #99)
> I'd add this right away, but upstream is bundling all these libs which is
> unacceptable. It needs to use the system (external) libs, before that, there's
> not a slightest chance this will go to portage.
> 

I agree that the build is not ideal.  While working on the ebuild, it's the FIRST question that came up, of course :)  The handbrake devs. rely on a VERY strict set of features from the "rolling" projects (x264, ffmpeg), and code their library to use them very uniquely.  For this reason, it's very possible that the application won't work, or produce sub-quality results with the various versions available (thinking of how fast x264 moves, for example).  So, they target a release with a very specific set of libraries, and build the app around them.

So, that's it.  The handbrake devs will not change the policy, so perhaps it's time for this bug to be closed.
Comment 104 Luca Barbato gentoo-dev 2010-02-25 08:43:08 UTC
(In reply to comment #103)
> they target a release with a very specific set of libraries, and build the app
> around them.

As FFmpeg upstream I'd like to know how... we have release and people working quite hard to provide them.
As Gentoo dev I could say that's a non issue...
Comment 105 Andrew Brouwers 2010-02-25 13:15:10 UTC
(In reply to comment #104)
> (In reply to comment #103)
> > they target a release with a very specific set of libraries, and build the app
> > around them.
> 
> As FFmpeg upstream I'd like to know how... we have release and people working
> quite hard to provide them.
> As Gentoo dev I could say that's a non issue...
> 

Yes, then you should especially know how fast the project moves, and that 0.5 was released almost a year ago.  Even outside of gentoo, almost all distros take snapshots of these projects (x264, mplayer come to mind too) to get around these delayed release schedules.

The point isn't just about ffmpeg, though.  It's that with everyone doing their own packaging around these in-flux multimedia projects, it's tough to guarantee handbrake to work on everything.  While gentoo can perhaps nail EXACTLY the ffmpeg and x264 versions that are needed for handbrake to work as it should, imagine trying to convince debian, slackware, suse, and the BSD's to all import and package that exact version.  And what happens when I update x264 to a new snapshot, and handbrake starts producing poor videos?

I personally think system libs would also be nice, but it won't happen.  Other distros have tried (debian has one, iirc), and it results in people coming into handbrake support channels, asking why their build is producing such poor results.  Handbrake really does its job well when built appropriately, so I think the current policy is working.
Comment 106 Scott Alfter 2010-04-27 15:04:35 UTC
Created attachment 229397 [details]
updated ebuild

The previous ebuild is missing a dependency on automake 1.10, so I've uploaded an updated version.
Comment 107 Dennis Schridde 2010-06-05 18:25:00 UTC
WTH is their buildscript doing... It seems like it's downloading a-dozen-or-so libraries for static bundling?!
Comment 108 Dennis Schridde 2010-06-05 18:26:49 UTC
URL of this bug should be changed to http://handbrake.fr/
Comment 109 Travis Hansen 2010-06-05 21:16:12 UTC
(In reply to comment #107)
> WTH is their buildscript doing... It seems like it's downloading a-dozen-or-so
> libraries for static bundling?!
> 

Yes, it is.
Comment 110 marty rosenberg 2010-08-05 12:07:31 UTC
handbrake works on ppc(theoretically) and ppc64 (i've actually tested this)
Since I was just doing this for my own sake, I killed the DEPEND=yasm line, since
the build script auto detects the arch and only uses yasm on x86 architectures.  
It should probably be guarded with x86? or amd64? (I don't actually know how to get or without having two separate conditionals)
Comment 111 Balázs L. Batári 2010-08-11 16:54:50 UTC
cant run ebuild digest on the ebuild:

sudo ebuild handbrake-0.9.4.ebuild digest
>>> Downloading 'http://de-mirror.org/distro/gentoo/distfiles/HandBrake-0.9.4.tar.bz2'
--2010-08-11 18:48:32--  http://de-mirror.org/distro/gentoo/distfiles/HandBrake-0.9.4.tar.bz2
de-mirror.org feloldása… 87.106.91.70
Csatlakozás a következőhöz: de-mirror.org[87.106.91.70]:80… kapcsolódva.
HTTP kérés elküldve, várakozás válaszra… 404 Not Found
2010-08-11 18:48:33 HIBA 404: Not Found.

>>> Downloading 'http://handbrake.fr/rotation.php?file=HandBrake-0.9.4.tar.bz2'
--2010-08-11 18:48:33--  http://handbrake.fr/rotation.php?file=HandBrake-0.9.4.tar.bz2
handbrake.fr feloldása… 91.121.74.28
Csatlakozás a következőhöz: handbrake.fr[91.121.74.28]:80… kapcsolódva.
HTTP kérés elküldve, várakozás válaszra… 302 Found
Hely: https://sourceforge.net/projects/handbrake/files/0.9.4/HandBrake-0.9.4.tar.bz2 [következik]
--2010-08-11 18:48:33--  https://sourceforge.net/projects/handbrake/files/0.9.4/HandBrake-0.9.4.tar.bz2
sourceforge.net feloldása… 216.34.181.60
Csatlakozás a következőhöz: sourceforge.net[216.34.181.60]:443… kapcsolódva.
HIBA: sourceforge.net „/C=US/O=Equifax/OU=Equifax Secure Certificate Authority” által kiadott tanúsítványa nem ellenőrizhető:
  A kibocsátó hitelessége nem ellenőrizhető helyileg.
A nem biztonságos kapcsolódáshoz sourceforge.net géphez használja a --no-check-certificate kapcsolót.
!!! Couldn't download 'HandBrake-0.9.4.tar.bz2'. Aborting.
!!! Fetch failed for HandBrake-0.9.4.tar.bz2, can't update Manifest

seems to be some wget certification errors with the mirror
Comment 112 Hendrik Friedel 2010-08-24 20:31:06 UTC
Hello,

thanks for your ebuild!
I can't get it to build:

/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build//contrib/lib/libavcodec.a(vaapi.o): In function `commit_slices':
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:97: undefined reference to `vaCreateBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:106: undefined reference to `vaCreateBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build//contrib/lib/libavcodec.a(vaapi.o): In function `alloc_buffer':
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:125: undefined reference to `vaCreateBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:127: undefined reference to `vaMapBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:125: undefined reference to `vaCreateBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:127: undefined reference to `vaMapBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:125: undefined reference to `vaCreateBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:127: undefined reference to `vaMapBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build//contrib/lib/libavcodec.a(vaapi.o): In function `destroy_buffers':
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:37: undefined reference to `vaDestroyBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:37: undefined reference to `vaDestroyBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:37: undefined reference to `vaDestroyBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:37: undefined reference to `vaDestroyBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build//contrib/lib/libavcodec.a(vaapi.o): In function `render_picture':
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:48: undefined reference to `vaUnmapBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:61: undefined reference to `vaBeginPicture'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:65: undefined reference to `vaRenderPicture'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:69: undefined reference to `vaRenderPicture'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:74: undefined reference to `vaEndPicture'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:52: undefined reference to `vaUnmapBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:57: undefined reference to `vaUnmapBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build//contrib/lib/libavcodec.a(vaapi.o): In function `commit_slices':
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:97: undefined reference to `vaCreateBuffer'
/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/contrib/ffmpeg/ffmpeg-r19067/libavcodec/vaapi.c:106: undefined reference to `vaCreateBuffer'
collect2: ld returned 1 exit status
make[3]: *** [ghb] Error 1
make[3]: Leaving directory `/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/gtk/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/gtk'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build/gtk'
make: *** [gtk.build] Error 2
make: Leaving directory `/tmp/portage/media-video/handbrake-0.9.4/work/HandBrake-0.9.4/build'
 * ERROR: media-video/handbrake-0.9.4 failed:
 *   failed compiling handbrake
 *
 * Call stack:
 *     ebuild.sh, line  48:  Called src_compile
 *   environment, line 324:  Called die
 * The specific snippet of code:
 *       emake -C build || die "failed compiling ${PN}"

------------------------------
emerge --info =media-video/handbrake-0.9.4
Portage 2.2_rc63 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.32-gentoo-r7 i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.32-gentoo-r7-i686-AMD_Athlon-tm-_Dual_Core_Processor_4850e-with-gentoo-2.0.1
Timestamp of tree: Tue, 24 Aug 2010 19:30:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81
virtual/os-headers:  2.6.32
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -pipe -fforce-addr -falign-functions=4 -fprefetch-loop-arrays"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=pentium3 -O2 -pipe -fforce-addr -falign-functions=4 -fprefetch-loop-arrays"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s"
LINGUAS="de en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X a52 aac acl acpi alsa amr amrnb amrwb apache2 aspell automount berkdb bluetooth branding bzip2 cairo cardbus cdaudio cdda cddb cdparanoia cdr cli consolekit corefonts cracklib crypt cups cxx daap dbus dmx dri dts dv dvb dvd dvdr dvdread emboss encode esd exif fam fbcon fbcondecor ffmpeg fftw firefox flac fortran ftp gd gdbm gif gpm gtk hal hddtemp iconv ieee1394 imagemagick imap imlib ipod ipv6 irda ithreads java joystick jpeg kde4 lame lastfm latin1 lcms libnotify libwww lirc live lm_sensors logrotate mad mikmod mmx mng modules mp2 mp3 mp3tunes mp4 mp4live mpeg mplayer mtp mudflap musepack mysql nas ncurses network nls nptl nptlonly nsplugin ntfs nvidia nvram ogg opengl openmp oscar oss pam pango pcre pda pdf perl phonon php pic png ppds pppd python qt3support qt4 quicktime rdesktop readline reflection samba scanner schroedinger sdl semantic-desktop session slang sndfile snes snmp spell spl sql sse ssl startup-notification svg svga sysfs tcpd theora tiff tk transcode truetype unicode usb v4l v4l2 vcd vdpau vdr vorbis webkit wifi x264 x86 xcb xcomposite xine xinerama xmame xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="joystick keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="all" LINGUAS="de en" LIRC_DEVICES="all" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev i740 i810 intel mga nv nvidia r128 radeon radeonhd s3 savage sis via v4l vesa vga voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
---------------
emerge -pqv =media-video/handbrake-0.9.4

!!! All ebuilds that could satisfy "=media-video/handbrake-0.9.4" have been masked.
!!! One of the following masked packages is required to complete your request:
- media-video/handbrake-0.9.4 (masked by: ~x86 keyword)


For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.


 * IMPORTANT: 3 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

vdr handbrake # ACCEPT_KEYWORDS="~x86" emerge -pqv =media-video/handbrake-0.9.4
[ebuild  N    ] media-video/handbrake-0.9.4  USE="gtk -css -doc"

 * IMPORTANT: 3 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.
------------

Can you help?

Regards,
Hendrik
Comment 113 mesh 2010-08-25 11:10:44 UTC
I have the same compile problem with vaapi. Found the following patch to disable vaapi:

[code]
Index: contrib/ffmpeg/module.defs
===================================================================
--- contrib/ffmpeg/module.defs  (revision 3415)
+++ contrib/ffmpeg/module.defs  (working copy)
@@ -14,6 +14,7 @@
     --disable-ffserver \
     --disable-muxers \
     --disable-network \
+    --disable-vaapi \
     --enable-bzlib \
     --enable-encoder=ac3 \
[/code]

But I have no idea, where to include the epatch line in the ebuild.
Comment 114 Steve Dibb (RETIRED) gentoo-dev 2010-09-29 20:07:45 UTC
Okay guys, here's the deal.  If someone can get a live-snapshot ebuild going (not a live build, but one that has a snapshot of a recent build), then I can get it in the tree and see about maintaining it.

However, to get it into the tree, it needs to follow QA policies .. that means no downloading any sources during the make process.

If you're doing a snapshot release, I imagine it's possible to add the sources to SRC_URI, and then modify the Makefile to ignore downloading and unpacking them, and just change directories to the sources instead.
Comment 115 Travis Hansen 2010-09-29 21:56:39 UTC
Steve

What do you think about creating a single tarball of the source with all archives already dowloaded and in place in the source structure?

(In reply to comment #114)
> Okay guys, here's the deal.  If someone can get a live-snapshot ebuild going
> (not a live build, but one that has a snapshot of a recent build), then I can
> get it in the tree and see about maintaining it.
> 
> However, to get it into the tree, it needs to follow QA policies .. that means
> no downloading any sources during the make process.
> 
> If you're doing a snapshot release, I imagine it's possible to add the sources
> to SRC_URI, and then modify the Makefile to ignore downloading and unpacking
> them, and just change directories to the sources instead.
> 

Comment 116 Steve Dibb (RETIRED) gentoo-dev 2010-09-29 23:18:59 UTC
(In reply to comment #115)
> Steve
> 
> What do you think about creating a single tarball of the source with all
> archives already dowloaded and in place in the source structure?

How it gets the sources is irrelevant ... just as long as the build process isn't trying to fetch or unpack anything is all that matters.
Comment 117 Travis Hansen 2010-09-30 09:00:16 UTC
Created attachment 249055 [details]
tool to create a complete tarball with contrib sources

Steve

I hacked this little tool together for you.  You need svn installed.  It accepts one optional argument which is simply a revision number.

./create_tarball.sh 3558

This should put together a full tarball containing the sources and contrib files as well that should build without the need of downloading anything extra.

Also note that the deps may have changed for gtk recently per this message I received building on a test machine...

configure: error: Package requirements (gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 libnotify gudev-1.0 webkit-1.0)

I think the 9999 build covers everthing there minus the gudev.  It appears that comes from udev[extras] which I'll be adding to the 9999 ebuild and updating shortly on this bug.

Anyway, using this script to create a tarball and making some minor changes to the 9999 ebuild above should acheive what you're after.
Comment 118 Travis Hansen 2010-09-30 09:40:29 UTC
Created attachment 249058 [details]
handbrake-9999.ebuild

adding udev[extras] dependency
adding configuration parameter --disable-gtk-update-checks

trunk is finally building again, it was failing due to some ffmpeg breakage that has apparently all been worked out
Comment 119 Travis Hansen 2010-09-30 10:03:25 UTC
Created attachment 249061 [details]
tool to create a complete tarball with contrib sources

fetching contrib items a little prettier :)
Comment 120 Andrew Brouwers 2010-09-30 11:54:26 UTC
(In reply to comment #118)
> Created an attachment (id=249058) [details]
> handbrake-9999.ebuild
> 
> adding udev[extras] dependency
> adding configuration parameter --disable-gtk-update-checks
> 
> trunk is finally building again, it was failing due to some ffmpeg breakage
> that has apparently all been worked out
> 

Thanks for the update to the live build.

I don't think you're deps are correct; for the GTK interface, hal was actually dropped for gudev ( udev[extras] ), so that can probably go.  Also, webkit-gtk is NOT needed with the --disable-gtk-update-checks  (we should do this explicitly on linux instead of a USE flag, since it can't do anything useful anyway - mostly an OSX feature from what I've gathered).

If we won't be fetching tarballs, the curl/wget dependency is probably useless too, no?  I guess still needed for the live build, but not for a snapshot.

Finally, if you check out my 0.9.4 build, I think I've simplified the configure sections (for example, we should use use_enable functions instead of the check you have), and removed a few redundant "cd" commands with emake -C  instead; any reason to not use those in the live too?
Comment 121 Travis Hansen 2010-09-30 15:52:38 UTC
(In reply to comment #120)
> (In reply to comment #118)
> > Created an attachment (id=249058) [details] [details]
> > handbrake-9999.ebuild
> > 
> > adding udev[extras] dependency
> > adding configuration parameter --disable-gtk-update-checks
> > 
> > trunk is finally building again, it was failing due to some ffmpeg breakage
> > that has apparently all been worked out
> > 
> 
> Thanks for the update to the live build.
> 
> I don't think you're deps are correct; for the GTK interface, hal was actually
> dropped for gudev ( udev[extras] ), so that can probably go.  Also, webkit-gtk
> is NOT needed with the --disable-gtk-update-checks  (we should do this
> explicitly on linux instead of a USE flag, since it can't do anything useful
> anyway - mostly an OSX feature from what I've gathered).
> 
> If we won't be fetching tarballs, the curl/wget dependency is probably useless
> too, no?  I guess still needed for the live build, but not for a snapshot.
> 
> Finally, if you check out my 0.9.4 build, I think I've simplified the configure
> sections (for example, we should use use_enable functions instead of the check
> you have), and removed a few redundant "cd" commands with emake -C  instead;
> any reason to not use those in the live too?
> 

Good call.  I'll add them all in there and make it pretty like yours :)  I think the only reason I moved away from use_enable was because there is not --enable-gtk option (although it doesn't hurt anything).  Is there some sort of best practice in these scenarios?  Once I know that I'll get it all cleaned up and uploaded.
Comment 122 Ross Smith 2010-10-09 05:30:58 UTC
the 0.9.4 ebuild fails to compile ffmpeg if libva (vaapi) is installed.  this can be fixed by blocking vaapi (bad) or by applying the patch I found here http://paste.handbrake.fr/pastebin.php?show=1521  I typically avoid linking to external patches, but it's not mine and I don't know the author.  

the live ebuild also complains about a bad automake version, even though the one it requests is installed. 
Comment 123 Ming-Wei 2010-10-15 11:50:49 UTC
Created attachment 250701 [details]
adds automake 1.4* dependency

Handbrake also needs automake 1.4.*, the patch adds this dependency. Tested here, it works for me (tm).
Comment 124 Travis Hansen 2010-10-15 16:42:52 UTC
Created attachment 250727 [details]
handbrake-9999.ebuild

This is cleaned up to match the 0.9.4 ebuild mostly in syntax and has the updated deps as well.
Comment 125 Kevin Williams 2010-12-16 15:08:01 UTC
(In reply to comment #124)
> handbrake-9999.ebuild

This ebuild fails to build for me right out of the gate, looking for all the world like an autoconf failure while compiling a52dec:

  autoreconf-2.68: running: aclocal  --output=aclocal.m4t
  aclocal: macro `_LT_DECL_SED' required but not defined
  aclocal: macro `_LT_FUNC_STRIPNAME_CNF' required but not defined


When I modified the latest handbrake-9999.ebuild to include:

  inherit autotools subversion gnome2-utils

  WANT_AUTOCONF=2.5
  WANT_AUTOMAKE=1.9

... a52dec compiled happily. Note that I do have automake 1.9 installed which isn't a requirement in the ebuild. Can anyone else encountering build difficulties confirm?
Comment 126 Travis Hansen 2010-12-16 16:53:27 UTC
Created attachment 257334 [details]
handbrake-9999.ebuild

Yeah, I was having similar problems (I haven't tried to build this in ages).  This adds the new dep and solved the issues for me.
Comment 127 peak eyed 2011-01-08 04:48:05 UTC
HandBrake 0.9.5: Released on Monday, Jan 03, 2011
Comment 128 Phil Rigby 2011-02-14 19:28:41 UTC
(In reply to comment #127)
> HandBrake 0.9.5: Released on Monday, Jan 03, 2011
> 

Added the new ebuild, get this while compiling...


/bin/mkdir -p contrib/a52dec/
/bin/rm -fr ./contrib/a52dec/a52dec/
/bin/tar xfC ../download/a52dec-0.7.4.tar.gz ./contrib/a52dec/
touch contrib/a52dec/.stamp.extract
/usr/bin/patch -t -N -p1 -d ./contrib/a52dec/a52dec/ < ../contrib/a52dec/A00-dpl2.patch
patching file include/a52.h
patching file liba52/a52_internal.h
patching file liba52/downmix.c
touch contrib/a52dec/.stamp.patch
set -e; cd ./contrib/a52dec/a52dec/; rm -fr aclocal.m4 autom4te.cache; autoreconf -fiv; CC=/usr/bin/gcc CFLAGS="" CXX=/usr/bin/g++ CXXFLAGS="" CPPFLAGS="" LDFLAGS="" ./configure --prefix=/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build/contrib/ --disable-dependency-tracking --disable-shared --enable-static
autoreconf-2.68: Entering directory `.'
autoreconf-2.68: configure.in: not using Gettext
autoreconf-2.68: running: aclocal  --output=aclocal.m4t
aclocal: macro `_LT_DECL_SED' required but not defined
aclocal: macro `_LT_FUNC_STRIPNAME_CNF' required but not defined
autoreconf-2.68: aclocal failed with exit status: 1
make: *** [contrib/a52dec/.stamp.configure] Error 1
 * ERROR: media-video/handbrake-9999 failed (compile phase):
 *   failed compiling handbrake
 *
 * Call stack:
 *     ebuild.sh, line  56:  Called src_compile
 *   environment, line 2567:  Called die
 * The specific snippet of code:
 *       make || die "failed compiling ${PN}"

(Sorry, would of done attachments if I could figure out how)
emerge --info :

System uname: Linux-2.6.37-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1075T_Processor-with-gentoo-2.0.1
Timestamp of tree: Mon, 14 Feb 2011 15:00:01 +0000
app-shells/bash:     4.1_p9
dev-lang/python:     2.6.6-r1, 2.7.1, 3.1.3
dev-util/cmake:      2.8.3-r1
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.5
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.4_p6-r1, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.4.4-r2, 4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=amdfam10 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US.UTF-8"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/dottout"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aalib accessibility acl acpi acpid alsa amd64 ass berkdb bindist bzip2 cdda cddb cdio cdparanoia cli cpudetection cracklib crypt cups cxx dbus device-mapper dirac directfb dri dts dvd dvdnav dxr3 embedded encode extras faac faad fbcon ffmpeg fontconfig fortran gdbm gif glx gpm gtk2 hal iconv id3tag imagemagick jpeg jpeg2k kde kerberos lame lastfm libcaca libmpeg2 libnotify lzo mad md5sum mjpeg mmx mmxext mng modplug modules mozilla mp3 mpeg mpeg4 mpg123 mplayer msn mudflap multilib musicbrainz ncurses network nls nouveau nptl nptlonly nvidia offensive ogg openal opengl openmp oscar osdmenu pam pcre perl png policykit pppd python qt3support qt4 quicktime rar raw readline rtc samba schroedinger semantic-desktop session sql sse sse2 sse3 sse4 sse4a ssl ssse3 svg symlink sysfs taglib tcpd tga theora truetype udev unicode vcd vorbis webkit x264 xcomposite xine xinerama xml xorg xscreensaver xv xvid yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="mouse keyboard evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US.UTF-8" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nv nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

emerge -pqv :
[ebuild  N    ] media-video/handbrake-9999  USE="-doc -gtk"
Comment 129 Steve Dibb (RETIRED) gentoo-dev 2011-02-14 22:24:02 UTC
Make sure you've got the a52dec tarball from handbrake's files, not gentoo's.  They are the same version, but md5sums don't match.
Comment 130 Steve Dibb (RETIRED) gentoo-dev 2011-02-14 22:30:12 UTC
(In reply to comment #119)
> Created an attachment (id=249061) [details]
> tool to create a complete tarball with contrib sources
> 
> fetching contrib items a little prettier :)
> 

Travis,

Another option I am thinking of is symlinking the download directory to DISTDIR, which is a portage variable.  That should work.
Comment 131 Travis Hansen 2011-02-16 19:51:53 UTC
(In reply to comment #130)
> (In reply to comment #119)
> > Created an attachment (id=249061) [details] [details]
> > tool to create a complete tarball with contrib sources
> > 
> > fetching contrib items a little prettier :)
> > 
> 
> Travis,
> 
> Another option I am thinking of is symlinking the download directory to
> DISTDIR, which is a portage variable.  That should work.
> 

I'd probably stay away from that, but that's just me :)  A couple thoughts that came to mind...

1. If something is missing, you'd have handbrake's build script downloading stuff directly to DISTDIR
2. checksums may be off

I can make a nice little package for 9.5 with associated ebuild etc if people would like.
Comment 132 Steve Dibb (RETIRED) gentoo-dev 2011-02-16 20:23:36 UTC
(In reply to comment #131)

> I'd probably stay away from that, but that's just me :)  A couple thoughts that
> came to mind...
> 
> 1. If something is missing, you'd have handbrake's build script downloading
> stuff directly to DISTDIR

Nope, handbrake just looks for the existence of the file.  Portage will handle the downloading of the files.  That handbrake tries to download stuff is the main reason I don't think an in-tree build is reasonable.

> 2. checksums may be off

It's going to be, but portage will handle that as well.  It will just delete the a52dec tarball that is the wrong one, and redownload the right one.

A minor inconvenience, but it could be worked around by altering the name of the file it's looking for in the Makefile and saving it as that, or some similar hackery.

The key point, though, is that the script should not presume to be able to have network access.  The ebuild should provide everything.
Comment 133 Justin 2011-02-21 22:39:59 UTC
(In reply to comment #129)
> Make sure you've got the a52dec tarball from handbrake's files, not gentoo's. 
> They are the same version, but md5sums don't match.
> 

This worked for me. To get around picking up Gentoo's a52dec I had to disable my http_proxy setting in /etc/make.conf, after which the 0.9.4 ebuild built properly.
Comment 134 Michele Ciacci 2011-02-22 09:18:27 UTC
version bump 0.9.5 is out
Comment 135 Keith Harrison 2011-03-13 20:52:40 UTC
I modified the handbrake-9999.ebuild for 0.9.5 but am seeing the following error:

if gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/media-video/handbrake-0.9.5/work/HandBrake-0.9.5/build/../gtk/src -I..  -DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" -DPACKAGE_SRC_DIR=\""/var/tmp/portage/media-video/handbrake-0.9.5/work/HandBrake-0.9.5/build/../gtk/src"\" -DPACKAGE_DATA_DIR=\""/usr/share"\" -pthread -DQT_SHARED -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/libdrm -I/usr/include/qt4/QtCore -I/usr/include/gstreamer-0.10 -I/usr/include/libxml2 -I/usr/include/gudev-1.0 -I/usr/include/webkit-1.0 -I/usr/include/libsoup-2.4    -Wall -g -g0 -O3 -I/var/tmp/portage/media-video/handbrake-0.9.5/work/HandBrake-0.9.5/build//libhb -D_ENABLE_GST -MT queuehandler.o -MD -MP -MF ".deps/queuehandler.Tpo" -c -o queuehandler.o /var/tmp/portage/media-video/handbrake-0.9.5/work/HandBrake-0.9.5/build/../gtk/src/queuehandler.c; \
then mv -f ".deps/queuehandler.Tpo" ".deps/queuehandler.Po"; else rm -f ".deps/queuehandler.Tpo"; exit 1; fi
/var/tmp/portage/media-video/handbrake-0.9.5/work/HandBrake-0.9.5/build/../gtk/src/callbacks.c:27:28: fatal error: dbus/dbus-glib.h: No such file or directory

dbus-glib.h is at /usr/include/dbus-1.0/dbus/dbus-glib.h so it looks like there should be an -I/usr/include/dbus-1.0

Best way to fix this?
Comment 136 Scott Alfter 2011-03-16 21:30:38 UTC
SVN ebuild works without errors for me to build 0.9.5 by changing the source from trunk to tags/0.9.5 (both relative to svn://svn.handbrake.fr/HandBrake/).
Comment 137 Greg Turner 2011-03-28 15:55:56 UTC
Created attachment 267555 [details]
handbrake-0.9.5.ebuild: hb 0.9.5 + recent-~amd64-compat. ebuild (still wget-encumbered)

I changed the ebuild like so to get 0.9.5 working (I should say compiling, really, since I haven't tested it) on my ~amd64 system (${FILESDIR} patch to follow).
Comment 138 Greg Turner 2011-03-28 16:02:15 UTC
Created attachment 267557 [details, diff]
0.9.5-backport-lib-fixes.patch

Backport of https://github.com/HandBrake/HandBrake/commit/c27906f68c8dacd90f447793bf3f8890728688e9 which resolves the dbus-glib.h problem and a libnotify 0.7.x incompatibility.
Comment 139 Keith Harrison 2011-03-28 16:42:55 UTC
Thank you!
Comment 140 Cyrius 2011-03-30 19:38:11 UTC
Great Stuff.
Thx
Comment 141 Tony Murray 2011-04-01 01:21:01 UTC
Does this still require automake 1.4?  I was able to build 0.9.5 without any problems on x86_64.
Comment 142 Fabio Rossi 2011-04-03 10:22:49 UTC
I don't see the systray icon, I'm using KDE 4.6
Comment 143 Jose Jiminez 2011-04-27 23:32:37 UTC
Fresh install of Sabayon (Gentoo derivative)
Downloaded the 0.9.5 ebuild and the last patch above.

emerge fails.  With parallel compile I get errors that gudev/gudev.h and gtk/gtk.h are not found.  With -j1 I only get the gudev problem.

Any ideas?
Comment 144 Adam Jorgensen 2011-05-03 09:52:04 UTC
(In reply to comment #143)
> Fresh install of Sabayon (Gentoo derivative)
> Downloaded the 0.9.5 ebuild and the last patch above.
> 
> emerge fails.  With parallel compile I get errors that gudev/gudev.h and
> gtk/gtk.h are not found.  With -j1 I only get the gudev problem.
> 
> Any ideas?

I've been trying to build HandBrake on Sabayon for a while now with no luck. It used to work just fine (About 6 months ago) but sometime between now and then it has just stopped working. Very frustrating.
Comment 145 Jose Jiminez 2011-05-05 15:17:33 UTC
OK, so although I did this wrong.  (Please let me know the right way)  I think there is something different about the headers for those who can get it to compile and those who can't.  

I added the following symlinks to get past the problems with finding headers.

lrwxrwxrwx   1 root root       28 May  5 10:07 gudev -> /usr/include/gudev-1.0/gudev                                                                            
lrwxrwxrwx   1 root root       25 May  5 10:08 gtk -> /usr/include/gtk-2.0/gtk/
lrwxrwxrwx   1 root root       35 May  5 10:16 glib-object.h -> /usr/include/glib-2.0/glib-object.h
lrwxrwxrwx   1 root root       29 May  5 10:18 gobject -> /usr/include/glib-2.0/gobject                                                                         
lrwxrwxrwx   1 root root       28 May  5 10:20 glib.h -> /usr/include/glib-2.0/glib.h
lrwxrwxrwx   1 root root       31 May  5 10:23 gmodule.h -> /usr/include/glib-2.0/gmodule.h
lrwxrwxrwx   1 root root       26 May  5 10:23 glib -> /usr/include/glib-2.0/glib                                                                               
lrwxrwxrwx   1 root root       36 May  5 10:26 glibconfig.h -> /usr/lib64/glib/include/glibconfig.h
lrwxrwxrwx   1 root root       26 May  5 10:28 dbus -> /usr/include/dbus-1.0/dbus                                                                               
lrwxrwxrwx   1 root root       38 May  5 10:31 gdk-pixbuf -> /usr/include/gdk-pixbuf-2.0/gdk-pixbuf                                                             
lrwxrwxrwx   1 root root       12 May  5 10:32 gio -> glib-2.0/gio
lrwxrwxrwx   1 root root       24 May  5 10:33 gdk -> /usr/include/gtk-2.0/gdk
lrwxrwxrwx   1 root root       15 May  5 10:34 cairo.h -> ./cairo/cairo.h
drwxr-xr-x   2 root root     4096 May  5 10:36 cairo
lrwxrwxrwx   1 root root       23 May  5 10:37 cairo-version.h -> ./cairo/cairo-version.h
lrwxrwxrwx   1 root root       24 May  5 10:37 cairo-features.h -> ./cairo/cairo-features.h
lrwxrwxrwx   1 root root       26 May  5 10:37 cairo-deprecated.h -> ./cairo/cairo-deprecated.h
lrwxrwxrwx   1 root root       17 May  5 10:41 pango -> ./pango-1.0/pango
lrwxrwxrwx   1 root root       38 May  5 10:42 gdkconfig.h -> /usr/lib64/gtk-2.0/include/gdkconfig.h
lrwxrwxrwx   1 root root       13 May  5 10:43 atk -> ./atk-1.0/atk


Now it fails with:

/usr/include/gobject/gtype.h:1643:18: note: declared here
/var/tmp/portage/media-video/handbrake-0.9.5/work/HandBrake-0.9.5/build/../gtk/src/callbacks.c: In function ‘notify_closed_cb’:
/var/tmp/portage/media-video/handbrake-0.9.5/work/HandBrake-0.9.5/build/../gtk/src/callbacks.c:4877:17: error: ‘GType’ undeclared (first use in this function)
/var/tmp/portage/media-video/handbrake-0.9.5/work/HandBrake-0.9.5/build/../gtk/src/callbacks.c:4877:2: error: too many arguments to function ‘g_type_check_instance_cast’
/usr/include/gobject/gtype.h:1643:18: note: declared here
/var/tmp/portage/media-video/handbrake-0.9.5/work/HandBrake-0.9.5/build/../gtk/src/callbacks.c: In function ‘ghb_notify_done’:
/var/tmp/portage/media-video/handbrake-0.9.5/work/HandBrake-0.9.5/build/../gtk/src/callbacks.c:4889:2: error: too many arguments to function ‘g_type_check_instance_cast’
/usr/include/gobject/gtype.h:1643:18: note: declared here
/var/tmp/portage/media-video/handbrake-0.9.5/work/HandBrake-0.9.5/build/../gtk/src/callbacks.c: At top level:
Comment 146 Andrey Ovcharov 2011-05-09 18:33:41 UTC
Created attachment 272655 [details, diff]
handbrake-0.9.5-dbus-glib.patch
Comment 147 Andrey Ovcharov 2011-05-09 18:35:11 UTC
Created attachment 272659 [details, diff]
handbrake-0.9.5-libnotify-0.7.patch
Comment 148 Andrey Ovcharov 2011-05-09 18:37:05 UTC
Created attachment 272661 [details]
handbrake-0.9.5.ebuild

for my on x86_64 build fine
Comment 149 dwrdeath 2011-05-11 21:26:44 UTC
Thanks Andrey, 
your patches and ebuild worked fine on my amd_64 also.
Comment 150 Nuno Silva 2011-05-21 19:19:43 UTC
0.9.5 was compiled successfully here and is working (so far - tried to convert only one video, with success).

This is amd64, and it was compiled with the three use flags disabled, USE="-css -doc -gtk".

(It still downloads stuff *during* the compilation, if someone's wondering about that.)
Comment 151 Steve Dibb (RETIRED) gentoo-dev 2011-06-11 06:05:54 UTC
Okay, I made *some* progress on cleaning up the 0.9.5 ebuild so it doesn't download using their make system.

But, it dies on some error with dbus-glib, so I'm probably going to give up on this version and look at doing a recent snapshot instead.

In the meantime, if someone can get this working, then that's awesome.
Comment 152 Steve Dibb (RETIRED) gentoo-dev 2011-06-11 06:07:29 UTC
Created attachment 276611 [details]
handbrake-0.9.5.ebuild more portage-friendly
Comment 153 Steve Dibb (RETIRED) gentoo-dev 2011-06-11 15:39:20 UTC
Created attachment 276673 [details]
handbrake-0.9.5_p4039.ebuild

Alright, I managed to put together an ebuild with a live snapshot.

If someone wants to test this, that'd be great.  The download for the snapshot can be found on my site at http://spaceparanoids.org/gentoo/distfiles/handbrake-0.9.5_p4039.tar.bz2

Everything else should download just fine.
Comment 154 Steve Dibb (RETIRED) gentoo-dev 2011-06-11 16:11:06 UTC
(In reply to comment #153)
> Created attachment 276673 [details]
> handbrake-0.9.5_p4039.ebuild
> 
> Alright, I managed to put together an ebuild with a live snapshot.
> 
> If someone wants to test this, that'd be great.  The download for the snapshot
> can be found on my site at
> http://spaceparanoids.org/gentoo/distfiles/handbrake-0.9.5_p4039.tar.bz2
> 
> Everything else should download just fine.

Okay, the ebuild is now in the gentoo-multimedia overlay.

http://gitorious.org/gentoo-multimedia
Comment 155 Scott Alfter 2011-06-13 15:57:48 UTC
(In reply to comment #154)
> Okay, the ebuild is now in the gentoo-multimedia overlay.
> 
> http://gitorious.org/gentoo-multimedia

Pulled this in, tried building it...looks like it depends on sys-apps/hal, which is going bye-bye in the near future:

http://www.gentoo.org/proj/en/desktop/kde/kde44-46-upgrade.xml#doc_chap3

It still builds OK if you remove this dependency from the ebuild. A test encode appears to have worked without problems.
Comment 156 Vytenis Sodaitis 2011-06-13 18:14:58 UTC
It looks like archlinux pkgbuild maintainers just replaced hal dependency with udev dependency and it's working fine. Maybe hal dependency needs to be replaced with udev dependency here too?
Comment 157 Steve Dibb (RETIRED) gentoo-dev 2011-06-15 15:55:06 UTC
Thanks guys, udev is in system, so I won't add that one but I did remove the hal dep in the overlay.
Comment 158 Sławomir Nizio 2011-07-08 13:17:59 UTC
Created attachment 279435 [details]
handbrake ebuild

Unfortunately with your ebuild handbrake doesn't build. It stops on error where it can't (IIRC) change directowy to liboog/libogg, probably because your tarball unpacks to libogg-$libogg_version.

Attaching my ebuild that works. Changes: modified LICENSE, added some dependencies, remove some of them, download from location as it would be downloaded during manual installation (I liked the idea of adding ${P} to file names) and some cleanup.
Comment 159 PM 2011-10-23 18:20:04 UTC
The 9999 ebuild doesn't seem to work. It fails while building libogg on an automake error:

/bin/mkdir -p contrib/libogg/
/bin/rm -fr ./contrib/libogg/libogg-1.3.0/
/bin/tar xfC ../download/libogg-1.3.0.tar.gz ./contrib/libogg/
touch contrib/libogg/.stamp.extract
touch contrib/libogg/.stamp.patch
set -e; cd ./contrib/libogg/libogg-1.3.0/; rm -fr aclocal.m4 autom4te.cache configure; autoreconf -fiv; CC=/usr/bin/gcc CFLAGS="" CXX=/usr/bin/g++ CXXFLAGS="" CPPFLAGS="" LDFLAGS="" PKG_CONFIG_PATH="/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build/contrib/lib/pkgconfig" ./configure --prefix=/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build/contrib/ --disable-dependency-tracking --disable-shared --enable-static --disable-sdl
autoreconf-2.68: Entering directory `.'
autoreconf-2.68: configure.in: not using Gettext
autoreconf-2.68: running: aclocal --force 
/usr/share/aclocal/gtkglextmm-1.2.m4:225: warning: underquoted definition of AC_GTKGLEXTMM_SUPPORTS_MULTIHEAD
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
autoreconf-2.68: configure.in: tracing
autoreconf-2.68: running: libtoolize --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
/usr/share/aclocal/gtkglextmm-1.2.m4:225: warning: underquoted definition of AC_GTKGLEXTMM_SUPPORTS_MULTIHEAD
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
autoreconf-2.68: running: /usr/bin/autoconf-2.68 --force
autoreconf-2.68: running: /usr/bin/autoheader-2.68 --force
autoreconf-2.68: running: automake --add-missing --copy --force-missing
Useless use of /d modifier in transliteration operator at /usr/share/automake-1.9/Automake/Wrap.pm line 60.
Makefile.am:5: require Automake 1.11, but have 1.9.6
autoreconf-2.68: automake failed with exit status: 1
make: *** [contrib/libogg/.stamp.configure] Błąd 1
make: Opuszczenie katalogu `/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build'
emake failed

I can't really tell if it's a bug in ebuild or some temporary problem with the live tree. Any insights?
Comment 160 PM 2011-10-23 18:44:56 UTC
Ok, I figured it out, just change WANT_AUTOMAKE=1.9 to WANT_AUTOMAKE=1.11 in the ebuild.
Comment 161 Cesko Voeten 2012-01-01 11:29:35 UTC
Hello,

I noticed two issues with the ebuild from the gentoo-multimedia overlay:

1) Please enforce MAKEOPTS=-j1, otherwise the build fails early with the error 'can't remove libtoolT'

2) It doesn't build (this happens somewhere in the middle of emake):
"checking for GHB... no
configure: error: Package requirements (gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 libnotify dbus-glib-1 gudev-1.0 webkit-1.0) were not met:

No package 'webkit-1.0' found"
Comment 162 crucify 2012-01-28 17:14:34 UTC
https://bugs.gentoo.org/attachment.cgi?id=279435
this ebuild name is handbrake-0.9.5_p4210.ebuild
Comment 163 Mike Nerone 2012-02-01 06:14:03 UTC
The build in comment #162 works great (thanks, crucify). I do suggest adding "--disable-gtk-update-checks" to the ./configure call and removing the dep on net-libs/webkit-gtk as discussed previously.
Comment 164 jannis 2012-02-03 18:12:59 UTC
Emerging fails when using python 3.x as active interpreter but works with python 2.x
handbrake works just perfectly here (~amd64). Any reason this isn't in main tree yet?
Comment 165 Mike Nerone 2012-02-03 19:13:30 UTC
Yes, see comment #58.
Comment 166 Marc Grondin 2012-02-12 16:01:23 UTC
build in comment #162 no longer works...get  Couldn't download 'handbrake-0.9.5_p4210.tar.bz2'. Aborting. when trying to build the manifest...
Comment 167 vik 2012-02-18 21:41:20 UTC
Created attachment 302449 [details]
handbrake-9999.ebuild

I modified the handbrake-9999.ebuild as it wouldn't build for me with the latest Handbrake and this works as of 2/18/2012.  I added a few dependencies that are required now: fribidi and intltool.  I added gst-plugins-meta because Handbrake was complaining that previewing movies was disabled with just gst-plugins-base.
Comment 168 Bernd Butscheidt 2012-02-19 12:57:57 UTC
Thank you very much.

Works here compiling the default CLI-Version.

Enabling the USE-Flag gtk gives me this error:

...

gcc -o create_resources create_resources-native.o plist-native.o values-native.o -pthread -lgdk_pixbuf-2.0 -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0  
python /extern02/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build/../gtk/src/makedeps.py
  File "/extern02/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build/../gtk/src/makedeps.py", line 90
    except Exception, err:
                    ^
SyntaxError: invalid syntax
make[3]: *** [widget.deps] Error 1


I don't know about the correct python syntax but it seem's to me that this error is not related to the ebuild itself. Anyway:

emerge --info

Portage 2.2.0_alpha86 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.3, glibc-2.14.1-r2, 3.0.6-gentoo x86_64)
=================================================================
System uname: Linux-3.0.6-gentoo-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5200+-with-gentoo-2.1
Timestamp of tree: Sun, 12 Feb 2012 13:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.7 [enabled]
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3, 3.2.2
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.7-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.4_p6-r1, 1.9.6-r3, 1.10.3, 1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo own_stuff multimedia sunrise
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/extern02/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --keep-going"
FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ ftp://de-mirror.org/distro/gentoo/ "
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/own /var/lib/layman/multimedia /var/lib/layman/sunrise"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo caps cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dga dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gdu gif gpm iconv ipv6 jpeg kde kipi lcms ldap libnotify mad midi mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pppd qt3support qt4 readline sdl semantic-desktop session spell sse sse2 ssl startup-notification svg sysfs tcpd threads tiff truetype udev unicode usb vorbis x264 xcb xcomposite xinerama xml xorg xscreensaver xulrunner xv xvid xvmc zlib" ALSA_CARDS="HDA NVidia" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv nvidia nvidia%" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 169 Mike Nerone 2012-02-22 08:59:09 UTC
(In reply to comment #168)
> Enabling the USE-Flag gtk gives me this error:
> 
> ...
> 
> gcc -o create_resources create_resources-native.o plist-native.o
> values-native.o -pthread -lgdk_pixbuf-2.0 -lgobject-2.0 -lgthread-2.0 -lrt
> -lglib-2.0  
> python
> /extern02/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build/../gtk/src/makedeps.py
>   File
> "/extern02/var/tmp/portage/media-video/handbrake-9999/work/handbrake-9999/build/../gtk/src/makedeps.py",
> line 90
>     except Exception, err:
>                     ^
> SyntaxError: invalid syntax
> make[3]: *** [widget.deps] Error 1

Bernd, I suspect you have your system python set to python-3, because that syntax, which was valid in python-2, is no longer valid in python-3. Use "eselect python list" to check.

Python-3 breaks backward compatibility, and lots of stuff in the tree is not ready for it. It's not recommended to have it set as your system python version. You almost certainly want to do "eselect python set python2.7".
Comment 170 Bernd Butscheidt 2012-02-23 18:46:59 UTC
Thanks for the hint.
Never noticed that I had a python-version-issue.

So with python 2.7 set as default the whole ebuild works here.
Comment 171 jospezial 2012-03-19 15:49:30 UTC
In sys-fs/udev-181 is extras disabled.

I removed the [extras] dependency in my handbrake-9999.ebuild.
It installs fine and starts up with udev-181 installed.

Does udev-181 install all that is needed by handbrake?

How can I test in handbrake the funktions that needed the udev extras?
Which funktions are conected with udev extras? I have read something about gudev but it seems to be installed by udev-181.

joerg@jlgentoo ~ $ diff udev171r5extras_grep_gudev udev181_grep_gudev 
1,2d0
< /lib64/libgudev-1.0.so.0
< /lib64/libgudev-1.0.so.0.1.0
12,13d9
< /usr/lib64/libgudev-1.0.a
< /usr/lib64/libgudev-1.0.la
14a11,12
> /usr/lib64/libgudev-1.0.so.0
> /usr/lib64/libgudev-1.0.so.0.1.1
21d18
< /usr/share/gtk-doc/html/gudev/gudev.devhelp
Comment 172 Scott Alfter 2012-04-23 21:00:18 UTC
handbrake-0.9.5_p4210.ebuild (from the multimedia overlay) doesn't build against webkit-gtk versions newer than 1.6.3-r200.  Newer versions don't provide /usr/lib/libwebkit-gtk-1.0.so.0.  

Changing the dependency in the ebuild from net-libs/webkit-gtk to <=net-libs/webkit-gtk-1.6.3-r200 should be sufficient.
Comment 173 PM 2012-05-28 10:39:13 UTC
handbrake-9999 fails due to missing (or rather hidden) glib.h.

In file included from /usr/include/fribidi/fribidi.h:35:0,
                 from ass_shaper.h:24,
                 from ass_font.c:35:
/usr/include/fribidi/fribidi-common.h:65:20: fatal error: glib.h: No such file or directory

$ qlist -e glib |grep "glib.h"
/usr/share/gtk-doc/html/glib/glib.html
/usr/share/gtk-doc/html/glib/home.png
/usr/include/glib-2.0/glib.h


How can this be fixed?

By the way: ass_shaper.h. No comment.
Comment 174 Samuli Suominen gentoo-dev 2012-05-30 11:23:56 UTC
(In reply to comment #173)
> handbrake-9999 fails due to missing (or rather hidden) glib.h.
> 
> In file included from /usr/include/fribidi/fribidi.h:35:0,
>                  from ass_shaper.h:24,
>                  from ass_font.c:35:
> /usr/include/fribidi/fribidi-common.h:65:20: fatal error: glib.h: No such
> file or directory
> 
> $ qlist -e glib |grep "glib.h"
> /usr/share/gtk-doc/html/glib/glib.html
> /usr/share/gtk-doc/html/glib/home.png
> /usr/include/glib-2.0/glib.h
> 
> 
> How can this be fixed?

It should be querying Cflags from /usr/lib/pkgconfig/fribidi.pc pkg-config file:

$ pkg-config --cflags-only-I fribidi
-I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include

And then it would find glib.h

An ebuild workaround is to 'inherit flag-o-matic toolchain-funcs' and call something like:

append-cppflags $($(tc-getPKG_CONFIG) --cflags fribidi)
or
append-flags $($(tc-getPKG_CONFIG) --cflags fribidi)

Before it enters the configure phase. The former is more correct, CPPFLAGS, but in case the package doesn't respect CPPFLAGS like it should, the latter will also put it to CFLAGS and CXXFLAGS which will more or less force it to work.

Obviously that's just a workaround... and handbrake should do this on it's own.
Comment 175 PM 2012-05-30 14:14:29 UTC
>Before it enters the configure phase.

You mean at the beginning of src_configure()? I'm not very good at ebuild-fu. I tried putting both versions there (cppflags and flags) and neither worked.
Comment 176 petreuss 2012-06-02 00:27:33 UTC
Im also having trouble at the same point.  

Its complaining about fribidi, which is installed and the libraries are found using whereis.

In file included from /usr/include/fribidi/fribidi.h:35:0,
                 from ass_shaper.h:24,
                 from ass_font.c:35:
/usr/include/fribidi/fribidi-common.h:65:20: fatal error: glib.h: No such file or directory
compilation terminated.
make[3]: *** [ass_font.lo] Error 1
make[3]: Leaving directory `/bigdrive/build/hb-trunk/build/contrib/libass/libass-0.10.0-1/libass'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/bigdrive/build/hb-trunk/build/contrib/libass/libass-0.10.0-1'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/bigdrive/build/hb-trunk/build/contrib/libass/libass-0.10.0-1'
make: *** [contrib/libass/.stamp.build] Error 2
Comment 177 petreuss 2012-06-02 00:44:22 UTC
Here is the emerge --info if that helps with this problem.

Portage 2.1.10.49 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r3, 3.2.1-gentoo-r2 x86_64)
=================================================================
System uname: Linux-3.2.1-gentoo-r2-x86_64-AMD_Phenom-tm-_9950_Quad-Core_Processor-with-gentoo-2.1
Timestamp of tree: Sun, 27 May 2012 15:15:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r1, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.4_p6-r1, 1.9.6-r3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo jamesbroadhead php sping x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=amdfam10 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/jamesbroadhead /var/lib/layman/php /var/lib/layman/sping /usr/local/portage"
SYNC="rsync://rsync.jp.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 3dnowprefetch X abm acl alsa amd64 apic apng berkdb bzip2 cdr cjk clfluch cli cmov cmp_legacy consolekit constant_tsc cr8_legacy cracklib crypt cups cx16 cx8 cxx dbus de declarative dri dvd esd extapic extensions extras fortran fpu fxsr fxsr_opt gdbm gnutls gpm gtk gudev hal ht ibs iconv immqt-bc ipv6 kde lahf_lm lm mad mca mce misalignsse mmx mmxext modules monitor mp3 msr mtrr mudflap multilib mysql ncurses nls nptl nx ogg opengl openmp osvw pae pam pat pcre pdpe1gb pge pni policykit pppd pse pse36 python qt3support qt4 rdtscp readline rep_good scanner sdl sep session sql sse sse2 sse4a ssl svg svm syscall tcpd tsc udev unicode vde vme vorbis webkit xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="hpaio" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 178 Samuli Suominen gentoo-dev 2012-06-02 02:00:07 UTC
(In reply to comment #175)
(In reply to comment #176)

You really should figure it out from Comment #174 which can't be any more clear than it is. It's not rocket science to get those compiler flags mentioned from pkg-config to show up in correct place of the build.

If you are here just to discuss handbreak instead of contributing to the effort of unbundling the massive amount of internal libraries, then you are at wrong place. Try http://forums.gentoo.org/ instead.
Comment 179 Travis Hansen 2012-06-02 16:13:00 UTC
I've reported the libass/freebidi issue upstream to j45.  In this particular case I'm not sure if the hack will work (it didn't for me but I may not be using it properly) because it's during the configure phase of one of the many bundled packages which I'm guessing wipes out all flags etc being passed to handbrake itself.  Just a guess.

In any case, it's known now and will be getting looked at soon.
Comment 180 PM 2012-06-04 12:55:35 UTC
(In reply to comment #178)
> (In reply to comment #175)
> (In reply to comment #176)
> 
> You really should figure it out from Comment #174 which can't be any more
> clear than it is. It's not rocket science to get those compiler flags
> mentioned from pkg-config to show up in correct place of the build.
> 
> If you are here just to discuss handbreak instead of contributing to the
> effort of unbundling the massive amount of internal libraries, then you are
> at wrong place. Try http://forums.gentoo.org/ instead.

Did you read comment #175? I said there that your workaround doesn't work.
Comment 181 Anthony Mutiso 2012-06-21 13:45:37 UTC
Is there a workaround on supporting sys-fs/udev-182-r3?

Try to upgrade udev is giving me a blocker on sys-fs/udev-147[extras] dependancy.

sys-fs/udev:0

  (sys-fs/udev-182-r3::gentoo, ebuild scheduled for merge) conflicts with
    >=sys-fs/udev-147[extras] required by (media-video/handbrake-9999::x-portage, installed)

Thanks

Anthony
Comment 182 Samuli Suominen gentoo-dev 2012-06-22 06:15:47 UTC
(In reply to comment #180)
> > You really should figure it out from Comment #174 which can't be any more
> > clear than it is. It's not rocket science to get those compiler flags
> > mentioned from pkg-config to show up in correct place of the build.
> Did you read comment #175? I said there that your workaround doesn't work.

Maybe not directly with copy and pasting but it's more than enough clue to get it working, all you have to do is to look how flags get passed along to the bundled copy of fribidi.

(In reply to comment #181)
> Try to upgrade udev is giving me a blocker on sys-fs/udev-147[extras]
> dependancy.
> (media-video/handbrake-9999::x-portage, installed)

USE="extras" is an old flag that used to enable what is now in separate USE flags of USE="gudev hwdb acl keymap introspection" and couple of others...

So solution is simple:

Replace the [extras] requirement with [gudev] in the handbrake-9999.ebuild.
Comment 183 vik 2012-07-03 06:41:44 UTC
Created attachment 317019 [details]
To assist with the libass fatal error: glib.h (amd64 arch only, please use pkg-config --cflags-only-I fribidi for other architectures).

I'm working on a new ebuild for handbrake, but hopefully this will help anyone who wants to build the 0.9.6 tarball in the meantime.  After extracting the tarball and running configure with your preferred options, put this GNUmakefile.custom.defs file under the build directory, cd build, and run WANT_AUTOMAKE="1.11" make.

This file is just appending the glib includes that fribidi is looking for under the FRIBIDI_CFLAGS variable.
Comment 184 vik 2012-07-04 08:29:36 UTC
Created attachment 317095 [details]
handbrake-0.9.6 ebuild, tested on amd64

This ebuild has only been tested in amd64; please test in x86 and if it works I'll change the keywords line to support x86.  Both GUI and command line were tested.
Comment 185 Dominique Michel 2012-07-07 18:11:33 UTC
On ~and64, the 0.9.6 ebuild is working fine, nut the 9999 ebuild failed.

First, KEYWORDS="~x86 ~amd64" is wrong for a live ebuild, it must be KEYWORDS="" according to gentoo policy.

In order to make this live ebuild to work, it was also necessary to change DEPEND="=sys-devel/automake-1.10* to 1.11*, in RDEPEND >=sys-fs/udev-147[extras] to >=sys-fs/udev-171[gudev] and in src_compile() WANT_AUTOMAKE=1.9 to WANT_AUTOMAKE=1.11.

I also prefere the USE flags in 0.9.6 than the ones in 9999. And I think than the files NEWS, CREDITS, AUTHORS and THANKS must be installed without the need of a doc USE flag.

And thank you for those ebuilds, they spared me a lot of time.
Comment 186 Dominique Michel 2012-07-07 19:15:18 UTC
I also renamed the icon:

pkg_preinst() {
	mv ${D}/usr/share/icons/hicolor/128x128/apps/hb-icon.png \
		${D}/usr/share/icons/hicolor/128x128/apps/ghb.png || die "renaming icon failed"
	gnome2_icon_savelist
}

I done this because it is no icon field into the desktop file, and a tool like fvwm-crystal.generate-menu assume than the icon it is looking for have the same name than the program it install a menu entry for.
Comment 187 vik 2012-07-08 03:48:52 UTC
Created attachment 317544 [details]
handbrake-9999 ebuild, tested on amd64

Tested on ~amd64, both GUI and command-line work.
Comment 188 vik 2012-07-08 03:59:18 UTC
Comment on attachment 317544 [details]
handbrake-9999 ebuild, tested on amd64

# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
ESVN_REPO_URI="svn://svn.handbrake.fr/HandBrake/trunk"
ESVN_PROJECT="hb-trunk"

inherit subversion python gnome2-utils toolchain-funcs

DESCRIPTION="Video Encoder"
HOMEPAGE="http://handbrake.fr"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="gtk gst ffmpeg2 doc"

# fribidi is necessary to compile libass
# Don't need this dependency, net-libs/webkit-gtk, 
# since I'm passing --disable-gtk-update-checks to configure.
DEPEND=">=sys-devel/gcc-4.0.0
        =dev-lang/python-2.7*
        || (
           >=net-misc/curl-7.21.4
           >=net-misc/wget-1.13.4
        )
        >=dev-lang/yasm-0.8.0
        sys-libs/zlib
        app-arch/bzip2
        dev-libs/fribidi
        =sys-devel/automake-1.11*
        gtk? (
           dev-util/intltool
           >=dev-libs/dbus-glib-0.98
           >=x11-libs/gtk+-2.0
           >=sys-fs/udev-171[gudev]
           x11-libs/libnotify
        )
        gst? (
           media-libs/gstreamer
           media-libs/gst-plugins-base
        )"
RDEPEND="${DEPEND}"

# the directory name differs from the package name so
# need to modify the source directory
S="${WORKDIR}/hb-trunk"

# what version of python must be eselected in the user's environment
ESELECT_PY_VERSION=2.7

# what version of automake required
AUTOMAKE_VERSION=1.11

# Set these variables manually since handbrake's configure
# script doesn't handle outputs from use_enable correctly
# (i.e. --disable-ff-mpeg2 will break ./configure)
DISABLE_GST="--disable-gst"
ENABLE_FFMPEG2=""
FETCH="wget"

pkg_setup()
{
   # make sure eselect for python set to ESELECT_PY_VERSION
   python_pkg_setup
   if [ -z $(python_get_version | grep "${ESELECT_PY_VERSION}") ]; then
      elog "Package dependencies require you to set the \
python version to ${ESELECT_PY_VERSION} before emerging ${PN}."
      elog "Please run eselect python list; eselect python set 1 \
(if python version ${ESELECT_PY_VERSION} is in the first slot, for example)."
      die "Python environment must be changed to meet package \
dependencies.  See above explanation and run eselect python help for details."
   fi

   # set the use flags for use in ./configure later on
   if use gst ; then
      DISABLE_GST="";
   fi
   if use ffmpeg2 ; then
      ENABLE_FFMPEG2="--enable-ff-mpeg2";
   fi
   if [ -x /usr/bin/curl ]; then
      FETCH="curl";
   fi
}

src_configure()
{
   # python configure script doesn't accept all econf flags
   ./configure --force --prefix=/usr $(use_enable gtk) \
--disable-gtk-update-checks ${DISABLE_GST} \
${ENABLE_FFMPEG2} --fetch=${FETCH}
}

src_compile()
{
   WANT_AUTOMAKE="${AUTOMAKE_VERSION}" emake -C build || die "failed compiling ${PN}"
}

src_install()
{
   WANT_AUTOMAKE="${AUTOMAKE_VERSION}" emake -C build DESTDIR=${D} install || die "failed installing ${PN}"
   elog "If you were required to change your python version, you \
may now change back to the previous version you were using before \
emerging ${PN}.  Please run eselect python list; eselect python set 1 \
(if python version ${ESELECT_PY_VERSION} is in the first slot, for example)."

   if use doc ; then
      WANT_AUTOMAKE="${AUTOMAKE_VERSION}" emake -C build doc
      dodoc AUTHORS CREDITS NEWS THANKS build/doc/articles/txt/* || die "dodoc
failed"
   else
      dodoc AUTHORS CREDITS NEWS THANKS || die "dodoc failed"
   fi
}

pkg_preinst()
{
   gnome2_icon_savelist
}

pkg_postinst()
{
   gnome2_icon_cache_update
}

pkg_postrm()
{
   gnome2_icon_cache_update
}
Comment 189 vik 2012-07-08 04:00:18 UTC
Comment on attachment 317544 [details]
handbrake-9999 ebuild, tested on amd64

# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
ESVN_REPO_URI="svn://svn.handbrake.fr/HandBrake/trunk"
ESVN_PROJECT="hb-trunk"

inherit subversion python gnome2-utils toolchain-funcs

DESCRIPTION="Video Encoder"
HOMEPAGE="http://handbrake.fr"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="gtk gst ffmpeg2 doc"

# fribidi is necessary to compile libass
# Don't need this dependency, net-libs/webkit-gtk, 
# since I'm passing --disable-gtk-update-checks to configure.
DEPEND=">=sys-devel/gcc-4.0.0
        =dev-lang/python-2.7*
        || (
           >=net-misc/curl-7.21.4
           >=net-misc/wget-1.13.4
        )
        >=dev-lang/yasm-0.8.0
        sys-libs/zlib
        app-arch/bzip2
        dev-libs/fribidi
        =sys-devel/automake-1.11*
        gtk? (
           dev-util/intltool
           >=dev-libs/dbus-glib-0.98
           >=x11-libs/gtk+-2.0
           >=sys-fs/udev-171[gudev]
           x11-libs/libnotify
        )
        gst? (
           media-libs/gstreamer
           media-libs/gst-plugins-base
        )"
RDEPEND="${DEPEND}"

# the directory name differs from the package name so
# need to modify the source directory
S="${WORKDIR}/hb-trunk"

# what version of python must be eselected in the user's environment
ESELECT_PY_VERSION=2.7

# what version of automake required
AUTOMAKE_VERSION=1.11

# Set these variables manually since handbrake's configure
# script doesn't handle outputs from use_enable correctly
# (i.e. --disable-ff-mpeg2 will break ./configure)
DISABLE_GST="--disable-gst"
ENABLE_FFMPEG2=""
FETCH="wget"

pkg_setup()
{
   # make sure eselect for python set to ESELECT_PY_VERSION
   python_pkg_setup
   if [ -z $(python_get_version | grep "${ESELECT_PY_VERSION}") ]; then
      elog "Package dependencies require you to set the \
python version to ${ESELECT_PY_VERSION} before emerging ${PN}."
      elog "Please run eselect python list; eselect python set 1 \
(if python version ${ESELECT_PY_VERSION} is in the first slot, for example)."
      die "Python environment must be changed to meet package \
dependencies.  See above explanation and run eselect python help for details."
   fi

   # set the use flags for use in ./configure later on
   if use gst ; then
      DISABLE_GST="";
   fi
   if use ffmpeg2 ; then
      ENABLE_FFMPEG2="--enable-ff-mpeg2";
   fi
   if [ -x /usr/bin/curl ]; then
      FETCH="curl";
   fi
}

src_configure()
{
   # python configure script doesn't accept all econf flags
   ./configure --force --prefix=/usr $(use_enable gtk) \
--disable-gtk-update-checks ${DISABLE_GST} \
${ENABLE_FFMPEG2} --fetch=${FETCH}
}

src_compile()
{
   WANT_AUTOMAKE="${AUTOMAKE_VERSION}" emake -C build || die "failed compiling ${PN}"
}

src_install()
{
   WANT_AUTOMAKE="${AUTOMAKE_VERSION}" emake -C build DESTDIR=${D} install || die "failed installing ${PN}"
   elog "If you were required to change your python version, you \
may now change back to the previous version you were using before \
emerging ${PN}.  Please run eselect python list; eselect python set 1 \
(if python version ${ESELECT_PY_VERSION} is in the first slot, for example)."

   if use doc ; then
      WANT_AUTOMAKE="${AUTOMAKE_VERSION}" emake -C build doc
      dodoc AUTHORS CREDITS NEWS THANKS build/doc/articles/txt/* || die "dodoc
failed"
   else
      dodoc AUTHORS CREDITS NEWS THANKS || die "dodoc failed"
   fi
}

pkg_preinst()
{
   gnome2_icon_savelist
}

pkg_postinst()
{
   gnome2_icon_cache_update
}

pkg_postrm()
{
   gnome2_icon_cache_update
}
Comment 190 vik 2012-07-08 04:11:56 UTC
Comment on attachment 317095 [details]
handbrake-0.9.6 ebuild, tested on amd64

# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4

inherit python gnome2-utils toolchain-funcs

DESCRIPTION="Video Encoder"
HOMEPAGE="http://handbrake.fr"
SRC_URI="http://iweb.dl.sourceforge.net/project/handbrake/${PV}/HandBrake-${PV}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="gtk gst ffmpeg2 doc"

# fribidi is necessary to compile libass
# Don't need this dependency, net-libs/webkit-gtk, 
# since I'm passing --disable-gtk-update-checks to configure.
DEPEND=">=sys-devel/gcc-4.0.0
        =dev-lang/python-2.7*
        || (
           >=net-misc/curl-7.21.4
           >=net-misc/wget-1.13.4
        )
        >=dev-lang/yasm-0.8.0
        sys-libs/zlib
        app-arch/bzip2
        dev-libs/fribidi
        =sys-devel/automake-1.11*
        gtk? (
           dev-util/intltool
           >=dev-libs/dbus-glib-0.98
           >=x11-libs/gtk+-2.0
           >=sys-fs/udev-171[gudev]
           x11-libs/libnotify
        )
        gst? (
           media-libs/gstreamer
           media-libs/gst-plugins-base
        )"
RDEPEND="${DEPEND}"

# the directory name differs from the package name so
# need to modify the source directory
S="${WORKDIR}/HandBrake-${PV}"

# what version of python must be eselected in the user's environment
ESELECT_PY_VERSION=2.7

# what version of automake required
AUTOMAKE_VERSION=1.11

# Set these variables manually since handbrake's configure
# script doesn't handle outputs from use_enable correctly
# (i.e. --disable-ff-mpeg2 will break ./configure)
DISABLE_GST="--disable-gst"
ENABLE_FFMPEG2=""
FETCH="wget"

pkg_setup()
{
   # make sure eselect for python set to ESELECT_PY_VERSION
   python_pkg_setup
   if [ -z $(python_get_version | grep "${ESELECT_PY_VERSION}") ]; then
      elog "Package dependencies require you to set the \
python version to ${ESELECT_PY_VERSION} before emerging ${PN}."
      elog "Please run eselect python list; eselect python set 1 \
(if python version ${ESELECT_PY_VERSION} is in the first slot, for example)."
      die "Python environment must be changed to meet package \
dependencies.  See above explanation and run eselect python help for details."
   fi

   # set the use flags for use in ./configure later on
   if use gst ; then
      DISABLE_GST="";
   fi
   if use ffmpeg2 ; then
      ENABLE_FFMPEG2="--enable-ff-mpeg2";
   fi
   if [ -x /usr/bin/curl ]; then
      FETCH="curl";
   fi
}

src_prepare()
{
   # This hack is necessary to get libass to compile.
   # The fribidi that libass is trying to build can't find glib.h
   # unless I add those directories to the build path.  This is
   # fixed in Gentoo's version of fribidi but is broken with the
   # snapshot of libass that Handbrake took before this release.

    # try creating an inline GNUmakefile.custom.defs based
    # on the one under ${S}/contrib/libass/module.defs
    CURRENT_FRIBIDI_CFLAGS=$($(tc-getPKG_CONFIG) --cflags fribidi)
    FRIBIDI_FIX_PATH="${S}/build/GNUmakefile.custom.defs"
    mkdir "${S}/build"
    touch "${FRIBIDI_FIX_PATH}"
    echo 'LIBASS.CONFIGURE.extra = \' >> "${FRIBIDI_FIX_PATH}"
    echo '--disable-png --disable-enca \' >> "${FRIBIDI_FIX_PATH}"
    echo 'FREETYPE_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfreetype" \' >> "${FRIBIDI_FIX_PATH}"
    echo 'FREETYPE_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include/freetype2" \' >> "${FRIBIDI_FIX_PATH}"
    echo 'FONTCONFIG_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfontconfig" \' >> "${FRIBIDI_FIX_PATH}"
    echo 'FONTCONFIG_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include" \' >> "${FRIBIDI_FIX_PATH}"
    echo 'FRIBIDI_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfribidi" \' >> "${FRIBIDI_FIX_PATH}"
    echo 'FRIBIDI_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include '"${CURRENT_FRIBIDI_CFLAGS}" '"' >> "${FRIBIDI_FIX_PATH}"
}

src_configure()
{
   # python configure script doesn't accept all econf flags
   ./configure --force --prefix=/usr $(use_enable gtk) \
--disable-gtk-update-checks ${DISABLE_GST} \
${ENABLE_FFMPEG2} --fetch=${FETCH}
}

src_compile()
{
   WANT_AUTOMAKE="${AUTOMAKE_VERSION}" emake -C build || die "failed compiling ${PN}"
}

src_install()
{
   WANT_AUTOMAKE="${AUTOMAKE_VERSION}" emake -C build DESTDIR=${D} install || die "failed installing ${PN}"
   elog "If you were required to change your python version, you \
may now change back to the previous version you were using before \
emerging ${PN}.  Please run eselect python list; eselect python set 1 \
(if python version ${ESELECT_PY_VERSION} is in the first slot, for example)."

   if use doc ; then
      WANT_AUTOMAKE="${AUTOMAKE_VERSION}" emake -C build doc
      dodoc AUTHORS CREDITS NEWS THANKS build/doc/articles/txt/* || die "dodoc
failed"
   else
      dodoc AUTHORS CREDITS NEWS THANKS || die "dodoc failed"
   fi
}

pkg_preinst()
{
   gnome2_icon_savelist
}

pkg_postinst()
{
   gnome2_icon_cache_update
}

pkg_postrm()
{
   gnome2_icon_cache_update
}
Comment 191 Dominique Michel 2012-07-10 17:40:26 UTC
Created attachment 317836 [details]
handbrake-0.9.6 ebuild

Python clean-up. 
Dependencies clean-up. Not sure if fridibi us needed only for build or also at runtime.
configure clean-up.
The modules are now downloaded into $DISTFILES, like in the 0.9.5 ebuild.
Comment 192 Dominique Michel 2012-07-10 17:46:51 UTC
Created attachment 317838 [details]
handbrake-0.9.6 ebuild

oops, more clean-up
Comment 193 Dominique Michel 2012-07-10 19:14:47 UTC
Created attachment 317846 [details]
handbrake-9999 ebuild

The same clean-up than in 0.9.6 at the exception of the modules download.
Comment 194 Dominique Michel 2012-07-10 19:23:11 UTC
Created attachment 317848 [details]
handbrake-9999 ebuild

Oops, I forgot the KEYWORDS
Comment 195 mg05182-gentoo 2012-07-12 01:12:53 UTC
When I run:

ebuild handbrake-0.9.6.ebuild digest

I'm getting a 404 Not Found downloading:

http://download.handbrake.fr/handbrake/contrib/libdca-r81-srapped.tar.gz

Changing the "srapped" at line line 24 to "strapped" fixed the issue.
Comment 196 Sławomir Nizio 2012-07-27 12:05:44 UTC
Created attachment 319380 [details]
handbrake-0.9.8.ebuild

Ebuild from comment 192 with some minimal changes, mainly: renamed USE flag to "gstreamer", added ~x86 after brief testing on this architecture, small changes to dependencies, commented out some stuff from SRC_URI (they aren't downloaded by the build system) and most importantly downloaded "contrib" sources don't include HandBrake version now, so they don't need to be downloaded again every HandBrake version bump if they stay the same.
Comment 197 Chris Slycord 2013-01-10 03:48:16 UTC
I think the "ffmpeg2" USE flag in the ebuild should be changed to something else because for those who don't know handbrake's build-command-line-options the name makes it seem like you're enabling some version 2 of ffmpeg when it really means to use ffmpeg for decoding mpeg version 2 instead of mpeg2dec.
Comment 198 Chris Slycord 2013-01-10 04:10:58 UTC
Created attachment 335014 [details]
failed_build.log

This is an excerpt of the build.log I obtained using the 0.9.8 ebuild attached. It starts right around where the errors start.
Comment 199 Chris Slycord 2013-01-10 04:12:26 UTC
Created attachment 335016 [details]
environment

Environment for previously mentioned failure
Comment 200 Samuli Suominen gentoo-dev 2013-01-10 09:38:44 UTC
*** Bug 407347 has been marked as a duplicate of this bug. ***
Comment 201 Michal Plichta 2013-03-13 14:55:24 UTC
I have problem with compiling with 0.9.8
Comment 202 Michal Plichta 2013-03-13 14:56:52 UTC
Created attachment 341898 [details]
emerge info for 0.9.8
Comment 203 Michal Plichta 2013-03-13 14:58:37 UTC
Created attachment 341900 [details]
build log for 0.9.8
Comment 204 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-05 17:14:52 UTC
Created attachment 347446 [details]
Obsoleting old attachments.
Comment 205 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-05 17:20:57 UTC
Comment on attachment 347446 [details]
Obsoleting old attachments.

+  05 May 2013; Tom Wijsman <TomWij@gentoo.org> +libmkv-0.6.5.1.ebuild,
+  +metadata.xml:
+  Added media-libs/libmkv, a dependency for media-video/handbrake.
Comment 206 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-05 17:43:06 UTC
+  05 May 2013; Tom Wijsman <TomWij@gentoo.org> package.mask:
+  Masking media-video/handbrake until =media-video/ffmpeg-1.2 is unmasked.

+  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.

Since bundled libraries are no longer a requirement with the upcoming 0.9.9 version, I've worked throughout the day on getting Handbrake to work without them. Because of that progress, Handbrake has been added tree.

Handbrake is currently masked because FFmpeg-1.2 is masked, see bug #466300.

To test Handbrake, you need to unmask both FFmpeg-1.2 and Handbrake:

echo "=media-video/ffmpeg-1.2" >> /etc/portage/package.unmask
echo "media-video/handbrake" >> /etc/portage/package.unmask

This bug will remain open until the unmasked 0.9.9 version is available.

Please file new bugs if you experience any problems...
Comment 207 Ian Whyman (thev00d00) gentoo-dev 2013-05-05 19:17:12 UTC
Excellent work Tom!

Is there a particular reason you are depending on media-video/ffmpeg instead of virtual/ffmpeg?

Upstream ship Libav v9.3 :)
Comment 208 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-05 19:38:09 UTC
(In reply to comment #207)
> Is there a particular reason you are depending on media-video/ffmpeg instead
> of virtual/ffmpeg?
> 
> Upstream ship Libav v9.3 :)

Ah, haven't considered to check whether there are dependencies that could have been virtual, I'll run over that soon. Thanks for mentioning.
Comment 209 Nikoli 2013-05-06 07:19:21 UTC
Does current snapshot fail to build and work with media-video/ffmpeg-1.1?
Comment 210 Ian Whyman (thev00d00) gentoo-dev 2013-05-08 06:24:14 UTC
I've updated the snapshot wbuild to use virtual/ffmpeg-9, it builds and works for me using libav:0/9. If somebody who has an equivalent ffmpeg could give it a quick build that would be great.
Comment 211 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-08 13:16:24 UTC
(In reply to comment #210)
> I've updated the snapshot wbuild to use virtual/ffmpeg-9, it builds and
> works for me using libav:0/9. If somebody who has an equivalent ffmpeg could
> give it a quick build that would be great.

Confirmed to work, now let's hope one of both versions gets unmasked soon.
Comment 212 Mark Knecht 2013-05-15 18:24:20 UTC
First, I'm REALLY happy to see someone working to bring handbrake out of the shadows. Thanks in advance.

I've attempted to install using the new ebuild but it's failing here. I'm primarily 64-bit stable here. I think I've unmasked & keyworded everything I could find in this report.

I'll post the full build failure in a log file or something. Let me know if you need the actual log files or anything else.

NOTE: The unmasks/etc. required here seem to break the xine ebuild unfortunately.

c2RAID6 ~ # emerge -DuN handbrake

<SNIP>

config.status: executing default-1 commands
config.status: executing libtool commands
config.status: executing po/stamp-it commands
touch gtk/.stamp.configure
make: INTERNAL: Exiting with 14 jobserver tokens available; should be 13!
make: Leaving directory `/var/tmp/portage/media-video/handbrake-0.9.9_pre5441-r1/work/build'
 * ERROR: media-video/handbrake-0.9.9_pre5441-r1 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-video/handbrake-0.9.9_pre5441-r1'`,
 * the complete build log and the output of `emerge -pqv '=media-video/handbrake-0.9.9_pre5441-r1'`.
 * The complete build log is located at '/var/tmp/portage/media-video/handbrake-0.9.9_pre5441-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/handbrake-0.9.9_pre5441-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/handbrake-0.9.9_pre5441-r1/work'
 * S: '/var/tmp/portage/media-video/handbrake-0.9.9_pre5441-r1/work'

 * Messages for package media-video/handbrake-0.9.9_pre5441-r1:

 * ERROR: media-video/handbrake-0.9.9_pre5441-r1 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-video/handbrake-0.9.9_pre5441-r1'`,
 * the complete build log and the output of `emerge -pqv '=media-video/handbrake-0.9.9_pre5441-r1'`.
 * The complete build log is located at '/var/tmp/portage/media-video/handbrake-0.9.9_pre5441-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/handbrake-0.9.9_pre5441-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/handbrake-0.9.9_pre5441-r1/work'
 * S: '/var/tmp/portage/media-video/handbrake-0.9.9_pre5441-r1/work'

 * Regenerating GNU info directory index...
 * Processed 129 info files.
c2RAID6 ~ #





c2RAID6 ~ # emerge --info
Portage 2.2.0_alpha174 (default/linux/amd64/13.0/desktop/kde, gcc-4.6.3, glibc-2.15-r3, 3.7.10-gentoo-r1 x86_64)
=================================================================
System uname: Linux-3.7.10-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7_CPU_X_980_@_3.33GHz-with-gentoo-2.2
KiB Mem:    24688580 total,  19908116 free
KiB Swap:   12602976 total,  12602976 free
Timestamp of tree: Wed, 15 May 2013 15:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo vmware
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL AdobeFlash-10.3 skype-eula google-chrome skype-4.0.0.7-copyright google-talkplugin Google-TOS"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --jobs=5"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.llarian.net/ http://gentoo.mirrors.hoobly.com/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j13 -l8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/vmware"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cleartype cli consolekit corefonts cracklib crypt cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gstreamer gtk iconv java jpeg jpeg2k kde kipi lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qt3support qt4 readline sdl semantic-desktop session spell sse sse2 ssl ssse3 startup-notification svg tcpd tiff truetype type1 udev udisks unicode upower usb vdpau vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

c2RAID6 ~ #



c2RAID6 ~ # cat /etc/portage/package.unmask 
media-video/handbrake
=media-video/libav-9.5
=virtual/ffmpeg-9
=media-video/ffmpeg-1.2.1
c2RAID6 ~ #



c2RAID6 ~ # cat /etc/portage/package.keywords 
<SNIP>
media-video/handbrake ~amd64
=media-libs/libmkv-0.6.5.1 ~amd64
=virtual/ffmpeg-9 ~amd64
=media-video/libav-9999 **
=media-video/ffmpeg-1.2.1 ~amd64
<SNIP>
c2RAID6 ~ #
Comment 213 Mark Knecht 2013-05-15 18:26:52 UTC
Created attachment 348412 [details]
handbrake build failure info
Comment 214 Mark Knecht 2013-05-15 18:39:31 UTC
OK, getting slightly further, while the virtual/ffmpeg got installed it seems the actual package didn't. I did that explicitly but I still fail building handbrake. Will attach the log and environment files as attachments.

c2RAID6 ~ # emerge --info '=media-video/handbrake-0.9.9_pre5441-r1'
Portage 2.2.0_alpha174 (default/linux/amd64/13.0/desktop/kde, gcc-4.6.3, glibc-2.15-r3, 3.7.10-gentoo-r1 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.7.10-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7_CPU_X_980_@_3.33GHz-with-gentoo-2.2
KiB Mem:    24688580 total,  19056188 free
KiB Swap:   12602976 total,  12602976 free
Timestamp of tree: Wed, 15 May 2013 15:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo vmware
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL AdobeFlash-10.3 skype-eula google-chrome skype-4.0.0.7-copyright google-talkplugin Google-TOS"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --jobs=5"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.llarian.net/ http://gentoo.mirrors.hoobly.com/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j13 -l8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/vmware"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cleartype cli consolekit corefonts cracklib crypt cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gstreamer gtk iconv java jpeg jpeg2k kde kipi lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qt3support qt4 readline sdl semantic-desktop session spell sse sse2 ssl ssse3 startup-notification svg tcpd tiff truetype type1 udev udisks unicode upower usb vdpau vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

c2RAID6 ~ #



c2RAID6 ~ # emerge -pqv '=media-video/handbrake-0.9.9_pre5441-r1'
[ebuild  N    ] media-video/handbrake-0.9.9_pre5441-r1  USE="ffmpeg gstreamer gtk -fdk" 
c2RAID6 ~ #
Comment 215 Mark Knecht 2013-05-15 18:42:52 UTC
Created attachment 348414 [details]
build.log
Comment 216 Mark Knecht 2013-05-15 18:43:23 UTC
Created attachment 348416 [details]
environment
Comment 217 Ryan Hill (RETIRED) gentoo-dev 2013-05-16 02:58:19 UTC
../libhb/muxmp4.c:10:25: fatal error: mp4v2/mp4v2.h: No such file or directory

dirtyepic@caribou ~ $ qfile /usr/include/mp4v2/mp4v2.h 
media-libs/libmp4v2 (/usr/include/mp4v2/mp4v2.h)

Hmm, I have media-libs/libmp4v2:0 installed but the dep here is for media-libs/libmp4v2:1.
Comment 218 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-16 05:53:18 UTC
+  16 May 2013; Tom Wijsman <TomWij@gentoo.org>
+  handbrake-0.9.9_pre5441-r1.ebuild, handbrake-9999.ebuild:
+  Changed slot of libmp4v2 dependency from 1 to 0 since 0 installs the required
+  include files whereas 1 doesn't.

As a reminder, please file separate bugs if you experience problems, thanks.
Comment 219 Nikoli 2013-05-16 14:24:18 UTC
Tried handbrake-0.9.9_pre5441-r1: builds fine, encodes sample fine. But there are 2 problems:
1) handbrake-0.9.9_pre5441.tar.gz is tar bomb, when making snapshot dir "${P}" should be created.
2) handbrake does not have version in "About" and in mkv muxer:
$ LANG=C mkvinfo /tmp/hb_001.mkv |grep Hand
| + Writing application: HandBrake rev0

During src_configure there is line:
probe: svn info...(fail) code 1

Many projects have ability to use "snapshot_version" file.
Comment 220 Mark Knecht 2013-05-16 15:05:19 UTC
-r1 got further but still complained about missing libraries:

fribidi
faac

emerge -1 fribidi faac

and now handbrake installed fine on my mostly stable system. The GUI comes up fine. I'll try encoding a few disks later today.

Add those dependencies and you'll be closer.

Thanks!
Comment 221 Mark Knecht 2013-05-16 16:25:19 UTC
Actually, if seems that maybe handbrake is assuming faac was installed with ffmpeg. On my system it wasn't there as a USE flag.

WRT to fribidi it seems that's purely a handbrake thing:

c2RAID6 ~ # equery depends fribidi
 * These packages depend on fribidi:
c2RAID6 ~ #


c2RAID6 ~ # equery depends ffmpeg
 * These packages depend on ffmpeg:
app-misc/strigi-0.7.7-r2 (ffmpeg ? virtual/ffmpeg)
kde-base/nepomuk-core-4.10.2 (ffmpeg ? virtual/ffmpeg)
media-libs/openal-1.15.1 (alstream ? virtual/ffmpeg)
media-libs/xine-lib-1.2.2 (media-video/ffmpeg)
                          (virtual/ffmpeg)
media-video/handbrake-0.9.9_pre5441-r1 (ffmpeg ? =virtual/ffmpeg-9)
virtual/ffmpeg-9 (>=media-video/ffmpeg-1.1[X?,encode?,gsm?,jpeg2k?,mp3?,opus?,sdl?,speex?,theora?,threads?,truetype?,vaapi?,vdpau?,x264?])
c2RAID6 ~ # emerge -pv ffmpeg

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   #] media-video/ffmpeg-1.2.1  USE="X aac alsa bzip2 encode hardcoded-tables iconv jpeg2k mmx mp3 sdl ssse3 truetype vdpau vorbis x264 xvid zlib -3dnow -3dnowext -aacplus (-altivec) -amr -avx -bindist -bluray -cdio (-celt) -cpudetection -debug -doc -examples -faac -fdk -flite -fontconfig -frei0r -gnutls -gsm -iec61883 -ieee1394 -jack -libass -libcaca -libsoxr -libv4l -mmxext -modplug (-neon) -network -openal -openssl -opus -oss -pic -pulseaudio -rtmp -schroedinger -speex -static-libs {-test} -theora -threads -twolame -v4l -vaapi (-vis) -vpx" FFTOOLS="aviocat cws2fws ffescape ffeval fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart trasher" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
c2RAID6 ~ # emerge -pv handbrake

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   #] media-video/handbrake-0.9.9_pre5441-r1  USE="ffmpeg gstreamer gtk -fdk" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
c2RAID6 ~ #
Comment 222 Mark Knecht 2013-05-16 19:51:32 UTC
I'll make a likely final report here. The new -r1 version of handbrake does appear to rip my media. However the results are mixed. I use the media in essentially 3 environments:

1) On my PC playing with xine. All media ripped with this new version fail to play in xine. While not specifically a handbrake issue the media ripped with the older version do play. I'll take this up with the handbrake people and do some Googling to see what's up with that. I do attach below the xine info from a terminal where I ran xine.

2) On my TV playing off a USB drive. The video works here but the one video I watched seemed to have the audio and video slightly out of sync. This is not unheard of with the old version. It happens once in awhile.

3) On my Kindle Fire. Untested at this time.

Anyway, this is a big step forward to have handbrake building from a Gentoo supported server so thanks for the efforts. I'm available to test of give more info if required.

Cheers

mark@c2RAID6 ~ $ xine
This is xine (X11 gui) - a free video player v0.99.7.
(c) 2000-2010 The xine Team.
vo_vdpau: vdpau API version : 1
vo_vdpau: vdpau implementation description : NVIDIA VDPAU Driver Shared Library  313.30  Wed Mar 27 15:53:55 PDT 2013
vo_vdpau: maximum video surface size for chroma type 4:2:2 is 4096x4096
vo_vdpau: maximum video surface size for chroma type 4:2:0 is 4096x4096
vo_vdpau: maximum output surface size is 16384x16384
X Error of failed request:  BadImplementation (server does not implement operation)
  Major opcode of failed request:  151 (NV-GLX)
  Minor opcode of failed request:  29 ()
  Serial number of failed request:  2153
  Current serial number in output stream:  2154
vo_vdpau: hold a maximum of 10 video output surfaces for reuse
vo_vdpau: using 3 output surfaces of size 5120x1080 for display queue
vdpau_set_property: property=1, value=0
vo_vdpau: deinterlace: none
vo_vdpau: set_scaling_level=0
vo_vdpau: enabled features: inverse_telecine=0
vo_vdpau: disable noise reduction.
vo_vdpau: disable sharpness.
vo_vdpau: vdpau_update_csc: hue=0.000000, saturation=1.000000, contrast=1.000000, brightness=0.000000, color_standard=0 studio_levels=0
vo_vdpau: skip_chroma = 0
Floating point exception
mark@c2RAID6 ~ $
Comment 223 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-23 15:06:37 UTC
There we go.

+  23 May 2013; Tom Wijsman <TomWij@gentoo.org> +handbrake-0.9.9.ebuild,
+  handbrake-9999.ebuild:
+  Version bump to 0.9.9.

I'm also unmasking this...

+  23 May 2013; Tom Wijsman <TomWij@gentoo.org> package.mask:
+  Drop mask for media-video/handbrake. I have read up on the history
+  of libav and ffmpeg; since libav is the default and unmasked, people
+  should be able to use this package. Those that do not wish to use libav
+  probably want to pursue helping to get ffmpeg fixed and unmasked.

Thanks for reporting and for the contributions, have a nice day!
Comment 224 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-23 15:29:16 UTC
Sorry, it appears the virtual itself is masked so we are still waiting for this. It's not the ffmpeg package that is blocking us, but rather the virtual which means we can't use it to depend on libav either.

The reason I didn't see this is due to a bug in eix, compare for yourself:

    eix -R : 0.8.2^t[2] (~)0.8.2-r2[2] 0.8.3[2] 0.8.5(0/0.8) (~)0.8.6(0/0.8) **0.8.9999(0/0.8) **0.8.9999[2] (~)9.5(0/9) **9.9999(0/9) **9999(0/9)^t **9999^t[2]

    eix : 0.8.5(0/0.8) (~)0.8.6(0/0.8) (~)0.8.7(0/0.8) **0.8.9999(0/0.8) [M] (~)9.6(0/9) **9.9999(0/9) **9999(0/9)^t

You'll see that the former eix call with the remotes mentions a version 9.5 that's not from an overlay (thus it in from the Gentoo repo), then when ran without the remotes you will see a 9.6 instead of 9.5 (what?!) that is masked.

Since I have -R in my default eix options, I thought the package was not masked; lesson learned, I'll try to use eshowkw for this in the future.
Comment 225 Nikoli 2013-05-23 16:33:05 UTC
Fails to build:
 * Running eautoreconf in '/var/tmp/portage/media-video/handbrake-0.9.9/work/HandBrake-0.9.9/gtk' ...
 * Running glib-gettextize --copy --force [ ok ]
 * Running intltoolize --automake --copy --force [ !! ]
 * Failed Running intltoolize !

# cat /var/tmp/portage/media-video/handbrake-0.9.9/temp/intltoolize.out
***** intltoolize *****
***** PWD: /var/tmp/portage/media-video/handbrake-0.9.9/work/HandBrake-0.9.9/gtk
***** intltoolize --automake --copy --force
Comment 226 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-23 16:56:02 UTC
Addendum to my previous comment: Both ffmpeg and libav appear to be masked these days, the virtual was therefore also masked as a result. This bug therefore now depends on two bugs tracking the unmasking of these dependencies.

So, with a change in package masks comes updated instructions: To use handbrake one needs to add the following lines to /etc/portage/package.unmask:

    >=virtual/ffmpeg-9
    >=media-video/libav-9
    # Alternative to libav package: >=media-video/ffmpeg-1.1
    media-video/handbrake

Pay attention though, doing this may break other packages. If so, please file a bug about that other package (if there is none) and block the tracker bugs (bug #466300 and bug #443230).

Please file new bugs instead of replying here, this bug should only be used for major bugs or changes that affect everyone; not all bugs that you experience are bugs the other people CC-ed here experience. Thank you in advance.

(In reply to comment #225)
> ***** intltoolize *****
> ***** PWD:
> /var/tmp/portage/media-video/handbrake-0.9.9/work/HandBrake-0.9.9/gtk
> ***** intltoolize --automake --copy --force

Eh, that doesn't even contain an error...

After this fails, can you try to run this manually in that folder?

If it also doesn't give an error, could you then run it again trough strace?

Please file the results of this as a new bug, thank you.
Comment 227 Nikoli 2013-05-23 16:58:10 UTC
It does and fix is trivial: after installing dev-util/intltool hb builds fine, but does not respect CC, LDFLAGS and CFLAGS:
    CFLAGS="-g0 -O3 -march=corei7-avx -O2 -pipe" \
    LDFLAGS="-Wl,-S -g0 -O3 -Wl,-O1 -Wl,--as-needed" \
    --prefix=/usr \
    --with-hb=/var/tmp/portage/media-video/handbrake-0.9.9/work/HandBrake-0.9.9/build/
/usr/bin/gcc -pipe -fmessage-length=0 -Wall -g0 -O3 -march=corei7-avx -O2 -pipe -DUSE_FF_MPEG2 -D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I./libhb/ -Iinclude -c ../libhb/denoise.c -o libhb/denoise.o
Comment 228 Mark Knecht 2013-06-27 00:58:41 UTC
Handbrake, now rev 0.9.9, continues to not build for me.

c2RAID6 ~ # emerge -pvDuN @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ~] media-video/handbrake-0.9.9::gentoo [0.9.8::MWK_overlay] USE="gstreamer%* gtk -fdk% -ffmpeg% (-ffmpeg2%) (-gst%)" 0 kB

Total: 1 package (1 upgrade), Size of downloads: 0 kB
c2RAID6 ~ #

There's a new version showing up tonight but I tried to build it and got more or less the same problems I got a month ago.

I tried looking at the comments below but I'm not sure whether my inputs or the inputs of others were being addressed. The output is too long to post but there are bunch of failures in the middle that look like:

../libhb/hbffmpeg.h:12:38: fatal error: libavutil/channel_layout.h: No such file or directory
compilation terminated.
make: *** [libhb/declpcm.o] Error 1
In file included from ../libhb/internal.h:10:0,
                 from ../libhb/common.h:99,
                 from ../libhb/hb.h:18,
                 from ../libhb/encvorbis.c:10:
../libhb/hbffmpeg.h:12:38: fatal error: libavutil/channel_layout.h: No such file or directory
compilation terminated.
make: *** [libhb/bd.o] Error 1
make: *** [libhb/decmpeg2.o] Error 1
make: *** [libhb/encvorbis.o] Error 1
In file included from ../libhb/internal.h:10:0,
                 from ../libhb/common.h:99,
                 from ../libhb/hb.h:18,
                 from ../libhb/muxmp4.c:13:
../libhb/hbffmpeg.h:12:38: fatal error: libavutil/channel_layout.h: No such file or directory
compilation terminated.
make: *** [libhb/muxmp4.o] Error 1
In file included from ../libhb/internal.h:10:0,
                 from ../libhb/common.h:99,
                 from ../libhb/hb.h:18,
                 from ../libhb/deblock.c:19:
../libhb/hbffmpeg.h:12:38: fatal error: libavutil/channel_layout.h: No such file or directory
compilation terminated.

and then it terminates like this:

checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for Gtk3... yes
checking for GStreamer1... yes
checking for libappindicator3... no
checking for GHB... yes
checking for pkg-config... /usr/bin/pkg-config
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating po/Makefile.in
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: executing libtool commands
config.status: executing po/stamp-it commands
touch gtk/.stamp.configure
make: Leaving directory `/var/tmp/portage/media-video/handbrake-0.9.9/work/HandBrake-0.9.9/build'
 * ERROR: media-video/handbrake-0.9.9 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-video/handbrake-0.9.9'`,
 * the complete build log and the output of `emerge -pqv '=media-video/handbrake-0.9.9'`.
 * The complete build log is located at '/var/tmp/portage/media-video/handbrake-0.9.9/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/handbrake-0.9.9/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/handbrake-0.9.9/work/HandBrake-0.9.9'
 * S: '/var/tmp/portage/media-video/handbrake-0.9.9/work/HandBrake-0.9.9'

 * Messages for package media-video/handbrake-0.9.9:

 * ERROR: media-video/handbrake-0.9.9 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-video/handbrake-0.9.9'`,
 * the complete build log and the output of `emerge -pqv '=media-video/handbrake-0.9.9'`.
 * The complete build log is located at '/var/tmp/portage/media-video/handbrake-0.9.9/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/handbrake-0.9.9/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/handbrake-0.9.9/work/HandBrake-0.9.9'
 * S: '/var/tmp/portage/media-video/handbrake-0.9.9/work/HandBrake-0.9.9'
c2RAID6 ~ #
Comment 229 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-06-27 05:57:53 UTC
HandBrake has since been unmasked because its dependencies have been unmasked.

It might be the case one of those versions of its dependencies is incompatible.

But please file a new bug with the following information:

1. Whether you use ffmpeg or libav and which version of that you have.
2. The build log attached.
3. The output of `emerge --info`.

Thank you in advance.
Comment 230 Timothy Jones 2013-07-01 21:31:07 UTC
Handbrake should depend on FFmpeg >= 1.1. See:

https://github.com/FFmpeg/FFmpeg/commit/5980f5dd18822f29cfd583c9c085c3e77d81aa72

And it looks like that has been fixed.