1 |
commit: cc60cfdd419b765696ec50b523bddb71d975e652 |
2 |
Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 8 23:30:30 2021 +0000 |
4 |
Commit: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 8 23:37:05 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc60cfdd |
7 |
|
8 |
x11-libs/libva-compat: use optfeatures instead of VIDEO_CARDS |
9 |
|
10 |
VIDEO_CARDS is ill suited for this because the situation with Intel GPUs |
11 |
is complicated. |
12 |
|
13 |
Discussed-with: Matt Turner <mattst88 <AT> gentoo.org> |
14 |
Discussed-with: Sam James <sam <AT> gentoo.org> |
15 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
16 |
Signed-off-by: Jason A. Donenfeld <zx2c4 <AT> gentoo.org> |
17 |
|
18 |
x11-libs/libva-compat/libva-compat-1.8.3-r2.ebuild | 67 ++++++++++++++++++++++ |
19 |
1 file changed, 67 insertions(+) |
20 |
|
21 |
diff --git a/x11-libs/libva-compat/libva-compat-1.8.3-r2.ebuild b/x11-libs/libva-compat/libva-compat-1.8.3-r2.ebuild |
22 |
new file mode 100644 |
23 |
index 00000000000..af57dbec426 |
24 |
--- /dev/null |
25 |
+++ b/x11-libs/libva-compat/libva-compat-1.8.3-r2.ebuild |
26 |
@@ -0,0 +1,67 @@ |
27 |
+# Copyright 1999-2021 Gentoo Authors |
28 |
+# Distributed under the terms of the GNU General Public License v2 |
29 |
+ |
30 |
+EAPI=7 |
31 |
+ |
32 |
+inherit autotools multilib-minimal optfeature |
33 |
+ |
34 |
+MY_PN="${PN%-compat}" |
35 |
+MY_P="${MY_PN}-${PV}" |
36 |
+ |
37 |
+DESCRIPTION="Video Acceleration (VA) API for Linux" |
38 |
+HOMEPAGE="https://01.org/linuxmedia/vaapi" |
39 |
+SRC_URI="https://github.com/01org/libva/archive/${PV}.tar.gz -> ${MY_P}.tar.gz" |
40 |
+ |
41 |
+LICENSE="MIT" |
42 |
+SLOT="1" |
43 |
+KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux" |
44 |
+IUSE="+drm egl opengl wayland X" |
45 |
+ |
46 |
+RDEPEND=">=x11-libs/libdrm-2.4.46[${MULTILIB_USEDEP}] |
47 |
+ X? ( |
48 |
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] |
49 |
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] |
50 |
+ >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] |
51 |
+ ) |
52 |
+ egl? ( >=media-libs/mesa-9.1.6[egl(+),${MULTILIB_USEDEP}] ) |
53 |
+ opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] ) |
54 |
+ wayland? ( >=dev-libs/wayland-1.0.6[${MULTILIB_USEDEP}] ) |
55 |
+ !x11-libs/libva:0/0" |
56 |
+ |
57 |
+DEPEND="${RDEPEND}" |
58 |
+BDEPEND="virtual/pkgconfig" |
59 |
+ |
60 |
+REQUIRED_USE="|| ( drm wayland X ) |
61 |
+ opengl? ( X )" |
62 |
+ |
63 |
+S="${WORKDIR}/${MY_P}" |
64 |
+DOCS=( NEWS ) |
65 |
+ |
66 |
+src_prepare() { |
67 |
+ default |
68 |
+ eautoreconf |
69 |
+} |
70 |
+ |
71 |
+multilib_src_configure() { |
72 |
+ local myeconfargs=( |
73 |
+ --with-drivers-path="${EPREFIX}/usr/$(get_libdir)/va/drivers" |
74 |
+ $(use_enable opengl glx) |
75 |
+ $(use_enable X x11) |
76 |
+ $(use_enable wayland) |
77 |
+ $(use_enable egl) |
78 |
+ $(use_enable drm) |
79 |
+ ) |
80 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
81 |
+} |
82 |
+ |
83 |
+multilib_src_install() { |
84 |
+ emake -C va DESTDIR="${D}" install-libLTLIBRARIES |
85 |
+ rm -vf "${ED}"/usr/$(get_libdir)/*.{la,so} || die |
86 |
+} |
87 |
+ |
88 |
+pkg_postinst() { |
89 |
+ optfeature_header |
90 |
+ optfeature "NVIDIA GPU support" x11-libs/libva-vdpau-driver |
91 |
+ optfeature "Older Intel GPU support" x11-libs/libva-intel-driver |
92 |
+ optfeature "Newer Intel GPU support" x11-libs/libva-intel-media-driver |
93 |
+} |