summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Tumaykin <itumaykin@gmail.com>2017-04-27 23:20:13 +0300
committerDavid Seifert <soap@gentoo.org>2017-05-04 18:27:48 +0200
commitc0f16e5f3d40f029d729b08140532e31acaffbf0 (patch)
tree27dc7ee2425806a94f6a32a09df32520c08e0a4a /media-video/mpv
parentmedia-video/mpv: adjust opengl dependency in 9999 (diff)
downloadgentoo-c0f16e5f3d40f029d729b08140532e31acaffbf0.tar.gz
gentoo-c0f16e5f3d40f029d729b08140532e31acaffbf0.tar.bz2
gentoo-c0f16e5f3d40f029d729b08140532e31acaffbf0.zip
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
Diffstat (limited to 'media-video/mpv')
-rw-r--r--media-video/mpv/metadata.xml1
-rw-r--r--media-video/mpv/mpv-9999.ebuild21
2 files changed, 11 insertions, 11 deletions
diff --git a/media-video/mpv/metadata.xml b/media-video/mpv/metadata.xml
index 06d939fb5de3..d04429058905 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="&gt;=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 d49580361cbd..6db8024521a4 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)