Gentoo Archives: gentoo-commits

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