Bug 203594 - media-video/mplayer should only depend on x264-svn if both encode and x264 USE flags are enabled
Bug#: 203594 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: minor Priority: P2
Resolution: FIXED Assigned To: media-video@gentoo.org Reported By: hopeless@hamiltonshells.ca
Component: Applications
URL: 
Summary: media-video/mplayer should only depend on x264-svn if both encode and x264 USE flags are enabled
Keywords:  
Status Whiteboard: 
Opened: 2007-12-28 17:40 0000
Description:   Opened: 2007-12-28 17:40 0000
`emerge mplayer` pulls in media-libs/x264-svn if the "x264" USE flag is
enabled, however it's not actually used if the "encode" USE flag is also
enabled.

From the ebuild (mplayer-1.0_rc2_p24929);
        if use encode; then
                use aac || myconf="${myconf} --disable-faac"
                use dv || myconf="${myconf} --disable-libdv"
                use x264 || myconf="${myconf} --disable-x264"
        else
                myconf="${myconf} --disable-mencoder --disable-libdv
--disable-x264 \
                        --disable-faac"
        fi

Interestingly, I have mplayer installed on two boxes, both with x264 in USE but
only one with encode.
x264-svn is pulled in in both cases, but as you can see it's disabled if
mencoder isn't built, however `ldd /usr/bin/mplayer` on the box with encode in
USE shows that the mplayer binary is actually linked to libx264.so as well as
mencoder, suggesting the possiblity that mplayer itself makes use of it even
without mencoder.

I suggest either changing the ebuild to depend on x264-svn if the x264 USE flag
is enabled irrespective of whether or not encode is also enabled, OR changing
the depends so x264-svn is only pulled in if the encode flag is enabled as well
as x264.

Reproducible: Always

------- Comment #1 From Hopeless 2007-12-28 17:41:20 0000 -------
That should read "however it's not actually used UNLESS the "encode" USE flag
is also enabled.

------- Comment #2 From Jakub Moc (RETIRED) 2007-12-28 18:21:28 0000 -------
Reopen with a patch or something instead of this messy description.

------- Comment #3 From Hopeless 2007-12-28 22:34:03 0000 -------
Fair enough, I'll attach a patch to mplayer-1.0_rc2_p24929.ebuild so it only
pulls in x264-svn if the encode USE flag is also active.

Anyway, even if mplayer is compiled with libx264 support it still uses ffmpeg's
ffh264 for playback by default.

------- Comment #4 From Hopeless 2007-12-28 22:35:09 0000 -------
Created an attachment (id=139540) [details]
patch to fix the x264svn RDEPEND

------- Comment #5 From Jakub Moc (RETIRED) 2007-12-28 22:40:00 0000 -------
Thanks, much more clear now... :)

------- Comment #6 From Steve Dibb 2008-01-03 02:04:05 0000 -------
Fixed in CVS, thanks