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, 28 Feb 2019 00:29:06
Message-Id: 1551313703.8a60189fc61344dc3c63a24e9c1af99feea80afc.mattst88@gentoo
1 commit: 8a60189fc61344dc3c63a24e9c1af99feea80afc
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 28 00:28:14 2019 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 28 00:28:23 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a60189f
7
8 media-libs/mesa: Version bump to 19.0.0_rc6
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 1 +
13 media-libs/mesa/mesa-19.0.0_rc6.ebuild | 515 +++++++++++++++++++++++++++++++++
14 2 files changed, 516 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index afd32e7b4fb..d5f6b53faae 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -7,3 +7,4 @@ DIST mesa-19.0.0-rc2.tar.xz 11921808 BLAKE2B 279552393209ee263dd24a5bfdfa1caf201
21 DIST mesa-19.0.0-rc3.tar.xz 11919960 BLAKE2B 24b2b6304cc8332dc5edc8db05e5b09e50c87a935057a46c3e9417ff71e1d6bf6150076be0da024d5e972cf3368856108a6730008dd9cf31842d4247f02ae816 SHA512 adcb4cdcda0ef5c43e2257368a674328cb7533c484e631db6ff80d4a6d15ffba4f3f18a063cb63102a7ae89a5954f5e2f45ac8fe295064513f2656198a12307f
22 DIST mesa-19.0.0-rc4.tar.xz 11928252 BLAKE2B 8cf4c2671e3de11e4ed65f0a451dae78bb40bfa32753306060be0d1523ed9f15d0ea479b628b592fcc43927e5c82ea8c68ef02494bb17be58b01ddcd2ea4dc3a SHA512 e17bfc29084a8efa259fcca16374f2f33aa1b62e034a8637fe0c9985410b1722fe68092b6f393fbf23f0db6ec3e1d6a191541d37cee650e42909ec7e0232f5a6
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
26 diff --git a/media-libs/mesa/mesa-19.0.0_rc6.ebuild b/media-libs/mesa/mesa-19.0.0_rc6.ebuild
27 new file mode 100644
28 index 00000000000..dd35b9d8a13
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-19.0.0_rc6.ebuild
31 @@ -0,0 +1,515 @@
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.97"
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 + )
173 + sys-devel/llvm:=[${MULTILIB_USEDEP}]
174 +"
175 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
176 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
177 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
178 +RDEPEND="${RDEPEND}
179 + llvm? (
180 + opencl? (
181 + video_cards_r600? (
182 + ${CLANG_DEPSTR_AMDGPU}
183 + )
184 + !video_cards_r600? (
185 + video_cards_radeonsi? (
186 + ${CLANG_DEPSTR_AMDGPU}
187 + )
188 + )
189 + !video_cards_r600? (
190 + !video_cards_radeonsi? (
191 + video_cards_radeon? (
192 + ${CLANG_DEPSTR_AMDGPU}
193 + )
194 + )
195 + )
196 + !video_cards_r600? (
197 + !video_cards_radeon? (
198 + !video_cards_radeonsi? (
199 + ${CLANG_DEPSTR}
200 + )
201 + )
202 + )
203 + )
204 + !opencl? (
205 + video_cards_r600? (
206 + ${LLVM_DEPSTR_AMDGPU}
207 + )
208 + !video_cards_r600? (
209 + video_cards_radeonsi? (
210 + ${LLVM_DEPSTR_AMDGPU}
211 + )
212 + )
213 + !video_cards_r600? (
214 + !video_cards_radeonsi? (
215 + video_cards_radeon? (
216 + ${LLVM_DEPSTR_AMDGPU}
217 + )
218 + )
219 + )
220 + !video_cards_r600? (
221 + !video_cards_radeon? (
222 + !video_cards_radeonsi? (
223 + ${LLVM_DEPSTR}
224 + )
225 + )
226 + )
227 + )
228 + )
229 +"
230 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
231 +
232 +DEPEND="${RDEPEND}
233 + ${PYTHON_DEPS}
234 + opencl? (
235 + >=sys-devel/gcc-4.6
236 + )
237 + sys-devel/bison
238 + sys-devel/flex
239 + sys-devel/gettext
240 + virtual/pkgconfig
241 + valgrind? ( dev-util/valgrind )
242 + x11-base/xorg-proto
243 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
244 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
245 +"
246 +
247 +S="${WORKDIR}/${MY_P}"
248 +EGIT_CHECKOUT_DIR=${S}
249 +
250 +QA_WX_LOAD="
251 +x86? (
252 + !pic? (
253 + usr/lib*/libglapi.so.0.0.0
254 + usr/lib*/libGLESv1_CM.so.1.0.0
255 + usr/lib*/libGLESv2.so.2.0.0
256 + usr/lib*/libGL.so.1.2.0
257 + usr/lib*/libOSMesa.so.8.0.0
258 + )
259 +)"
260 +
261 +llvm_check_deps() {
262 + local flags=${MULTILIB_USEDEP}
263 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
264 + then
265 + flags+=",llvm_targets_AMDGPU(-)"
266 + fi
267 +
268 + if use opencl; then
269 + has_version "sys-devel/clang[${flags}]" || return 1
270 + fi
271 + has_version "sys-devel/llvm[${flags}]"
272 +}
273 +
274 +pkg_pretend() {
275 + if use opencl; then
276 + if ! use video_cards_r600 &&
277 + ! use video_cards_radeonsi; then
278 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
279 + fi
280 + fi
281 +
282 + if use vaapi; then
283 + if ! use video_cards_r600 &&
284 + ! use video_cards_radeonsi &&
285 + ! use video_cards_nouveau; then
286 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
287 + fi
288 + fi
289 +
290 + if use vdpau; then
291 + if ! use video_cards_r300 &&
292 + ! use video_cards_r600 &&
293 + ! use video_cards_radeonsi &&
294 + ! use video_cards_nouveau; then
295 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
296 + fi
297 + fi
298 +
299 + if use xa; then
300 + if ! use video_cards_freedreno &&
301 + ! use video_cards_nouveau &&
302 + ! use video_cards_vmware; then
303 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
304 + fi
305 + fi
306 +
307 + if use xvmc; then
308 + if ! use video_cards_r600 &&
309 + ! use video_cards_nouveau; then
310 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
311 + fi
312 + fi
313 +
314 + if ! use gallium; then
315 + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
316 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
317 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
318 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
319 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
320 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
321 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
322 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
323 + fi
324 +
325 + if ! use llvm; then
326 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
327 + fi
328 +}
329 +
330 +python_check_deps() {
331 + has_version ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
332 +}
333 +
334 +pkg_setup() {
335 + # warning message for bug 459306
336 + if use llvm && has_version sys-devel/llvm[!debug=]; then
337 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
338 + ewarn "detected! This can cause problems. For details, see bug 459306."
339 + fi
340 +
341 + if use llvm; then
342 + llvm_pkg_setup
343 + fi
344 + python-any-r1_pkg_setup
345 +}
346 +
347 +multilib_src_configure() {
348 + local emesonargs=()
349 +
350 + if use classic; then
351 + # Intel code
352 + dri_driver_enable video_cards_i915 i915
353 + dri_driver_enable video_cards_i965 i965
354 + if ! use video_cards_i915 && \
355 + ! use video_cards_i965; then
356 + dri_driver_enable video_cards_intel i915 i965
357 + fi
358 +
359 + # Nouveau code
360 + dri_driver_enable video_cards_nouveau nouveau
361 +
362 + # ATI code
363 + dri_driver_enable video_cards_r100 r100
364 + dri_driver_enable video_cards_r200 r200
365 + if ! use video_cards_r100 && \
366 + ! use video_cards_r200; then
367 + dri_driver_enable video_cards_radeon r100 r200
368 + fi
369 + fi
370 +
371 + emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
372 +
373 + if use gallium; then
374 + emesonargs+=(
375 + $(meson_use llvm)
376 + $(meson_use lm_sensors lmsensors)
377 + $(meson_use unwind libunwind)
378 + )
379 +
380 + if use video_cards_r300 ||
381 + use video_cards_r600 ||
382 + use video_cards_radeonsi ||
383 + use video_cards_nouveau ||
384 + use video_cards_vmware; then
385 + emesonargs+=($(meson_use d3d9 gallium-nine))
386 + else
387 + emesonargs+=(-Dgallium-nine=false)
388 + fi
389 +
390 + if use video_cards_r600 ||
391 + use video_cards_radeonsi ||
392 + use video_cards_nouveau; then
393 + emesonargs+=($(meson_use vaapi gallium-va))
394 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
395 + else
396 + emesonargs+=(-Dgallium-va=false)
397 + fi
398 +
399 + if use video_cards_r300 ||
400 + use video_cards_r600 ||
401 + use video_cards_radeonsi ||
402 + use video_cards_nouveau; then
403 + emesonargs+=($(meson_use vdpau gallium-vdpau))
404 + else
405 + emesonargs+=(-Dgallium-vdpau=false)
406 + fi
407 +
408 + if use video_cards_freedreno ||
409 + use video_cards_nouveau ||
410 + use video_cards_vmware; then
411 + emesonargs+=($(meson_use xa gallium-xa))
412 + else
413 + emesonargs+=(-Dgallium-xa=false)
414 + fi
415 +
416 + if use video_cards_r600 ||
417 + use video_cards_nouveau; then
418 + emesonargs+=($(meson_use xvmc gallium-xvmc))
419 + else
420 + emesonargs+=(-Dgallium-xvmc=false)
421 + fi
422 +
423 + gallium_enable video_cards_vc4 vc4
424 + gallium_enable video_cards_vivante etnaviv
425 + gallium_enable video_cards_vmware svga
426 + gallium_enable video_cards_nouveau nouveau
427 + gallium_enable video_cards_imx imx
428 +
429 + # Only one i915 driver (classic vs gallium). Default to classic.
430 + if ! use classic; then
431 + gallium_enable video_cards_i915 i915
432 + if ! use video_cards_i915 && \
433 + ! use video_cards_i965; then
434 + gallium_enable video_cards_intel i915
435 + fi
436 + fi
437 +
438 + gallium_enable video_cards_r300 r300
439 + gallium_enable video_cards_r600 r600
440 + gallium_enable video_cards_radeonsi radeonsi
441 + if ! use video_cards_r300 && \
442 + ! use video_cards_r600; then
443 + gallium_enable video_cards_radeon r300 r600
444 + fi
445 +
446 + gallium_enable video_cards_freedreno freedreno
447 + gallium_enable video_cards_virgl virgl
448 +
449 + # opencl stuff
450 + emesonargs+=(
451 + -Dgallium-opencl="$(usex opencl icd disabled)"
452 + )
453 + fi
454 +
455 + if use vulkan; then
456 + vulkan_enable video_cards_i965 intel
457 + vulkan_enable video_cards_radeonsi amd
458 + fi
459 +
460 + # x86 hardened pax_kernel needs glx-rts, bug 240956
461 + if [[ ${ABI} == x86 ]]; then
462 + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
463 + fi
464 +
465 + # on abi_x86_32 hardened we need to have asm disable
466 + if [[ ${ABI} == x86* ]] && use pic; then
467 + emesonargs+=( -Dasm=false )
468 + fi
469 +
470 + if use gallium; then
471 + gallium_enable -- swrast
472 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
473 + else
474 + dri_driver_enable -- swrast
475 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
476 + fi
477 +
478 + driver_list() {
479 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
480 + echo "${drivers//$'\n'/,}"
481 + }
482 +
483 + emesonargs+=(
484 + $(meson_use test build-tests)
485 + -Dglx=dri
486 + -Dshared-glapi=true
487 + $(meson_use dri3)
488 + $(meson_use egl)
489 + $(meson_use gbm)
490 + $(meson_use gles1)
491 + $(meson_use gles2)
492 + $(meson_use selinux)
493 + -Dvalgrind=$(usex valgrind auto false)
494 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
495 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
496 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
497 + --buildtype $(usex debug debug plain)
498 + -Db_ndebug=$(usex debug false true)
499 + )
500 + meson_src_configure
501 +}
502 +
503 +multilib_src_compile() {
504 + meson_src_compile
505 +}
506 +
507 +multilib_src_install() {
508 + meson_src_install
509 +}
510 +
511 +multilib_src_install_all() {
512 + einstalldocs
513 +}
514 +
515 +multilib_src_test() {
516 + meson_src_test
517 +}
518 +
519 +pkg_postinst() {
520 + # Switch to the xorg implementation.
521 + echo
522 + eselect opengl set --use-old ${OPENGL_DIR}
523 +}
524 +
525 +# $1 - VIDEO_CARDS flag (check skipped for "--")
526 +# other args - names of DRI drivers to enable
527 +dri_driver_enable() {
528 + if [[ $1 == -- ]] || use $1; then
529 + shift
530 + DRI_DRIVERS+=("$@")
531 + fi
532 +}
533 +
534 +gallium_enable() {
535 + if [[ $1 == -- ]] || use $1; then
536 + shift
537 + GALLIUM_DRIVERS+=("$@")
538 + fi
539 +}
540 +
541 +vulkan_enable() {
542 + if [[ $1 == -- ]] || use $1; then
543 + shift
544 + VULKAN_DRIVERS+=("$@")
545 + fi
546 +}