public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-libs/libva-intel-media-driver/files/, x11-libs/libva-intel-media-driver/
Date: Mon,  4 Jan 2021 16:59:54 +0000 (UTC)	[thread overview]
Message-ID: <1609779050.77bf88d00121d5d23f550d91b168a0cbc917ec79.sam@gentoo> (raw)

commit:     77bf88d00121d5d23f550d91b168a0cbc917ec79
Author:     Karlson2k (Evgeny Grin) <k2k <AT> narod <DOT> ru>
AuthorDate: Sun Jan  3 19:04:46 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan  4 16:50:50 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77bf88d0

x11-libs/libva-intel-media-driver: added X USE flag

This patch fixes ambiguous usage of X11 in the package.
Before this patch the package tries to autodetect presence
of X11 in the system and tries to use it if found. However,
presence of X11 headers doesn't grantee that required
packages (libva) were installed with X11 support.
Now result of build depends on USE flags instead of
presence/absence of X11 headers on the build system.

Closes: https://bugs.gentoo.org/743625

Signed-off-by: Karlson2k (Evgeny Grin) <k2k <AT> narod.ru>
Closes: https://github.com/gentoo/gentoo/pull/18933
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...va-intel-media-driver-20.2.0_x11_optional.patch | 16 ++++++++
 .../libva-intel-media-driver-20.1.1-r1.ebuild      | 43 +++++++++++++++++++++
 .../libva-intel-media-driver-20.2.0-r1.ebuild      | 45 ++++++++++++++++++++++
 3 files changed, 104 insertions(+)

diff --git a/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.2.0_x11_optional.patch b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.2.0_x11_optional.patch
new file mode 100644
index 00000000000..81c80d80f90
--- /dev/null
+++ b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.2.0_x11_optional.patch
@@ -0,0 +1,16 @@
+--- a/media_driver/media_top_cmake.cmake
++++ b/media_driver/media_top_cmake.cmake
+@@ -21,7 +21,12 @@
+ project( media )
+ 
+ find_package(PkgConfig)
++if(NOT DEFINED USE_X11 OR USE_X11)
+ find_package(X11)
++endif(NOT DEFINED USE_X11 OR USE_X11)
++if(USE_X11 AND NOT X11_FOUND)
++    message(FATAL_ERROR "Usage of X11 is required by USE_X11 variable, but X11 package is not found")
++endif(USE_X11 AND NOT X11_FOUND)
+ 
+ bs_set_if_undefined(LIB_NAME iHD_drv_video)
+ 
+

diff --git a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.1.1-r1.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.1.1-r1.ebuild
new file mode 100644
index 00000000000..51a01699873
--- /dev/null
+++ b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.1.1-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+if [[ ${PV} == *9999 ]] ; then
+	: ${EGIT_REPO_URI:="https://github.com/intel/media-driver"}
+	if [[ ${PV%9999} != "" ]] ; then
+		: ${EGIT_BRANCH:="release/${PV%.9999}"}
+	fi
+	inherit git-r3
+else
+	SRC_URI="https://github.com/intel/media-driver/archive/intel-media-${PV}.tar.gz"
+	S="${WORKDIR}/media-driver-intel-media-${PV}"
+	KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Intel Media Driver for VAAPI (iHD)"
+HOMEPAGE="https://github.com/intel/media-driver"
+
+LICENSE="MIT BSD"
+SLOT="0"
+IUSE="X"
+
+PATCHES=( "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch )
+
+DEPEND=">=media-libs/gmmlib-${PV}
+	>=x11-libs/libva-2.7.1[X?]
+	>=x11-libs/libpciaccess-0.13.1-r1:=
+"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+	local mycmakeargs=(
+		-DMEDIA_BUILD_FATAL_WARNINGS=OFF
+		-DMEDIA_RUN_TEST_SUITE=OFF
+		-DUSE_X11=$(usex X)
+	)
+
+	cmake-utils_src_configure
+}

diff --git a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.2.0-r1.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.2.0-r1.ebuild
new file mode 100644
index 00000000000..b05c1a2f948
--- /dev/null
+++ b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.2.0-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+if [[ ${PV} == *9999 ]] ; then
+	: ${EGIT_REPO_URI:="https://github.com/intel/media-driver"}
+	if [[ ${PV%9999} != "" ]] ; then
+		: ${EGIT_BRANCH:="release/${PV%.9999}"}
+	fi
+	inherit git-r3
+else
+	SRC_URI="https://github.com/intel/media-driver/archive/intel-media-${PV}.tar.gz"
+	S="${WORKDIR}/media-driver-intel-media-${PV}"
+	KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Intel Media Driver for VAAPI (iHD)"
+HOMEPAGE="https://github.com/intel/media-driver"
+
+LICENSE="MIT BSD"
+SLOT="0"
+IUSE="X"
+
+PATCHES=( "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch )
+
+DEPEND=">=media-libs/gmmlib-20.2.2
+	>=x11-libs/libva-2.8.0[X?]
+	>=x11-libs/libpciaccess-0.13.1-r1:=
+"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+	local mycmakeargs=(
+		-DMEDIA_BUILD_FATAL_WARNINGS=OFF
+		-DMEDIA_RUN_TEST_SUITE=OFF
+		-DBUILD_TYPE=release
+		-DPLATFORM=linux
+		-DUSE_X11=$(usex X)
+	)
+
+	cmake-utils_src_configure
+}


             reply	other threads:[~2021-01-04 17:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 16:59 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-11 20:13 [gentoo-commits] repo/gentoo:master commit in: x11-libs/libva-intel-media-driver/files/, x11-libs/libva-intel-media-driver/ Sam James
2021-01-11 20:13 Sam James
2021-03-26 15:55 Sam James
2021-12-02 18:01 Matt Turner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1609779050.77bf88d00121d5d23f550d91b168a0cbc917ec79.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox