commit:     411d5bb4746fbb22e332748d0a48c77c47f0669e
Author:     Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Tue Dec 22 19:08:23 2015 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Mon Dec 28 12:47:19 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=411d5bb4

media-video/mpv: use more sane logic for opengl and egl USE flags

Currently 'opengl' USE stands for 'anything that draws using OpenGL
API', and 'egl' USE stands for 'EGL for X11'. Notice these are not
complementary.

Thus, for example, on Wayland one should use 'mpv[wayland,opengl,-egl]',
which is a bit counterintuitive, since Wayland (compositor) uses EGL
only. Also one cannot disable GLX support, but leave EGL on X11, because
of USE flags interdependencies.

Both X11 and Wayland use OpenGL API to do drawing, but historically the
first one was native OpenGL in X11 aka GLX and later came EGL in X11 and
Wayland. However, now there is a tendency to prefer EGL to not bind
oneself to X11.

There is no global 'egl' USE atm, but the logic of local 'egl' USEs
across the tree is 'not bind oneself to GLX'. On Linux there is no need
to repeat that drawing is done using OpenGL API even when EGL comes to
play.

Taking all of the above into account more sane and expected meaning
should be given to 'opengl' and 'egl' USE flags.

After this change 'opengl' USE stands for 'OpenGL in X11 aka GLX' and
'egl' USE stands for 'any EGL-based output'. Notice these are now
complementary.

Package-Manager: portage-2.2.24

 media-video/mpv/metadata.xml    |  2 +-
 media-video/mpv/mpv-9999.ebuild | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/media-video/mpv/metadata.xml b/media-video/mpv/metadata.xml
index b8c9d8b..949632e 100644
--- a/media-video/mpv/metadata.xml
+++ b/media-video/mpv/metadata.xml
@@ -26,7 +26,7 @@
                <flag name="cdio">Enable CDDA support via 
<pkg>dev-libs/libcdio-paranoia</pkg></flag>
                <flag name="doc-pdf">Build documentation in pdf format</flag>
                <flag name="drm">Enable Kernel Mode Setting / Direct Rendering 
Manager based video output</flag>
-               <flag name="egl">Enable EGL backend for X11 OpenGL video output 
(experimental)</flag>
+               <flag name="egl">Enable support for various EGL-based video 
outputs</flag>
                <flag name="enca">Enable subtitles charset discovery via 
<pkg>app-i18n/enca</pkg></flag>
                <flag name="jpeg">Enable support for saving screenshots in JPEG 
format</flag>
                <flag name="libguess">Enable subtitles charset discovery via 
<pkg>app-i18n/libguess</pkg></flag>

diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
index 2a70556..980877c 100644
--- a/media-video/mpv/mpv-9999.ebuild
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -28,6 +28,7 @@ DOCS+=( README.md etc/example.conf etc/input.conf )
 # See Copyright in source tarball and bug #506946. Waf is BSD, libmpv is ISC.
 LICENSE="GPL-2+ BSD ISC"
 SLOT="0"
+# Here 'opengl' stands for GLX, 'egl' stands for any EGL-based output
 IUSE="+alsa archive bluray cdda +cli doc drm dvb +dvd egl +enca encode +iconv
 jack jpeg lcms +libass libav libcaca libguess libmpv lua luajit openal +opengl
 oss pulseaudio pvr raspberry-pi rubberband samba sdl selinux test uchardet v4l
@@ -35,12 +36,12 @@ vaapi vdpau vf-dlopen wayland +X xinerama +xscreensaver xv"
 
 REQUIRED_USE="
        || ( cli libmpv )
-       egl? ( opengl X )
+       egl? ( || ( X wayland ) )
        enca? ( iconv )
-       lcms? ( opengl )
+       lcms? ( || ( opengl egl ) )
        libguess? ( iconv )
        luajit? ( lua )
-       opengl? ( || ( wayland X ) )
+       opengl? ( X )
        pvr? ( v4l )
        uchardet? ( iconv )
        v4l? ( || ( alsa oss ) )
@@ -71,6 +72,7 @@ COMMON_DEPEND="
        iconv? ( virtual/libiconv )
        jack? ( media-sound/jack-audio-connection-kit )
        jpeg? ( virtual/jpeg:0 )
+       lcms? ( >=media-libs/lcms-2.6:2 )
        libass? (
                >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz]
                virtual/ttf-fonts
@@ -100,7 +102,6 @@ COMMON_DEPEND="
                        x11-libs/libXdamage
                        virtual/opengl
                )
-               lcms? ( >=media-libs/lcms-2.6:2 )
                vaapi? ( >=x11-libs/libva-1.2.0[X] )
                vdpau? ( >=x11-libs/libvdpau-0.2 )
                xinerama? ( x11-libs/libXinerama )
@@ -219,10 +220,9 @@ src_configure() {
                $(use_enable xv)
                $(use_enable xinerama)
                $(use_enable X xrandr)
-               $(usex X "$(use_enable opengl gl-x11)" '--disable-gl-x11')
-               $(use_enable egl egl-x11)
+               $(use_enable opengl gl-x11)
+               $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
                $(use_enable wayland gl-wayland)
-               $(use_enable opengl gl)
                $(use_enable vdpau)
                $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" 
'--disable-vdpau-gl-x11')
                $(use_enable vaapi)

Reply via email to