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: Mon, 13 Feb 2017 14:25:29
Message-Id: 1486995910.1dc2fda1ea4723356cc32cac072f48d804cf9e41.mattst88@gentoo
1 commit: 1dc2fda1ea4723356cc32cac072f48d804cf9e41
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 13 14:22:12 2017 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 13 14:25:10 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dc2fda1
7
8 media-libs/mesa: Version bump to 17.0.0.
9
10 media-libs/mesa/Manifest | 1 +
11 media-libs/mesa/mesa-17.0.0.ebuild | 495 +++++++++++++++++++++++++++++++++++++
12 2 files changed, 496 insertions(+)
13
14 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
15 index a269884ca8..afd16cc18e 100644
16 --- a/media-libs/mesa/Manifest
17 +++ b/media-libs/mesa/Manifest
18 @@ -7,3 +7,4 @@ DIST mesa-13.0.3.tar.xz 9162036 SHA256 d9aa8be5c176d00d0cd503cb2f64a5a403ea471ec
19 DIST mesa-13.0.4.tar.xz 9164612 SHA256 a95d7ce8f7bd5f88585e4be3144a341236d8c0fc91f6feaec59bb8ba3120e726 SHA512 5f4d8ad12389a32c028cf3c5289fe285892e2b241220c5c6d04cda5748240e8b13289c4537ac7a6b58d87d6ca4111031e15ad37c9b008777be71918e42e88817 WHIRLPOOL 041cb8db42cd2126b108f8e5d0f105f96882bb4f75808f859d4789b05ffc2b6d98a2b348ebff8abfa507ffb71e7ec757e7dd85ca81e77a264f477296f40b50ed
20 DIST mesa-17.0.0-rc2.tar.xz 9438192 SHA256 1788e124c0198cb76e0409aaf883855861d2c697ee895a84137026fffa62aba4 SHA512 3a1c285b600b91667a8fe4f3c2b3063520eb7e60e50e51d56d0265bd4d05fc6dda8f0ed14ce5637375caf7803a896dd5311dfb166dc7a52aea51d5a6efced43a WHIRLPOOL 92d153bd535b69c16e2f3de0bada8781d6c92dc0a09918170392fb2a44f471819129afeb65fe0a4523fdbbcd8d321a3544750fe1d4efdd61a54d049419b99871
21 DIST mesa-17.0.0-rc3.tar.xz 9440336 SHA256 e60e50b186159c0140e4bb9141d16933f6cf15cf2039d284a8fb5461b49ec99e SHA512 f37ad3182ae59838dd94dbfa03165a81ae1cbd5ee1a30e5d9a90b75abe4452c8632738ac445fd97927eaea4d6e1cccbd03349e2b7602696a48febc6fdd9aea41 WHIRLPOOL 5335f865b50acb6580a579b53d6bf33f0e9a42d5293c16a9a4ce14664f74b633d35213a0eb3ceccdbd19654a5a9d936e65ed7effb5ff3d0a4c4ce1a6c545aff2
22 +DIST mesa-17.0.0.tar.xz 9442580 SHA256 39db3d59700159add7f977307d12a7dfe016363e760ad82280ac4168ea668481 SHA512 880364d63fc252efff27fb324a5a9c037f7197819db0b543f695687849db15deabbb4433d1850d005c2c2436d1c1a01f8533f0d79c71c08aaf79d562b35a753d WHIRLPOOL b48b11df188251d5b0b2ae5428a28c38d1dc79e6790d5e66b9f9b6681bafa181ad9571a6edc3f23d9353634293a48fa1228fca43b5840943c68d0786a7e442ea
23
24 diff --git a/media-libs/mesa/mesa-17.0.0.ebuild b/media-libs/mesa/mesa-17.0.0.ebuild
25 new file mode 100644
26 index 0000000000..11b03e23a3
27 --- /dev/null
28 +++ b/media-libs/mesa/mesa-17.0.0.ebuild
29 @@ -0,0 +1,495 @@
30 +# Copyright 1999-2017 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI=6
35 +
36 +EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
37 +
38 +if [[ ${PV} = 9999 ]]; then
39 + GIT_ECLASS="git-r3"
40 + EXPERIMENTAL="true"
41 +fi
42 +
43 +PYTHON_COMPAT=( python2_7 )
44 +
45 +inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
46 +
47 +OPENGL_DIR="xorg-x11"
48 +
49 +MY_P="${P/_/-}"
50 +
51 +DESCRIPTION="OpenGL-like graphic library for Linux"
52 +HOMEPAGE="http://mesa3d.sourceforge.net/"
53 +
54 +if [[ $PV == 9999 ]]; then
55 + SRC_URI=""
56 + KEYWORDS=""
57 +else
58 + SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
59 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
60 +fi
61 +
62 +LICENSE="MIT"
63 +SLOT="0"
64 +RESTRICT="!bindist? ( bindist )"
65 +
66 +INTEL_CARDS="i915 i965 ilo intel"
67 +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
68 +VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno imx nouveau vc4 vivante vmware"
69 +for card in ${VIDEO_CARDS}; do
70 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
71 +done
72 +
73 +IUSE="${IUSE_VIDEO_CARDS}
74 + bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm
75 + +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind vdpau
76 + vulkan wayland xvmc xa"
77 +
78 +REQUIRED_USE="
79 + d3d9? ( dri3 gallium )
80 + llvm? ( gallium )
81 + opencl? ( gallium llvm )
82 + openmax? ( gallium )
83 + gles1? ( egl )
84 + gles2? ( egl )
85 + vaapi? ( gallium )
86 + vdpau? ( gallium )
87 + vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
88 + video_cards_radeonsi? ( llvm ) )
89 + wayland? ( egl gbm )
90 + xa? ( gallium )
91 + video_cards_freedreno? ( gallium )
92 + video_cards_intel? ( classic )
93 + video_cards_i915? ( || ( classic gallium ) )
94 + video_cards_i965? ( classic )
95 + video_cards_ilo? ( gallium )
96 + video_cards_imx? ( gallium )
97 + video_cards_nouveau? ( || ( classic gallium ) )
98 + video_cards_radeon? ( || ( classic gallium )
99 + gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
100 + video_cards_r100? ( classic )
101 + video_cards_r200? ( classic )
102 + video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
103 + video_cards_r600? ( gallium )
104 + video_cards_radeonsi? ( gallium llvm )
105 + video_cards_vivante? ( gallium gbm )
106 + video_cards_vmware? ( gallium )
107 + ${PYTHON_REQUIRED_USE}
108 +"
109 +
110 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.72"
111 +# keep correct libdrm and dri2proto dep
112 +# keep blocks in rdepend for binpkg
113 +RDEPEND="
114 + !<x11-base/xorg-server-1.7
115 + !<=x11-proto/xf86driproto-2.0.3
116 + abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
117 + classic? ( app-eselect/eselect-mesa )
118 + gallium? ( app-eselect/eselect-mesa )
119 + >=app-eselect/eselect-opengl-1.3.0
120 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
121 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
122 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
123 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
124 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
125 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
126 + >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
127 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
128 + llvm? (
129 + video_cards_radeonsi? (
130 + virtual/libelf:0=[${MULTILIB_USEDEP}]
131 + vulkan? ( >=sys-devel/llvm-3.9.0:=[${MULTILIB_USEDEP}] )
132 + )
133 + >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
134 + )
135 + opencl? (
136 + app-eselect/eselect-opencl
137 + dev-libs/libclc
138 + virtual/libelf:0=[${MULTILIB_USEDEP}]
139 + )
140 + openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
141 + vaapi? (
142 + >=x11-libs/libva-1.6.0:=[${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 + wayland? ( >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] )
147 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
148 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
149 +"
150 +for card in ${INTEL_CARDS}; do
151 + RDEPEND="${RDEPEND}
152 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
153 + "
154 +done
155 +
156 +for card in ${RADEON_CARDS}; do
157 + RDEPEND="${RDEPEND}
158 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
159 + "
160 +done
161 +RDEPEND="${RDEPEND}
162 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
163 +"
164 +
165 +# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once
166 +# LLVM < 3.9 is out of the game
167 +DEPEND="${RDEPEND}
168 + llvm? (
169 + video_cards_radeonsi? ( || (
170 + sys-devel/llvm[llvm_targets_AMDGPU]
171 + sys-devel/llvm[video_cards_radeon]
172 + ) )
173 + )
174 + opencl? (
175 + >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
176 + >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
177 + >=sys-devel/gcc-4.6
178 + )
179 + sys-devel/gettext
180 + virtual/pkgconfig
181 + valgrind? ( dev-util/valgrind )
182 + >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
183 + dri3? (
184 + >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
185 + >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
186 + )
187 + >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
188 + >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
189 + >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
190 + >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
191 +"
192 +[[ ${PV} == 9999 ]] && DEPEND+="
193 + sys-devel/bison
194 + sys-devel/flex
195 + ${PYTHON_DEPS}
196 + $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
197 +"
198 +
199 +S="${WORKDIR}/${MY_P}"
200 +EGIT_CHECKOUT_DIR=${S}
201 +
202 +QA_WX_LOAD="
203 +x86? (
204 + !pic? (
205 + usr/lib*/libglapi.so.0.0.0
206 + usr/lib*/libGLESv1_CM.so.1.1.0
207 + usr/lib*/libGLESv2.so.2.0.0
208 + usr/lib*/libGL.so.1.2.0
209 + usr/lib*/libOSMesa.so.8.0.0
210 + )
211 +)"
212 +
213 +pkg_setup() {
214 + # warning message for bug 459306
215 + if use llvm && has_version sys-devel/llvm[!debug=]; then
216 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
217 + ewarn "detected! This can cause problems. For details, see bug 459306."
218 + fi
219 +
220 + python-any-r1_pkg_setup
221 +}
222 +
223 +src_prepare() {
224 + [[ ${PV} == 9999 ]] && eautoreconf
225 + eapply_user
226 +}
227 +
228 +multilib_src_configure() {
229 + local myconf
230 +
231 + if use classic; then
232 + # Configurable DRI drivers
233 + driver_enable swrast
234 +
235 + # Intel code
236 + driver_enable video_cards_i915 i915
237 + driver_enable video_cards_i965 i965
238 + if ! use video_cards_i915 && \
239 + ! use video_cards_i965; then
240 + driver_enable video_cards_intel i915 i965
241 + fi
242 +
243 + # Nouveau code
244 + driver_enable video_cards_nouveau nouveau
245 +
246 + # ATI code
247 + driver_enable video_cards_r100 radeon
248 + driver_enable video_cards_r200 r200
249 + if ! use video_cards_r100 && \
250 + ! use video_cards_r200; then
251 + driver_enable video_cards_radeon radeon r200
252 + fi
253 + fi
254 +
255 + if use egl; then
256 + myconf+=" --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
257 + fi
258 +
259 + if use gallium; then
260 + myconf+="
261 + $(use_enable d3d9 nine)
262 + $(use_enable llvm gallium-llvm)
263 + $(use_enable openmax omx)
264 + $(use_enable vaapi va)
265 + $(use_enable vdpau)
266 + $(use_enable xa)
267 + $(use_enable xvmc)
268 + "
269 + use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
270 +
271 + gallium_enable swrast
272 + gallium_enable video_cards_vc4 vc4
273 + gallium_enable video_cards_vivante etnaviv
274 + gallium_enable video_cards_vmware svga
275 + gallium_enable video_cards_nouveau nouveau
276 + gallium_enable video_cards_i915 i915
277 + gallium_enable video_cards_ilo ilo
278 + gallium_enable video_cards_imx imx
279 + if ! use video_cards_i915 && \
280 + ! use video_cards_i965; then
281 + gallium_enable video_cards_intel i915
282 + fi
283 +
284 + gallium_enable video_cards_r300 r300
285 + gallium_enable video_cards_r600 r600
286 + gallium_enable video_cards_radeonsi radeonsi
287 + if ! use video_cards_r300 && \
288 + ! use video_cards_r600; then
289 + gallium_enable video_cards_radeon r300 r600
290 + fi
291 +
292 + gallium_enable video_cards_freedreno freedreno
293 + # opencl stuff
294 + if use opencl; then
295 + myconf+="
296 + $(use_enable opencl)
297 + --with-clang-libdir="${EPREFIX}/usr/lib"
298 + "
299 + fi
300 + fi
301 +
302 + if use vulkan; then
303 + vulkan_enable video_cards_i965 intel
304 + vulkan_enable video_cards_radeonsi radeon
305 + fi
306 +
307 + # x86 hardened pax_kernel needs glx-rts, bug 240956
308 + if [[ ${ABI} == x86 ]]; then
309 + myconf+=" $(use_enable pax_kernel glx-read-only-text)"
310 + fi
311 +
312 + # on abi_x86_32 hardened we need to have asm disable
313 + if [[ ${ABI} == x86* ]] && use pic; then
314 + myconf+=" --disable-asm"
315 + fi
316 +
317 + if use gallium; then
318 + myconf+=" $(use_enable osmesa gallium-osmesa)"
319 + else
320 + myconf+=" $(use_enable osmesa)"
321 + fi
322 +
323 + # build fails with BSD indent, bug #428112
324 + use userland_GNU || export INDENT=cat
325 +
326 + ECONF_SOURCE="${S}" \
327 + econf \
328 + --enable-dri \
329 + --enable-glx \
330 + --enable-shared-glapi \
331 + $(use_enable !bindist texture-float) \
332 + $(use_enable d3d9 nine) \
333 + $(use_enable debug) \
334 + $(use_enable dri3) \
335 + $(use_enable egl) \
336 + $(use_enable gbm) \
337 + $(use_enable gles1) \
338 + $(use_enable gles2) \
339 + $(use_enable nptl glx-tls) \
340 + --enable-valgrind=$(usex valgrind auto no) \
341 + --enable-llvm-shared-libs \
342 + --with-dri-drivers=${DRI_DRIVERS} \
343 + --with-gallium-drivers=${GALLIUM_DRIVERS} \
344 + --with-vulkan-drivers=${VULKAN_DRIVERS} \
345 + PYTHON2="${PYTHON}" \
346 + ${myconf}
347 +}
348 +
349 +multilib_src_install() {
350 + emake install DESTDIR="${D}"
351 +
352 + if use classic || use gallium; then
353 + ebegin "Moving DRI/Gallium drivers for dynamic switching"
354 + local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
355 + keepdir /usr/$(get_libdir)/dri
356 + dodir /usr/$(get_libdir)/mesa
357 + for x in ${gallium_drivers[@]}; do
358 + if [ -f "$(get_libdir)/gallium/${x}" ]; then
359 + mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
360 + || die "Failed to move ${x}"
361 + fi
362 + done
363 + if use classic; then
364 + emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
365 + fi
366 + for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
367 + if [ -f ${x} -o -L ${x} ]; then
368 + mv -f "${x}" "${x/dri/mesa}" \
369 + || die "Failed to move ${x}"
370 + fi
371 + done
372 + pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
373 + ln -s ../mesa/*.so . || die "Creating symlink failed"
374 + # remove symlinks to drivers known to eselect
375 + for x in ${gallium_drivers[@]}; do
376 + if [ -f ${x} -o -L ${x} ]; then
377 + rm "${x}" || die "Failed to remove ${x}"
378 + fi
379 + done
380 + popd
381 + eend $?
382 + fi
383 + if use opencl; then
384 + ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
385 + local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
386 + dodir ${cl_dir}/{lib,include}
387 + if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
388 + mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
389 + "${ED}"${cl_dir}
390 + fi
391 + if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
392 + mv -f "${ED}"/usr/include/CL \
393 + "${ED}"${cl_dir}/include
394 + fi
395 + eend $?
396 + fi
397 +
398 + if use openmax; then
399 + echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
400 + doenvd "${T}"/99mesaxdgomx
401 + keepdir /usr/share/mesa/xdg
402 + fi
403 +}
404 +
405 +multilib_src_install_all() {
406 + find "${ED}" -name '*.la' -delete
407 + einstalldocs
408 +
409 + if use !bindist; then
410 + dodoc docs/patents.txt
411 + fi
412 +
413 + # Install config file for eselect mesa
414 + insinto /usr/share/mesa
415 + newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
416 +}
417 +
418 +multilib_src_test() {
419 + if use llvm; then
420 + local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
421 + pushd src/gallium/drivers/llvmpipe >/dev/null || die
422 + emake ${llvm_tests}
423 + pax-mark m ${llvm_tests}
424 + popd >/dev/null || die
425 + fi
426 + emake check
427 +}
428 +
429 +pkg_postinst() {
430 + # Switch to the xorg implementation.
431 + echo
432 + eselect opengl set --use-old ${OPENGL_DIR}
433 +
434 + # Select classic/gallium drivers
435 + if use classic || use gallium; then
436 + eselect mesa set --auto
437 + fi
438 +
439 + # Switch to mesa opencl
440 + if use opencl; then
441 + eselect opencl set --use-old ${PN}
442 + fi
443 +
444 + # run omxregister-bellagio to make the OpenMAX drivers known system-wide
445 + if use openmax; then
446 + ebegin "Registering OpenMAX drivers"
447 + BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
448 + OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
449 + omxregister-bellagio
450 + eend $?
451 + fi
452 +
453 + # warn about patent encumbered texture-float
454 + if use !bindist; then
455 + elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
456 + elog "enabled. Please see patents.txt for an explanation."
457 + fi
458 +
459 + if ! has_version media-libs/libtxc_dxtn; then
460 + elog "Note that in order to have full S3TC support, it is necessary to install"
461 + elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
462 + elog "textures in some apps, and some others even require this to run."
463 + fi
464 +}
465 +
466 +pkg_prerm() {
467 + if use openmax; then
468 + rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
469 + fi
470 +}
471 +
472 +# $1 - VIDEO_CARDS flag
473 +# other args - names of DRI drivers to enable
474 +# TODO: avoid code duplication for a more elegant implementation
475 +driver_enable() {
476 + case $# in
477 + # for enabling unconditionally
478 + 1)
479 + DRI_DRIVERS+=",$1"
480 + ;;
481 + *)
482 + if use $1; then
483 + shift
484 + for i in $@; do
485 + DRI_DRIVERS+=",${i}"
486 + done
487 + fi
488 + ;;
489 + esac
490 +}
491 +
492 +gallium_enable() {
493 + case $# in
494 + # for enabling unconditionally
495 + 1)
496 + GALLIUM_DRIVERS+=",$1"
497 + ;;
498 + *)
499 + if use $1; then
500 + shift
501 + for i in $@; do
502 + GALLIUM_DRIVERS+=",${i}"
503 + done
504 + fi
505 + ;;
506 + esac
507 +}
508 +
509 +vulkan_enable() {
510 + case $# in
511 + # for enabling unconditionally
512 + 1)
513 + VULKAN_DRIVERS+=",$1"
514 + ;;
515 + *)
516 + if use $1; then
517 + shift
518 + for i in $@; do
519 + VULKAN_DRIVERS+=",${i}"
520 + done
521 + fi
522 + ;;
523 + esac
524 +}