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