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