1 |
commit: 411d5bb4746fbb22e332748d0a48c77c47f0669e |
2 |
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Dec 22 19:08:23 2015 +0000 |
4 |
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 28 12:47:19 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=411d5bb4 |
7 |
|
8 |
media-video/mpv: use more sane logic for opengl and egl USE flags |
9 |
|
10 |
Currently 'opengl' USE stands for 'anything that draws using OpenGL |
11 |
API', and 'egl' USE stands for 'EGL for X11'. Notice these are not |
12 |
complementary. |
13 |
|
14 |
Thus, for example, on Wayland one should use 'mpv[wayland,opengl,-egl]', |
15 |
which is a bit counterintuitive, since Wayland (compositor) uses EGL |
16 |
only. Also one cannot disable GLX support, but leave EGL on X11, because |
17 |
of USE flags interdependencies. |
18 |
|
19 |
Both X11 and Wayland use OpenGL API to do drawing, but historically the |
20 |
first one was native OpenGL in X11 aka GLX and later came EGL in X11 and |
21 |
Wayland. However, now there is a tendency to prefer EGL to not bind |
22 |
oneself to X11. |
23 |
|
24 |
There is no global 'egl' USE atm, but the logic of local 'egl' USEs |
25 |
across the tree is 'not bind oneself to GLX'. On Linux there is no need |
26 |
to repeat that drawing is done using OpenGL API even when EGL comes to |
27 |
play. |
28 |
|
29 |
Taking all of the above into account more sane and expected meaning |
30 |
should be given to 'opengl' and 'egl' USE flags. |
31 |
|
32 |
After this change 'opengl' USE stands for 'OpenGL in X11 aka GLX' and |
33 |
'egl' USE stands for 'any EGL-based output'. Notice these are now |
34 |
complementary. |
35 |
|
36 |
Package-Manager: portage-2.2.24 |
37 |
|
38 |
media-video/mpv/metadata.xml | 2 +- |
39 |
media-video/mpv/mpv-9999.ebuild | 14 +++++++------- |
40 |
2 files changed, 8 insertions(+), 8 deletions(-) |
41 |
|
42 |
diff --git a/media-video/mpv/metadata.xml b/media-video/mpv/metadata.xml |
43 |
index b8c9d8b..949632e 100644 |
44 |
--- a/media-video/mpv/metadata.xml |
45 |
+++ b/media-video/mpv/metadata.xml |
46 |
@@ -26,7 +26,7 @@ |
47 |
<flag name="cdio">Enable CDDA support via <pkg>dev-libs/libcdio-paranoia</pkg></flag> |
48 |
<flag name="doc-pdf">Build documentation in pdf format</flag> |
49 |
<flag name="drm">Enable Kernel Mode Setting / Direct Rendering Manager based video output</flag> |
50 |
- <flag name="egl">Enable EGL backend for X11 OpenGL video output (experimental)</flag> |
51 |
+ <flag name="egl">Enable support for various EGL-based video outputs</flag> |
52 |
<flag name="enca">Enable subtitles charset discovery via <pkg>app-i18n/enca</pkg></flag> |
53 |
<flag name="jpeg">Enable support for saving screenshots in JPEG format</flag> |
54 |
<flag name="libguess">Enable subtitles charset discovery via <pkg>app-i18n/libguess</pkg></flag> |
55 |
|
56 |
diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild |
57 |
index 2a70556..980877c 100644 |
58 |
--- a/media-video/mpv/mpv-9999.ebuild |
59 |
+++ b/media-video/mpv/mpv-9999.ebuild |
60 |
@@ -28,6 +28,7 @@ DOCS+=( README.md etc/example.conf etc/input.conf ) |
61 |
# See Copyright in source tarball and bug #506946. Waf is BSD, libmpv is ISC. |
62 |
LICENSE="GPL-2+ BSD ISC" |
63 |
SLOT="0" |
64 |
+# Here 'opengl' stands for GLX, 'egl' stands for any EGL-based output |
65 |
IUSE="+alsa archive bluray cdda +cli doc drm dvb +dvd egl +enca encode +iconv |
66 |
jack jpeg lcms +libass libav libcaca libguess libmpv lua luajit openal +opengl |
67 |
oss pulseaudio pvr raspberry-pi rubberband samba sdl selinux test uchardet v4l |
68 |
@@ -35,12 +36,12 @@ vaapi vdpau vf-dlopen wayland +X xinerama +xscreensaver xv" |
69 |
|
70 |
REQUIRED_USE=" |
71 |
|| ( cli libmpv ) |
72 |
- egl? ( opengl X ) |
73 |
+ egl? ( || ( X wayland ) ) |
74 |
enca? ( iconv ) |
75 |
- lcms? ( opengl ) |
76 |
+ lcms? ( || ( opengl egl ) ) |
77 |
libguess? ( iconv ) |
78 |
luajit? ( lua ) |
79 |
- opengl? ( || ( wayland X ) ) |
80 |
+ opengl? ( X ) |
81 |
pvr? ( v4l ) |
82 |
uchardet? ( iconv ) |
83 |
v4l? ( || ( alsa oss ) ) |
84 |
@@ -71,6 +72,7 @@ COMMON_DEPEND=" |
85 |
iconv? ( virtual/libiconv ) |
86 |
jack? ( media-sound/jack-audio-connection-kit ) |
87 |
jpeg? ( virtual/jpeg:0 ) |
88 |
+ lcms? ( >=media-libs/lcms-2.6:2 ) |
89 |
libass? ( |
90 |
>=media-libs/libass-0.12.1:=[fontconfig,harfbuzz] |
91 |
virtual/ttf-fonts |
92 |
@@ -100,7 +102,6 @@ COMMON_DEPEND=" |
93 |
x11-libs/libXdamage |
94 |
virtual/opengl |
95 |
) |
96 |
- lcms? ( >=media-libs/lcms-2.6:2 ) |
97 |
vaapi? ( >=x11-libs/libva-1.2.0[X] ) |
98 |
vdpau? ( >=x11-libs/libvdpau-0.2 ) |
99 |
xinerama? ( x11-libs/libXinerama ) |
100 |
@@ -219,10 +220,9 @@ src_configure() { |
101 |
$(use_enable xv) |
102 |
$(use_enable xinerama) |
103 |
$(use_enable X xrandr) |
104 |
- $(usex X "$(use_enable opengl gl-x11)" '--disable-gl-x11') |
105 |
- $(use_enable egl egl-x11) |
106 |
+ $(use_enable opengl gl-x11) |
107 |
+ $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11') |
108 |
$(use_enable wayland gl-wayland) |
109 |
- $(use_enable opengl gl) |
110 |
$(use_enable vdpau) |
111 |
$(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11') |
112 |
$(use_enable vaapi) |