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: Tue, 24 Jan 2017 02:24:06
Message-Id: 1485224397.ef679d3e5919a9f0e158ff40e56b153b9cee352b.mattst88@gentoo
1 commit: ef679d3e5919a9f0e158ff40e56b153b9cee352b
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 24 02:19:23 2017 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 24 02:19:57 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef679d3e
7
8 media-libs/mesa: Version bump to 12.0.6.
9
10 media-libs/mesa/Manifest | 1 +
11 media-libs/mesa/mesa-12.0.6.ebuild | 469 +++++++++++++++++++++++++++++++++++++
12 2 files changed, 470 insertions(+)
13
14 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
15 index c3b26ff..fc501be 100644
16 --- a/media-libs/mesa/Manifest
17 +++ b/media-libs/mesa/Manifest
18 @@ -5,6 +5,7 @@ DIST mesa-11.2.2.tar.xz 7860932 SHA256 40e148812388ec7c6d7b6657d5a16e2e8dabba8b9
19 DIST mesa-12.0.1.tar.xz 8571144 SHA256 bab24fb79f78c876073527f515ed871fc9c81d816f66c8a0b051d8d653896389 SHA512 11898336478d1f5bd3946d695b9599647c0b9084ad8890b4fa89daa922a217e5ca6d8b72f5801e362c3dd7723382f2daaa655b54f65a6d088ad8cfdb85f10023 WHIRLPOOL 9923990fc35142b8c877cbbfdfa7d362ae94c8c637360f28e348943dc6f380bdf5aee944c04da6337994f0f15790c8d1a55bea1f0b00afa780305e5862c78601
20 DIST mesa-12.0.3.tar.xz 8577408 SHA256 1dc86dd9b51272eee1fad3df65e18cda2e556ef1bc0b6e07cd750b9757f493b1 SHA512 7d6525b5ed75e1361f3586aaf7f058de06b5038900a6379ab5f713ee879a0b3cecd253d6f3fb799673ef097bcd6866d61b46c33c0059f6636bb06fb5ceb5d750 WHIRLPOOL 88d77d445aaff7d96f9c44143c4b09763850d7dbffd6b0716a6204f6753ea84d155c97798e7959de0039f0babc8cffddc05845f385b9f39e6eb6f308921d379d
21 DIST mesa-12.0.5.tar.xz 8661528 SHA256 2b0a972d8282860a11291c09c3ef01ac45171405951eb21a83c45ed2b4321924 SHA512 a805a227e502ae8def108636cc2236cfd1129a727af680b07b73ef9e4eaffd2a469b0447a23f8a59d6e2b30eddb577f600095322798d6425769ef0054c6b15a6 WHIRLPOOL 30a665cf42300d903491c8cf9b315c09342a65255226ab8d1d388cf4699213506203440ebae8d85c8d8928ad36b40920d008f7c86857f02cf6b1637e48ef0292
22 +DIST mesa-12.0.6.tar.xz 8662900 SHA256 7d6da9744c1022a4c2ab6ad01a206984d00443fb691568011d01b3dd97e36448 SHA512 2492044f6a3c9d98937146e3a3bd8e262cb1edbb11c3e6d5114fe8c83aa9c846ec3f266b9712adb66fbe080121043772899ca18ddcc3b7a838a84417b6701aae WHIRLPOOL b9993201880536de33852f767001c93f35e6bbc851aac2f2f261b45e9c8a1614b9ad1d121eeef1e737e2943195dbe7489bf34e8f79d705eac2489e59b3206c9a
23 DIST mesa-13.0.0.tar.xz 9151388 SHA256 94edb4ebff82066a68be79d9c2627f15995e1fe10f67ab3fc63deb842027d727 SHA512 3de56ffed1e7940bf0caf604cb9071d39684b9252e09c1c6430fe28227cd7e88d48b4a31591d5677669feca73b95b1c7958944e16c9247cf6b3c59494099e77d WHIRLPOOL 67a1a53b7783126871f5ae23a5ab3fae2665e68bd57638441b15758e9a173771e64469736e4d8285e97cf49b99113db237153f41772de88d00ffe2b1923eed99
24 DIST mesa-13.0.1.tar.xz 9154288 SHA256 71962fb2bf77d33b0ad4a565b490dbbeaf4619099c6d9722f04a73187957a731 SHA512 00ae0eaef742a3954c1461b50cdcc8b9f933e829c89784d66bfcc0890e7e2793350efcad1a06f28bd3c115f04702a43a6f1ac6ce86270ca7799a90f1a5cf5127 WHIRLPOOL 7198e65498800606b7835003e40c4534f891447d8ad3ef682a08a18b2edac41ec6a75ab216efc81217958735cc21ebf0a7a67a2928ebedd5fb2a08d66185faa4
25 DIST mesa-13.0.2.tar.xz 9159100 SHA256 a6ed622645f4ed61da418bf65adde5bcc4bb79023c36ba7d6b45b389da4416d5 SHA512 e4e2b9d685910f9b1d70958c50f54d059263623865571a92c3aa185914f4f7aa745d74afc9706b64ecd1f8d04c603ad03a78365d976382e2664284dc6a8351be WHIRLPOOL 49cb109e3b97f491f7682155a3194fd3df8808235a45a18539a8ecf55d2e3a9ba13dabb13f819822e256b272b4145efad029e38e7c666a5bf7abe7906528f6d2
26
27 diff --git a/media-libs/mesa/mesa-12.0.6.ebuild b/media-libs/mesa/mesa-12.0.6.ebuild
28 new file mode 100644
29 index 00000000..2114cf7
30 --- /dev/null
31 +++ b/media-libs/mesa/mesa-12.0.6.ebuild
32 @@ -0,0 +1,469 @@
33 +# Copyright 1999-2017 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="~hppa"
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 vc4 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 valgrind
80 + vdpau 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 + gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
101 + video_cards_r100? ( classic )
102 + video_cards_r200? ( classic )
103 + video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
104 + video_cards_r600? ( gallium )
105 + video_cards_radeonsi? ( gallium llvm )
106 + video_cards_vmware? ( gallium )
107 + ${PYTHON_REQUIRED_USE}
108 +"
109 +
110 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.67"
111 +# keep correct libdrm and dri2proto dep
112 +# keep blocks in rdepend for binpkg
113 +RDEPEND="
114 + !<x11-base/xorg-server-1.7
115 + !<=x11-proto/xf86driproto-2.0.3
116 + abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
117 + classic? ( app-eselect/eselect-mesa )
118 + gallium? ( app-eselect/eselect-mesa )
119 + >=app-eselect/eselect-opengl-1.3.0
120 + udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
121 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
122 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
123 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
124 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
125 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
126 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
127 + >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
128 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
129 + llvm? ( !kernel_FreeBSD? (
130 + video_cards_radeonsi? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
131 + !video_cards_r600? (
132 + video_cards_radeon? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
133 + ) )
134 + >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}]
135 + )
136 + opencl? (
137 + app-eselect/eselect-opencl
138 + dev-libs/libclc
139 + !kernel_FreeBSD? ( virtual/libelf:0=[${MULTILIB_USEDEP}] )
140 + )
141 + openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
142 + vaapi? (
143 + >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}]
144 + video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
145 + )
146 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
147 + wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
148 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
149 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vmware?,${MULTILIB_USEDEP}]
150 +"
151 +for card in ${INTEL_CARDS}; do
152 + RDEPEND="${RDEPEND}
153 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
154 + "
155 +done
156 +
157 +for card in ${RADEON_CARDS}; do
158 + RDEPEND="${RDEPEND}
159 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
160 + "
161 +done
162 +RDEPEND="${RDEPEND}
163 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
164 +"
165 +
166 +# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once
167 +# LLVM < 3.9 is out of the game
168 +DEPEND="${RDEPEND}
169 + llvm? (
170 + video_cards_radeonsi? ( || (
171 + sys-devel/llvm[llvm_targets_AMDGPU]
172 + sys-devel/llvm[video_cards_radeon]
173 + ) )
174 + )
175 + opencl? (
176 + >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
177 + >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
178 + >=sys-devel/gcc-4.6
179 + )
180 + sys-devel/gettext
181 + virtual/pkgconfig
182 + valgrind? ( dev-util/valgrind )
183 + >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
184 + dri3? (
185 + >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
186 + >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
187 + )
188 + >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
189 + >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
190 + >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
191 + >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
192 +"
193 +[[ ${PV} == 9999 ]] && DEPEND+="
194 + sys-devel/bison
195 + sys-devel/flex
196 + ${PYTHON_DEPS}
197 + $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
198 +"
199 +
200 +S="${WORKDIR}/${MY_P}"
201 +EGIT_CHECKOUT_DIR=${S}
202 +
203 +QA_WX_LOAD="
204 +x86? (
205 + !pic? (
206 + usr/lib*/libglapi.so.0.0.0
207 + usr/lib*/libGLESv1_CM.so.1.1.0
208 + usr/lib*/libGLESv2.so.2.0.0
209 + usr/lib*/libGL.so.1.2.0
210 + usr/lib*/libOSMesa.so.8.0.0
211 + )
212 +)"
213 +
214 +pkg_setup() {
215 + # warning message for bug 459306
216 + if use llvm && has_version sys-devel/llvm[!debug=]; then
217 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
218 + ewarn "detected! This can cause problems. For details, see bug 459306."
219 + fi
220 +
221 + python-any-r1_pkg_setup
222 +}
223 +
224 +src_prepare() {
225 + [[ ${PV} == 9999 ]] && eautoreconf
226 +}
227 +
228 +multilib_src_configure() {
229 + local myconf
230 +
231 + if use classic; then
232 + # Configurable DRI drivers
233 + driver_enable swrast
234 +
235 + # Intel code
236 + driver_enable video_cards_i915 i915
237 + driver_enable video_cards_i965 i965
238 + if ! use video_cards_i915 && \
239 + ! use video_cards_i965; then
240 + driver_enable video_cards_intel i915 i965
241 + fi
242 +
243 + # Nouveau code
244 + driver_enable video_cards_nouveau nouveau
245 +
246 + # ATI code
247 + driver_enable video_cards_r100 radeon
248 + driver_enable video_cards_r200 r200
249 + if ! use video_cards_r100 && \
250 + ! use video_cards_r200; then
251 + driver_enable video_cards_radeon radeon r200
252 + fi
253 + fi
254 +
255 + if use egl; then
256 + myconf+=" --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
257 + fi
258 +
259 + if use gallium; then
260 + myconf+="
261 + $(use_enable d3d9 nine)
262 + $(use_enable llvm gallium-llvm)
263 + $(use_enable openmax omx)
264 + $(use_enable vaapi va)
265 + $(use_enable vdpau)
266 + $(use_enable xa)
267 + $(use_enable xvmc)
268 + "
269 + use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
270 +
271 + gallium_enable swrast
272 + gallium_enable video_cards_vc4 vc4
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-rts, 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 + if use gallium; then
311 + myconf+=" $(use_enable osmesa gallium-osmesa)"
312 + else
313 + myconf+=" $(use_enable osmesa)"
314 + fi
315 +
316 + # build fails with BSD indent, bug #428112
317 + use userland_GNU || export INDENT=cat
318 +
319 + ECONF_SOURCE="${S}" \
320 + econf \
321 + --enable-dri \
322 + --enable-glx \
323 + --enable-shared-glapi \
324 + --disable-shader-cache \
325 + $(use_enable !bindist texture-float) \
326 + $(use_enable d3d9 nine) \
327 + $(use_enable debug) \
328 + $(use_enable dri3) \
329 + $(use_enable egl) \
330 + $(use_enable gbm) \
331 + $(use_enable gles1) \
332 + $(use_enable gles2) \
333 + $(use_enable nptl glx-tls) \
334 + $(use_enable !udev sysfs) \
335 + --enable-valgrind=$(usex valgrind auto no) \
336 + --enable-llvm-shared-libs \
337 + --with-dri-drivers=${DRI_DRIVERS} \
338 + --with-gallium-drivers=${GALLIUM_DRIVERS} \
339 + PYTHON2="${PYTHON}" \
340 + ${myconf}
341 +}
342 +
343 +multilib_src_install() {
344 + emake install DESTDIR="${D}"
345 +
346 + if use classic || use gallium; then
347 + ebegin "Moving DRI/Gallium drivers for dynamic switching"
348 + local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
349 + keepdir /usr/$(get_libdir)/dri
350 + dodir /usr/$(get_libdir)/mesa
351 + for x in ${gallium_drivers[@]}; do
352 + if [ -f "$(get_libdir)/gallium/${x}" ]; then
353 + mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
354 + || die "Failed to move ${x}"
355 + fi
356 + done
357 + if use classic; then
358 + emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
359 + fi
360 + for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
361 + if [ -f ${x} -o -L ${x} ]; then
362 + mv -f "${x}" "${x/dri/mesa}" \
363 + || die "Failed to move ${x}"
364 + fi
365 + done
366 + pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
367 + ln -s ../mesa/*.so . || die "Creating symlink failed"
368 + # remove symlinks to drivers known to eselect
369 + for x in ${gallium_drivers[@]}; do
370 + if [ -f ${x} -o -L ${x} ]; then
371 + rm "${x}" || die "Failed to remove ${x}"
372 + fi
373 + done
374 + popd
375 + eend $?
376 + fi
377 + if use opencl; then
378 + ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
379 + local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
380 + dodir ${cl_dir}/{lib,include}
381 + if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
382 + mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
383 + "${ED}"${cl_dir}
384 + fi
385 + if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
386 + mv -f "${ED}"/usr/include/CL \
387 + "${ED}"${cl_dir}/include
388 + fi
389 + eend $?
390 + fi
391 +
392 + if use openmax; then
393 + echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
394 + doenvd "${T}"/99mesaxdgomx
395 + keepdir /usr/share/mesa/xdg
396 + fi
397 +}
398 +
399 +multilib_src_install_all() {
400 + prune_libtool_files --all
401 + einstalldocs
402 +
403 + if use !bindist; then
404 + dodoc docs/patents.txt
405 + fi
406 +
407 + # Install config file for eselect mesa
408 + insinto /usr/share/mesa
409 + newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
410 +}
411 +
412 +multilib_src_test() {
413 + if use llvm; then
414 + 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'
415 + pushd src/gallium/drivers/llvmpipe >/dev/null || die
416 + emake ${llvm_tests}
417 + pax-mark m ${llvm_tests}
418 + popd >/dev/null || die
419 + fi
420 + emake check
421 +}
422 +
423 +pkg_postinst() {
424 + # Switch to the xorg implementation.
425 + echo
426 + eselect opengl set --use-old ${OPENGL_DIR}
427 +
428 + # Select classic/gallium drivers
429 + if use classic || use gallium; then
430 + eselect mesa set --auto
431 + fi
432 +
433 + # Switch to mesa opencl
434 + if use opencl; then
435 + eselect opencl set --use-old ${PN}
436 + fi
437 +
438 + # run omxregister-bellagio to make the OpenMAX drivers known system-wide
439 + if use openmax; then
440 + ebegin "Registering OpenMAX drivers"
441 + BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
442 + OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
443 + omxregister-bellagio
444 + eend $?
445 + fi
446 +
447 + # warn about patent encumbered texture-float
448 + if use !bindist; then
449 + elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
450 + elog "enabled. Please see patents.txt for an explanation."
451 + fi
452 +
453 + if ! has_version media-libs/libtxc_dxtn; then
454 + elog "Note that in order to have full S3TC support, it is necessary to install"
455 + elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
456 + elog "textures in some apps, and some others even require this to run."
457 + fi
458 +}
459 +
460 +pkg_prerm() {
461 + if use openmax; then
462 + rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
463 + fi
464 +}
465 +
466 +# $1 - VIDEO_CARDS flag
467 +# other args - names of DRI drivers to enable
468 +# TODO: avoid code duplication for a more elegant implementation
469 +driver_enable() {
470 + case $# in
471 + # for enabling unconditionally
472 + 1)
473 + DRI_DRIVERS+=",$1"
474 + ;;
475 + *)
476 + if use $1; then
477 + shift
478 + for i in $@; do
479 + DRI_DRIVERS+=",${i}"
480 + done
481 + fi
482 + ;;
483 + esac
484 +}
485 +
486 +gallium_enable() {
487 + case $# in
488 + # for enabling unconditionally
489 + 1)
490 + GALLIUM_DRIVERS+=",$1"
491 + ;;
492 + *)
493 + if use $1; then
494 + shift
495 + for i in $@; do
496 + GALLIUM_DRIVERS+=",${i}"
497 + done
498 + fi
499 + ;;
500 + esac
501 +}