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, 28 Nov 2016 18:20:48
Message-Id: 1480357062.7aff4dc3b6fd61cfbbcd17c1c65b779757a2b360.mattst88@gentoo
1 commit: 7aff4dc3b6fd61cfbbcd17c1c65b779757a2b360
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 28 18:17:35 2016 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 28 18:17:42 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7aff4dc3
7
8 media-libs/mesa: Version bump to 13.0.2.
9
10 media-libs/mesa/Manifest | 1 +
11 media-libs/mesa/mesa-13.0.2.ebuild | 506 +++++++++++++++++++++++++++++++++++++
12 2 files changed, 507 insertions(+)
13
14 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
15 index 71596a3..4cb2ab1 100644
16 --- a/media-libs/mesa/Manifest
17 +++ b/media-libs/mesa/Manifest
18 @@ -6,3 +6,4 @@ DIST mesa-12.0.1.tar.xz 8571144 SHA256 bab24fb79f78c876073527f515ed871fc9c81d816
19 DIST mesa-12.0.3.tar.xz 8577408 SHA256 1dc86dd9b51272eee1fad3df65e18cda2e556ef1bc0b6e07cd750b9757f493b1 SHA512 7d6525b5ed75e1361f3586aaf7f058de06b5038900a6379ab5f713ee879a0b3cecd253d6f3fb799673ef097bcd6866d61b46c33c0059f6636bb06fb5ceb5d750 WHIRLPOOL 88d77d445aaff7d96f9c44143c4b09763850d7dbffd6b0716a6204f6753ea84d155c97798e7959de0039f0babc8cffddc05845f385b9f39e6eb6f308921d379d
20 DIST mesa-13.0.0.tar.xz 9151388 SHA256 94edb4ebff82066a68be79d9c2627f15995e1fe10f67ab3fc63deb842027d727 SHA512 3de56ffed1e7940bf0caf604cb9071d39684b9252e09c1c6430fe28227cd7e88d48b4a31591d5677669feca73b95b1c7958944e16c9247cf6b3c59494099e77d WHIRLPOOL 67a1a53b7783126871f5ae23a5ab3fae2665e68bd57638441b15758e9a173771e64469736e4d8285e97cf49b99113db237153f41772de88d00ffe2b1923eed99
21 DIST mesa-13.0.1.tar.xz 9154288 SHA256 71962fb2bf77d33b0ad4a565b490dbbeaf4619099c6d9722f04a73187957a731 SHA512 00ae0eaef742a3954c1461b50cdcc8b9f933e829c89784d66bfcc0890e7e2793350efcad1a06f28bd3c115f04702a43a6f1ac6ce86270ca7799a90f1a5cf5127 WHIRLPOOL 7198e65498800606b7835003e40c4534f891447d8ad3ef682a08a18b2edac41ec6a75ab216efc81217958735cc21ebf0a7a67a2928ebedd5fb2a08d66185faa4
22 +DIST mesa-13.0.2.tar.xz 9159100 SHA256 a6ed622645f4ed61da418bf65adde5bcc4bb79023c36ba7d6b45b389da4416d5 SHA512 e4e2b9d685910f9b1d70958c50f54d059263623865571a92c3aa185914f4f7aa745d74afc9706b64ecd1f8d04c603ad03a78365d976382e2664284dc6a8351be WHIRLPOOL 49cb109e3b97f491f7682155a3194fd3df8808235a45a18539a8ecf55d2e3a9ba13dabb13f819822e256b272b4145efad029e38e7c666a5bf7abe7906528f6d2
23
24 diff --git a/media-libs/mesa/mesa-13.0.2.ebuild b/media-libs/mesa/mesa-13.0.2.ebuild
25 new file mode 100644
26 index 00000000..5194e90
27 --- /dev/null
28 +++ b/media-libs/mesa/mesa-13.0.2.ebuild
29 @@ -0,0 +1,506 @@
30 +# Copyright 1999-2016 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI=5
35 +
36 +EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
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 +FOLDER="${PV/_rc*/}"
51 +
52 +DESCRIPTION="OpenGL-like graphic library for Linux"
53 +HOMEPAGE="http://mesa3d.sourceforge.net/"
54 +
55 +if [[ $PV == 9999 ]]; then
56 + SRC_URI=""
57 + KEYWORDS=""
58 +else
59 + SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_P}.tar.xz"
60 + 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"
61 +fi
62 +
63 +LICENSE="MIT"
64 +SLOT="0"
65 +RESTRICT="!bindist? ( bindist )"
66 +
67 +INTEL_CARDS="i915 i965 ilo intel"
68 +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
69 +VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vc4 vmware"
70 +for card in ${VIDEO_CARDS}; do
71 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
72 +done
73 +
74 +IUSE="${IUSE_VIDEO_CARDS}
75 + bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gcrypt gles1 gles2
76 + libressl +llvm +nettle +nptl opencl osmesa pax_kernel openmax openssl pic
77 + selinux vaapi valgrind vdpau vulkan wayland xvmc xa kernel_FreeBSD"
78 +
79 +REQUIRED_USE="
80 + || ( gcrypt libressl nettle openssl )
81 + d3d9? ( dri3 gallium )
82 + llvm? ( gallium )
83 + opencl? ( gallium llvm )
84 + openmax? ( gallium )
85 + gles1? ( egl )
86 + gles2? ( egl )
87 + vaapi? ( gallium )
88 + vdpau? ( gallium )
89 + vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) )
90 + wayland? ( egl gbm )
91 + xa? ( gallium )
92 + video_cards_freedreno? ( gallium )
93 + video_cards_intel? ( classic )
94 + video_cards_i915? ( || ( classic gallium ) )
95 + video_cards_i965? ( classic )
96 + video_cards_ilo? ( 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_vmware? ( gallium )
106 + ${PYTHON_REQUIRED_USE}
107 +"
108 +
109 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.72"
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 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
120 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
121 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
122 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
123 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
124 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
125 + >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
126 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
127 + llvm? ( !kernel_FreeBSD? (
128 + video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
129 + !video_cards_r600? (
130 + video_cards_radeon? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
131 + ) )
132 + >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
133 + )
134 + nettle? ( dev-libs/nettle:=[${MULTILIB_USEDEP}] )
135 + !nettle? (
136 + gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] )
137 + !gcrypt? (
138 + libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] )
139 + !libressl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
140 + )
141 + )
142 + opencl? (
143 + app-eselect/eselect-opencl
144 + dev-libs/libclc
145 + !kernel_FreeBSD? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
146 + )
147 + openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
148 + vaapi? (
149 + >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}]
150 + video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
151 + )
152 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
153 + wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
154 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
155 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vmware?,${MULTILIB_USEDEP}]
156 +"
157 +for card in ${INTEL_CARDS}; do
158 + RDEPEND="${RDEPEND}
159 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
160 + "
161 +done
162 +
163 +for card in ${RADEON_CARDS}; do
164 + RDEPEND="${RDEPEND}
165 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
166 + "
167 +done
168 +RDEPEND="${RDEPEND}
169 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
170 +"
171 +
172 +# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once
173 +# LLVM < 3.9 is out of the game
174 +DEPEND="${RDEPEND}
175 + llvm? (
176 + video_cards_radeonsi? ( || (
177 + sys-devel/llvm[llvm_targets_AMDGPU]
178 + sys-devel/llvm[video_cards_radeon]
179 + ) )
180 + )
181 + opencl? (
182 + >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
183 + >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
184 + >=sys-devel/gcc-4.6
185 + )
186 + sys-devel/gettext
187 + virtual/pkgconfig
188 + valgrind? ( dev-util/valgrind )
189 + >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
190 + dri3? (
191 + >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
192 + >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
193 + )
194 + >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
195 + >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
196 + >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
197 + >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
198 +"
199 +[[ ${PV} == 9999 ]] && DEPEND+="
200 + sys-devel/bison
201 + sys-devel/flex
202 + ${PYTHON_DEPS}
203 + $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
204 +"
205 +
206 +S="${WORKDIR}/${MY_P}"
207 +EGIT_CHECKOUT_DIR=${S}
208 +
209 +QA_WX_LOAD="
210 +x86? (
211 + !pic? (
212 + usr/lib*/libglapi.so.0.0.0
213 + usr/lib*/libGLESv1_CM.so.1.1.0
214 + usr/lib*/libGLESv2.so.2.0.0
215 + usr/lib*/libGL.so.1.2.0
216 + usr/lib*/libOSMesa.so.8.0.0
217 + )
218 +)"
219 +
220 +pkg_setup() {
221 + # warning message for bug 459306
222 + if use llvm && has_version sys-devel/llvm[!debug=]; then
223 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
224 + ewarn "detected! This can cause problems. For details, see bug 459306."
225 + fi
226 +
227 + python-any-r1_pkg_setup
228 +}
229 +
230 +src_prepare() {
231 + [[ ${PV} == 9999 ]] && eautoreconf
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 gallium-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_vmware svga
280 + gallium_enable video_cards_nouveau nouveau
281 + gallium_enable video_cards_i915 i915
282 + gallium_enable video_cards_ilo ilo
283 + if ! use video_cards_i915 && \
284 + ! use video_cards_i965; then
285 + gallium_enable video_cards_intel i915
286 + fi
287 +
288 + gallium_enable video_cards_r300 r300
289 + gallium_enable video_cards_r600 r600
290 + gallium_enable video_cards_radeonsi radeonsi
291 + if ! use video_cards_r300 && \
292 + ! use video_cards_r600; then
293 + gallium_enable video_cards_radeon r300 r600
294 + fi
295 +
296 + gallium_enable video_cards_freedreno freedreno
297 + # opencl stuff
298 + if use opencl; then
299 + myconf+="
300 + $(use_enable opencl)
301 + --with-clang-libdir="${EPREFIX}/usr/lib"
302 + "
303 + fi
304 + fi
305 +
306 + if use vulkan; then
307 + vulkan_enable video_cards_i965 intel
308 + vulkan_enable video_cards_radeonsi radeon
309 + fi
310 +
311 + # x86 hardened pax_kernel needs glx-rts, bug 240956
312 + if [[ ${ABI} == x86 ]]; then
313 + myconf+=" $(use_enable pax_kernel glx-read-only-text)"
314 + fi
315 +
316 + # on abi_x86_32 hardened we need to have asm disable
317 + if [[ ${ABI} == x86* ]] && use pic; then
318 + myconf+=" --disable-asm"
319 + fi
320 +
321 + if use gallium; then
322 + myconf+=" $(use_enable osmesa gallium-osmesa)"
323 + else
324 + myconf+=" $(use_enable osmesa)"
325 + fi
326 +
327 + # build fails with BSD indent, bug #428112
328 + use userland_GNU || export INDENT=cat
329 +
330 + ECONF_SOURCE="${S}" \
331 + econf \
332 + --enable-dri \
333 + --enable-glx \
334 + --enable-shared-glapi \
335 + --disable-shader-cache \
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 + --with-sha1=$(usex nettle libnettle $(usex gcrypt libgcrypt libcrypto)) \
351 + PYTHON2="${PYTHON}" \
352 + ${myconf}
353 +}
354 +
355 +multilib_src_install() {
356 + emake install DESTDIR="${D}"
357 +
358 + if use classic || use gallium; then
359 + ebegin "Moving DRI/Gallium drivers for dynamic switching"
360 + local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
361 + keepdir /usr/$(get_libdir)/dri
362 + dodir /usr/$(get_libdir)/mesa
363 + for x in ${gallium_drivers[@]}; do
364 + if [ -f "$(get_libdir)/gallium/${x}" ]; then
365 + mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
366 + || die "Failed to move ${x}"
367 + fi
368 + done
369 + if use classic; then
370 + emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
371 + fi
372 + for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
373 + if [ -f ${x} -o -L ${x} ]; then
374 + mv -f "${x}" "${x/dri/mesa}" \
375 + || die "Failed to move ${x}"
376 + fi
377 + done
378 + pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
379 + ln -s ../mesa/*.so . || die "Creating symlink failed"
380 + # remove symlinks to drivers known to eselect
381 + for x in ${gallium_drivers[@]}; do
382 + if [ -f ${x} -o -L ${x} ]; then
383 + rm "${x}" || die "Failed to remove ${x}"
384 + fi
385 + done
386 + popd
387 + eend $?
388 + fi
389 + if use opencl; then
390 + ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
391 + local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
392 + dodir ${cl_dir}/{lib,include}
393 + if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
394 + mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
395 + "${ED}"${cl_dir}
396 + fi
397 + if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
398 + mv -f "${ED}"/usr/include/CL \
399 + "${ED}"${cl_dir}/include
400 + fi
401 + eend $?
402 + fi
403 +
404 + if use openmax; then
405 + echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
406 + doenvd "${T}"/99mesaxdgomx
407 + keepdir /usr/share/mesa/xdg
408 + fi
409 +}
410 +
411 +multilib_src_install_all() {
412 + prune_libtool_files --all
413 + einstalldocs
414 +
415 + if use !bindist; then
416 + dodoc docs/patents.txt
417 + fi
418 +
419 + # Install config file for eselect mesa
420 + insinto /usr/share/mesa
421 + newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
422 +
423 + # Mesa should not install these
424 + if use vulkan; then
425 + rm "${ED}"/usr/include/vulkan/{vulkan.h,vk_platform.h} || die
426 + fi
427 +}
428 +
429 +multilib_src_test() {
430 + if use llvm; then
431 + 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'
432 + pushd src/gallium/drivers/llvmpipe >/dev/null || die
433 + emake ${llvm_tests}
434 + pax-mark m ${llvm_tests}
435 + popd >/dev/null || die
436 + fi
437 + emake check
438 +}
439 +
440 +pkg_postinst() {
441 + # Switch to the xorg implementation.
442 + echo
443 + eselect opengl set --use-old ${OPENGL_DIR}
444 +
445 + # Select classic/gallium drivers
446 + if use classic || use gallium; then
447 + eselect mesa set --auto
448 + fi
449 +
450 + # Switch to mesa opencl
451 + if use opencl; then
452 + eselect opencl set --use-old ${PN}
453 + fi
454 +
455 + # run omxregister-bellagio to make the OpenMAX drivers known system-wide
456 + if use openmax; then
457 + ebegin "Registering OpenMAX drivers"
458 + BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
459 + OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
460 + omxregister-bellagio
461 + eend $?
462 + fi
463 +
464 + # warn about patent encumbered texture-float
465 + if use !bindist; then
466 + elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
467 + elog "enabled. Please see patents.txt for an explanation."
468 + fi
469 +
470 + if ! has_version media-libs/libtxc_dxtn; then
471 + elog "Note that in order to have full S3TC support, it is necessary to install"
472 + elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
473 + elog "textures in some apps, and some others even require this to run."
474 + fi
475 +}
476 +
477 +pkg_prerm() {
478 + if use openmax; then
479 + rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
480 + fi
481 +}
482 +
483 +# $1 - VIDEO_CARDS flag
484 +# other args - names of DRI drivers to enable
485 +# TODO: avoid code duplication for a more elegant implementation
486 +driver_enable() {
487 + case $# in
488 + # for enabling unconditionally
489 + 1)
490 + DRI_DRIVERS+=",$1"
491 + ;;
492 + *)
493 + if use $1; then
494 + shift
495 + for i in $@; do
496 + DRI_DRIVERS+=",${i}"
497 + done
498 + fi
499 + ;;
500 + esac
501 +}
502 +
503 +gallium_enable() {
504 + case $# in
505 + # for enabling unconditionally
506 + 1)
507 + GALLIUM_DRIVERS+=",$1"
508 + ;;
509 + *)
510 + if use $1; then
511 + shift
512 + for i in $@; do
513 + GALLIUM_DRIVERS+=",${i}"
514 + done
515 + fi
516 + ;;
517 + esac
518 +}
519 +
520 +vulkan_enable() {
521 + case $# in
522 + # for enabling unconditionally
523 + 1)
524 + VULKAN_DRIVERS+=",$1"
525 + ;;
526 + *)
527 + if use $1; then
528 + shift
529 + for i in $@; do
530 + VULKAN_DRIVERS+=",${i}"
531 + done
532 + fi
533 + ;;
534 + esac
535 +}