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