Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/
Date: Thu, 14 Mar 2019 00:31:49
Message-Id: 1552523479.0c9990ec8fd2c8e6094bfca8d6b3f11c921cc77f.mattst88@gentoo
1 commit: 0c9990ec8fd2c8e6094bfca8d6b3f11c921cc77f
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 14 00:28:10 2019 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 14 00:31:19 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c9990ec
7
8 media-libs/mesa: Version bump to 19.0.0
9
10 Also succumb to pressure and allow llvm-8.
11
12 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
13
14 media-libs/mesa/Manifest | 1 +
15 media-libs/mesa/mesa-19.0.0.ebuild | 525 +++++++++++++++++++++++++++++++++++++
16 2 files changed, 526 insertions(+)
17
18 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
19 index 78596b1d395..ce8ae348b0f 100644
20 --- a/media-libs/mesa/Manifest
21 +++ b/media-libs/mesa/Manifest
22 @@ -9,3 +9,4 @@ DIST mesa-19.0.0-rc4.tar.xz 11928252 BLAKE2B 8cf4c2671e3de11e4ed65f0a451dae78bb4
23 DIST mesa-19.0.0-rc5.tar.xz 11927936 BLAKE2B 9fe64733df91f1788b6fba7ab64637f332854671bc0b5c647c962e12985c993eb185b95bdbe4baa98ca408c3d68818c925a653b5b12d5e02ca64812d80c05133 SHA512 f73bafa6d63576720a0aa6254b6fc97ba4e6e1ecf8b62bc62dd83967d5624fc83caed150707f1e5bfda87aff0bc3ebcd4872f8020ba5c23d3f6b42ab4523a91f
24 DIST mesa-19.0.0-rc6.tar.xz 11928968 BLAKE2B c077973c07485fd8ebf42f1da6f8b8d7d2417dd1051bf1488c5244793e0ad32b01ab73e9f65d9dc61fb9d16716ad4be94c62ac73e521c11cf2ab35daaef8c5bf SHA512 88b3b6877acee4ede515dc986a1ca84a341f59b7283318848ea8eb5fd2892ed37d9ad960baf3f92ea10042d51b4e5e101b9f781af0669e0192503e8a79fc2b5f
25 DIST mesa-19.0.0-rc7.tar.xz 11929088 BLAKE2B e0695b3d82612c53986857190eff7749afee23af42a4e3daef08888b6910e7f00cc16007f86c51d6fa952a0fa66f89268498223cb157455ba6b2e0524eb2fc1c SHA512 f86d13ffef4c567614ffe74220139cad319b4cfec06005b97eb1487b146bd7fc16521ba71136f16503c96eb9bf95e1dcb6a3f50214d1f4529887415f1abddfdf
26 +DIST mesa-19.0.0.tar.xz 11959360 BLAKE2B e58144bb22f296175d7feb59d2c7940ca795dd417b0b014735d8842a29292cf07a6197184942febfdc85ad062267a55059e0ebd1532a886610dabf888cc68b8f SHA512 5759b85275bcd145513cf14a9ef7505595766fb33b82c53738f74ede462e5850580d48ab4af326b41209e7f4b05aab75539f2bfebf67c3098a4680ea95c37591
27
28 diff --git a/media-libs/mesa/mesa-19.0.0.ebuild b/media-libs/mesa/mesa-19.0.0.ebuild
29 new file mode 100644
30 index 00000000000..34b85000781
31 --- /dev/null
32 +++ b/media-libs/mesa/mesa-19.0.0.ebuild
33 @@ -0,0 +1,525 @@
34 +# Copyright 1999-2019 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +PYTHON_COMPAT=( python3_4 python3_5 python3_6 python3_7 )
40 +
41 +inherit llvm meson multilib-minimal pax-utils python-any-r1
42 +
43 +OPENGL_DIR="xorg-x11"
44 +
45 +MY_P="${P/_/-}"
46 +
47 +DESCRIPTION="OpenGL-like graphic library for Linux"
48 +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
49 +
50 +if [[ ${PV} == 9999 ]]; then
51 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
52 + EXPERIMENTAL="true"
53 + inherit git-r3
54 +else
55 + SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
56 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
57 +fi
58 +
59 +LICENSE="MIT"
60 +SLOT="0"
61 +RESTRICT="
62 + !test? ( test )
63 +"
64 +
65 +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
66 +VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
67 +for card in ${VIDEO_CARDS}; do
68 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
69 +done
70 +
71 +IUSE="${IUSE_VIDEO_CARDS}
72 + +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +libglvnd +llvm
73 + lm_sensors opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind
74 + vdpau vulkan wayland xa xvmc"
75 +
76 +REQUIRED_USE="
77 + d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
78 + gles1? ( egl )
79 + gles2? ( egl )
80 + vulkan? ( dri3
81 + || ( video_cards_i965 video_cards_radeonsi )
82 + video_cards_radeonsi? ( llvm ) )
83 + wayland? ( egl gbm )
84 + video_cards_freedreno? ( gallium )
85 + video_cards_intel? ( classic )
86 + video_cards_i915? ( || ( classic gallium ) )
87 + video_cards_i965? ( classic )
88 + video_cards_imx? ( gallium video_cards_vivante )
89 + video_cards_nouveau? ( || ( classic gallium ) )
90 + video_cards_radeon? ( || ( classic gallium )
91 + gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
92 + video_cards_r100? ( classic )
93 + video_cards_r200? ( classic )
94 + video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
95 + video_cards_r600? ( gallium )
96 + video_cards_radeonsi? ( gallium llvm )
97 + video_cards_vc4? ( gallium )
98 + video_cards_virgl? ( gallium )
99 + video_cards_vivante? ( gallium gbm )
100 + video_cards_vmware? ( gallium )
101 +"
102 +
103 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.97"
104 +RDEPEND="
105 + !app-eselect/eselect-mesa
106 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
107 + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
108 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
109 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
110 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
111 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
112 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
113 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
114 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
115 + libglvnd? (
116 + media-libs/libglvnd
117 + !app-eselect/eselect-opengl
118 + )
119 + !libglvnd? (
120 + >=app-eselect/eselect-opengl-1.3.0
121 + )
122 + gallium? (
123 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
124 + llvm? (
125 + video_cards_radeonsi? (
126 + virtual/libelf:0=[${MULTILIB_USEDEP}]
127 + )
128 + video_cards_r600? (
129 + virtual/libelf:0=[${MULTILIB_USEDEP}]
130 + )
131 + video_cards_radeon? (
132 + virtual/libelf:0=[${MULTILIB_USEDEP}]
133 + )
134 + )
135 + lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
136 + opencl? (
137 + dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
138 + dev-libs/libclc
139 + virtual/libelf:0=[${MULTILIB_USEDEP}]
140 + )
141 + vaapi? (
142 + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
143 + video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
144 + )
145 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
146 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
147 + )
148 + wayland? (
149 + >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
150 + >=dev-libs/wayland-protocols-1.8
151 + )
152 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
153 +
154 + video_cards_intel? (
155 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
156 + )
157 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
158 +"
159 +for card in ${RADEON_CARDS}; do
160 + RDEPEND="${RDEPEND}
161 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
162 + "
163 +done
164 +RDEPEND="${RDEPEND}
165 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
166 +"
167 +
168 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
169 +# we need to *really* make sure we're not pulling one than more slot
170 +# simultaneously.
171 +#
172 +# How to use it:
173 +# 1. List all the working slots (with min versions) in ||, newest first.
174 +# 2. Update the := to specify *max* version, e.g. < 7.
175 +# 3. Specify LLVM_MAX_SLOT, e.g. 6.
176 +LLVM_MAX_SLOT="8"
177 +LLVM_DEPSTR="
178 + || (
179 + sys-devel/llvm:8[${MULTILIB_USEDEP}]
180 + sys-devel/llvm:7[${MULTILIB_USEDEP}]
181 + )
182 + sys-devel/llvm:=[${MULTILIB_USEDEP}]
183 +"
184 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
185 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
186 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
187 +RDEPEND="${RDEPEND}
188 + llvm? (
189 + opencl? (
190 + video_cards_r600? (
191 + ${CLANG_DEPSTR_AMDGPU}
192 + )
193 + !video_cards_r600? (
194 + video_cards_radeonsi? (
195 + ${CLANG_DEPSTR_AMDGPU}
196 + )
197 + )
198 + !video_cards_r600? (
199 + !video_cards_radeonsi? (
200 + video_cards_radeon? (
201 + ${CLANG_DEPSTR_AMDGPU}
202 + )
203 + )
204 + )
205 + !video_cards_r600? (
206 + !video_cards_radeon? (
207 + !video_cards_radeonsi? (
208 + ${CLANG_DEPSTR}
209 + )
210 + )
211 + )
212 + )
213 + !opencl? (
214 + video_cards_r600? (
215 + ${LLVM_DEPSTR_AMDGPU}
216 + )
217 + !video_cards_r600? (
218 + video_cards_radeonsi? (
219 + ${LLVM_DEPSTR_AMDGPU}
220 + )
221 + )
222 + !video_cards_r600? (
223 + !video_cards_radeonsi? (
224 + video_cards_radeon? (
225 + ${LLVM_DEPSTR_AMDGPU}
226 + )
227 + )
228 + )
229 + !video_cards_r600? (
230 + !video_cards_radeon? (
231 + !video_cards_radeonsi? (
232 + ${LLVM_DEPSTR}
233 + )
234 + )
235 + )
236 + )
237 + )
238 +"
239 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
240 +
241 +DEPEND="${RDEPEND}
242 + ${PYTHON_DEPS}
243 + opencl? (
244 + >=sys-devel/gcc-4.6
245 + )
246 + sys-devel/bison
247 + sys-devel/flex
248 + sys-devel/gettext
249 + virtual/pkgconfig
250 + valgrind? ( dev-util/valgrind )
251 + x11-base/xorg-proto
252 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
253 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
254 +"
255 +
256 +S="${WORKDIR}/${MY_P}"
257 +EGIT_CHECKOUT_DIR=${S}
258 +
259 +QA_WX_LOAD="
260 +x86? (
261 + !pic? (
262 + usr/lib*/libglapi.so.0.0.0
263 + usr/lib*/libGLESv1_CM.so.1.0.0
264 + usr/lib*/libGLESv2.so.2.0.0
265 + usr/lib*/libGL.so.1.2.0
266 + usr/lib*/libOSMesa.so.8.0.0
267 + )
268 +)"
269 +
270 +llvm_check_deps() {
271 + local flags=${MULTILIB_USEDEP}
272 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
273 + then
274 + flags+=",llvm_targets_AMDGPU(-)"
275 + fi
276 +
277 + if use opencl; then
278 + has_version "sys-devel/clang[${flags}]" || return 1
279 + fi
280 + has_version "sys-devel/llvm[${flags}]"
281 +}
282 +
283 +pkg_pretend() {
284 + if use opencl; then
285 + if ! use video_cards_r600 &&
286 + ! use video_cards_radeonsi; then
287 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
288 + fi
289 + fi
290 +
291 + if use vaapi; then
292 + if ! use video_cards_r600 &&
293 + ! use video_cards_radeonsi &&
294 + ! use video_cards_nouveau; then
295 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
296 + fi
297 + fi
298 +
299 + if use vdpau; then
300 + if ! use video_cards_r300 &&
301 + ! use video_cards_r600 &&
302 + ! use video_cards_radeonsi &&
303 + ! use video_cards_nouveau; then
304 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
305 + fi
306 + fi
307 +
308 + if use xa; then
309 + if ! use video_cards_freedreno &&
310 + ! use video_cards_nouveau &&
311 + ! use video_cards_vmware; then
312 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
313 + fi
314 + fi
315 +
316 + if use xvmc; then
317 + if ! use video_cards_r600 &&
318 + ! use video_cards_nouveau; then
319 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
320 + fi
321 + fi
322 +
323 + if ! use gallium; then
324 + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
325 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
326 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
327 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
328 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
329 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
330 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
331 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
332 + fi
333 +
334 + if ! use llvm; then
335 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
336 + fi
337 +}
338 +
339 +python_check_deps() {
340 + has_version ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
341 +}
342 +
343 +pkg_setup() {
344 + # warning message for bug 459306
345 + if use llvm && has_version sys-devel/llvm[!debug=]; then
346 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
347 + ewarn "detected! This can cause problems. For details, see bug 459306."
348 + fi
349 +
350 + if use llvm; then
351 + llvm_pkg_setup
352 + fi
353 + python-any-r1_pkg_setup
354 +}
355 +
356 +multilib_src_configure() {
357 + local emesonargs=()
358 +
359 + if use classic; then
360 + # Intel code
361 + dri_driver_enable video_cards_i915 i915
362 + dri_driver_enable video_cards_i965 i965
363 + if ! use video_cards_i915 && \
364 + ! use video_cards_i965; then
365 + dri_driver_enable video_cards_intel i915 i965
366 + fi
367 +
368 + # Nouveau code
369 + dri_driver_enable video_cards_nouveau nouveau
370 +
371 + # ATI code
372 + dri_driver_enable video_cards_r100 r100
373 + dri_driver_enable video_cards_r200 r200
374 + if ! use video_cards_r100 && \
375 + ! use video_cards_r200; then
376 + dri_driver_enable video_cards_radeon r100 r200
377 + fi
378 + fi
379 +
380 + emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
381 +
382 + if use gallium; then
383 + emesonargs+=(
384 + $(meson_use llvm)
385 + $(meson_use lm_sensors lmsensors)
386 + $(meson_use unwind libunwind)
387 + )
388 +
389 + if use video_cards_r300 ||
390 + use video_cards_r600 ||
391 + use video_cards_radeonsi ||
392 + use video_cards_nouveau ||
393 + use video_cards_vmware; then
394 + emesonargs+=($(meson_use d3d9 gallium-nine))
395 + else
396 + emesonargs+=(-Dgallium-nine=false)
397 + fi
398 +
399 + if use video_cards_r600 ||
400 + use video_cards_radeonsi ||
401 + use video_cards_nouveau; then
402 + emesonargs+=($(meson_use vaapi gallium-va))
403 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
404 + else
405 + emesonargs+=(-Dgallium-va=false)
406 + fi
407 +
408 + if use video_cards_r300 ||
409 + use video_cards_r600 ||
410 + use video_cards_radeonsi ||
411 + use video_cards_nouveau; then
412 + emesonargs+=($(meson_use vdpau gallium-vdpau))
413 + else
414 + emesonargs+=(-Dgallium-vdpau=false)
415 + fi
416 +
417 + if use video_cards_freedreno ||
418 + use video_cards_nouveau ||
419 + use video_cards_vmware; then
420 + emesonargs+=($(meson_use xa gallium-xa))
421 + else
422 + emesonargs+=(-Dgallium-xa=false)
423 + fi
424 +
425 + if use video_cards_r600 ||
426 + use video_cards_nouveau; then
427 + emesonargs+=($(meson_use xvmc gallium-xvmc))
428 + else
429 + emesonargs+=(-Dgallium-xvmc=false)
430 + fi
431 +
432 + gallium_enable video_cards_vc4 vc4
433 + gallium_enable video_cards_vivante etnaviv
434 + gallium_enable video_cards_vmware svga
435 + gallium_enable video_cards_nouveau nouveau
436 + gallium_enable video_cards_imx imx
437 +
438 + # Only one i915 driver (classic vs gallium). Default to classic.
439 + if ! use classic; then
440 + gallium_enable video_cards_i915 i915
441 + if ! use video_cards_i915 && \
442 + ! use video_cards_i965; then
443 + gallium_enable video_cards_intel i915
444 + fi
445 + fi
446 +
447 + gallium_enable video_cards_r300 r300
448 + gallium_enable video_cards_r600 r600
449 + gallium_enable video_cards_radeonsi radeonsi
450 + if ! use video_cards_r300 && \
451 + ! use video_cards_r600; then
452 + gallium_enable video_cards_radeon r300 r600
453 + fi
454 +
455 + gallium_enable video_cards_freedreno freedreno
456 + gallium_enable video_cards_virgl virgl
457 +
458 + # opencl stuff
459 + emesonargs+=(
460 + -Dgallium-opencl="$(usex opencl icd disabled)"
461 + )
462 + fi
463 +
464 + if use vulkan; then
465 + vulkan_enable video_cards_i965 intel
466 + vulkan_enable video_cards_radeonsi amd
467 + fi
468 +
469 + # x86 hardened pax_kernel needs glx-rts, bug 240956
470 + if [[ ${ABI} == x86 ]]; then
471 + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
472 + fi
473 +
474 + # on abi_x86_32 hardened we need to have asm disable
475 + if [[ ${ABI} == x86* ]] && use pic; then
476 + emesonargs+=( -Dasm=false )
477 + fi
478 +
479 + if use gallium; then
480 + gallium_enable -- swrast
481 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
482 + else
483 + dri_driver_enable -- swrast
484 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
485 + fi
486 +
487 + driver_list() {
488 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
489 + echo "${drivers//$'\n'/,}"
490 + }
491 +
492 + emesonargs+=(
493 + $(meson_use test build-tests)
494 + -Dglx=dri
495 + -Dshared-glapi=true
496 + $(meson_use dri3)
497 + $(meson_use egl)
498 + $(meson_use gbm)
499 + $(meson_use gles1)
500 + $(meson_use gles2)
501 + $(meson_use libglvnd glvnd)
502 + $(meson_use selinux)
503 + -Dvalgrind=$(usex valgrind auto false)
504 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
505 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
506 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
507 + --buildtype $(usex debug debug plain)
508 + -Db_ndebug=$(usex debug false true)
509 + )
510 + meson_src_configure
511 +}
512 +
513 +multilib_src_compile() {
514 + meson_src_compile
515 +}
516 +
517 +multilib_src_install() {
518 + meson_src_install
519 +
520 + use libglvnd && rm -f "${D}"/usr/$(get_libdir)/libGLESv{1_CM,2}.so*
521 +}
522 +
523 +multilib_src_install_all() {
524 + einstalldocs
525 +}
526 +
527 +multilib_src_test() {
528 + meson_src_test
529 +}
530 +
531 +pkg_postinst() {
532 + # Switch to the xorg implementation.
533 + echo
534 + eselect opengl set --use-old ${OPENGL_DIR}
535 +}
536 +
537 +# $1 - VIDEO_CARDS flag (check skipped for "--")
538 +# other args - names of DRI drivers to enable
539 +dri_driver_enable() {
540 + if [[ $1 == -- ]] || use $1; then
541 + shift
542 + DRI_DRIVERS+=("$@")
543 + fi
544 +}
545 +
546 +gallium_enable() {
547 + if [[ $1 == -- ]] || use $1; then
548 + shift
549 + GALLIUM_DRIVERS+=("$@")
550 + fi
551 +}
552 +
553 +vulkan_enable() {
554 + if [[ $1 == -- ]] || use $1; then
555 + shift
556 + VULKAN_DRIVERS+=("$@")
557 + fi
558 +}