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, 07 May 2018 16:12:17
Message-Id: 1525709512.9c82e26f1a595a7cb1a95c96515713542e63888b.mattst88@gentoo
1 commit: 9c82e26f1a595a7cb1a95c96515713542e63888b
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 7 16:11:42 2018 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Mon May 7 16:11:52 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c82e26f
7
8 media-libs/mesa: Version bump to 18.0.3
9
10 media-libs/mesa/Manifest | 1 +
11 media-libs/mesa/mesa-18.0.3.ebuild | 571 +++++++++++++++++++++++++++++++++++++
12 2 files changed, 572 insertions(+)
13
14 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
15 index d72581e4f46..71ce5ea9284 100644
16 --- a/media-libs/mesa/Manifest
17 +++ b/media-libs/mesa/Manifest
18 @@ -1,3 +1,4 @@
19 DIST mesa-17.3.9.tar.xz 10660456 BLAKE2B 54f4a75f9040e50e9eea8f5c52a276578379d25d2a01ac4767ab12bee85fe5dae1492d5bb1df06b6e8c6b0fe960bbd5ea38691c75d08a6b4302c64377ce58e54 SHA512 83deffbc6b9823b8e93cccf57d7952106f3d55fea881e3924f9f9586f0e9347a6e3a1a36cc19c24af819f2fde3af9496652a6ff56132511a5618d5774404f63f
20 DIST mesa-18.0.2.tar.xz 10949364 BLAKE2B 8b0557db70f61ac39df96e923383e41008f483ae2f89b3723e94e644cb2ced81a7996d61009acaebaf7813843742a24351a573c80f1173615e6c0302552cf621 SHA512 77d24d01c4c22596d28421aeb74932ff232730a4f556ae1a2e8777ece2876e4e352679575385c065505df4a2a83d2c1cf30db92dcf88038417e36a2768332d7e
21 +DIST mesa-18.0.3.tar.xz 10922936 BLAKE2B 7281579b39b3fcff7fbe56576c1345954f47f42edaceea2ee02d99f3fd704704bfdcfd698ae78c4756df16acac9f0a297a3248e46e2c2aca61d7291df7b0b521 SHA512 decd050bab049d17bcde3f832d4da0ffdb80f147c99377a162739bbe72fd6fd32b51e56e6fc66895b8c30fc19a1815bae164b21aa557816c3998ad18c1ffca2d
22 DIST mesa-18.1.0-rc2.tar.xz 11117872 BLAKE2B a95096ed573031eed17b880f725d68af062e0f7d9513d391d83c51e996fa238add93e05ae98ad4ed77d731f7521736b73566687be798029293d88f8b4b75db1c SHA512 43ddb27c436ab6ad08c4f5f764855e0681c10995e5279146c01e03e6e8af98dd23d96a20d3ac50107a6ca89cc3dd094bc472ddd70d290d0357cef3059ae34cfc
23
24 diff --git a/media-libs/mesa/mesa-18.0.3.ebuild b/media-libs/mesa/mesa-18.0.3.ebuild
25 new file mode 100644
26 index 00000000000..944b89c4937
27 --- /dev/null
28 +++ b/media-libs/mesa/mesa-18.0.3.ebuild
29 @@ -0,0 +1,571 @@
30 +# Copyright 1999-2018 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=6
34 +
35 +EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
36 +
37 +if [[ ${PV} = 9999 ]]; then
38 + GIT_ECLASS="git-r3"
39 + EXPERIMENTAL="true"
40 +fi
41 +
42 +PYTHON_COMPAT=( python2_7 )
43 +
44 +inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
45 +
46 +OPENGL_DIR="xorg-x11"
47 +
48 +MY_P="${P/_/-}"
49 +
50 +DESCRIPTION="OpenGL-like graphic library for Linux"
51 +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
52 +
53 +if [[ $PV == 9999 ]]; then
54 + SRC_URI=""
55 +else
56 + SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
57 + 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"
58 +fi
59 +
60 +LICENSE="MIT"
61 +SLOT="0"
62 +RESTRICT="!bindist? ( bindist )"
63 +
64 +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
65 +VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
66 +for card in ${VIDEO_CARDS}; do
67 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
68 +done
69 +
70 +IUSE="${IUSE_VIDEO_CARDS}
71 + bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
72 + +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
73 + vdpau vulkan wayland xvmc xa"
74 +
75 +REQUIRED_USE="
76 + d3d9? ( dri3 gallium )
77 + llvm? ( gallium )
78 + opencl? ( gallium llvm )
79 + openmax? ( gallium )
80 + gles1? ( egl )
81 + gles2? ( egl )
82 + vaapi? ( gallium )
83 + vdpau? ( gallium )
84 + vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
85 + video_cards_radeonsi? ( llvm ) )
86 + wayland? ( egl gbm )
87 + xa? ( gallium )
88 + video_cards_freedreno? ( gallium )
89 + video_cards_intel? ( classic )
90 + video_cards_i915? ( || ( classic gallium ) )
91 + video_cards_i965? ( classic )
92 + video_cards_imx? ( gallium video_cards_vivante )
93 + video_cards_nouveau? ( || ( classic gallium ) )
94 + video_cards_radeon? ( || ( classic gallium )
95 + gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
96 + video_cards_r100? ( classic )
97 + video_cards_r200? ( classic )
98 + video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
99 + video_cards_r600? ( gallium )
100 + video_cards_radeonsi? ( gallium llvm )
101 + video_cards_vc4? ( gallium )
102 + video_cards_virgl? ( gallium )
103 + video_cards_vivante? ( gallium gbm )
104 + video_cards_vmware? ( gallium )
105 +"
106 +
107 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.89"
108 +RDEPEND="
109 + classic? ( app-eselect/eselect-mesa )
110 + gallium? ( app-eselect/eselect-mesa )
111 + >=app-eselect/eselect-opengl-1.3.0
112 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
113 + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
114 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
115 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
116 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
117 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
118 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
119 + >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
120 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
121 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
122 + llvm? (
123 + video_cards_radeonsi? (
124 + virtual/libelf:0=[${MULTILIB_USEDEP}]
125 + )
126 + video_cards_r600? (
127 + virtual/libelf:0=[${MULTILIB_USEDEP}]
128 + )
129 + video_cards_radeon? (
130 + virtual/libelf:0=[${MULTILIB_USEDEP}]
131 + )
132 + )
133 + opencl? (
134 + app-eselect/eselect-opencl
135 + dev-libs/libclc
136 + virtual/libelf:0=[${MULTILIB_USEDEP}]
137 + )
138 + openmax? (
139 + >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
140 + x11-misc/xdg-utils
141 + )
142 + vaapi? (
143 + >=x11-libs/libva-1.7.3:=[${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? (
148 + >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
149 + >=dev-libs/wayland-protocols-1.8
150 + )
151 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
152 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
153 +
154 + video_cards_intel? (
155 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
156 + )
157 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
158 +"
159 +for card in ${RADEON_CARDS}; do
160 + RDEPEND="${RDEPEND}
161 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
162 + "
163 +done
164 +RDEPEND="${RDEPEND}
165 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
166 +"
167 +
168 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
169 +# we need to *really* make sure we're not pulling one than more slot
170 +# simultaneously.
171 +#
172 +# How to use it:
173 +# 1. List all the working slots (with min versions) in ||, newest first.
174 +# 2. Update the := to specify *max* version, e.g. < 7.
175 +# 3. Specify LLVM_MAX_SLOT, e.g. 6.
176 +LLVM_DEPSTR="
177 + || (
178 + sys-devel/llvm:6[${MULTILIB_USEDEP}]
179 + sys-devel/llvm:5[${MULTILIB_USEDEP}]
180 + sys-devel/llvm:4[${MULTILIB_USEDEP}]
181 + >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
182 + )
183 + sys-devel/llvm:=[${MULTILIB_USEDEP}]
184 +"
185 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
186 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
187 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
188 +RDEPEND="${RDEPEND}
189 + llvm? (
190 + opencl? (
191 + video_cards_r600? (
192 + ${CLANG_DEPSTR_AMDGPU}
193 + )
194 + !video_cards_r600? (
195 + video_cards_radeonsi? (
196 + ${CLANG_DEPSTR_AMDGPU}
197 + )
198 + )
199 + !video_cards_r600? (
200 + !video_cards_radeonsi? (
201 + video_cards_radeon? (
202 + ${CLANG_DEPSTR_AMDGPU}
203 + )
204 + )
205 + )
206 + !video_cards_r600? (
207 + !video_cards_radeon? (
208 + !video_cards_radeonsi? (
209 + ${CLANG_DEPSTR}
210 + )
211 + )
212 + )
213 + )
214 + !opencl? (
215 + video_cards_r600? (
216 + ${LLVM_DEPSTR_AMDGPU}
217 + )
218 + !video_cards_r600? (
219 + video_cards_radeonsi? (
220 + ${LLVM_DEPSTR_AMDGPU}
221 + )
222 + )
223 + !video_cards_r600? (
224 + !video_cards_radeonsi? (
225 + video_cards_radeon? (
226 + ${LLVM_DEPSTR_AMDGPU}
227 + )
228 + )
229 + )
230 + !video_cards_r600? (
231 + !video_cards_radeon? (
232 + !video_cards_radeonsi? (
233 + ${LLVM_DEPSTR}
234 + )
235 + )
236 + )
237 + )
238 + )
239 +"
240 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
241 +
242 +DEPEND="${RDEPEND}
243 + ${PYTHON_DEPS}
244 + opencl? (
245 + >=sys-devel/gcc-4.6
246 + )
247 + sys-devel/gettext
248 + virtual/pkgconfig
249 + valgrind? ( dev-util/valgrind )
250 + x11-base/xorg-proto
251 + vulkan? (
252 + $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
253 + )
254 +"
255 +[[ ${PV} == 9999 ]] && DEPEND+="
256 + sys-devel/bison
257 + sys-devel/flex
258 + $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
259 +"
260 +
261 +S="${WORKDIR}/${MY_P}"
262 +EGIT_CHECKOUT_DIR=${S}
263 +
264 +QA_WX_LOAD="
265 +x86? (
266 + !pic? (
267 + usr/lib*/libglapi.so.0.0.0
268 + usr/lib*/libGLESv1_CM.so.1.1.0
269 + usr/lib*/libGLESv2.so.2.0.0
270 + usr/lib*/libGL.so.1.2.0
271 + usr/lib*/libOSMesa.so.8.0.0
272 + )
273 +)"
274 +
275 +llvm_check_deps() {
276 + local flags=${MULTILIB_USEDEP}
277 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
278 + then
279 + flags+=",llvm_targets_AMDGPU(-)"
280 + fi
281 +
282 + if use opencl; then
283 + has_version "sys-devel/clang[${flags}]" || return 1
284 + fi
285 + has_version "sys-devel/llvm[${flags}]"
286 +}
287 +
288 +pkg_setup() {
289 + # warning message for bug 459306
290 + if use llvm && has_version sys-devel/llvm[!debug=]; then
291 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
292 + ewarn "detected! This can cause problems. For details, see bug 459306."
293 + fi
294 +
295 + if use llvm; then
296 + llvm_pkg_setup
297 + fi
298 + python-any-r1_pkg_setup
299 +}
300 +
301 +src_prepare() {
302 + [[ ${PV} == 9999 ]] && eautoreconf
303 + eapply_user
304 +}
305 +
306 +multilib_src_configure() {
307 + local myconf
308 +
309 + if use classic; then
310 + # Configurable DRI drivers
311 + driver_enable swrast
312 +
313 + # Intel code
314 + driver_enable video_cards_i915 i915
315 + driver_enable video_cards_i965 i965
316 + if ! use video_cards_i915 && \
317 + ! use video_cards_i965; then
318 + driver_enable video_cards_intel i915 i965
319 + fi
320 +
321 + # Nouveau code
322 + driver_enable video_cards_nouveau nouveau
323 +
324 + # ATI code
325 + driver_enable video_cards_r100 radeon
326 + driver_enable video_cards_r200 r200
327 + if ! use video_cards_r100 && \
328 + ! use video_cards_r200; then
329 + driver_enable video_cards_radeon radeon r200
330 + fi
331 + fi
332 +
333 + if use egl; then
334 + myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
335 + fi
336 +
337 + if use gallium; then
338 + myconf+="
339 + $(use_enable d3d9 nine)
340 + $(use_enable llvm)
341 + $(use_enable openmax omx-bellagio)
342 + $(use_enable vaapi va)
343 + $(use_enable vdpau)
344 + $(use_enable xa)
345 + $(use_enable xvmc)
346 + "
347 + use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
348 +
349 + gallium_enable swrast
350 + gallium_enable video_cards_vc4 vc4
351 + gallium_enable video_cards_vivante etnaviv
352 + gallium_enable video_cards_vmware svga
353 + gallium_enable video_cards_nouveau nouveau
354 + gallium_enable video_cards_i915 i915
355 + gallium_enable video_cards_imx imx
356 + if ! use video_cards_i915 && \
357 + ! use video_cards_i965; then
358 + gallium_enable video_cards_intel i915
359 + fi
360 +
361 + gallium_enable video_cards_r300 r300
362 + gallium_enable video_cards_r600 r600
363 + gallium_enable video_cards_radeonsi radeonsi
364 + if ! use video_cards_r300 && \
365 + ! use video_cards_r600; then
366 + gallium_enable video_cards_radeon r300 r600
367 + fi
368 +
369 + gallium_enable video_cards_freedreno freedreno
370 + # opencl stuff
371 + if use opencl; then
372 + myconf+="
373 + $(use_enable opencl)
374 + --with-clang-libdir="${EPREFIX}/usr/lib"
375 + "
376 + fi
377 +
378 + gallium_enable video_cards_virgl virgl
379 + fi
380 +
381 + if use vulkan; then
382 + vulkan_enable video_cards_i965 intel
383 + vulkan_enable video_cards_radeonsi radeon
384 + fi
385 +
386 + # x86 hardened pax_kernel needs glx-rts, bug 240956
387 + if [[ ${ABI} == x86 ]]; then
388 + myconf+=" $(use_enable pax_kernel glx-read-only-text)"
389 + fi
390 +
391 + # on abi_x86_32 hardened we need to have asm disable
392 + if [[ ${ABI} == x86* ]] && use pic; then
393 + myconf+=" --disable-asm"
394 + fi
395 +
396 + if use gallium; then
397 + myconf+=" $(use_enable osmesa gallium-osmesa)"
398 + else
399 + myconf+=" $(use_enable osmesa)"
400 + fi
401 +
402 + # build fails with BSD indent, bug #428112
403 + use userland_GNU || export INDENT=cat
404 +
405 + ECONF_SOURCE="${S}" \
406 + econf \
407 + --enable-dri \
408 + --enable-glx \
409 + --enable-shared-glapi \
410 + $(use_enable !bindist texture-float) \
411 + $(use_enable d3d9 nine) \
412 + $(use_enable debug) \
413 + $(use_enable dri3) \
414 + $(use_enable egl) \
415 + $(use_enable gbm) \
416 + $(use_enable gles1) \
417 + $(use_enable gles2) \
418 + $(use_enable nptl glx-tls) \
419 + $(use_enable unwind libunwind) \
420 + --enable-valgrind=$(usex valgrind auto no) \
421 + --enable-llvm-shared-libs \
422 + --disable-opencl-icd \
423 + --with-dri-drivers=${DRI_DRIVERS} \
424 + --with-gallium-drivers=${GALLIUM_DRIVERS} \
425 + --with-vulkan-drivers=${VULKAN_DRIVERS} \
426 + PYTHON2="${PYTHON}" \
427 + ${myconf}
428 +}
429 +
430 +multilib_src_install() {
431 + emake install DESTDIR="${D}"
432 +
433 + if use classic || use gallium; then
434 + ebegin "Moving DRI/Gallium drivers for dynamic switching"
435 + local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
436 + keepdir /usr/$(get_libdir)/dri
437 + dodir /usr/$(get_libdir)/mesa
438 + for x in ${gallium_drivers[@]}; do
439 + if [ -f "$(get_libdir)/gallium/${x}" ]; then
440 + mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
441 + || die "Failed to move ${x}"
442 + fi
443 + done
444 + if use classic; then
445 + emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
446 + fi
447 + for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
448 + if [ -f ${x} -o -L ${x} ]; then
449 + mv -f "${x}" "${x/dri/mesa}" \
450 + || die "Failed to move ${x}"
451 + fi
452 + done
453 + pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
454 + ln -s ../mesa/*.so . || die "Creating symlink failed"
455 + # remove symlinks to drivers known to eselect
456 + for x in ${gallium_drivers[@]}; do
457 + if [ -f ${x} -o -L ${x} ]; then
458 + rm "${x}" || die "Failed to remove ${x}"
459 + fi
460 + done
461 + popd
462 + eend $?
463 + fi
464 + if use opencl; then
465 + ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
466 + local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
467 + dodir ${cl_dir}/{lib,include}
468 + if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
469 + mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
470 + "${ED}"${cl_dir}
471 + fi
472 + if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
473 + mv -f "${ED}"/usr/include/CL \
474 + "${ED}"${cl_dir}/include
475 + fi
476 + eend $?
477 + fi
478 +
479 + if use openmax; then
480 + echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
481 + doenvd "${T}"/99mesaxdgomx
482 + keepdir /usr/share/mesa/xdg
483 + fi
484 +}
485 +
486 +multilib_src_install_all() {
487 + find "${ED}" -name '*.la' -delete
488 + einstalldocs
489 +
490 + if use !bindist; then
491 + dodoc docs/patents.txt
492 + fi
493 +
494 + # Install config file for eselect mesa
495 + insinto /usr/share/mesa
496 + newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
497 +}
498 +
499 +multilib_src_test() {
500 + if use llvm; then
501 + 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'
502 + pushd src/gallium/drivers/llvmpipe >/dev/null || die
503 + emake ${llvm_tests}
504 + pax-mark m ${llvm_tests}
505 + popd >/dev/null || die
506 + fi
507 + emake check
508 +}
509 +
510 +pkg_postinst() {
511 + # Switch to the xorg implementation.
512 + echo
513 + eselect opengl set --use-old ${OPENGL_DIR}
514 +
515 + # Select classic/gallium drivers
516 + if use classic || use gallium; then
517 + eselect mesa set --auto
518 + fi
519 +
520 + # Switch to mesa opencl
521 + if use opencl; then
522 + eselect opencl set --use-old ${PN}
523 + fi
524 +
525 + # run omxregister-bellagio to make the OpenMAX drivers known system-wide
526 + if use openmax; then
527 + ebegin "Registering OpenMAX drivers"
528 + BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
529 + OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
530 + omxregister-bellagio
531 + eend $?
532 + fi
533 +
534 + # warn about patent encumbered texture-float
535 + if use !bindist; then
536 + elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
537 + elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
538 + elog "explanation."
539 + fi
540 +}
541 +
542 +pkg_prerm() {
543 + if use openmax; then
544 + rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
545 + fi
546 +}
547 +
548 +# $1 - VIDEO_CARDS flag
549 +# other args - names of DRI drivers to enable
550 +# TODO: avoid code duplication for a more elegant implementation
551 +driver_enable() {
552 + case $# in
553 + # for enabling unconditionally
554 + 1)
555 + DRI_DRIVERS+=",$1"
556 + ;;
557 + *)
558 + if use $1; then
559 + shift
560 + for i in $@; do
561 + DRI_DRIVERS+=",${i}"
562 + done
563 + fi
564 + ;;
565 + esac
566 +}
567 +
568 +gallium_enable() {
569 + case $# in
570 + # for enabling unconditionally
571 + 1)
572 + GALLIUM_DRIVERS+=",$1"
573 + ;;
574 + *)
575 + if use $1; then
576 + shift
577 + for i in $@; do
578 + GALLIUM_DRIVERS+=",${i}"
579 + done
580 + fi
581 + ;;
582 + esac
583 +}
584 +
585 +vulkan_enable() {
586 + case $# in
587 + # for enabling unconditionally
588 + 1)
589 + VULKAN_DRIVERS+=",$1"
590 + ;;
591 + *)
592 + if use $1; then
593 + shift
594 + for i in $@; do
595 + VULKAN_DRIVERS+=",${i}"
596 + done
597 + fi
598 + ;;
599 + esac
600 +}