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/, media-libs/mesa/files/
Date: Sat, 29 Sep 2018 17:19:34
Message-Id: 1538241545.818bdd6b89fdf4d25b18bf5db13f830d32279f9a.mattst88@gentoo
1 commit: 818bdd6b89fdf4d25b18bf5db13f830d32279f9a
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 29 17:08:33 2018 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 29 17:19:05 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=818bdd6b
7
8 media-libs/mesa: Drop old versions
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 3 -
13 media-libs/mesa/files/eselect-mesa.conf.9.2 | 38 --
14 media-libs/mesa/mesa-17.3.9.ebuild | 573 ----------------------------
15 media-libs/mesa/mesa-18.1.6.ebuild | 540 --------------------------
16 media-libs/mesa/mesa-18.1.8.ebuild | 540 --------------------------
17 5 files changed, 1694 deletions(-)
18
19 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
20 index 3a1703b6c6c..7bb94fa3fff 100644
21 --- a/media-libs/mesa/Manifest
22 +++ b/media-libs/mesa/Manifest
23 @@ -1,6 +1,3 @@
24 -DIST mesa-17.3.9.tar.xz 10660456 BLAKE2B 54f4a75f9040e50e9eea8f5c52a276578379d25d2a01ac4767ab12bee85fe5dae1492d5bb1df06b6e8c6b0fe960bbd5ea38691c75d08a6b4302c64377ce58e54 SHA512 83deffbc6b9823b8e93cccf57d7952106f3d55fea881e3924f9f9586f0e9347a6e3a1a36cc19c24af819f2fde3af9496652a6ff56132511a5618d5774404f63f
25 -DIST mesa-18.1.6.tar.xz 11142884 BLAKE2B fdd156fe7debf5223285dfa238070a2bd7d8ec684dec168afab78b9d2d38d53c10d939aaa64f34c2910e542dce3869adfca6383fca6a854c6dd03287a044b0e3 SHA512 2966210800215f5ced2720691063a8519b51ebeab9fb1e99bde4b1bd7ccc719d6395a1c29f25c88efe62d1592cf14ceafc163aca349490b1f8cee81070d46fcc
26 -DIST mesa-18.1.8.tar.xz 11139864 BLAKE2B bdbd6c186f79b708656a44177b352e9188b8b846c816f8457c99ff76607019f856e19f5eba1c2473d998cd020aa03e732f25f9253f1acdd7f3d9b1470f42ec9e SHA512 ab89c6d27b765d3efdf61b24dc56d863ae590d83003d2eae4bfe25ecfbeda5bee0227f21d057523bb4eceeaf3d9955df48087ffb472c41b123c100e593056cb9
27 DIST mesa-18.1.9.tar.xz 11146188 BLAKE2B 753f0fa3780502d56927f9b0e6124b4728cb5aa3600de78585487fb8e178c6987a72b79fb56e6c310757d157f9f85f12b73a6889bd361b51b62fb1dc1c20eecd SHA512 22db2950d25a3d9393e7c622c783bd177c21695569c8a95683bf77e92318e1db85672a134d4bea30c1f49a24e52bc3a2c1a0ac15deafb3a8fcbfb6de6a18adc2
28 DIST mesa-18.2.0.tar.xz 11331164 BLAKE2B e4e7c65a0c3c0716451157f7d026df8836399b5a25ca7ce77746b34f82e0c14d0bfcb965732f67c979190c2c2db68f272ffafa51b49613a510f186e9e8a01c93 SHA512 e6e997e166845009f6b97da204384758c797c870b56332652c0a2636734638f9180b7e4dbad144495645308ae4d77981a2493a22d57973723338b658e0655557
29 DIST mesa-18.2.1.tar.xz 11374476 BLAKE2B f0f3b766d68550f8c395a1b1d1ffc7a9e532c22ee6b91d698db33a270c152e03ab656d4219301bc2e0e95ba6f0583017c4361add928ad8ab26378a1ec6958f36 SHA512 d249bdf79aad36db9a8d291b3a1a100d283893ac741f58f85ae7e5c90ca25c37f80a5fa6fc57945ffeb0b67b788e7ea146543ec790b22f144578fc4c1525b84d
30
31 diff --git a/media-libs/mesa/files/eselect-mesa.conf.9.2 b/media-libs/mesa/files/eselect-mesa.conf.9.2
32 deleted file mode 100644
33 index 18bfaff8653..00000000000
34 --- a/media-libs/mesa/files/eselect-mesa.conf.9.2
35 +++ /dev/null
36 @@ -1,38 +0,0 @@
37 -# mesa classic/gallium implementations in this release
38 -
39 -# Syntax description:
40 -# * MESA_IMPLEMENTATIONS contains a space-delimited list of switchable
41 -# classic/gallium implementations.
42 -# * MESA_DRIVERS is an associative array, for each member "foo" of
43 -# MESA_IMPLEMENTATIONS it contains the following elements:
44 -# foo,description - Human-readable description of the driver
45 -# foo,classicdriver - Filename of the classic driver
46 -# foo,galliumdriver - Filename of the gallium driver
47 -# foo,default - which of classic or gallium is chosen by default
48 -
49 -MESA_IMPLEMENTATIONS="i915 i965 r300 r600 sw"
50 -declare -A MESA_DRIVERS || die "MESA_DRIVERS already in environment and not associative."
51 -
52 -MESA_DRIVERS[i915,description]="i915 (Intel 915, 945)"
53 -MESA_DRIVERS[i915,classicdriver]="i915_dri.so"
54 -MESA_DRIVERS[i915,galliumdriver]="i915g_dri.so"
55 -MESA_DRIVERS[i915,default]="gallium"
56 -
57 -MESA_DRIVERS[i965,description]="i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)"
58 -MESA_DRIVERS[i965,classicdriver]="i965_dri.so"
59 -MESA_DRIVERS[i965,default]="classic"
60 -
61 -MESA_DRIVERS[r300,description]="r300 (Radeon R300-R500)"
62 -MESA_DRIVERS[r300,classicdriver]="r300_dri.so"
63 -MESA_DRIVERS[r300,galliumdriver]="r300g_dri.so"
64 -MESA_DRIVERS[r300,default]="gallium"
65 -
66 -MESA_DRIVERS[r600,description]="r600 (Radeon R600-R700, Evergreen, Northern Islands)"
67 -MESA_DRIVERS[r600,classicdriver]="r600_dri.so"
68 -MESA_DRIVERS[r600,galliumdriver]="r600g_dri.so"
69 -MESA_DRIVERS[r600,default]="gallium"
70 -
71 -MESA_DRIVERS[sw,description]="sw (Software renderer)"
72 -MESA_DRIVERS[sw,classicdriver]="swrast_dri.so"
73 -MESA_DRIVERS[sw,galliumdriver]="swrastg_dri.so"
74 -MESA_DRIVERS[sw,default]="gallium"
75
76 diff --git a/media-libs/mesa/mesa-17.3.9.ebuild b/media-libs/mesa/mesa-17.3.9.ebuild
77 deleted file mode 100644
78 index d2abc9e9a64..00000000000
79 --- a/media-libs/mesa/mesa-17.3.9.ebuild
80 +++ /dev/null
81 @@ -1,573 +0,0 @@
82 -# Copyright 1999-2018 Gentoo Foundation
83 -# Distributed under the terms of the GNU General Public License v2
84 -
85 -EAPI=6
86 -
87 -EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
88 -
89 -if [[ ${PV} = 9999 ]]; then
90 - GIT_ECLASS="git-r3"
91 - EXPERIMENTAL="true"
92 -fi
93 -
94 -PYTHON_COMPAT=( python2_7 )
95 -
96 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
97 -
98 -OPENGL_DIR="xorg-x11"
99 -
100 -MY_P="${P/_/-}"
101 -
102 -DESCRIPTION="OpenGL-like graphic library for Linux"
103 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
104 -
105 -if [[ $PV == 9999 ]]; then
106 - SRC_URI=""
107 -else
108 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
109 - KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
110 -fi
111 -
112 -LICENSE="MIT"
113 -SLOT="0"
114 -RESTRICT="!bindist? ( bindist )"
115 -
116 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
117 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
118 -for card in ${VIDEO_CARDS}; do
119 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
120 -done
121 -
122 -IUSE="${IUSE_VIDEO_CARDS}
123 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
124 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
125 - vdpau vulkan wayland xvmc xa"
126 -
127 -REQUIRED_USE="
128 - d3d9? ( dri3 gallium )
129 - llvm? ( gallium )
130 - opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
131 - openmax? ( gallium )
132 - gles1? ( egl )
133 - gles2? ( egl )
134 - vaapi? ( gallium )
135 - vdpau? ( gallium )
136 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
137 - video_cards_radeonsi? ( llvm ) )
138 - wayland? ( egl gbm )
139 - xa? ( gallium )
140 - video_cards_freedreno? ( gallium )
141 - video_cards_intel? ( classic )
142 - video_cards_i915? ( || ( classic gallium ) )
143 - video_cards_i965? ( classic )
144 - video_cards_imx? ( gallium video_cards_vivante )
145 - video_cards_nouveau? ( || ( classic gallium ) )
146 - video_cards_radeon? ( || ( classic gallium )
147 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
148 - video_cards_r100? ( classic )
149 - video_cards_r200? ( classic )
150 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
151 - video_cards_r600? ( gallium )
152 - video_cards_radeonsi? ( gallium llvm )
153 - video_cards_vc4? ( gallium )
154 - video_cards_virgl? ( gallium )
155 - video_cards_vivante? ( gallium gbm )
156 - video_cards_vmware? ( gallium )
157 -"
158 -
159 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.89"
160 -# keep blocks in rdepend for binpkg
161 -RDEPEND="
162 - !<x11-base/xorg-server-1.7
163 - !<=x11-proto/xf86driproto-2.0.3
164 - classic? ( app-eselect/eselect-mesa )
165 - gallium? ( app-eselect/eselect-mesa )
166 - >=app-eselect/eselect-opengl-1.3.0
167 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
168 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
169 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
170 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
171 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
172 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
173 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
174 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
175 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
176 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
177 - llvm? (
178 - video_cards_radeonsi? (
179 - virtual/libelf:0=[${MULTILIB_USEDEP}]
180 - )
181 - video_cards_r600? (
182 - virtual/libelf:0=[${MULTILIB_USEDEP}]
183 - )
184 - video_cards_radeon? (
185 - virtual/libelf:0=[${MULTILIB_USEDEP}]
186 - )
187 - )
188 - opencl? (
189 - app-eselect/eselect-opencl
190 - dev-libs/libclc
191 - virtual/libelf:0=[${MULTILIB_USEDEP}]
192 - )
193 - openmax? (
194 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
195 - x11-misc/xdg-utils
196 - )
197 - vaapi? (
198 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
199 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
200 - )
201 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
202 - wayland? (
203 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
204 - >=dev-libs/wayland-protocols-1.8
205 - )
206 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
207 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
208 -
209 - video_cards_intel? (
210 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
211 - )
212 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
213 -"
214 -for card in ${RADEON_CARDS}; do
215 - RDEPEND="${RDEPEND}
216 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
217 - "
218 -done
219 -RDEPEND="${RDEPEND}
220 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
221 -"
222 -
223 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
224 -# we need to *really* make sure we're not pulling one than more slot
225 -# simultaneously.
226 -#
227 -# How to use it:
228 -# 1. List all the working slots (with min versions) in ||, newest first.
229 -# 2. Update the := to specify *max* version, e.g. < 7.
230 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
231 -LLVM_MAX_SLOT="5"
232 -LLVM_DEPSTR="
233 - || (
234 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
235 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
236 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
237 - )
238 - <sys-devel/llvm-6:=[${MULTILIB_USEDEP}]
239 -"
240 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
241 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
242 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
243 -RDEPEND="${RDEPEND}
244 - llvm? (
245 - opencl? (
246 - video_cards_r600? (
247 - ${CLANG_DEPSTR_AMDGPU}
248 - )
249 - !video_cards_r600? (
250 - video_cards_radeonsi? (
251 - ${CLANG_DEPSTR_AMDGPU}
252 - )
253 - )
254 - !video_cards_r600? (
255 - !video_cards_radeonsi? (
256 - video_cards_radeon? (
257 - ${CLANG_DEPSTR_AMDGPU}
258 - )
259 - )
260 - )
261 - !video_cards_r600? (
262 - !video_cards_radeon? (
263 - !video_cards_radeonsi? (
264 - ${CLANG_DEPSTR}
265 - )
266 - )
267 - )
268 - )
269 - !opencl? (
270 - video_cards_r600? (
271 - ${LLVM_DEPSTR_AMDGPU}
272 - )
273 - !video_cards_r600? (
274 - video_cards_radeonsi? (
275 - ${LLVM_DEPSTR_AMDGPU}
276 - )
277 - )
278 - !video_cards_r600? (
279 - !video_cards_radeonsi? (
280 - video_cards_radeon? (
281 - ${LLVM_DEPSTR_AMDGPU}
282 - )
283 - )
284 - )
285 - !video_cards_r600? (
286 - !video_cards_radeon? (
287 - !video_cards_radeonsi? (
288 - ${LLVM_DEPSTR}
289 - )
290 - )
291 - )
292 - )
293 - )
294 -"
295 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
296 -
297 -DEPEND="${RDEPEND}
298 - ${PYTHON_DEPS}
299 - opencl? (
300 - >=sys-devel/gcc-4.6
301 - )
302 - sys-devel/gettext
303 - virtual/pkgconfig
304 - valgrind? ( dev-util/valgrind )
305 - x11-base/xorg-proto
306 - vulkan? (
307 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
308 - )
309 -"
310 -[[ ${PV} == 9999 ]] && DEPEND+="
311 - sys-devel/bison
312 - sys-devel/flex
313 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
314 -"
315 -
316 -S="${WORKDIR}/${MY_P}"
317 -EGIT_CHECKOUT_DIR=${S}
318 -
319 -QA_WX_LOAD="
320 -x86? (
321 - !pic? (
322 - usr/lib*/libglapi.so.0.0.0
323 - usr/lib*/libGLESv1_CM.so.1.1.0
324 - usr/lib*/libGLESv2.so.2.0.0
325 - usr/lib*/libGL.so.1.2.0
326 - usr/lib*/libOSMesa.so.8.0.0
327 - )
328 -)"
329 -
330 -llvm_check_deps() {
331 - local flags=${MULTILIB_USEDEP}
332 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
333 - then
334 - flags+=",llvm_targets_AMDGPU(-)"
335 - fi
336 -
337 - if use opencl; then
338 - has_version "sys-devel/clang[${flags}]" || return 1
339 - fi
340 - has_version "sys-devel/llvm[${flags}]"
341 -}
342 -
343 -pkg_setup() {
344 - # warning message for bug 459306
345 - if use llvm && has_version sys-devel/llvm[!debug=]; then
346 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
347 - ewarn "detected! This can cause problems. For details, see bug 459306."
348 - fi
349 -
350 - if use llvm; then
351 - llvm_pkg_setup
352 - fi
353 - python-any-r1_pkg_setup
354 -}
355 -
356 -src_prepare() {
357 - [[ ${PV} == 9999 ]] && eautoreconf
358 - eapply_user
359 -}
360 -
361 -multilib_src_configure() {
362 - local myconf
363 -
364 - if use classic; then
365 - # Configurable DRI drivers
366 - driver_enable swrast
367 -
368 - # Intel code
369 - driver_enable video_cards_i915 i915
370 - driver_enable video_cards_i965 i965
371 - if ! use video_cards_i915 && \
372 - ! use video_cards_i965; then
373 - driver_enable video_cards_intel i915 i965
374 - fi
375 -
376 - # Nouveau code
377 - driver_enable video_cards_nouveau nouveau
378 -
379 - # ATI code
380 - driver_enable video_cards_r100 radeon
381 - driver_enable video_cards_r200 r200
382 - if ! use video_cards_r100 && \
383 - ! use video_cards_r200; then
384 - driver_enable video_cards_radeon radeon r200
385 - fi
386 - fi
387 -
388 - if use egl; then
389 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
390 - fi
391 -
392 - if use gallium; then
393 - myconf+="
394 - $(use_enable d3d9 nine)
395 - $(use_enable llvm)
396 - $(use_enable openmax omx-bellagio)
397 - $(use_enable vaapi va)
398 - $(use_enable vdpau)
399 - $(use_enable xa)
400 - $(use_enable xvmc)
401 - "
402 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
403 -
404 - gallium_enable swrast
405 - gallium_enable video_cards_vc4 vc4
406 - gallium_enable video_cards_vivante etnaviv
407 - gallium_enable video_cards_vmware svga
408 - gallium_enable video_cards_nouveau nouveau
409 - gallium_enable video_cards_i915 i915
410 - gallium_enable video_cards_imx imx
411 - if ! use video_cards_i915 && \
412 - ! use video_cards_i965; then
413 - gallium_enable video_cards_intel i915
414 - fi
415 -
416 - gallium_enable video_cards_r300 r300
417 - gallium_enable video_cards_r600 r600
418 - gallium_enable video_cards_radeonsi radeonsi
419 - if ! use video_cards_r300 && \
420 - ! use video_cards_r600; then
421 - gallium_enable video_cards_radeon r300 r600
422 - fi
423 -
424 - gallium_enable video_cards_freedreno freedreno
425 - # opencl stuff
426 - if use opencl; then
427 - myconf+="
428 - $(use_enable opencl)
429 - --with-clang-libdir="${EPREFIX}/usr/lib"
430 - "
431 - fi
432 -
433 - gallium_enable video_cards_virgl virgl
434 - fi
435 -
436 - if use vulkan; then
437 - vulkan_enable video_cards_i965 intel
438 - vulkan_enable video_cards_radeonsi radeon
439 - fi
440 -
441 - # x86 hardened pax_kernel needs glx-rts, bug 240956
442 - if [[ ${ABI} == x86 ]]; then
443 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
444 - fi
445 -
446 - # on abi_x86_32 hardened we need to have asm disable
447 - if [[ ${ABI} == x86* ]] && use pic; then
448 - myconf+=" --disable-asm"
449 - fi
450 -
451 - if use gallium; then
452 - myconf+=" $(use_enable osmesa gallium-osmesa)"
453 - else
454 - myconf+=" $(use_enable osmesa)"
455 - fi
456 -
457 - # build fails with BSD indent, bug #428112
458 - use userland_GNU || export INDENT=cat
459 -
460 - ECONF_SOURCE="${S}" \
461 - econf \
462 - --enable-dri \
463 - --enable-glx \
464 - --enable-shared-glapi \
465 - $(use_enable !bindist texture-float) \
466 - $(use_enable d3d9 nine) \
467 - $(use_enable debug) \
468 - $(use_enable dri3) \
469 - $(use_enable egl) \
470 - $(use_enable gbm) \
471 - $(use_enable gles1) \
472 - $(use_enable gles2) \
473 - $(use_enable nptl glx-tls) \
474 - $(use_enable unwind libunwind) \
475 - --enable-valgrind=$(usex valgrind auto no) \
476 - --enable-llvm-shared-libs \
477 - --with-dri-drivers=${DRI_DRIVERS} \
478 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
479 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
480 - PYTHON2="${PYTHON}" \
481 - ${myconf}
482 -}
483 -
484 -multilib_src_install() {
485 - emake install DESTDIR="${D}"
486 -
487 - if use classic || use gallium; then
488 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
489 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
490 - keepdir /usr/$(get_libdir)/dri
491 - dodir /usr/$(get_libdir)/mesa
492 - for x in ${gallium_drivers[@]}; do
493 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
494 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
495 - || die "Failed to move ${x}"
496 - fi
497 - done
498 - if use classic; then
499 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
500 - fi
501 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
502 - if [ -f ${x} -o -L ${x} ]; then
503 - mv -f "${x}" "${x/dri/mesa}" \
504 - || die "Failed to move ${x}"
505 - fi
506 - done
507 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
508 - ln -s ../mesa/*.so . || die "Creating symlink failed"
509 - # remove symlinks to drivers known to eselect
510 - for x in ${gallium_drivers[@]}; do
511 - if [ -f ${x} -o -L ${x} ]; then
512 - rm "${x}" || die "Failed to remove ${x}"
513 - fi
514 - done
515 - popd
516 - eend $?
517 - fi
518 - if use opencl; then
519 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
520 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
521 - dodir ${cl_dir}/{lib,include}
522 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
523 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
524 - "${ED}"${cl_dir}
525 - fi
526 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
527 - mv -f "${ED}"/usr/include/CL \
528 - "${ED}"${cl_dir}/include
529 - fi
530 - eend $?
531 - fi
532 -
533 - if use openmax; then
534 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
535 - doenvd "${T}"/99mesaxdgomx
536 - keepdir /usr/share/mesa/xdg
537 - fi
538 -}
539 -
540 -multilib_src_install_all() {
541 - find "${ED}" -name '*.la' -delete
542 - einstalldocs
543 -
544 - if use !bindist; then
545 - dodoc docs/patents.txt
546 - fi
547 -
548 - # Install config file for eselect mesa
549 - insinto /usr/share/mesa
550 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
551 -}
552 -
553 -multilib_src_test() {
554 - if use llvm; then
555 - 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'
556 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
557 - emake ${llvm_tests}
558 - pax-mark m ${llvm_tests}
559 - popd >/dev/null || die
560 - fi
561 - emake check
562 -}
563 -
564 -pkg_postinst() {
565 - # Switch to the xorg implementation.
566 - echo
567 - eselect opengl set --use-old ${OPENGL_DIR}
568 -
569 - # Select classic/gallium drivers
570 - if use classic || use gallium; then
571 - eselect mesa set --auto
572 - fi
573 -
574 - # Switch to mesa opencl
575 - if use opencl; then
576 - eselect opencl set --use-old ${PN}
577 - fi
578 -
579 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
580 - if use openmax; then
581 - ebegin "Registering OpenMAX drivers"
582 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
583 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
584 - omxregister-bellagio
585 - eend $?
586 - fi
587 -
588 - # warn about patent encumbered texture-float
589 - if use !bindist; then
590 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
591 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
592 - elog "explanation."
593 - fi
594 -}
595 -
596 -pkg_prerm() {
597 - if use openmax; then
598 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
599 - fi
600 -}
601 -
602 -# $1 - VIDEO_CARDS flag
603 -# other args - names of DRI drivers to enable
604 -# TODO: avoid code duplication for a more elegant implementation
605 -driver_enable() {
606 - case $# in
607 - # for enabling unconditionally
608 - 1)
609 - DRI_DRIVERS+=",$1"
610 - ;;
611 - *)
612 - if use $1; then
613 - shift
614 - for i in $@; do
615 - DRI_DRIVERS+=",${i}"
616 - done
617 - fi
618 - ;;
619 - esac
620 -}
621 -
622 -gallium_enable() {
623 - case $# in
624 - # for enabling unconditionally
625 - 1)
626 - GALLIUM_DRIVERS+=",$1"
627 - ;;
628 - *)
629 - if use $1; then
630 - shift
631 - for i in $@; do
632 - GALLIUM_DRIVERS+=",${i}"
633 - done
634 - fi
635 - ;;
636 - esac
637 -}
638 -
639 -vulkan_enable() {
640 - case $# in
641 - # for enabling unconditionally
642 - 1)
643 - VULKAN_DRIVERS+=",$1"
644 - ;;
645 - *)
646 - if use $1; then
647 - shift
648 - for i in $@; do
649 - VULKAN_DRIVERS+=",${i}"
650 - done
651 - fi
652 - ;;
653 - esac
654 -}
655
656 diff --git a/media-libs/mesa/mesa-18.1.6.ebuild b/media-libs/mesa/mesa-18.1.6.ebuild
657 deleted file mode 100644
658 index b325261df67..00000000000
659 --- a/media-libs/mesa/mesa-18.1.6.ebuild
660 +++ /dev/null
661 @@ -1,540 +0,0 @@
662 -# Copyright 1999-2018 Gentoo Foundation
663 -# Distributed under the terms of the GNU General Public License v2
664 -
665 -EAPI=6
666 -
667 -EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
668 -
669 -if [[ ${PV} = 9999 ]]; then
670 - GIT_ECLASS="git-r3"
671 - EXPERIMENTAL="true"
672 -fi
673 -
674 -PYTHON_COMPAT=( python2_7 )
675 -
676 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
677 -
678 -OPENGL_DIR="xorg-x11"
679 -
680 -MY_P="${P/_/-}"
681 -
682 -DESCRIPTION="OpenGL-like graphic library for Linux"
683 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
684 -
685 -if [[ $PV == 9999 ]]; then
686 - SRC_URI=""
687 -else
688 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
689 - KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
690 -fi
691 -
692 -LICENSE="MIT"
693 -SLOT="0"
694 -RESTRICT="!bindist? ( bindist )"
695 -
696 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
697 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
698 -for card in ${VIDEO_CARDS}; do
699 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
700 -done
701 -
702 -IUSE="${IUSE_VIDEO_CARDS}
703 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
704 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
705 - vdpau vulkan wayland xvmc xa"
706 -
707 -REQUIRED_USE="
708 - d3d9? ( dri3 gallium )
709 - llvm? ( gallium )
710 - opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
711 - openmax? ( gallium )
712 - gles1? ( egl )
713 - gles2? ( egl )
714 - vaapi? ( gallium )
715 - vdpau? ( gallium )
716 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
717 - video_cards_radeonsi? ( llvm ) )
718 - wayland? ( egl gbm )
719 - xa? ( gallium )
720 - video_cards_freedreno? ( gallium )
721 - video_cards_intel? ( classic )
722 - video_cards_i915? ( || ( classic gallium ) )
723 - video_cards_i965? ( classic )
724 - video_cards_imx? ( gallium video_cards_vivante )
725 - video_cards_nouveau? ( || ( classic gallium ) )
726 - video_cards_radeon? ( || ( classic gallium )
727 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
728 - video_cards_r100? ( classic )
729 - video_cards_r200? ( classic )
730 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
731 - video_cards_r600? ( gallium )
732 - video_cards_radeonsi? ( gallium llvm )
733 - video_cards_vc4? ( gallium )
734 - video_cards_virgl? ( gallium )
735 - video_cards_vivante? ( gallium gbm )
736 - video_cards_vmware? ( gallium )
737 -"
738 -
739 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
740 -RDEPEND="
741 - !app-eselect/eselect-mesa
742 - >=app-eselect/eselect-opengl-1.3.0
743 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
744 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
745 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
746 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
747 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
748 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
749 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
750 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
751 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
752 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
753 - llvm? (
754 - video_cards_radeonsi? (
755 - virtual/libelf:0=[${MULTILIB_USEDEP}]
756 - )
757 - video_cards_r600? (
758 - virtual/libelf:0=[${MULTILIB_USEDEP}]
759 - )
760 - video_cards_radeon? (
761 - virtual/libelf:0=[${MULTILIB_USEDEP}]
762 - )
763 - )
764 - opencl? (
765 - app-eselect/eselect-opencl
766 - dev-libs/libclc
767 - virtual/libelf:0=[${MULTILIB_USEDEP}]
768 - )
769 - openmax? (
770 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
771 - x11-misc/xdg-utils
772 - )
773 - vaapi? (
774 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
775 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
776 - )
777 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
778 - wayland? (
779 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
780 - >=dev-libs/wayland-protocols-1.8
781 - )
782 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
783 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
784 -
785 - video_cards_intel? (
786 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
787 - )
788 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
789 -"
790 -for card in ${RADEON_CARDS}; do
791 - RDEPEND="${RDEPEND}
792 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
793 - "
794 -done
795 -RDEPEND="${RDEPEND}
796 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
797 -"
798 -
799 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
800 -# we need to *really* make sure we're not pulling one than more slot
801 -# simultaneously.
802 -#
803 -# How to use it:
804 -# 1. List all the working slots (with min versions) in ||, newest first.
805 -# 2. Update the := to specify *max* version, e.g. < 7.
806 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
807 -LLVM_MAX_SLOT="6"
808 -LLVM_DEPSTR="
809 - || (
810 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
811 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
812 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
813 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
814 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
815 - )
816 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
817 -"
818 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
819 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
820 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
821 -RDEPEND="${RDEPEND}
822 - llvm? (
823 - opencl? (
824 - video_cards_r600? (
825 - ${CLANG_DEPSTR_AMDGPU}
826 - )
827 - !video_cards_r600? (
828 - video_cards_radeonsi? (
829 - ${CLANG_DEPSTR_AMDGPU}
830 - )
831 - )
832 - !video_cards_r600? (
833 - !video_cards_radeonsi? (
834 - video_cards_radeon? (
835 - ${CLANG_DEPSTR_AMDGPU}
836 - )
837 - )
838 - )
839 - !video_cards_r600? (
840 - !video_cards_radeon? (
841 - !video_cards_radeonsi? (
842 - ${CLANG_DEPSTR}
843 - )
844 - )
845 - )
846 - )
847 - !opencl? (
848 - video_cards_r600? (
849 - ${LLVM_DEPSTR_AMDGPU}
850 - )
851 - !video_cards_r600? (
852 - video_cards_radeonsi? (
853 - ${LLVM_DEPSTR_AMDGPU}
854 - )
855 - )
856 - !video_cards_r600? (
857 - !video_cards_radeonsi? (
858 - video_cards_radeon? (
859 - ${LLVM_DEPSTR_AMDGPU}
860 - )
861 - )
862 - )
863 - !video_cards_r600? (
864 - !video_cards_radeon? (
865 - !video_cards_radeonsi? (
866 - ${LLVM_DEPSTR}
867 - )
868 - )
869 - )
870 - )
871 - )
872 -"
873 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
874 -
875 -DEPEND="${RDEPEND}
876 - ${PYTHON_DEPS}
877 - opencl? (
878 - >=sys-devel/gcc-4.6
879 - )
880 - sys-devel/gettext
881 - virtual/pkgconfig
882 - valgrind? ( dev-util/valgrind )
883 - x11-base/xorg-proto
884 - vulkan? (
885 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
886 - )
887 -"
888 -[[ ${PV} == 9999 ]] && DEPEND+="
889 - sys-devel/bison
890 - sys-devel/flex
891 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
892 -"
893 -
894 -S="${WORKDIR}/${MY_P}"
895 -EGIT_CHECKOUT_DIR=${S}
896 -
897 -QA_WX_LOAD="
898 -x86? (
899 - !pic? (
900 - usr/lib*/libglapi.so.0.0.0
901 - usr/lib*/libGLESv1_CM.so.1.1.0
902 - usr/lib*/libGLESv2.so.2.0.0
903 - usr/lib*/libGL.so.1.2.0
904 - usr/lib*/libOSMesa.so.8.0.0
905 - )
906 -)"
907 -
908 -llvm_check_deps() {
909 - local flags=${MULTILIB_USEDEP}
910 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
911 - then
912 - flags+=",llvm_targets_AMDGPU(-)"
913 - fi
914 -
915 - if use opencl; then
916 - has_version "sys-devel/clang[${flags}]" || return 1
917 - fi
918 - has_version "sys-devel/llvm[${flags}]"
919 -}
920 -
921 -pkg_setup() {
922 - # warning message for bug 459306
923 - if use llvm && has_version sys-devel/llvm[!debug=]; then
924 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
925 - ewarn "detected! This can cause problems. For details, see bug 459306."
926 - fi
927 -
928 - if use llvm; then
929 - llvm_pkg_setup
930 - fi
931 - python-any-r1_pkg_setup
932 -}
933 -
934 -src_prepare() {
935 - eapply_user
936 - [[ ${PV} == 9999 ]] && eautoreconf
937 -}
938 -
939 -multilib_src_configure() {
940 - local myconf
941 -
942 - if use classic; then
943 - # Configurable DRI drivers
944 - driver_enable swrast
945 -
946 - # Intel code
947 - driver_enable video_cards_i915 i915
948 - driver_enable video_cards_i965 i965
949 - if ! use video_cards_i915 && \
950 - ! use video_cards_i965; then
951 - driver_enable video_cards_intel i915 i965
952 - fi
953 -
954 - # Nouveau code
955 - driver_enable video_cards_nouveau nouveau
956 -
957 - # ATI code
958 - driver_enable video_cards_r100 radeon
959 - driver_enable video_cards_r200 r200
960 - if ! use video_cards_r100 && \
961 - ! use video_cards_r200; then
962 - driver_enable video_cards_radeon radeon r200
963 - fi
964 - fi
965 -
966 - if use egl; then
967 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
968 - fi
969 -
970 - if use gallium; then
971 - myconf+="
972 - $(use_enable d3d9 nine)
973 - $(use_enable llvm)
974 - $(use_enable openmax omx-bellagio)
975 - $(use_enable vaapi va)
976 - $(use_enable vdpau)
977 - $(use_enable xa)
978 - $(use_enable xvmc)
979 - "
980 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
981 -
982 - gallium_enable swrast
983 - gallium_enable video_cards_vc4 vc4
984 - gallium_enable video_cards_vivante etnaviv
985 - gallium_enable video_cards_vmware svga
986 - gallium_enable video_cards_nouveau nouveau
987 - gallium_enable video_cards_i915 i915
988 - gallium_enable video_cards_imx imx
989 - if ! use video_cards_i915 && \
990 - ! use video_cards_i965; then
991 - gallium_enable video_cards_intel i915
992 - fi
993 -
994 - gallium_enable video_cards_r300 r300
995 - gallium_enable video_cards_r600 r600
996 - gallium_enable video_cards_radeonsi radeonsi
997 - if ! use video_cards_r300 && \
998 - ! use video_cards_r600; then
999 - gallium_enable video_cards_radeon r300 r600
1000 - fi
1001 -
1002 - gallium_enable video_cards_freedreno freedreno
1003 - # opencl stuff
1004 - if use opencl; then
1005 - myconf+="
1006 - $(use_enable opencl)
1007 - --with-clang-libdir="${EPREFIX}/usr/lib"
1008 - "
1009 - fi
1010 -
1011 - gallium_enable video_cards_virgl virgl
1012 - fi
1013 -
1014 - if use vulkan; then
1015 - vulkan_enable video_cards_i965 intel
1016 - vulkan_enable video_cards_radeonsi radeon
1017 - fi
1018 -
1019 - # x86 hardened pax_kernel needs glx-rts, bug 240956
1020 - if [[ ${ABI} == x86 ]]; then
1021 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
1022 - fi
1023 -
1024 - # on abi_x86_32 hardened we need to have asm disable
1025 - if [[ ${ABI} == x86* ]] && use pic; then
1026 - myconf+=" --disable-asm"
1027 - fi
1028 -
1029 - if use gallium; then
1030 - myconf+=" $(use_enable osmesa gallium-osmesa)"
1031 - else
1032 - myconf+=" $(use_enable osmesa)"
1033 - fi
1034 -
1035 - # build fails with BSD indent, bug #428112
1036 - use userland_GNU || export INDENT=cat
1037 -
1038 - ECONF_SOURCE="${S}" \
1039 - econf \
1040 - --enable-dri \
1041 - --enable-glx \
1042 - --enable-shared-glapi \
1043 - $(use_enable !bindist texture-float) \
1044 - $(use_enable d3d9 nine) \
1045 - $(use_enable debug) \
1046 - $(use_enable dri3) \
1047 - $(use_enable egl) \
1048 - $(use_enable gbm) \
1049 - $(use_enable gles1) \
1050 - $(use_enable gles2) \
1051 - $(use_enable nptl glx-tls) \
1052 - $(use_enable unwind libunwind) \
1053 - --enable-valgrind=$(usex valgrind auto no) \
1054 - --enable-llvm-shared-libs \
1055 - --disable-opencl-icd \
1056 - --with-dri-drivers=${DRI_DRIVERS} \
1057 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
1058 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
1059 - PYTHON2="${PYTHON}" \
1060 - ${myconf}
1061 -}
1062 -
1063 -multilib_src_install() {
1064 - emake install DESTDIR="${D}"
1065 -
1066 - if use wayland; then
1067 - # These files are now provided by >=dev-libs/wayland-1.15.0
1068 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
1069 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
1070 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
1071 - rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
1072 - fi
1073 -
1074 - if use opencl; then
1075 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
1076 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
1077 - dodir ${cl_dir}/{lib,include}
1078 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
1079 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
1080 - "${ED}"${cl_dir}
1081 - fi
1082 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
1083 - mv -f "${ED}"/usr/include/CL \
1084 - "${ED}"${cl_dir}/include
1085 - fi
1086 - eend $?
1087 - fi
1088 -
1089 - if use openmax; then
1090 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
1091 - doenvd "${T}"/99mesaxdgomx
1092 - keepdir /usr/share/mesa/xdg
1093 - fi
1094 -}
1095 -
1096 -multilib_src_install_all() {
1097 - find "${ED}" -name '*.la' -delete
1098 - einstalldocs
1099 -
1100 - if use !bindist; then
1101 - dodoc docs/patents.txt
1102 - fi
1103 -}
1104 -
1105 -multilib_src_test() {
1106 - if use llvm; then
1107 - 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'
1108 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
1109 - emake ${llvm_tests}
1110 - pax-mark m ${llvm_tests}
1111 - popd >/dev/null || die
1112 - fi
1113 - emake check
1114 -}
1115 -
1116 -pkg_postinst() {
1117 - # Switch to the xorg implementation.
1118 - echo
1119 - eselect opengl set --use-old ${OPENGL_DIR}
1120 -
1121 - # Switch to mesa opencl
1122 - if use opencl; then
1123 - eselect opencl set --use-old ${PN}
1124 - fi
1125 -
1126 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
1127 - if use openmax; then
1128 - ebegin "Registering OpenMAX drivers"
1129 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
1130 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
1131 - omxregister-bellagio
1132 - eend $?
1133 - fi
1134 -
1135 - # warn about patent encumbered texture-float
1136 - if use !bindist; then
1137 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
1138 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
1139 - elog "explanation."
1140 - fi
1141 -}
1142 -
1143 -pkg_prerm() {
1144 - if use openmax; then
1145 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
1146 - fi
1147 -}
1148 -
1149 -# $1 - VIDEO_CARDS flag
1150 -# other args - names of DRI drivers to enable
1151 -# TODO: avoid code duplication for a more elegant implementation
1152 -driver_enable() {
1153 - case $# in
1154 - # for enabling unconditionally
1155 - 1)
1156 - DRI_DRIVERS+=",$1"
1157 - ;;
1158 - *)
1159 - if use $1; then
1160 - shift
1161 - for i in $@; do
1162 - DRI_DRIVERS+=",${i}"
1163 - done
1164 - fi
1165 - ;;
1166 - esac
1167 -}
1168 -
1169 -gallium_enable() {
1170 - case $# in
1171 - # for enabling unconditionally
1172 - 1)
1173 - GALLIUM_DRIVERS+=",$1"
1174 - ;;
1175 - *)
1176 - if use $1; then
1177 - shift
1178 - for i in $@; do
1179 - GALLIUM_DRIVERS+=",${i}"
1180 - done
1181 - fi
1182 - ;;
1183 - esac
1184 -}
1185 -
1186 -vulkan_enable() {
1187 - case $# in
1188 - # for enabling unconditionally
1189 - 1)
1190 - VULKAN_DRIVERS+=",$1"
1191 - ;;
1192 - *)
1193 - if use $1; then
1194 - shift
1195 - for i in $@; do
1196 - VULKAN_DRIVERS+=",${i}"
1197 - done
1198 - fi
1199 - ;;
1200 - esac
1201 -}
1202
1203 diff --git a/media-libs/mesa/mesa-18.1.8.ebuild b/media-libs/mesa/mesa-18.1.8.ebuild
1204 deleted file mode 100644
1205 index 749c5c07c8a..00000000000
1206 --- a/media-libs/mesa/mesa-18.1.8.ebuild
1207 +++ /dev/null
1208 @@ -1,540 +0,0 @@
1209 -# Copyright 1999-2018 Gentoo Foundation
1210 -# Distributed under the terms of the GNU General Public License v2
1211 -
1212 -EAPI=6
1213 -
1214 -EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1215 -
1216 -if [[ ${PV} = 9999 ]]; then
1217 - GIT_ECLASS="git-r3"
1218 - EXPERIMENTAL="true"
1219 -fi
1220 -
1221 -PYTHON_COMPAT=( python2_7 )
1222 -
1223 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
1224 -
1225 -OPENGL_DIR="xorg-x11"
1226 -
1227 -MY_P="${P/_/-}"
1228 -
1229 -DESCRIPTION="OpenGL-like graphic library for Linux"
1230 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1231 -
1232 -if [[ $PV == 9999 ]]; then
1233 - SRC_URI=""
1234 -else
1235 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1236 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
1237 -fi
1238 -
1239 -LICENSE="MIT"
1240 -SLOT="0"
1241 -RESTRICT="!bindist? ( bindist )"
1242 -
1243 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1244 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
1245 -for card in ${VIDEO_CARDS}; do
1246 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1247 -done
1248 -
1249 -IUSE="${IUSE_VIDEO_CARDS}
1250 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
1251 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
1252 - vdpau vulkan wayland xvmc xa"
1253 -
1254 -REQUIRED_USE="
1255 - d3d9? ( dri3 gallium )
1256 - llvm? ( gallium )
1257 - opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
1258 - openmax? ( gallium )
1259 - gles1? ( egl )
1260 - gles2? ( egl )
1261 - vaapi? ( gallium )
1262 - vdpau? ( gallium )
1263 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
1264 - video_cards_radeonsi? ( llvm ) )
1265 - wayland? ( egl gbm )
1266 - xa? ( gallium )
1267 - video_cards_freedreno? ( gallium )
1268 - video_cards_intel? ( classic )
1269 - video_cards_i915? ( || ( classic gallium ) )
1270 - video_cards_i965? ( classic )
1271 - video_cards_imx? ( gallium video_cards_vivante )
1272 - video_cards_nouveau? ( || ( classic gallium ) )
1273 - video_cards_radeon? ( || ( classic gallium )
1274 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1275 - video_cards_r100? ( classic )
1276 - video_cards_r200? ( classic )
1277 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1278 - video_cards_r600? ( gallium )
1279 - video_cards_radeonsi? ( gallium llvm )
1280 - video_cards_vc4? ( gallium )
1281 - video_cards_virgl? ( gallium )
1282 - video_cards_vivante? ( gallium gbm )
1283 - video_cards_vmware? ( gallium )
1284 -"
1285 -
1286 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
1287 -RDEPEND="
1288 - !app-eselect/eselect-mesa
1289 - >=app-eselect/eselect-opengl-1.3.0
1290 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1291 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1292 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1293 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1294 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1295 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1296 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1297 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1298 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1299 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1300 - llvm? (
1301 - video_cards_radeonsi? (
1302 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1303 - )
1304 - video_cards_r600? (
1305 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1306 - )
1307 - video_cards_radeon? (
1308 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1309 - )
1310 - )
1311 - opencl? (
1312 - app-eselect/eselect-opencl
1313 - dev-libs/libclc
1314 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1315 - )
1316 - openmax? (
1317 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
1318 - x11-misc/xdg-utils
1319 - )
1320 - vaapi? (
1321 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1322 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
1323 - )
1324 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1325 - wayland? (
1326 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
1327 - >=dev-libs/wayland-protocols-1.8
1328 - )
1329 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1330 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1331 -
1332 - video_cards_intel? (
1333 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1334 - )
1335 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1336 -"
1337 -for card in ${RADEON_CARDS}; do
1338 - RDEPEND="${RDEPEND}
1339 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1340 - "
1341 -done
1342 -RDEPEND="${RDEPEND}
1343 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1344 -"
1345 -
1346 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1347 -# we need to *really* make sure we're not pulling one than more slot
1348 -# simultaneously.
1349 -#
1350 -# How to use it:
1351 -# 1. List all the working slots (with min versions) in ||, newest first.
1352 -# 2. Update the := to specify *max* version, e.g. < 7.
1353 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
1354 -LLVM_MAX_SLOT="6"
1355 -LLVM_DEPSTR="
1356 - || (
1357 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
1358 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
1359 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
1360 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
1361 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
1362 - )
1363 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
1364 -"
1365 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1366 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1367 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1368 -RDEPEND="${RDEPEND}
1369 - llvm? (
1370 - opencl? (
1371 - video_cards_r600? (
1372 - ${CLANG_DEPSTR_AMDGPU}
1373 - )
1374 - !video_cards_r600? (
1375 - video_cards_radeonsi? (
1376 - ${CLANG_DEPSTR_AMDGPU}
1377 - )
1378 - )
1379 - !video_cards_r600? (
1380 - !video_cards_radeonsi? (
1381 - video_cards_radeon? (
1382 - ${CLANG_DEPSTR_AMDGPU}
1383 - )
1384 - )
1385 - )
1386 - !video_cards_r600? (
1387 - !video_cards_radeon? (
1388 - !video_cards_radeonsi? (
1389 - ${CLANG_DEPSTR}
1390 - )
1391 - )
1392 - )
1393 - )
1394 - !opencl? (
1395 - video_cards_r600? (
1396 - ${LLVM_DEPSTR_AMDGPU}
1397 - )
1398 - !video_cards_r600? (
1399 - video_cards_radeonsi? (
1400 - ${LLVM_DEPSTR_AMDGPU}
1401 - )
1402 - )
1403 - !video_cards_r600? (
1404 - !video_cards_radeonsi? (
1405 - video_cards_radeon? (
1406 - ${LLVM_DEPSTR_AMDGPU}
1407 - )
1408 - )
1409 - )
1410 - !video_cards_r600? (
1411 - !video_cards_radeon? (
1412 - !video_cards_radeonsi? (
1413 - ${LLVM_DEPSTR}
1414 - )
1415 - )
1416 - )
1417 - )
1418 - )
1419 -"
1420 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1421 -
1422 -DEPEND="${RDEPEND}
1423 - ${PYTHON_DEPS}
1424 - opencl? (
1425 - >=sys-devel/gcc-4.6
1426 - )
1427 - sys-devel/gettext
1428 - virtual/pkgconfig
1429 - valgrind? ( dev-util/valgrind )
1430 - x11-base/xorg-proto
1431 - vulkan? (
1432 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
1433 - )
1434 -"
1435 -[[ ${PV} == 9999 ]] && DEPEND+="
1436 - sys-devel/bison
1437 - sys-devel/flex
1438 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
1439 -"
1440 -
1441 -S="${WORKDIR}/${MY_P}"
1442 -EGIT_CHECKOUT_DIR=${S}
1443 -
1444 -QA_WX_LOAD="
1445 -x86? (
1446 - !pic? (
1447 - usr/lib*/libglapi.so.0.0.0
1448 - usr/lib*/libGLESv1_CM.so.1.1.0
1449 - usr/lib*/libGLESv2.so.2.0.0
1450 - usr/lib*/libGL.so.1.2.0
1451 - usr/lib*/libOSMesa.so.8.0.0
1452 - )
1453 -)"
1454 -
1455 -llvm_check_deps() {
1456 - local flags=${MULTILIB_USEDEP}
1457 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1458 - then
1459 - flags+=",llvm_targets_AMDGPU(-)"
1460 - fi
1461 -
1462 - if use opencl; then
1463 - has_version "sys-devel/clang[${flags}]" || return 1
1464 - fi
1465 - has_version "sys-devel/llvm[${flags}]"
1466 -}
1467 -
1468 -pkg_setup() {
1469 - # warning message for bug 459306
1470 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1471 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1472 - ewarn "detected! This can cause problems. For details, see bug 459306."
1473 - fi
1474 -
1475 - if use llvm; then
1476 - llvm_pkg_setup
1477 - fi
1478 - python-any-r1_pkg_setup
1479 -}
1480 -
1481 -src_prepare() {
1482 - eapply_user
1483 - [[ ${PV} == 9999 ]] && eautoreconf
1484 -}
1485 -
1486 -multilib_src_configure() {
1487 - local myconf
1488 -
1489 - if use classic; then
1490 - # Configurable DRI drivers
1491 - driver_enable swrast
1492 -
1493 - # Intel code
1494 - driver_enable video_cards_i915 i915
1495 - driver_enable video_cards_i965 i965
1496 - if ! use video_cards_i915 && \
1497 - ! use video_cards_i965; then
1498 - driver_enable video_cards_intel i915 i965
1499 - fi
1500 -
1501 - # Nouveau code
1502 - driver_enable video_cards_nouveau nouveau
1503 -
1504 - # ATI code
1505 - driver_enable video_cards_r100 radeon
1506 - driver_enable video_cards_r200 r200
1507 - if ! use video_cards_r100 && \
1508 - ! use video_cards_r200; then
1509 - driver_enable video_cards_radeon radeon r200
1510 - fi
1511 - fi
1512 -
1513 - if use egl; then
1514 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
1515 - fi
1516 -
1517 - if use gallium; then
1518 - myconf+="
1519 - $(use_enable d3d9 nine)
1520 - $(use_enable llvm)
1521 - $(use_enable openmax omx-bellagio)
1522 - $(use_enable vaapi va)
1523 - $(use_enable vdpau)
1524 - $(use_enable xa)
1525 - $(use_enable xvmc)
1526 - "
1527 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
1528 -
1529 - gallium_enable swrast
1530 - gallium_enable video_cards_vc4 vc4
1531 - gallium_enable video_cards_vivante etnaviv
1532 - gallium_enable video_cards_vmware svga
1533 - gallium_enable video_cards_nouveau nouveau
1534 - gallium_enable video_cards_i915 i915
1535 - gallium_enable video_cards_imx imx
1536 - if ! use video_cards_i915 && \
1537 - ! use video_cards_i965; then
1538 - gallium_enable video_cards_intel i915
1539 - fi
1540 -
1541 - gallium_enable video_cards_r300 r300
1542 - gallium_enable video_cards_r600 r600
1543 - gallium_enable video_cards_radeonsi radeonsi
1544 - if ! use video_cards_r300 && \
1545 - ! use video_cards_r600; then
1546 - gallium_enable video_cards_radeon r300 r600
1547 - fi
1548 -
1549 - gallium_enable video_cards_freedreno freedreno
1550 - # opencl stuff
1551 - if use opencl; then
1552 - myconf+="
1553 - $(use_enable opencl)
1554 - --with-clang-libdir="${EPREFIX}/usr/lib"
1555 - "
1556 - fi
1557 -
1558 - gallium_enable video_cards_virgl virgl
1559 - fi
1560 -
1561 - if use vulkan; then
1562 - vulkan_enable video_cards_i965 intel
1563 - vulkan_enable video_cards_radeonsi radeon
1564 - fi
1565 -
1566 - # x86 hardened pax_kernel needs glx-rts, bug 240956
1567 - if [[ ${ABI} == x86 ]]; then
1568 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
1569 - fi
1570 -
1571 - # on abi_x86_32 hardened we need to have asm disable
1572 - if [[ ${ABI} == x86* ]] && use pic; then
1573 - myconf+=" --disable-asm"
1574 - fi
1575 -
1576 - if use gallium; then
1577 - myconf+=" $(use_enable osmesa gallium-osmesa)"
1578 - else
1579 - myconf+=" $(use_enable osmesa)"
1580 - fi
1581 -
1582 - # build fails with BSD indent, bug #428112
1583 - use userland_GNU || export INDENT=cat
1584 -
1585 - ECONF_SOURCE="${S}" \
1586 - econf \
1587 - --enable-dri \
1588 - --enable-glx \
1589 - --enable-shared-glapi \
1590 - $(use_enable !bindist texture-float) \
1591 - $(use_enable d3d9 nine) \
1592 - $(use_enable debug) \
1593 - $(use_enable dri3) \
1594 - $(use_enable egl) \
1595 - $(use_enable gbm) \
1596 - $(use_enable gles1) \
1597 - $(use_enable gles2) \
1598 - $(use_enable nptl glx-tls) \
1599 - $(use_enable unwind libunwind) \
1600 - --enable-valgrind=$(usex valgrind auto no) \
1601 - --enable-llvm-shared-libs \
1602 - --disable-opencl-icd \
1603 - --with-dri-drivers=${DRI_DRIVERS} \
1604 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
1605 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
1606 - PYTHON2="${PYTHON}" \
1607 - ${myconf}
1608 -}
1609 -
1610 -multilib_src_install() {
1611 - emake install DESTDIR="${D}"
1612 -
1613 - if use wayland; then
1614 - # These files are now provided by >=dev-libs/wayland-1.15.0
1615 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
1616 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
1617 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
1618 - rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
1619 - fi
1620 -
1621 - if use opencl; then
1622 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
1623 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
1624 - dodir ${cl_dir}/{lib,include}
1625 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
1626 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
1627 - "${ED}"${cl_dir}
1628 - fi
1629 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
1630 - mv -f "${ED}"/usr/include/CL \
1631 - "${ED}"${cl_dir}/include
1632 - fi
1633 - eend $?
1634 - fi
1635 -
1636 - if use openmax; then
1637 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
1638 - doenvd "${T}"/99mesaxdgomx
1639 - keepdir /usr/share/mesa/xdg
1640 - fi
1641 -}
1642 -
1643 -multilib_src_install_all() {
1644 - find "${ED}" -name '*.la' -delete
1645 - einstalldocs
1646 -
1647 - if use !bindist; then
1648 - dodoc docs/patents.txt
1649 - fi
1650 -}
1651 -
1652 -multilib_src_test() {
1653 - if use llvm; then
1654 - 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'
1655 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
1656 - emake ${llvm_tests}
1657 - pax-mark m ${llvm_tests}
1658 - popd >/dev/null || die
1659 - fi
1660 - emake check
1661 -}
1662 -
1663 -pkg_postinst() {
1664 - # Switch to the xorg implementation.
1665 - echo
1666 - eselect opengl set --use-old ${OPENGL_DIR}
1667 -
1668 - # Switch to mesa opencl
1669 - if use opencl; then
1670 - eselect opencl set --use-old ${PN}
1671 - fi
1672 -
1673 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
1674 - if use openmax; then
1675 - ebegin "Registering OpenMAX drivers"
1676 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
1677 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
1678 - omxregister-bellagio
1679 - eend $?
1680 - fi
1681 -
1682 - # warn about patent encumbered texture-float
1683 - if use !bindist; then
1684 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
1685 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
1686 - elog "explanation."
1687 - fi
1688 -}
1689 -
1690 -pkg_prerm() {
1691 - if use openmax; then
1692 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
1693 - fi
1694 -}
1695 -
1696 -# $1 - VIDEO_CARDS flag
1697 -# other args - names of DRI drivers to enable
1698 -# TODO: avoid code duplication for a more elegant implementation
1699 -driver_enable() {
1700 - case $# in
1701 - # for enabling unconditionally
1702 - 1)
1703 - DRI_DRIVERS+=",$1"
1704 - ;;
1705 - *)
1706 - if use $1; then
1707 - shift
1708 - for i in $@; do
1709 - DRI_DRIVERS+=",${i}"
1710 - done
1711 - fi
1712 - ;;
1713 - esac
1714 -}
1715 -
1716 -gallium_enable() {
1717 - case $# in
1718 - # for enabling unconditionally
1719 - 1)
1720 - GALLIUM_DRIVERS+=",$1"
1721 - ;;
1722 - *)
1723 - if use $1; then
1724 - shift
1725 - for i in $@; do
1726 - GALLIUM_DRIVERS+=",${i}"
1727 - done
1728 - fi
1729 - ;;
1730 - esac
1731 -}
1732 -
1733 -vulkan_enable() {
1734 - case $# in
1735 - # for enabling unconditionally
1736 - 1)
1737 - VULKAN_DRIVERS+=",$1"
1738 - ;;
1739 - *)
1740 - if use $1; then
1741 - shift
1742 - for i in $@; do
1743 - VULKAN_DRIVERS+=",${i}"
1744 - done
1745 - fi
1746 - ;;
1747 - esac
1748 -}