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