Gentoo Archives: gentoo-commits

From: "Chi-Thanh Christopher Nguyen (chithanh)" <chithanh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/mesa: metadata.xml mesa-10.4.4.ebuild ChangeLog
Date: Sun, 08 Feb 2015 19:11:05
Message-Id: 20150208191100.484871156F@oystercatcher.gentoo.org
1 chithanh 15/02/08 19:11:00
2
3 Modified: metadata.xml ChangeLog
4 Added: mesa-10.4.4.ebuild
5 Log:
6 Version bump. Add d3d9 flag, bug #537494.
7
8 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0x2324E7B566DF2611!)
9
10 Revision Changes Path
11 1.25 media-libs/mesa/metadata.xml
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/metadata.xml?rev=1.25&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/metadata.xml?rev=1.25&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/metadata.xml?r1=1.24&r2=1.25
16
17 Index: metadata.xml
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/metadata.xml,v
20 retrieving revision 1.24
21 retrieving revision 1.25
22 diff -u -r1.24 -r1.25
23 --- metadata.xml 9 Dec 2014 21:09:03 -0000 1.24
24 +++ metadata.xml 8 Feb 2015 19:11:00 -0000 1.25
25 @@ -5,6 +5,7 @@
26 <use>
27 <flag name='bindist'>Disable patent-encumbered ARB_texture_float, EXT_texture_shared_exponent, and EXT_packed_float extensions.</flag>
28 <flag name='classic'>Build drivers based on the classic architecture.</flag>
29 + <flag name='d3d9'>Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine.</flag>
30 <flag name='dri3'>Enable DRI3 support.</flag>
31 <flag name='egl'>Enable EGL support.</flag>
32 <flag name='gallium'>Build drivers based on Gallium3D, the new architecture for 3D graphics drivers.</flag>
33
34
35
36 1.601 media-libs/mesa/ChangeLog
37
38 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.601&view=markup
39 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.601&content-type=text/plain
40 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.600&r2=1.601
41
42 Index: ChangeLog
43 ===================================================================
44 RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v
45 retrieving revision 1.600
46 retrieving revision 1.601
47 diff -u -r1.600 -r1.601
48 --- ChangeLog 4 Feb 2015 09:10:13 -0000 1.600
49 +++ ChangeLog 8 Feb 2015 19:11:00 -0000 1.601
50 @@ -1,6 +1,12 @@
51 # ChangeLog for media-libs/mesa
52 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
53 -# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.600 2015/02/04 09:10:13 pacho Exp $
54 +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.601 2015/02/08 19:11:00 chithanh Exp $
55 +
56 +*mesa-10.4.4 (08 Feb 2015)
57 +
58 + 08 Feb 2015; Chí-Thanh Christopher Nguyễn <chithanh@g.o>
59 + +mesa-10.4.4.ebuild, metadata.xml:
60 + Version bump. Add d3d9 flag, bug #537494.
61
62 04 Feb 2015; Pacho Ramos <pacho@g.o> mesa-10.2.8.ebuild:
63 ia64 stable, bug #513736 by Émeric Maschino
64
65
66
67 1.1 media-libs/mesa/mesa-10.4.4.ebuild
68
69 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-10.4.4.ebuild?rev=1.1&view=markup
70 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-10.4.4.ebuild?rev=1.1&content-type=text/plain
71
72 Index: mesa-10.4.4.ebuild
73 ===================================================================
74 # Copyright 1999-2015 Gentoo Foundation
75 # Distributed under the terms of the GNU General Public License v2
76 # $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-10.4.4.ebuild,v 1.1 2015/02/08 19:11:00 chithanh Exp $
77
78 EAPI=5
79
80 EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
81
82 if [[ ${PV} = 9999* ]]; then
83 GIT_ECLASS="git-r3"
84 EXPERIMENTAL="true"
85 fi
86
87 PYTHON_COMPAT=( python{2_6,2_7} )
88
89 inherit base autotools multilib multilib-minimal flag-o-matic \
90 python-any-r1 toolchain-funcs pax-utils ${GIT_ECLASS}
91
92 OPENGL_DIR="xorg-x11"
93
94 MY_PN="${PN/m/M}"
95 MY_P="${MY_PN}-${PV/_/-}"
96 MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
97
98 FOLDER="${PV/_rc*/}"
99
100 DESCRIPTION="OpenGL-like graphic library for Linux"
101 HOMEPAGE="http://mesa3d.sourceforge.net/"
102
103 #SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2"
104 if [[ $PV = 9999* ]]; then
105 SRC_URI="${SRC_PATCHES}"
106 else
107 SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2
108 ${SRC_PATCHES}"
109 fi
110
111 # The code is MIT/X11.
112 # GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0
113 LICENSE="MIT SGI-B-2.0"
114 SLOT="0"
115 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
116
117 INTEL_CARDS="i915 i965 ilo intel"
118 RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
119 VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
120 for card in ${VIDEO_CARDS}; do
121 IUSE_VIDEO_CARDS+=" video_cards_${card}"
122 done
123
124 IUSE="${IUSE_VIDEO_CARDS}
125 bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm
126 +nptl opencl osmesa pax_kernel openmax pic r600-llvm-compiler selinux
127 +udev vaapi vdpau wayland xvmc xa kernel_FreeBSD"
128
129 REQUIRED_USE="
130 d3d9? ( dri3 gallium )
131 llvm? ( gallium )
132 opencl? (
133 gallium
134 llvm
135 video_cards_r600? ( r600-llvm-compiler )
136 video_cards_radeon? ( r600-llvm-compiler )
137 video_cards_radeonsi? ( r600-llvm-compiler )
138 )
139 openmax? ( gallium )
140 gles1? ( egl )
141 gles2? ( egl )
142 r600-llvm-compiler? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi video_cards_radeon ) )
143 vaapi? ( gallium )
144 vdpau? ( gallium )
145 wayland? ( egl gbm )
146 xa? ( gallium )
147 video_cards_freedreno? ( gallium )
148 video_cards_intel? ( || ( classic gallium ) )
149 video_cards_i915? ( || ( classic gallium ) )
150 video_cards_i965? ( classic )
151 video_cards_ilo? ( gallium )
152 video_cards_nouveau? ( || ( classic gallium ) )
153 video_cards_radeon? ( || ( classic gallium ) )
154 video_cards_r100? ( classic )
155 video_cards_r200? ( classic )
156 video_cards_r300? ( gallium )
157 video_cards_r600? ( gallium )
158 video_cards_radeonsi? ( gallium llvm )
159 video_cards_vmware? ( gallium )
160 ${PYTHON_REQUIRED_USE}
161 "
162
163 LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.56"
164 # keep correct libdrm and dri2proto dep
165 # keep blocks in rdepend for binpkg
166 RDEPEND="
167 !<x11-base/xorg-server-1.7
168 !<=x11-proto/xf86driproto-2.0.3
169 abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
170 classic? ( app-admin/eselect-mesa )
171 gallium? ( app-admin/eselect-mesa )
172 >=app-admin/eselect-opengl-1.3.0
173 udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
174 >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
175 gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
176 dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
177 >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
178 >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
179 >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
180 >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
181 >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
182 >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
183 llvm? (
184 video_cards_radeonsi? ( || (
185 >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
186 >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
187 ) )
188 video_cards_r600? ( || (
189 >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
190 >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
191 ) )
192 !video_cards_r600? (
193 video_cards_radeon? ( || (
194 >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
195 >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
196 ) )
197 )
198 >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
199 )
200 opencl? (
201 app-admin/eselect-opencl
202 dev-libs/libclc
203 )
204 openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
205 vaapi? ( >=x11-libs/libva-0.35.0:=[${MULTILIB_USEDEP}] )
206 vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
207 wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
208 xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
209 ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
210 "
211 for card in ${INTEL_CARDS}; do
212 RDEPEND="${RDEPEND}
213 video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
214 "
215 done
216
217 for card in ${RADEON_CARDS}; do
218 RDEPEND="${RDEPEND}
219 video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
220 "
221 done
222
223 DEPEND="${RDEPEND}
224 ${PYTHON_DEPS}
225 llvm? (
226 r600-llvm-compiler? ( sys-devel/llvm[video_cards_radeon] )
227 video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
228 )
229 opencl? (
230 >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
231 >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
232 >=sys-devel/gcc-4.6
233 )
234 sys-devel/bison
235 sys-devel/flex
236 sys-devel/gettext
237 virtual/pkgconfig
238 >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
239 dri3? (
240 >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
241 >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
242 )
243 >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
244 >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
245 >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
246 >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
247 "
248
249 S="${WORKDIR}/${MY_P}"
250 EGIT_CHECKOUT_DIR=${S}
251
252 # It is slow without texrels, if someone wants slow
253 # mesa without texrels +pic use is worth the shot
254 QA_EXECSTACK="usr/lib*/libGL.so*"
255 QA_WX_LOAD="usr/lib*/libGL.so*"
256
257 # Think about: ggi, fbcon, no-X configs
258
259 pkg_setup() {
260 # workaround toc-issue wrt #386545
261 use ppc64 && append-flags -mminimal-toc
262
263 # warning message for bug 459306
264 if use llvm && has_version sys-devel/llvm[!debug=]; then
265 ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
266 ewarn "detected! This can cause problems. For details, see bug 459306."
267 fi
268
269 python-any-r1_pkg_setup
270 }
271
272 src_unpack() {
273 default
274 [[ $PV = 9999* ]] && git-r3_src_unpack
275 }
276
277 src_prepare() {
278 # apply patches
279 if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
280 EPATCH_FORCE="yes" \
281 EPATCH_SOURCE="${WORKDIR}/patches" \
282 EPATCH_SUFFIX="patch" \
283 epatch
284 fi
285
286 # fix for hardened pax_kernel, bug 240956
287 [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
288
289 # Solaris needs some recent POSIX stuff in our case
290 if [[ ${CHOST} == *-solaris* ]] ; then
291 sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die
292 fi
293
294 base_src_prepare
295
296 eautoreconf
297 multilib_copy_sources
298 }
299
300 multilib_src_configure() {
301 local myconf
302
303 if use classic; then
304 # Configurable DRI drivers
305 driver_enable swrast
306
307 # Intel code
308 driver_enable video_cards_i915 i915
309 driver_enable video_cards_i965 i965
310 if ! use video_cards_i915 && \
311 ! use video_cards_i965; then
312 driver_enable video_cards_intel i915 i965
313 fi
314
315 # Nouveau code
316 driver_enable video_cards_nouveau nouveau
317
318 # ATI code
319 driver_enable video_cards_r100 radeon
320 driver_enable video_cards_r200 r200
321 if ! use video_cards_r100 && \
322 ! use video_cards_r200; then
323 driver_enable video_cards_radeon radeon r200
324 fi
325 fi
326
327 if use egl; then
328 myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
329 fi
330
331 if use gallium; then
332 myconf+="
333 $(use_enable d3d9 nine)
334 $(use_enable llvm gallium-llvm)
335 $(use_enable openmax omx)
336 $(use_enable r600-llvm-compiler)
337 $(use_enable vaapi va)
338 $(use_enable vdpau)
339 $(use_enable xa)
340 $(use_enable xvmc)
341 "
342 gallium_enable swrast
343 gallium_enable video_cards_vmware svga
344 gallium_enable video_cards_nouveau nouveau
345 gallium_enable video_cards_i915 i915
346 gallium_enable video_cards_ilo ilo
347 if ! use video_cards_i915 && \
348 ! use video_cards_i965; then
349 gallium_enable video_cards_intel i915
350 fi
351
352 gallium_enable video_cards_r300 r300
353 gallium_enable video_cards_r600 r600
354 gallium_enable video_cards_radeonsi radeonsi
355 if ! use video_cards_r300 && \
356 ! use video_cards_r600; then
357 gallium_enable video_cards_radeon r300 r600
358 fi
359
360 gallium_enable video_cards_freedreno freedreno
361 # opencl stuff
362 if use opencl; then
363 myconf+="
364 $(use_enable opencl)
365 --with-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"
366 --with-clang-libdir="${EPREFIX}/usr/lib"
367 "
368 fi
369 fi
370
371 # x86 hardened pax_kernel needs glx-rts, bug 240956
372 if use pax_kernel; then
373 myconf+="
374 $(use_enable x86 glx-rts)
375 "
376 fi
377
378 # on abi_x86_32 hardened we need to have asm disable
379 if [[ ${ABI} == x86* ]] && use pic; then
380 myconf+=" --disable-asm"
381 fi
382
383 # build fails with BSD indent, bug #428112
384 use userland_GNU || export INDENT=cat
385
386 econf \
387 --enable-dri \
388 --enable-glx \
389 --enable-shared-glapi \
390 $(use_enable !bindist texture-float) \
391 $(use_enable debug) \
392 $(use_enable dri3) \
393 $(use_enable egl) \
394 $(use_enable gbm) \
395 $(use_enable gles1) \
396 $(use_enable gles2) \
397 $(use_enable nptl glx-tls) \
398 $(use_enable osmesa) \
399 $(use_enable !udev sysfs) \
400 --enable-llvm-shared-libs \
401 --with-dri-drivers=${DRI_DRIVERS} \
402 --with-gallium-drivers=${GALLIUM_DRIVERS} \
403 PYTHON2="${PYTHON}" \
404 ${myconf}
405 }
406
407 multilib_src_install() {
408 emake install DESTDIR="${D}"
409
410 if use classic || use gallium; then
411 ebegin "Moving DRI/Gallium drivers for dynamic switching"
412 local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
413 keepdir /usr/$(get_libdir)/dri
414 dodir /usr/$(get_libdir)/mesa
415 for x in ${gallium_drivers[@]}; do
416 if [ -f "$(get_libdir)/gallium/${x}" ]; then
417 mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
418 || die "Failed to move ${x}"
419 fi
420 done
421 if use classic; then
422 emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
423 fi
424 for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
425 if [ -f ${x} -o -L ${x} ]; then
426 mv -f "${x}" "${x/dri/mesa}" \
427 || die "Failed to move ${x}"
428 fi
429 done
430 pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
431 ln -s ../mesa/*.so . || die "Creating symlink failed"
432 # remove symlinks to drivers known to eselect
433 for x in ${gallium_drivers[@]}; do
434 if [ -f ${x} -o -L ${x} ]; then
435 rm "${x}" || die "Failed to remove ${x}"
436 fi
437 done
438 popd
439 eend $?
440 fi
441 if use opencl; then
442 ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
443 local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
444 dodir ${cl_dir}/{lib,include}
445 if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
446 mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
447 "${ED}"${cl_dir}
448 fi
449 if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
450 mv -f "${ED}"/usr/include/CL \
451 "${ED}"${cl_dir}/include
452 fi
453 eend $?
454 fi
455
456 if use openmax; then
457 echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
458 doenvd "${T}"/99mesaxdgomx
459 keepdir /usr/share/mesa/xdg
460 fi
461 }
462
463 multilib_src_install_all() {
464 prune_libtool_files --all
465 einstalldocs
466
467 if use !bindist; then
468 dodoc docs/patents.txt
469 fi
470
471 # Install config file for eselect mesa
472 insinto /usr/share/mesa
473 newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
474 }
475
476 multilib_src_test() {
477 if use llvm; then
478 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'
479 pushd src/gallium/drivers/llvmpipe >/dev/null || die
480 emake ${llvm_tests}
481 pax-mark m ${llvm_tests}
482 popd >/dev/null || die
483 fi
484 emake check
485 }
486
487 pkg_postinst() {
488 # Switch to the xorg implementation.
489 echo
490 eselect opengl set --use-old ${OPENGL_DIR}
491
492 # Select classic/gallium drivers
493 if use classic || use gallium; then
494 eselect mesa set --auto
495 fi
496
497 # Switch to mesa opencl
498 if use opencl; then
499 eselect opencl set --use-old ${PN}
500 fi
501
502 # run omxregister-bellagio to make the OpenMAX drivers known system-wide
503 if use openmax; then
504 ebegin "Registering OpenMAX drivers"
505 BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
506 OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
507 omxregister-bellagio
508 eend $?
509 fi
510
511 # warn about patent encumbered texture-float
512 if use !bindist; then
513 elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
514 elog "enabled. Please see patents.txt for an explanation."
515 fi
516
517 local using_radeon r_flag
518 for r_flag in ${RADEON_CARDS}; do
519 if use video_cards_${r_flag}; then
520 using_radeon=1
521 break
522 fi
523 done
524
525 if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then
526 elog "Note that in order to have full S3TC support, it is necessary to install"
527 elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
528 elog "textures in some apps, and some others even require this to run."
529 fi
530 }
531
532 pkg_prerm() {
533 if use openmax; then
534 rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
535 fi
536 }
537
538 # $1 - VIDEO_CARDS flag
539 # other args - names of DRI drivers to enable
540 # TODO: avoid code duplication for a more elegant implementation
541 driver_enable() {
542 case $# in
543 # for enabling unconditionally
544 1)
545 DRI_DRIVERS+=",$1"
546 ;;
547 *)
548 if use $1; then
549 shift
550 for i in $@; do
551 DRI_DRIVERS+=",${i}"
552 done
553 fi
554 ;;
555 esac
556 }
557
558 gallium_enable() {
559 case $# in
560 # for enabling unconditionally
561 1)
562 GALLIUM_DRIVERS+=",$1"
563 ;;
564 *)
565 if use $1; then
566 shift
567 for i in $@; do
568 GALLIUM_DRIVERS+=",${i}"
569 done
570 fi
571 ;;
572 esac
573 }