From c027a64c3b367ae99de609ea08f4df9b06275744 Mon Sep 17 00:00:00 2001
From: Ilya Tumaykin <itumaykin@gmail.com>
Date: Fri, 12 Feb 2016 12:36:03 +0300
Subject: media-video/mpv: add useful comment

Package-Manager: portage-2.2.27
---
 media-video/mpv/mpv-0.14.0-r1.ebuild | 1 +
 media-video/mpv/mpv-0.15.0-r1.ebuild | 1 +
 media-video/mpv/mpv-9999.ebuild      | 1 +
 3 files changed, 3 insertions(+)

diff --git a/media-video/mpv/mpv-0.14.0-r1.ebuild b/media-video/mpv/mpv-0.14.0-r1.ebuild
index df48b7c37994..40ccf88d0500 100644
--- a/media-video/mpv/mpv-0.14.0-r1.ebuild
+++ b/media-video/mpv/mpv-0.14.0-r1.ebuild
@@ -177,6 +177,7 @@ src_configure() {
 		$(usex cli '' '--disable-cplayer')
 		$(use_enable libmpv libmpv-shared)
 
+		# See deep down below for build-date
 		--disable-libmpv-static
 		--disable-static-build
 		--disable-optimize		# Do not add '-O2' to CFLAGS
diff --git a/media-video/mpv/mpv-0.15.0-r1.ebuild b/media-video/mpv/mpv-0.15.0-r1.ebuild
index 5de9fb609f72..d30f5e7c20eb 100644
--- a/media-video/mpv/mpv-0.15.0-r1.ebuild
+++ b/media-video/mpv/mpv-0.15.0-r1.ebuild
@@ -177,6 +177,7 @@ src_configure() {
 		$(usex cli '' '--disable-cplayer')
 		$(use_enable libmpv libmpv-shared)
 
+		# See deep down below for build-date
 		--disable-libmpv-static
 		--disable-static-build
 		--disable-optimize		# Do not add '-O2' to CFLAGS
diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
index a7eb17751cf9..cc6675bb31ae 100644
--- a/media-video/mpv/mpv-9999.ebuild
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -174,6 +174,7 @@ src_configure() {
 		$(usex cli '' '--disable-cplayer')
 		$(use_enable libmpv libmpv-shared)
 
+		# See deep down below for build-date
 		--disable-libmpv-static
 		--disable-static-build
 		--disable-optimize		# Do not add '-O2' to CFLAGS
-- 
cgit v1.2.3-65-gdbad


From 9d74b5240c025ae703f33817d1e3939d7847d653 Mon Sep 17 00:00:00 2001
From: Ilya Tumaykin <itumaykin@gmail.com>
Date: Fri, 12 Feb 2016 12:58:41 +0300
Subject: media-video/mpv: enable xv USE by default in 9999

Enable xv USE by default, since we enable X USE by default.
xv output is much better than x11 one.

Package-Manager: portage-2.2.27
---
 media-video/mpv/mpv-9999.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
index cc6675bb31ae..02ec44a96e3c 100644
--- a/media-video/mpv/mpv-9999.ebuild
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -33,7 +33,7 @@ IUSE="+alsa archive bluray cdda +cli doc drm dvb +dvd +egl +enca encode gbm
 	+iconv jack jpeg lcms +libass libav libcaca libguess libmpv lua luajit
 	openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl selinux
 	test uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama +xscreensaver
-	xv zsh-completion"
+	+xv zsh-completion"
 
 REQUIRED_USE="
 	|| ( cli libmpv )
-- 
cgit v1.2.3-65-gdbad


From 65e3818f6012af6672f7fa4e9dea54dec1fef3fb Mon Sep 17 00:00:00 2001
From: Ilya Tumaykin <itumaykin@gmail.com>
Date: Fri, 12 Feb 2016 13:11:22 +0300
Subject: media-video/mpv: untie opengl USE from X USE in 9999

opengl USE can now do something else, but enabling GLX.
opengl USE now also controls OpenGL support in libmpv.

Package-Manager: portage-2.2.27
---
 media-video/mpv/mpv-9999.ebuild | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
index 02ec44a96e3c..cfbfe7bd6642 100644
--- a/media-video/mpv/mpv-9999.ebuild
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -28,7 +28,6 @@ DOCS+=( README.md )
 # 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 gbm
 	+iconv jack jpeg lcms +libass libav libcaca libguess libmpv lua luajit
 	openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl selinux
@@ -43,7 +42,6 @@ REQUIRED_USE="
 	lcms? ( || ( opengl egl ) )
 	libguess? ( iconv )
 	luajit? ( lua )
-	opengl? ( X )
 	uchardet? ( iconv )
 	v4l? ( || ( alsa oss ) )
 	vaapi? ( || ( gbm X wayland ) )
@@ -89,6 +87,7 @@ COMMON_DEPEND="
 		luajit? ( dev-lang/luajit:2 )
 	)
 	openal? ( >=media-libs/openal-1.13 )
+	opengl? ( virtual/opengl )
 	pulseaudio? ( media-sound/pulseaudio )
 	rubberband? ( >=media-libs/rubberband-1.8.0 )
 	samba? ( net-fs/samba )
@@ -103,10 +102,7 @@ COMMON_DEPEND="
 		x11-libs/libX11
 		x11-libs/libXext
 		>=x11-libs/libXrandr-1.2.0
-		opengl? (
-			x11-libs/libXdamage
-			virtual/opengl
-		)
+		opengl? ( x11-libs/libXdamage )
 		vdpau? ( >=x11-libs/libvdpau-0.2 )
 		xinerama? ( x11-libs/libXinerama )
 		xscreensaver? ( x11-libs/libXScrnSaver )
@@ -230,20 +226,21 @@ src_configure() {
 		$(use_enable xv)
 		$(use_enable xinerama)
 		$(use_enable X xrandr)
-		$(use_enable opengl gl-x11)
+		$(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)
 		$(use_enable vdpau)
 		$(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
-		$(use_enable vaapi)		# See below for vaapi-x-egl
+		$(use_enable vaapi)		# See below for vaapi-glx, vaapi-x-egl
 		$(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
 		$(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
 		$(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
-		$(usex vaapi "$(use_enable opengl vaapi-glx)" '--disable-vaapi-glx')
 		$(use_enable libcaca caca)
 		$(use_enable jpeg)
+		--disable-android
 		$(use_enable raspberry-pi rpi)
+		$(use_enable opengl desktop-gl)
 
 		# HWaccels
 		$(use_enable vaapi vaapi-hwaccel)
@@ -257,10 +254,11 @@ src_configure() {
 		$(use_enable dvb dvbin)
 	)
 
-	if use vaapi && use X && use egl; then
-		mywafargs+=(--enable-vaapi-x-egl)
-	else
-		mywafargs+=(--disable-vaapi-x-egl)
+	if use vaapi && use X; then
+		mywafargs+=(
+			$(use_enable opengl vaapi-glx)
+			$(use_enable egl vaapi-x-egl)
+		)
 	fi
 
 	# Create reproducible non-live builds
-- 
cgit v1.2.3-65-gdbad