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