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