From 8097e78c84c3e5daa27296824d0e4206f214e1be Mon Sep 17 00:00:00 2001 From: "Karlson2k (Evgeny Grin)" Date: Fri, 8 Jan 2021 15:53:30 +0300 Subject: x11-libs/libva-intel-media-driver: 'set-as-default' USE flag Added USE flag "set-as-default" to enforce iHD as default libva driver Closes: https://bugs.gentoo.org/737284 Signed-off-by: Karlson2k (Evgeny Grin) Signed-off-by: Sam James --- .../libva-intel-media-driver-20.4.5.ebuild | 11 ++++++++++- .../libva-intel-media-driver-9999.ebuild | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'x11-libs/libva-intel-media-driver') diff --git a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild index 620d1556bd0e..5806c83688ef 100644 --- a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild +++ b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild @@ -22,7 +22,7 @@ HOMEPAGE="https://github.com/intel/media-driver" LICENSE="MIT BSD" SLOT="0" -IUSE="X" +IUSE="set-as-default X" PATCHES=( "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch ) @@ -43,3 +43,12 @@ src_configure() { cmake_src_configure } + +src_install() { + cmake_src_install + + if use set-as-default ; then + echo 'LIBVA_DRIVER_NAME="iHD"' > "${T}/55libva-intel-media-driver" || die + doenvd "${T}/55libva-intel-media-driver" + fi +} diff --git a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild index 620d1556bd0e..5806c83688ef 100644 --- a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild +++ b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild @@ -22,7 +22,7 @@ HOMEPAGE="https://github.com/intel/media-driver" LICENSE="MIT BSD" SLOT="0" -IUSE="X" +IUSE="set-as-default X" PATCHES=( "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch ) @@ -43,3 +43,12 @@ src_configure() { cmake_src_configure } + +src_install() { + cmake_src_install + + if use set-as-default ; then + echo 'LIBVA_DRIVER_NAME="iHD"' > "${T}/55libva-intel-media-driver" || die + doenvd "${T}/55libva-intel-media-driver" + fi +} -- cgit v1.2.3-65-gdbad