Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 222627 - =media-video/mplayer-1.0_rc2_20090731 depends on x11 libraries with -X in use
Summary: =media-video/mplayer-1.0_rc2_20090731 depends on x11 libraries with -X in use
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 264672 279245 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-18 12:29 UTC by William Hubbs
Modified: 2009-09-25 16:48 UTC (History)
3 users (show)

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


Attachments
info.txt (info.txt,3.14 KB, text/plain)
2008-05-18 12:30 UTC, William Hubbs
Details
mplayer.txt (mplayer.txt,2.33 KB, text/plain)
2008-05-18 12:30 UTC, William Hubbs
Details
mplayer.patch (mplayer.patch,3.51 KB, text/plain)
2009-08-04 20:16 UTC, William Hubbs
Details
/home/william/mplayer.pv.txt (mplayer.pv.txt,5.53 KB, text/plain)
2009-08-04 20:48 UTC, William Hubbs
Details
mplayer.patch (mplayer.patch,6.86 KB, text/plain)
2009-08-05 01:21 UTC, William Hubbs
Details
mplayer.patch (mplayer.patch,7.39 KB, text/plain)
2009-08-06 14:40 UTC, William Hubbs
Details
mplayer.patch (mplayer.patch,7.39 KB, text/plain)
2009-08-06 20:52 UTC, William Hubbs
Details
applied patch (mplayer-2.patch,6.88 KB, patch)
2009-09-19 15:35 UTC, Steve Dibb (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William Hubbs gentoo-dev 2008-05-18 12:29:46 UTC
Hi all,

I noticed that even though I have -X in my use flags, this version of
mplayer wants to install multiple X11 dependencies.

I checked the ebuild, and it seems that the dependencies for the xv and
xscreensaver use flags, at least, should also be inside the dependencies
for the X use flag.

I am not familiar with the way mplayer works, so I do not know if any
other dependencies make sense without X support, but at least these two
seem not to.

Could someone take a look at this and rework the dependencies so that
mplayer can be built without X support?

I am including my emerge --info output and the output from emerge -pv
mplayer as attachments.

Thanks,

William
Comment 1 William Hubbs gentoo-dev 2008-05-18 12:30:20 UTC
Created attachment 153525 [details]
info.txt

Output from emerge --info.
Comment 2 William Hubbs gentoo-dev 2008-05-18 12:30:47 UTC
Created attachment 153527 [details]
mplayer.txt

Output from emerge -pv mplayer.
Comment 3 Steve Dibb (RETIRED) gentoo-dev 2008-05-21 15:44:52 UTC
Talked to WilliamH on freenode, and the basic premise is -- it's a lot of work to put the many X deps under one use flag tree, since it's so dependent.

I'm not sure if it's even a good idea, since I *think* that X actually provides x11 video output support.

Anyway, if someone wants to do it, they'd have to write a patch since it'd be a small undertaking.
Comment 4 Steve Dibb (RETIRED) gentoo-dev 2009-04-07 20:09:58 UTC
*** Bug 264672 has been marked as a duplicate of this bug. ***
Comment 5 William Hubbs gentoo-dev 2009-08-04 14:51:09 UTC
All,

Upstream, as far as I know, supports building mmplayer without x11 video
support.  In that setup, it would play the audio but not display the
video.  Since that is the case, shouldn't we support building it in this
configuration as well?

If I'm not correct about upstream supporting building mplayer without X
support, is there an equivalent media player in portage that I am not
aware of which will work for a non-X system?

Thanks,

William

Comment 6 Steve Dibb (RETIRED) gentoo-dev 2009-08-04 15:18:42 UTC
(In reply to comment #5)
> All,
> 
> Upstream, as far as I know, supports building mmplayer without x11 video
> support.  In that setup, it would play the audio but not display the
> video.  Since that is the case, shouldn't we support building it in this
> configuration as well?
> 
> If I'm not correct about upstream supporting building mplayer without X
> support, is there an equivalent media player in portage that I am not
> aware of which will work for a non-X system?
> 
> Thanks,
> 
> William
> 

Yes, it's possible, and support questions shouldnt be brought up on bugzilla (try forums).

You just have to flip off all the USE flags that are pulling in X dependencies.
Comment 7 Steve Dibb (RETIRED) gentoo-dev 2009-08-04 15:35:18 UTC
If you do want to write a patch, heres the use flags that need X support (that I can think of)

X osdmenu xscreensaver xv xvmc  dxr3 ggi gmplayer opengl sdl tga vdpau vidix

Comment 8 William Hubbs gentoo-dev 2009-08-04 20:16:00 UTC
Created attachment 200195 [details]
mplayer.patch

I have started work on the dependencies.  Here is the patch as I have it
so far, but it doesn't seem to be changing what is pulled in.  I am
using portage-2.2_rc35.

I also found some more use flags that I think are x dependent.  Here is
the list.  Let me know what you think and if I am missing something.  I
will also attach the output from emerge -pv mplayer below.

X dga dxr3 ggi gmplayer opengl osdmenu sdl tga truetype vdpau vidix xinerama xscreensaver xv xvmc
Comment 9 William Hubbs gentoo-dev 2009-08-04 20:19:14 UTC
Disregard what I said above about extra things being pulled and just let
me know if I am missing any other flags that should be in the
dependencies.

Thanks.
Comment 10 William Hubbs gentoo-dev 2009-08-04 20:48:00 UTC
Created attachment 200200 [details]
/home/william/mplayer.pv.txt
Comment 11 William Hubbs gentoo-dev 2009-08-04 21:00:01 UTC
Comment on attachment 200200 [details]
/home/william/mplayer.pv.txt

This is not needed; I don't know why I am having trouble marking it obsolete.
Comment 12 William Hubbs gentoo-dev 2009-08-05 01:21:20 UTC
Created attachment 200219 [details]
mplayer.patch

Steve,

here is my latest patch.  This doesn't account for the following flags:

gmplayer tga truetype

Can you look this over and let me know what you think?  Also, how would you handle the flags I listed?

Thanks,

William
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2009-08-05 17:43:46 UTC
*** Bug 279245 has been marked as a duplicate of this bug. ***
Comment 14 Daniel Robbins 2009-08-05 17:51:51 UTC
In bug 279245, I reported this issue as well and requested that GUI options not be enabled by default. 

BEANDOG'S REPLY:

Sorry, Daniel, gonna close this one as WONTFIX.  MPlayer is a special case
where enabling "too many" use flags causes far less issues than users
complaining that their playback is slow / crappy / missing codecs / etc.

Besides that, X isn't the only thing pulling in X11 libraries.   xv, for
instance, does, which is also enabled by default.

MY REPLY:

With Gentoo's modular profile system, there's no reason (that I know of) why
you can't accommodate both groups.

What would be a much better solution is to enable these X-specific options in
the desktop profile, in make.defaults (if you want to enable them globally) or
package.use (if you want them specific to mplayer) - and leave them disabled by
default in the ebuild. Then you manage the gui options there.

This way, desktop users use the desktop profile and all the gui options get
auto-enabled in all packages all at once.

And more importantly, server-based media server users aren't placed in the
tricky position of figuring out what of the zillion USE vars is pulling in X.

Please reconsider. It would save me a bit of upstream merging work but
generally I think it's the right way to go.
Comment 15 William Hubbs gentoo-dev 2009-08-05 18:01:50 UTC
Daniel,

I'm curious what you think about the solution suggested by the patch I
have come up with?  The goal is to not pull in any X dependencies unless
X is turned on, then, if you don't want X, you put -X in your use flags.
Comment 16 Daniel Robbins 2009-08-05 18:25:11 UTC
William, I have not looked at the patch but based on your description, that would be a nice improvement. I would then say that X should not be set by default, but enabled in the desktop profile, and we would benefit from a clean ebuild as well as nice behavior for media server builders as well as desktop users. :thumbsup:
Comment 17 William Hubbs gentoo-dev 2009-08-06 14:40:10 UTC
Created attachment 200390 [details]
mplayer.patch

All,

here is an updated patch whichalso disables X in the iuse defaults.
Steve, please look this over and let me know what you think.
Comment 18 Steve Dibb (RETIRED) gentoo-dev 2009-08-06 14:54:52 UTC
(In reply to comment #17)
> Created an attachment (id=200390) [edit]
> mplayer.patch
> 
> All,
> 
> here is an updated patch whichalso disables X in the iuse defaults.
> Steve, please look this over and let me know what you think.
> 

Looks like a good start.  A couple of things that need to be fixed before going in (and there may be more).

sdl should be split up a bit, since it applies to video out and audio out.  The check under the X use flag should see if libsdl[X] is enabled.  And then, only disable SDL support completely if both X and sdl use flags are turned off.

For ass use flag, don't disable it in src_configure (not added anyway) unless both that flag and X are unset, since the dependencies only pull in stuff to display them, but we still need support to recognize / access them in other settings.
Comment 19 William Hubbs gentoo-dev 2009-08-06 20:52:23 UTC
Created attachment 200430 [details]
mplayer.patch

Steve,

here is an updated patch that fixes the ass and sdl use flags.
Comment 20 Steve Dibb (RETIRED) gentoo-dev 2009-09-19 15:35:39 UTC
Created attachment 204613 [details, diff]
applied patch

Thanks, William, here's the version that I've applied to the ebuild.  Just a few minor tweaks, nothing major.
Comment 21 Steve Dibb (RETIRED) gentoo-dev 2009-09-19 16:13:39 UTC
Applied in mplayer-1.0_rc4_p20090919-r1.ebuild
Comment 22 Luca Barbato gentoo-dev 2009-09-20 15:05:36 UTC
The patch introduces some annoyiances with sdl, if you have a pulse only sdl but you want to have ao_alsa in mplayer now you cannot. I'd consider reverting it.
Comment 23 Steve Dibb (RETIRED) gentoo-dev 2009-09-25 16:48:29 UTC
(In reply to comment #22)
> The patch introduces some annoyiances with sdl, if you have a pulse only sdl
> but you want to have ao_alsa in mplayer now you cannot. I'd consider reverting
> it.
> 

done in -r2