commit: c0f16e5f3d40f029d729b08140532e31acaffbf0
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Thu Apr 27 20:20:13 2017 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu May 4 16:27:48 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0f16e5f
media-video/mpv: map opengl USE to 'opengl' video output in 9999
Pros:
- mapping is clear for everyone w/o getting into technical details;
- wayland users are very happy by default.
Cons:
- you cannot build X11 backend with EGL, but without GLX.
Cons are very minor and ebuild complexity stays at about the same level,
but wayland users should be much happier with the default configuration.
Previous opengl USE behaviour is described in Gentoo commit 411d5bb4746.
As one can see it was somewhat unnecessarily complex.
Gentoo-Bug: 608858
Package-Manager: Portage-2.3.5, Repoman-2.3.2
media-video/mpv/metadata.xml | 1 +
media-video/mpv/mpv-9999.ebuild | 21 ++++++++++-----------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/media-video/mpv/metadata.xml b/media-video/mpv/metadata.xml
index 06d939fb5de..d0442905890 100644
--- a/media-video/mpv/metadata.xml
+++ b/media-video/mpv/metadata.xml
@@ -29,6 +29,7 @@
<flag name="libmpv">Build mpv shared library</flag>
<flag name="lua">Enable Lua scripting, OSC (On Screen
Controller) GUI and <pkg>net-misc/youtube-dl</pkg> hook-script</flag>
<flag name="luajit">Use <pkg>dev-lang/luajit</pkg> instead of
<pkg>dev-lang/lua</pkg></flag>
+ <flag name="opengl"
restrict=">=media-video/mpv-0.25.0">Enable the recommended 'opengl' video
output</flag>
<flag name="raspberry-pi">Enable support for the Raspberry
Pi</flag>
<flag name="rubberband">Enable high quality pitch correction
via <pkg>media-libs/rubberband</pkg></flag>
<flag name="sdl">Enable <pkg>media-libs/libsdl2</pkg> based
video and audio outputs
diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
index d49580361cb..6db8024521a 100644
--- a/media-video/mpv/mpv-9999.ebuild
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -37,19 +37,21 @@ IUSE+=" cpu_flags_x86_sse4_1"
REQUIRED_USE="
|| ( cli libmpv )
aqua? ( opengl )
- cuda? ( !libav || ( opengl egl ) )
+ cuda? ( !libav opengl )
egl? ( || ( gbm X wayland ) )
- gbm? ( drm egl )
- lcms? ( || ( opengl egl ) )
+ gbm? ( drm egl opengl )
+ lcms? ( opengl )
luajit? ( lua )
- opengl? ( || ( aqua X !cli? ( libmpv ) ) )
- test? ( || ( opengl egl ) )
+ opengl? ( || ( aqua egl X raspberry-pi !cli? ( libmpv ) ) )
+ raspberry-pi? ( opengl )
+ test? ( opengl )
tools? ( cli )
uchardet? ( iconv )
v4l? ( || ( alsa oss ) )
vaapi? ( || ( gbm X wayland ) )
vdpau? ( X )
wayland? ( egl )
+ X? ( egl? ( opengl ) )
xv? ( X )
zsh-completion? ( cli )
${PYTHON_REQUIRED_USE}
@@ -139,7 +141,7 @@ mpv_check_compiler() {
( $(gcc-major-version) -eq 4 &&
$(gcc-minor-version) -lt 5 ) ]]; then
die "${PN} requires GCC>=4.5."
fi
- if ( use opengl || use egl ) && ! tc-has-tls; then
+ if use opengl && ! tc-has-tls; then
die "Your compiler lacks C++11 TLS support. Use
GCC>=4.8 or Clang>=3.3."
fi
if ! tc-is-gcc && use vaapi && use cpu_flags_x86_sse4_1 && \
@@ -238,7 +240,7 @@ src_configure() {
$(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
$(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
$(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
- $(use_enable wayland gl-wayland)
+ $(usex opengl "$(use_enable wayland gl-wayland)"
'--disable-gl-wayland')
$(use_enable vdpau)
$(usex vdpau "$(use_enable opengl vdpau-gl-x11)"
'--disable-vdpau-gl-x11')
$(use_enable vaapi) # See below for vaapi-glx,
vaapi-x-egl.
@@ -251,6 +253,7 @@ src_configure() {
$(use_enable raspberry-pi rpi)
$(usex libmpv "$(use_enable opengl plain-gl)"
'--disable-plain-gl')
--disable-mali-fbdev # Only available in overlays.
+ $(usex opengl '' '--disable-gl')
# HWaccels:
# Automagic Video Toolbox HW acceleration. See Gentoo bug
577332.
@@ -276,10 +279,6 @@ src_configure() {
)
fi
- if ! use egl && ! use opengl && ! use raspberry-pi; then
- mywafargs+=(--disable-gl)
- fi
-
# Create reproducible non-live builds.
[[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)