From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1031462-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id A2110138334
	for <garchives@archives.gentoo.org>; Wed, 20 Jun 2018 22:43:39 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id CDDACE0A9C;
	Wed, 20 Jun 2018 22:43:37 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 93DD2E0A9C
	for <gentoo-commits@lists.gentoo.org>; Wed, 20 Jun 2018 22:43:37 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 784C5335C97
	for <gentoo-commits@lists.gentoo.org>; Wed, 20 Jun 2018 22:43:36 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id C185F2E5
	for <gentoo-commits@lists.gentoo.org>; Wed, 20 Jun 2018 22:43:33 +0000 (UTC)
From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" <gyakovlev@gentoo.org>
Message-ID: <1529534474.7cbc5531a7cc4547e97727a25c270426e362c42c.gyakovlev@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-video/mpv/metadata.xml media-video/mpv/mpv-9999.ebuild
X-VCS-Directories: media-video/mpv/
X-VCS-Committer: gyakovlev
X-VCS-Committer-Name: Georgy Yakovlev
X-VCS-Revision: 7cbc5531a7cc4547e97727a25c270426e362c42c
X-VCS-Branch: master
Date: Wed, 20 Jun 2018 22:43:33 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 10f307da-4f40-494f-b6e2-d38d418576e5
X-Archives-Hash: e87d0e5edd2ff0ab01f3f8f66cb916e7

commit:     7cbc5531a7cc4547e97727a25c270426e362c42c
Author:     Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Sat Jun 16 19:29:52 2018 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Jun 20 22:41:14 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cbc5531

media-video/mpv: add vulkan support to 9999

Implementation details:
- mpv requires at least one enabled vulkan context (X or wayland),
  even though this isn't reflected by the build system. Hence the
  REQUIRED_USE. Without this you cannot enable vulkan backend.
- The appropriate context must be enabled in vulkan-loader.
- mpv technically allows vulkan without shaderc on NVIDIA cards,
  but support for this in NVIDIA drivers is deprecated and going
  away, see [1]. Thus always require shaderc.

[1]: https://github.com/mpv-player/mpv/issues/5867
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 media-video/mpv/metadata.xml    | 1 +
 media-video/mpv/mpv-9999.ebuild | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/media-video/mpv/metadata.xml b/media-video/mpv/metadata.xml
index df0200d2936..1eb1494cbbc 100644
--- a/media-video/mpv/metadata.xml
+++ b/media-video/mpv/metadata.xml
@@ -33,6 +33,7 @@
 			(Note: these outputs exist for compatibility reasons only, avoid if possible)</flag>
 		<flag name="tools">Install extra tools: mpv_identify.sh, mpv_idet.sh, and umpv</flag>
 		<flag name="uchardet">Enable subtitles charset discovery via <pkg>app-i18n/uchardet</pkg></flag>
+		<flag name="vulkan">Enable support for various Vulkan-based video backends</flag>
 	</use>
 	<upstream>
 		<remote-id type="github">mpv-player/mpv</remote-id>

diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
index 8601e37b4bd..f99a57b4a26 100644
--- a/media-video/mpv/mpv-9999.ebuild
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -31,7 +31,7 @@ SLOT="0"
 IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins cuda doc drm dvb
 	dvd +egl gbm +iconv jack javascript jpeg lcms +libass libav libcaca libmpv
 	+lua luajit openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl
-	selinux test tools +uchardet v4l vaapi vdpau wayland +X +xv zlib
+	selinux test tools +uchardet v4l vaapi vdpau vulkan wayland +X +xv zlib
 	zsh-completion"
 
 REQUIRED_USE="
@@ -50,6 +50,7 @@ REQUIRED_USE="
 	v4l? ( || ( alsa oss ) )
 	vaapi? ( || ( gbm X wayland ) )
 	vdpau? ( X )
+	vulkan? ( || ( X wayland ) )
 	wayland? ( egl )
 	X? ( egl? ( opengl ) )
 	xv? ( X )
@@ -96,6 +97,10 @@ COMMON_DEPEND="
 	v4l? ( media-libs/libv4l )
 	vaapi? ( x11-libs/libva:=[drm?,X?,wayland?] )
 	vdpau? ( x11-libs/libvdpau )
+	vulkan? (
+		media-libs/shaderc
+		media-libs/vulkan-loader[X?,wayland?]
+	)
 	wayland? (
 		>=dev-libs/wayland-1.6.0
 		>=dev-libs/wayland-protocols-1.14
@@ -231,10 +236,12 @@ src_configure() {
 		$(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
 		$(use_enable libcaca caca)
 		$(use_enable jpeg)
+		$(use_enable vulkan shaderc)
 		$(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')
+		$(use_enable vulkan)
 
 		# HWaccels:
 		# Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.