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, 07 Sep 2018 22:38:58
Message-Id: 1536359923.eb96b0191f21c9553a58a46494c45cbe09b389fb.mattst88@gentoo
1 commit: eb96b0191f21c9553a58a46494c45cbe09b389fb
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 7 22:35:43 2018 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 7 22:38:43 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb96b019
7
8 media-libs/mesa: Drop old versions
9
10 media-libs/mesa/Manifest | 6 -
11 media-libs/mesa/mesa-18.0.5.ebuild | 571 ---------------------------------
12 media-libs/mesa/mesa-18.1.7.ebuild | 540 -------------------------------
13 media-libs/mesa/mesa-18.2.0_rc3.ebuild | 547 -------------------------------
14 media-libs/mesa/mesa-18.2.0_rc4.ebuild | 547 -------------------------------
15 media-libs/mesa/mesa-18.2.0_rc5.ebuild | 547 -------------------------------
16 media-libs/mesa/mesa-18.2.0_rc6.ebuild | 547 -------------------------------
17 7 files changed, 3305 deletions(-)
18
19 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
20 index 2e97be2f4a3..06df0681db5 100644
21 --- a/media-libs/mesa/Manifest
22 +++ b/media-libs/mesa/Manifest
23 @@ -1,10 +1,4 @@
24 DIST mesa-17.3.9.tar.xz 10660456 BLAKE2B 54f4a75f9040e50e9eea8f5c52a276578379d25d2a01ac4767ab12bee85fe5dae1492d5bb1df06b6e8c6b0fe960bbd5ea38691c75d08a6b4302c64377ce58e54 SHA512 83deffbc6b9823b8e93cccf57d7952106f3d55fea881e3924f9f9586f0e9347a6e3a1a36cc19c24af819f2fde3af9496652a6ff56132511a5618d5774404f63f
25 -DIST mesa-18.0.5.tar.xz 10952996 BLAKE2B 708cdb2ef95a618430cd4e7eb45bcab0f6575774065b61f53787aa378385fe0dfa0b04f9c80c5426f9581851edc545a75c137777dc304ac8ba57465d365fcd50 SHA512 63b47cdca7f8282aab7aaa66233411f02918e5c4804b7a0010de2b1867fe90171e492ff031dfc4aa20968dfc99bd7dceb5d35fd44c709e54a2ece61175a60f3d
26 DIST mesa-18.1.6.tar.xz 11142884 BLAKE2B fdd156fe7debf5223285dfa238070a2bd7d8ec684dec168afab78b9d2d38d53c10d939aaa64f34c2910e542dce3869adfca6383fca6a854c6dd03287a044b0e3 SHA512 2966210800215f5ced2720691063a8519b51ebeab9fb1e99bde4b1bd7ccc719d6395a1c29f25c88efe62d1592cf14ceafc163aca349490b1f8cee81070d46fcc
27 -DIST mesa-18.1.7.tar.xz 11136580 BLAKE2B a3076803dce9264e1b2138614398f046cef945a2658a13bc0447a712a45e7177291071884378a4c969e793a98680b90921c272991594957e5ef04c1087b1fb5f SHA512 697c4f441ae52bc867d9d73b103094a29102168c248a502c4ea0fc48f51bcb86b2e741da39e882f24131326d460cdb1416415604c6994d1b8c09fb8a153a5c77
28 DIST mesa-18.1.8.tar.xz 11139864 BLAKE2B bdbd6c186f79b708656a44177b352e9188b8b846c816f8457c99ff76607019f856e19f5eba1c2473d998cd020aa03e732f25f9253f1acdd7f3d9b1470f42ec9e SHA512 ab89c6d27b765d3efdf61b24dc56d863ae590d83003d2eae4bfe25ecfbeda5bee0227f21d057523bb4eceeaf3d9955df48087ffb472c41b123c100e593056cb9
29 -DIST mesa-18.2.0-rc3.tar.xz 11327960 BLAKE2B 7ce236d6a308904a8f76b2fda86af181ae4e422d637caffb45ffd5ce0ed427fdfbd107f44c52825bff173ec8aaf4e3a3dbae939167da9f6a1a719b7366914526 SHA512 175dbdffdcdf61c7ac0e4e1fae021daba80311fac02074ad6dea208971ab50c68bc43ba8d7b36ecf82b7081c051d301cb562f66785446973b88657d48f7bb663
30 -DIST mesa-18.2.0-rc4.tar.xz 11320208 BLAKE2B bf99295f462ec8162bced6ff6d8496f3d2246ef85b5b6512f1b2d6c6ac63c04a2677b0e0368e857e0becd0ea08d96c53c557a4a103bbee8e169d3e1f80dd9092 SHA512 8aa5c75567c23228c80174c36f1cbc30bea79e5a5cf93804a9ca6c6142c428c55ea256b0a76d83493a52d60d4c4ace96ae81434f01fcdfc1971151bf3900f655
31 -DIST mesa-18.2.0-rc5.tar.xz 11325840 BLAKE2B ec0a0ad0b480b4f8b092e80cb25a8f3544d9568976d7878c1c052921bdf5b8065677d512d08907798621bc91d63aa1f30c3b1fe21446d7b320aeb6b7e8ae05b5 SHA512 156f6ae7fd42b33cfcc0a402afbd7e0d4560c114a82b6d99d9e47c0deebdeb3430550cf5c06a64e19ab01e324ab28f2475b746037552d87563c2a92a24aa203a
32 -DIST mesa-18.2.0-rc6.tar.xz 11330888 BLAKE2B 233df9d97042b4c20132cc8af71ca1209db539326aba095780f977c6ea941f558236b061209f34b1c9887438888d8c05f9229ae0240375cf6dead12596f4183c SHA512 bdccf9bc37d54f0319699fac95b64169c01686cbebccb1b99d52b9ca5cfee8db1b3dc467ca9731e842651b94efd34abb35d7f67f65e3eef06a362fcfc7383e6f
33 DIST mesa-18.2.0.tar.xz 11331164 BLAKE2B e4e7c65a0c3c0716451157f7d026df8836399b5a25ca7ce77746b34f82e0c14d0bfcb965732f67c979190c2c2db68f272ffafa51b49613a510f186e9e8a01c93 SHA512 e6e997e166845009f6b97da204384758c797c870b56332652c0a2636734638f9180b7e4dbad144495645308ae4d77981a2493a22d57973723338b658e0655557
34
35 diff --git a/media-libs/mesa/mesa-18.0.5.ebuild b/media-libs/mesa/mesa-18.0.5.ebuild
36 deleted file mode 100644
37 index 8ff783e1d43..00000000000
38 --- a/media-libs/mesa/mesa-18.0.5.ebuild
39 +++ /dev/null
40 @@ -1,571 +0,0 @@
41 -# Copyright 1999-2018 Gentoo Foundation
42 -# Distributed under the terms of the GNU General Public License v2
43 -
44 -EAPI=6
45 -
46 -EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
47 -
48 -if [[ ${PV} = 9999 ]]; then
49 - GIT_ECLASS="git-r3"
50 - EXPERIMENTAL="true"
51 -fi
52 -
53 -PYTHON_COMPAT=( python2_7 )
54 -
55 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
56 -
57 -OPENGL_DIR="xorg-x11"
58 -
59 -MY_P="${P/_/-}"
60 -
61 -DESCRIPTION="OpenGL-like graphic library for Linux"
62 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
63 -
64 -if [[ $PV == 9999 ]]; then
65 - SRC_URI=""
66 -else
67 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
68 - 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"
69 -fi
70 -
71 -LICENSE="MIT"
72 -SLOT="0"
73 -RESTRICT="!bindist? ( bindist )"
74 -
75 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
76 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
77 -for card in ${VIDEO_CARDS}; do
78 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
79 -done
80 -
81 -IUSE="${IUSE_VIDEO_CARDS}
82 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
83 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
84 - vdpau vulkan wayland xvmc xa"
85 -
86 -REQUIRED_USE="
87 - d3d9? ( dri3 gallium )
88 - llvm? ( gallium )
89 - opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
90 - openmax? ( gallium )
91 - gles1? ( egl )
92 - gles2? ( egl )
93 - vaapi? ( gallium )
94 - vdpau? ( gallium )
95 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
96 - video_cards_radeonsi? ( llvm ) )
97 - wayland? ( egl gbm )
98 - xa? ( gallium )
99 - video_cards_freedreno? ( gallium )
100 - video_cards_intel? ( classic )
101 - video_cards_i915? ( || ( classic gallium ) )
102 - video_cards_i965? ( classic )
103 - video_cards_imx? ( gallium video_cards_vivante )
104 - video_cards_nouveau? ( || ( classic gallium ) )
105 - video_cards_radeon? ( || ( classic gallium )
106 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
107 - video_cards_r100? ( classic )
108 - video_cards_r200? ( classic )
109 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
110 - video_cards_r600? ( gallium )
111 - video_cards_radeonsi? ( gallium llvm )
112 - video_cards_vc4? ( gallium )
113 - video_cards_virgl? ( gallium )
114 - video_cards_vivante? ( gallium gbm )
115 - video_cards_vmware? ( gallium )
116 -"
117 -
118 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.89"
119 -RDEPEND="
120 - classic? ( app-eselect/eselect-mesa )
121 - gallium? ( app-eselect/eselect-mesa )
122 - >=app-eselect/eselect-opengl-1.3.0
123 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
124 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
125 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
126 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
127 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
128 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
129 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
130 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
131 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
132 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
133 - llvm? (
134 - video_cards_radeonsi? (
135 - virtual/libelf:0=[${MULTILIB_USEDEP}]
136 - )
137 - video_cards_r600? (
138 - virtual/libelf:0=[${MULTILIB_USEDEP}]
139 - )
140 - video_cards_radeon? (
141 - virtual/libelf:0=[${MULTILIB_USEDEP}]
142 - )
143 - )
144 - opencl? (
145 - app-eselect/eselect-opencl
146 - dev-libs/libclc
147 - virtual/libelf:0=[${MULTILIB_USEDEP}]
148 - )
149 - openmax? (
150 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
151 - x11-misc/xdg-utils
152 - )
153 - vaapi? (
154 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
155 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
156 - )
157 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
158 - wayland? (
159 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
160 - >=dev-libs/wayland-protocols-1.8
161 - )
162 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
163 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
164 -
165 - video_cards_intel? (
166 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
167 - )
168 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
169 -"
170 -for card in ${RADEON_CARDS}; do
171 - RDEPEND="${RDEPEND}
172 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
173 - "
174 -done
175 -RDEPEND="${RDEPEND}
176 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
177 -"
178 -
179 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
180 -# we need to *really* make sure we're not pulling one than more slot
181 -# simultaneously.
182 -#
183 -# How to use it:
184 -# 1. List all the working slots (with min versions) in ||, newest first.
185 -# 2. Update the := to specify *max* version, e.g. < 7.
186 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
187 -LLVM_DEPSTR="
188 - || (
189 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
190 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
191 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
192 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
193 - )
194 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
195 -"
196 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
197 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
198 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
199 -RDEPEND="${RDEPEND}
200 - llvm? (
201 - opencl? (
202 - video_cards_r600? (
203 - ${CLANG_DEPSTR_AMDGPU}
204 - )
205 - !video_cards_r600? (
206 - video_cards_radeonsi? (
207 - ${CLANG_DEPSTR_AMDGPU}
208 - )
209 - )
210 - !video_cards_r600? (
211 - !video_cards_radeonsi? (
212 - video_cards_radeon? (
213 - ${CLANG_DEPSTR_AMDGPU}
214 - )
215 - )
216 - )
217 - !video_cards_r600? (
218 - !video_cards_radeon? (
219 - !video_cards_radeonsi? (
220 - ${CLANG_DEPSTR}
221 - )
222 - )
223 - )
224 - )
225 - !opencl? (
226 - video_cards_r600? (
227 - ${LLVM_DEPSTR_AMDGPU}
228 - )
229 - !video_cards_r600? (
230 - video_cards_radeonsi? (
231 - ${LLVM_DEPSTR_AMDGPU}
232 - )
233 - )
234 - !video_cards_r600? (
235 - !video_cards_radeonsi? (
236 - video_cards_radeon? (
237 - ${LLVM_DEPSTR_AMDGPU}
238 - )
239 - )
240 - )
241 - !video_cards_r600? (
242 - !video_cards_radeon? (
243 - !video_cards_radeonsi? (
244 - ${LLVM_DEPSTR}
245 - )
246 - )
247 - )
248 - )
249 - )
250 -"
251 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
252 -
253 -DEPEND="${RDEPEND}
254 - ${PYTHON_DEPS}
255 - opencl? (
256 - >=sys-devel/gcc-4.6
257 - )
258 - sys-devel/gettext
259 - virtual/pkgconfig
260 - valgrind? ( dev-util/valgrind )
261 - x11-base/xorg-proto
262 - vulkan? (
263 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
264 - )
265 -"
266 -[[ ${PV} == 9999 ]] && DEPEND+="
267 - sys-devel/bison
268 - sys-devel/flex
269 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
270 -"
271 -
272 -S="${WORKDIR}/${MY_P}"
273 -EGIT_CHECKOUT_DIR=${S}
274 -
275 -QA_WX_LOAD="
276 -x86? (
277 - !pic? (
278 - usr/lib*/libglapi.so.0.0.0
279 - usr/lib*/libGLESv1_CM.so.1.1.0
280 - usr/lib*/libGLESv2.so.2.0.0
281 - usr/lib*/libGL.so.1.2.0
282 - usr/lib*/libOSMesa.so.8.0.0
283 - )
284 -)"
285 -
286 -llvm_check_deps() {
287 - local flags=${MULTILIB_USEDEP}
288 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
289 - then
290 - flags+=",llvm_targets_AMDGPU(-)"
291 - fi
292 -
293 - if use opencl; then
294 - has_version "sys-devel/clang[${flags}]" || return 1
295 - fi
296 - has_version "sys-devel/llvm[${flags}]"
297 -}
298 -
299 -pkg_setup() {
300 - # warning message for bug 459306
301 - if use llvm && has_version sys-devel/llvm[!debug=]; then
302 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
303 - ewarn "detected! This can cause problems. For details, see bug 459306."
304 - fi
305 -
306 - if use llvm; then
307 - llvm_pkg_setup
308 - fi
309 - python-any-r1_pkg_setup
310 -}
311 -
312 -src_prepare() {
313 - [[ ${PV} == 9999 ]] && eautoreconf
314 - eapply_user
315 -}
316 -
317 -multilib_src_configure() {
318 - local myconf
319 -
320 - if use classic; then
321 - # Configurable DRI drivers
322 - driver_enable swrast
323 -
324 - # Intel code
325 - driver_enable video_cards_i915 i915
326 - driver_enable video_cards_i965 i965
327 - if ! use video_cards_i915 && \
328 - ! use video_cards_i965; then
329 - driver_enable video_cards_intel i915 i965
330 - fi
331 -
332 - # Nouveau code
333 - driver_enable video_cards_nouveau nouveau
334 -
335 - # ATI code
336 - driver_enable video_cards_r100 radeon
337 - driver_enable video_cards_r200 r200
338 - if ! use video_cards_r100 && \
339 - ! use video_cards_r200; then
340 - driver_enable video_cards_radeon radeon r200
341 - fi
342 - fi
343 -
344 - if use egl; then
345 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
346 - fi
347 -
348 - if use gallium; then
349 - myconf+="
350 - $(use_enable d3d9 nine)
351 - $(use_enable llvm)
352 - $(use_enable openmax omx-bellagio)
353 - $(use_enable vaapi va)
354 - $(use_enable vdpau)
355 - $(use_enable xa)
356 - $(use_enable xvmc)
357 - "
358 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
359 -
360 - gallium_enable swrast
361 - gallium_enable video_cards_vc4 vc4
362 - gallium_enable video_cards_vivante etnaviv
363 - gallium_enable video_cards_vmware svga
364 - gallium_enable video_cards_nouveau nouveau
365 - gallium_enable video_cards_i915 i915
366 - gallium_enable video_cards_imx imx
367 - if ! use video_cards_i915 && \
368 - ! use video_cards_i965; then
369 - gallium_enable video_cards_intel i915
370 - fi
371 -
372 - gallium_enable video_cards_r300 r300
373 - gallium_enable video_cards_r600 r600
374 - gallium_enable video_cards_radeonsi radeonsi
375 - if ! use video_cards_r300 && \
376 - ! use video_cards_r600; then
377 - gallium_enable video_cards_radeon r300 r600
378 - fi
379 -
380 - gallium_enable video_cards_freedreno freedreno
381 - # opencl stuff
382 - if use opencl; then
383 - myconf+="
384 - $(use_enable opencl)
385 - --with-clang-libdir="${EPREFIX}/usr/lib"
386 - "
387 - fi
388 -
389 - gallium_enable video_cards_virgl virgl
390 - fi
391 -
392 - if use vulkan; then
393 - vulkan_enable video_cards_i965 intel
394 - vulkan_enable video_cards_radeonsi radeon
395 - fi
396 -
397 - # x86 hardened pax_kernel needs glx-rts, bug 240956
398 - if [[ ${ABI} == x86 ]]; then
399 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
400 - fi
401 -
402 - # on abi_x86_32 hardened we need to have asm disable
403 - if [[ ${ABI} == x86* ]] && use pic; then
404 - myconf+=" --disable-asm"
405 - fi
406 -
407 - if use gallium; then
408 - myconf+=" $(use_enable osmesa gallium-osmesa)"
409 - else
410 - myconf+=" $(use_enable osmesa)"
411 - fi
412 -
413 - # build fails with BSD indent, bug #428112
414 - use userland_GNU || export INDENT=cat
415 -
416 - ECONF_SOURCE="${S}" \
417 - econf \
418 - --enable-dri \
419 - --enable-glx \
420 - --enable-shared-glapi \
421 - $(use_enable !bindist texture-float) \
422 - $(use_enable d3d9 nine) \
423 - $(use_enable debug) \
424 - $(use_enable dri3) \
425 - $(use_enable egl) \
426 - $(use_enable gbm) \
427 - $(use_enable gles1) \
428 - $(use_enable gles2) \
429 - $(use_enable nptl glx-tls) \
430 - $(use_enable unwind libunwind) \
431 - --enable-valgrind=$(usex valgrind auto no) \
432 - --enable-llvm-shared-libs \
433 - --disable-opencl-icd \
434 - --with-dri-drivers=${DRI_DRIVERS} \
435 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
436 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
437 - PYTHON2="${PYTHON}" \
438 - ${myconf}
439 -}
440 -
441 -multilib_src_install() {
442 - emake install DESTDIR="${D}"
443 -
444 - if use classic || use gallium; then
445 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
446 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
447 - keepdir /usr/$(get_libdir)/dri
448 - dodir /usr/$(get_libdir)/mesa
449 - for x in ${gallium_drivers[@]}; do
450 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
451 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
452 - || die "Failed to move ${x}"
453 - fi
454 - done
455 - if use classic; then
456 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
457 - fi
458 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
459 - if [ -f ${x} -o -L ${x} ]; then
460 - mv -f "${x}" "${x/dri/mesa}" \
461 - || die "Failed to move ${x}"
462 - fi
463 - done
464 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
465 - ln -s ../mesa/*.so . || die "Creating symlink failed"
466 - # remove symlinks to drivers known to eselect
467 - for x in ${gallium_drivers[@]}; do
468 - if [ -f ${x} -o -L ${x} ]; then
469 - rm "${x}" || die "Failed to remove ${x}"
470 - fi
471 - done
472 - popd
473 - eend $?
474 - fi
475 - if use opencl; then
476 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
477 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
478 - dodir ${cl_dir}/{lib,include}
479 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
480 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
481 - "${ED}"${cl_dir}
482 - fi
483 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
484 - mv -f "${ED}"/usr/include/CL \
485 - "${ED}"${cl_dir}/include
486 - fi
487 - eend $?
488 - fi
489 -
490 - if use openmax; then
491 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
492 - doenvd "${T}"/99mesaxdgomx
493 - keepdir /usr/share/mesa/xdg
494 - fi
495 -}
496 -
497 -multilib_src_install_all() {
498 - find "${ED}" -name '*.la' -delete
499 - einstalldocs
500 -
501 - if use !bindist; then
502 - dodoc docs/patents.txt
503 - fi
504 -
505 - # Install config file for eselect mesa
506 - insinto /usr/share/mesa
507 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
508 -}
509 -
510 -multilib_src_test() {
511 - if use llvm; then
512 - 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'
513 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
514 - emake ${llvm_tests}
515 - pax-mark m ${llvm_tests}
516 - popd >/dev/null || die
517 - fi
518 - emake check
519 -}
520 -
521 -pkg_postinst() {
522 - # Switch to the xorg implementation.
523 - echo
524 - eselect opengl set --use-old ${OPENGL_DIR}
525 -
526 - # Select classic/gallium drivers
527 - if use classic || use gallium; then
528 - eselect mesa set --auto
529 - fi
530 -
531 - # Switch to mesa opencl
532 - if use opencl; then
533 - eselect opencl set --use-old ${PN}
534 - fi
535 -
536 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
537 - if use openmax; then
538 - ebegin "Registering OpenMAX drivers"
539 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
540 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
541 - omxregister-bellagio
542 - eend $?
543 - fi
544 -
545 - # warn about patent encumbered texture-float
546 - if use !bindist; then
547 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
548 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
549 - elog "explanation."
550 - fi
551 -}
552 -
553 -pkg_prerm() {
554 - if use openmax; then
555 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
556 - fi
557 -}
558 -
559 -# $1 - VIDEO_CARDS flag
560 -# other args - names of DRI drivers to enable
561 -# TODO: avoid code duplication for a more elegant implementation
562 -driver_enable() {
563 - case $# in
564 - # for enabling unconditionally
565 - 1)
566 - DRI_DRIVERS+=",$1"
567 - ;;
568 - *)
569 - if use $1; then
570 - shift
571 - for i in $@; do
572 - DRI_DRIVERS+=",${i}"
573 - done
574 - fi
575 - ;;
576 - esac
577 -}
578 -
579 -gallium_enable() {
580 - case $# in
581 - # for enabling unconditionally
582 - 1)
583 - GALLIUM_DRIVERS+=",$1"
584 - ;;
585 - *)
586 - if use $1; then
587 - shift
588 - for i in $@; do
589 - GALLIUM_DRIVERS+=",${i}"
590 - done
591 - fi
592 - ;;
593 - esac
594 -}
595 -
596 -vulkan_enable() {
597 - case $# in
598 - # for enabling unconditionally
599 - 1)
600 - VULKAN_DRIVERS+=",$1"
601 - ;;
602 - *)
603 - if use $1; then
604 - shift
605 - for i in $@; do
606 - VULKAN_DRIVERS+=",${i}"
607 - done
608 - fi
609 - ;;
610 - esac
611 -}
612
613 diff --git a/media-libs/mesa/mesa-18.1.7.ebuild b/media-libs/mesa/mesa-18.1.7.ebuild
614 deleted file mode 100644
615 index 749c5c07c8a..00000000000
616 --- a/media-libs/mesa/mesa-18.1.7.ebuild
617 +++ /dev/null
618 @@ -1,540 +0,0 @@
619 -# Copyright 1999-2018 Gentoo Foundation
620 -# Distributed under the terms of the GNU General Public License v2
621 -
622 -EAPI=6
623 -
624 -EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
625 -
626 -if [[ ${PV} = 9999 ]]; then
627 - GIT_ECLASS="git-r3"
628 - EXPERIMENTAL="true"
629 -fi
630 -
631 -PYTHON_COMPAT=( python2_7 )
632 -
633 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
634 -
635 -OPENGL_DIR="xorg-x11"
636 -
637 -MY_P="${P/_/-}"
638 -
639 -DESCRIPTION="OpenGL-like graphic library for Linux"
640 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
641 -
642 -if [[ $PV == 9999 ]]; then
643 - SRC_URI=""
644 -else
645 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
646 - 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"
647 -fi
648 -
649 -LICENSE="MIT"
650 -SLOT="0"
651 -RESTRICT="!bindist? ( bindist )"
652 -
653 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
654 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
655 -for card in ${VIDEO_CARDS}; do
656 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
657 -done
658 -
659 -IUSE="${IUSE_VIDEO_CARDS}
660 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
661 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
662 - vdpau vulkan wayland xvmc xa"
663 -
664 -REQUIRED_USE="
665 - d3d9? ( dri3 gallium )
666 - llvm? ( gallium )
667 - opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
668 - openmax? ( gallium )
669 - gles1? ( egl )
670 - gles2? ( egl )
671 - vaapi? ( gallium )
672 - vdpau? ( gallium )
673 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
674 - video_cards_radeonsi? ( llvm ) )
675 - wayland? ( egl gbm )
676 - xa? ( gallium )
677 - video_cards_freedreno? ( gallium )
678 - video_cards_intel? ( classic )
679 - video_cards_i915? ( || ( classic gallium ) )
680 - video_cards_i965? ( classic )
681 - video_cards_imx? ( gallium video_cards_vivante )
682 - video_cards_nouveau? ( || ( classic gallium ) )
683 - video_cards_radeon? ( || ( classic gallium )
684 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
685 - video_cards_r100? ( classic )
686 - video_cards_r200? ( classic )
687 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
688 - video_cards_r600? ( gallium )
689 - video_cards_radeonsi? ( gallium llvm )
690 - video_cards_vc4? ( gallium )
691 - video_cards_virgl? ( gallium )
692 - video_cards_vivante? ( gallium gbm )
693 - video_cards_vmware? ( gallium )
694 -"
695 -
696 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
697 -RDEPEND="
698 - !app-eselect/eselect-mesa
699 - >=app-eselect/eselect-opengl-1.3.0
700 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
701 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
702 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
703 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
704 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
705 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
706 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
707 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
708 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
709 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
710 - llvm? (
711 - video_cards_radeonsi? (
712 - virtual/libelf:0=[${MULTILIB_USEDEP}]
713 - )
714 - video_cards_r600? (
715 - virtual/libelf:0=[${MULTILIB_USEDEP}]
716 - )
717 - video_cards_radeon? (
718 - virtual/libelf:0=[${MULTILIB_USEDEP}]
719 - )
720 - )
721 - opencl? (
722 - app-eselect/eselect-opencl
723 - dev-libs/libclc
724 - virtual/libelf:0=[${MULTILIB_USEDEP}]
725 - )
726 - openmax? (
727 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
728 - x11-misc/xdg-utils
729 - )
730 - vaapi? (
731 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
732 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
733 - )
734 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
735 - wayland? (
736 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
737 - >=dev-libs/wayland-protocols-1.8
738 - )
739 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
740 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
741 -
742 - video_cards_intel? (
743 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
744 - )
745 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
746 -"
747 -for card in ${RADEON_CARDS}; do
748 - RDEPEND="${RDEPEND}
749 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
750 - "
751 -done
752 -RDEPEND="${RDEPEND}
753 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
754 -"
755 -
756 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
757 -# we need to *really* make sure we're not pulling one than more slot
758 -# simultaneously.
759 -#
760 -# How to use it:
761 -# 1. List all the working slots (with min versions) in ||, newest first.
762 -# 2. Update the := to specify *max* version, e.g. < 7.
763 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
764 -LLVM_MAX_SLOT="6"
765 -LLVM_DEPSTR="
766 - || (
767 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
768 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
769 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
770 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
771 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
772 - )
773 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
774 -"
775 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
776 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
777 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
778 -RDEPEND="${RDEPEND}
779 - llvm? (
780 - opencl? (
781 - video_cards_r600? (
782 - ${CLANG_DEPSTR_AMDGPU}
783 - )
784 - !video_cards_r600? (
785 - video_cards_radeonsi? (
786 - ${CLANG_DEPSTR_AMDGPU}
787 - )
788 - )
789 - !video_cards_r600? (
790 - !video_cards_radeonsi? (
791 - video_cards_radeon? (
792 - ${CLANG_DEPSTR_AMDGPU}
793 - )
794 - )
795 - )
796 - !video_cards_r600? (
797 - !video_cards_radeon? (
798 - !video_cards_radeonsi? (
799 - ${CLANG_DEPSTR}
800 - )
801 - )
802 - )
803 - )
804 - !opencl? (
805 - video_cards_r600? (
806 - ${LLVM_DEPSTR_AMDGPU}
807 - )
808 - !video_cards_r600? (
809 - video_cards_radeonsi? (
810 - ${LLVM_DEPSTR_AMDGPU}
811 - )
812 - )
813 - !video_cards_r600? (
814 - !video_cards_radeonsi? (
815 - video_cards_radeon? (
816 - ${LLVM_DEPSTR_AMDGPU}
817 - )
818 - )
819 - )
820 - !video_cards_r600? (
821 - !video_cards_radeon? (
822 - !video_cards_radeonsi? (
823 - ${LLVM_DEPSTR}
824 - )
825 - )
826 - )
827 - )
828 - )
829 -"
830 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
831 -
832 -DEPEND="${RDEPEND}
833 - ${PYTHON_DEPS}
834 - opencl? (
835 - >=sys-devel/gcc-4.6
836 - )
837 - sys-devel/gettext
838 - virtual/pkgconfig
839 - valgrind? ( dev-util/valgrind )
840 - x11-base/xorg-proto
841 - vulkan? (
842 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
843 - )
844 -"
845 -[[ ${PV} == 9999 ]] && DEPEND+="
846 - sys-devel/bison
847 - sys-devel/flex
848 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
849 -"
850 -
851 -S="${WORKDIR}/${MY_P}"
852 -EGIT_CHECKOUT_DIR=${S}
853 -
854 -QA_WX_LOAD="
855 -x86? (
856 - !pic? (
857 - usr/lib*/libglapi.so.0.0.0
858 - usr/lib*/libGLESv1_CM.so.1.1.0
859 - usr/lib*/libGLESv2.so.2.0.0
860 - usr/lib*/libGL.so.1.2.0
861 - usr/lib*/libOSMesa.so.8.0.0
862 - )
863 -)"
864 -
865 -llvm_check_deps() {
866 - local flags=${MULTILIB_USEDEP}
867 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
868 - then
869 - flags+=",llvm_targets_AMDGPU(-)"
870 - fi
871 -
872 - if use opencl; then
873 - has_version "sys-devel/clang[${flags}]" || return 1
874 - fi
875 - has_version "sys-devel/llvm[${flags}]"
876 -}
877 -
878 -pkg_setup() {
879 - # warning message for bug 459306
880 - if use llvm && has_version sys-devel/llvm[!debug=]; then
881 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
882 - ewarn "detected! This can cause problems. For details, see bug 459306."
883 - fi
884 -
885 - if use llvm; then
886 - llvm_pkg_setup
887 - fi
888 - python-any-r1_pkg_setup
889 -}
890 -
891 -src_prepare() {
892 - eapply_user
893 - [[ ${PV} == 9999 ]] && eautoreconf
894 -}
895 -
896 -multilib_src_configure() {
897 - local myconf
898 -
899 - if use classic; then
900 - # Configurable DRI drivers
901 - driver_enable swrast
902 -
903 - # Intel code
904 - driver_enable video_cards_i915 i915
905 - driver_enable video_cards_i965 i965
906 - if ! use video_cards_i915 && \
907 - ! use video_cards_i965; then
908 - driver_enable video_cards_intel i915 i965
909 - fi
910 -
911 - # Nouveau code
912 - driver_enable video_cards_nouveau nouveau
913 -
914 - # ATI code
915 - driver_enable video_cards_r100 radeon
916 - driver_enable video_cards_r200 r200
917 - if ! use video_cards_r100 && \
918 - ! use video_cards_r200; then
919 - driver_enable video_cards_radeon radeon r200
920 - fi
921 - fi
922 -
923 - if use egl; then
924 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
925 - fi
926 -
927 - if use gallium; then
928 - myconf+="
929 - $(use_enable d3d9 nine)
930 - $(use_enable llvm)
931 - $(use_enable openmax omx-bellagio)
932 - $(use_enable vaapi va)
933 - $(use_enable vdpau)
934 - $(use_enable xa)
935 - $(use_enable xvmc)
936 - "
937 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
938 -
939 - gallium_enable swrast
940 - gallium_enable video_cards_vc4 vc4
941 - gallium_enable video_cards_vivante etnaviv
942 - gallium_enable video_cards_vmware svga
943 - gallium_enable video_cards_nouveau nouveau
944 - gallium_enable video_cards_i915 i915
945 - gallium_enable video_cards_imx imx
946 - if ! use video_cards_i915 && \
947 - ! use video_cards_i965; then
948 - gallium_enable video_cards_intel i915
949 - fi
950 -
951 - gallium_enable video_cards_r300 r300
952 - gallium_enable video_cards_r600 r600
953 - gallium_enable video_cards_radeonsi radeonsi
954 - if ! use video_cards_r300 && \
955 - ! use video_cards_r600; then
956 - gallium_enable video_cards_radeon r300 r600
957 - fi
958 -
959 - gallium_enable video_cards_freedreno freedreno
960 - # opencl stuff
961 - if use opencl; then
962 - myconf+="
963 - $(use_enable opencl)
964 - --with-clang-libdir="${EPREFIX}/usr/lib"
965 - "
966 - fi
967 -
968 - gallium_enable video_cards_virgl virgl
969 - fi
970 -
971 - if use vulkan; then
972 - vulkan_enable video_cards_i965 intel
973 - vulkan_enable video_cards_radeonsi radeon
974 - fi
975 -
976 - # x86 hardened pax_kernel needs glx-rts, bug 240956
977 - if [[ ${ABI} == x86 ]]; then
978 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
979 - fi
980 -
981 - # on abi_x86_32 hardened we need to have asm disable
982 - if [[ ${ABI} == x86* ]] && use pic; then
983 - myconf+=" --disable-asm"
984 - fi
985 -
986 - if use gallium; then
987 - myconf+=" $(use_enable osmesa gallium-osmesa)"
988 - else
989 - myconf+=" $(use_enable osmesa)"
990 - fi
991 -
992 - # build fails with BSD indent, bug #428112
993 - use userland_GNU || export INDENT=cat
994 -
995 - ECONF_SOURCE="${S}" \
996 - econf \
997 - --enable-dri \
998 - --enable-glx \
999 - --enable-shared-glapi \
1000 - $(use_enable !bindist texture-float) \
1001 - $(use_enable d3d9 nine) \
1002 - $(use_enable debug) \
1003 - $(use_enable dri3) \
1004 - $(use_enable egl) \
1005 - $(use_enable gbm) \
1006 - $(use_enable gles1) \
1007 - $(use_enable gles2) \
1008 - $(use_enable nptl glx-tls) \
1009 - $(use_enable unwind libunwind) \
1010 - --enable-valgrind=$(usex valgrind auto no) \
1011 - --enable-llvm-shared-libs \
1012 - --disable-opencl-icd \
1013 - --with-dri-drivers=${DRI_DRIVERS} \
1014 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
1015 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
1016 - PYTHON2="${PYTHON}" \
1017 - ${myconf}
1018 -}
1019 -
1020 -multilib_src_install() {
1021 - emake install DESTDIR="${D}"
1022 -
1023 - if use wayland; then
1024 - # These files are now provided by >=dev-libs/wayland-1.15.0
1025 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
1026 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
1027 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
1028 - rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
1029 - fi
1030 -
1031 - if use opencl; then
1032 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
1033 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
1034 - dodir ${cl_dir}/{lib,include}
1035 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
1036 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
1037 - "${ED}"${cl_dir}
1038 - fi
1039 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
1040 - mv -f "${ED}"/usr/include/CL \
1041 - "${ED}"${cl_dir}/include
1042 - fi
1043 - eend $?
1044 - fi
1045 -
1046 - if use openmax; then
1047 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
1048 - doenvd "${T}"/99mesaxdgomx
1049 - keepdir /usr/share/mesa/xdg
1050 - fi
1051 -}
1052 -
1053 -multilib_src_install_all() {
1054 - find "${ED}" -name '*.la' -delete
1055 - einstalldocs
1056 -
1057 - if use !bindist; then
1058 - dodoc docs/patents.txt
1059 - fi
1060 -}
1061 -
1062 -multilib_src_test() {
1063 - if use llvm; then
1064 - 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'
1065 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
1066 - emake ${llvm_tests}
1067 - pax-mark m ${llvm_tests}
1068 - popd >/dev/null || die
1069 - fi
1070 - emake check
1071 -}
1072 -
1073 -pkg_postinst() {
1074 - # Switch to the xorg implementation.
1075 - echo
1076 - eselect opengl set --use-old ${OPENGL_DIR}
1077 -
1078 - # Switch to mesa opencl
1079 - if use opencl; then
1080 - eselect opencl set --use-old ${PN}
1081 - fi
1082 -
1083 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
1084 - if use openmax; then
1085 - ebegin "Registering OpenMAX drivers"
1086 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
1087 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
1088 - omxregister-bellagio
1089 - eend $?
1090 - fi
1091 -
1092 - # warn about patent encumbered texture-float
1093 - if use !bindist; then
1094 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
1095 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
1096 - elog "explanation."
1097 - fi
1098 -}
1099 -
1100 -pkg_prerm() {
1101 - if use openmax; then
1102 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
1103 - fi
1104 -}
1105 -
1106 -# $1 - VIDEO_CARDS flag
1107 -# other args - names of DRI drivers to enable
1108 -# TODO: avoid code duplication for a more elegant implementation
1109 -driver_enable() {
1110 - case $# in
1111 - # for enabling unconditionally
1112 - 1)
1113 - DRI_DRIVERS+=",$1"
1114 - ;;
1115 - *)
1116 - if use $1; then
1117 - shift
1118 - for i in $@; do
1119 - DRI_DRIVERS+=",${i}"
1120 - done
1121 - fi
1122 - ;;
1123 - esac
1124 -}
1125 -
1126 -gallium_enable() {
1127 - case $# in
1128 - # for enabling unconditionally
1129 - 1)
1130 - GALLIUM_DRIVERS+=",$1"
1131 - ;;
1132 - *)
1133 - if use $1; then
1134 - shift
1135 - for i in $@; do
1136 - GALLIUM_DRIVERS+=",${i}"
1137 - done
1138 - fi
1139 - ;;
1140 - esac
1141 -}
1142 -
1143 -vulkan_enable() {
1144 - case $# in
1145 - # for enabling unconditionally
1146 - 1)
1147 - VULKAN_DRIVERS+=",$1"
1148 - ;;
1149 - *)
1150 - if use $1; then
1151 - shift
1152 - for i in $@; do
1153 - VULKAN_DRIVERS+=",${i}"
1154 - done
1155 - fi
1156 - ;;
1157 - esac
1158 -}
1159
1160 diff --git a/media-libs/mesa/mesa-18.2.0_rc3.ebuild b/media-libs/mesa/mesa-18.2.0_rc3.ebuild
1161 deleted file mode 100644
1162 index 69d0cf600fc..00000000000
1163 --- a/media-libs/mesa/mesa-18.2.0_rc3.ebuild
1164 +++ /dev/null
1165 @@ -1,547 +0,0 @@
1166 -# Copyright 1999-2018 Gentoo Foundation
1167 -# Distributed under the terms of the GNU General Public License v2
1168 -
1169 -EAPI=6
1170 -
1171 -PYTHON_COMPAT=( python2_7 )
1172 -
1173 -inherit llvm meson multilib-minimal pax-utils python-any-r1
1174 -
1175 -OPENGL_DIR="xorg-x11"
1176 -
1177 -MY_P="${P/_/-}"
1178 -
1179 -DESCRIPTION="OpenGL-like graphic library for Linux"
1180 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1181 -
1182 -if [[ ${PV} == 9999 ]]; then
1183 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1184 - EXPERIMENTAL="true"
1185 - inherit git-r3
1186 -else
1187 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1188 - 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"
1189 -fi
1190 -
1191 -LICENSE="MIT"
1192 -SLOT="0"
1193 -RESTRICT="
1194 - !test? ( test )
1195 -"
1196 -
1197 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1198 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
1199 -for card in ${VIDEO_CARDS}; do
1200 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1201 -done
1202 -
1203 -IUSE="${IUSE_VIDEO_CARDS}
1204 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
1205 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
1206 - vulkan wayland xa xvmc"
1207 -
1208 -REQUIRED_USE="
1209 - d3d9? ( dri3 )
1210 - gles1? ( egl )
1211 - gles2? ( egl )
1212 - vulkan? ( dri3
1213 - || ( video_cards_i965 video_cards_radeonsi )
1214 - video_cards_radeonsi? ( llvm ) )
1215 - wayland? ( egl gbm )
1216 - video_cards_freedreno? ( gallium )
1217 - video_cards_intel? ( classic )
1218 - video_cards_i915? ( || ( classic gallium ) )
1219 - video_cards_i965? ( classic )
1220 - video_cards_imx? ( gallium video_cards_vivante )
1221 - video_cards_nouveau? ( || ( classic gallium ) )
1222 - video_cards_radeon? ( || ( classic gallium )
1223 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1224 - video_cards_r100? ( classic )
1225 - video_cards_r200? ( classic )
1226 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1227 - video_cards_r600? ( gallium )
1228 - video_cards_radeonsi? ( gallium llvm )
1229 - video_cards_vc4? ( gallium )
1230 - video_cards_virgl? ( gallium )
1231 - video_cards_vivante? ( gallium gbm )
1232 - video_cards_vmware? ( gallium )
1233 -"
1234 -
1235 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
1236 -RDEPEND="
1237 - !app-eselect/eselect-mesa
1238 - >=app-eselect/eselect-opengl-1.3.0
1239 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1240 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1241 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1242 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1243 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1244 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1245 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1246 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1247 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1248 - gallium? (
1249 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1250 - llvm? (
1251 - video_cards_radeonsi? (
1252 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1253 - )
1254 - video_cards_r600? (
1255 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1256 - )
1257 - video_cards_radeon? (
1258 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1259 - )
1260 - )
1261 - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
1262 - opencl? (
1263 - app-eselect/eselect-opencl
1264 - dev-libs/libclc
1265 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1266 - )
1267 - vaapi? (
1268 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1269 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
1270 - )
1271 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1272 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1273 - )
1274 - wayland? (
1275 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
1276 - >=dev-libs/wayland-protocols-1.8
1277 - )
1278 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1279 -
1280 - video_cards_intel? (
1281 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1282 - )
1283 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1284 -"
1285 -for card in ${RADEON_CARDS}; do
1286 - RDEPEND="${RDEPEND}
1287 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1288 - "
1289 -done
1290 -RDEPEND="${RDEPEND}
1291 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1292 -"
1293 -
1294 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1295 -# we need to *really* make sure we're not pulling one than more slot
1296 -# simultaneously.
1297 -#
1298 -# How to use it:
1299 -# 1. List all the working slots (with min versions) in ||, newest first.
1300 -# 2. Update the := to specify *max* version, e.g. < 7.
1301 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
1302 -LLVM_MAX_SLOT="7"
1303 -LLVM_DEPSTR="
1304 - || (
1305 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
1306 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
1307 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
1308 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
1309 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
1310 - )
1311 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
1312 -"
1313 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1314 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1315 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1316 -RDEPEND="${RDEPEND}
1317 - llvm? (
1318 - opencl? (
1319 - video_cards_r600? (
1320 - ${CLANG_DEPSTR_AMDGPU}
1321 - )
1322 - !video_cards_r600? (
1323 - video_cards_radeonsi? (
1324 - ${CLANG_DEPSTR_AMDGPU}
1325 - )
1326 - )
1327 - !video_cards_r600? (
1328 - !video_cards_radeonsi? (
1329 - video_cards_radeon? (
1330 - ${CLANG_DEPSTR_AMDGPU}
1331 - )
1332 - )
1333 - )
1334 - !video_cards_r600? (
1335 - !video_cards_radeon? (
1336 - !video_cards_radeonsi? (
1337 - ${CLANG_DEPSTR}
1338 - )
1339 - )
1340 - )
1341 - )
1342 - !opencl? (
1343 - video_cards_r600? (
1344 - ${LLVM_DEPSTR_AMDGPU}
1345 - )
1346 - !video_cards_r600? (
1347 - video_cards_radeonsi? (
1348 - ${LLVM_DEPSTR_AMDGPU}
1349 - )
1350 - )
1351 - !video_cards_r600? (
1352 - !video_cards_radeonsi? (
1353 - video_cards_radeon? (
1354 - ${LLVM_DEPSTR_AMDGPU}
1355 - )
1356 - )
1357 - )
1358 - !video_cards_r600? (
1359 - !video_cards_radeon? (
1360 - !video_cards_radeonsi? (
1361 - ${LLVM_DEPSTR}
1362 - )
1363 - )
1364 - )
1365 - )
1366 - )
1367 -"
1368 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1369 -
1370 -DEPEND="${RDEPEND}
1371 - ${PYTHON_DEPS}
1372 - opencl? (
1373 - >=sys-devel/gcc-4.6
1374 - )
1375 - sys-devel/bison
1376 - sys-devel/flex
1377 - sys-devel/gettext
1378 - virtual/pkgconfig
1379 - valgrind? ( dev-util/valgrind )
1380 - x11-base/xorg-proto
1381 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1382 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1383 -"
1384 -
1385 -S="${WORKDIR}/${MY_P}"
1386 -EGIT_CHECKOUT_DIR=${S}
1387 -
1388 -QA_WX_LOAD="
1389 -x86? (
1390 - !pic? (
1391 - usr/lib*/libglapi.so.0.0.0
1392 - usr/lib*/libGLESv1_CM.so.1.0.0
1393 - usr/lib*/libGLESv2.so.2.0.0
1394 - usr/lib*/libGL.so.1.2.0
1395 - usr/lib*/libOSMesa.so.8.0.0
1396 - )
1397 -)"
1398 -
1399 -llvm_check_deps() {
1400 - local flags=${MULTILIB_USEDEP}
1401 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1402 - then
1403 - flags+=",llvm_targets_AMDGPU(-)"
1404 - fi
1405 -
1406 - if use opencl; then
1407 - has_version "sys-devel/clang[${flags}]" || return 1
1408 - fi
1409 - has_version "sys-devel/llvm[${flags}]"
1410 -}
1411 -
1412 -pkg_pretend() {
1413 - if use d3d9; then
1414 - if ! use video_cards_r300 &&
1415 - ! use video_cards_r600 &&
1416 - ! use video_cards_radeonsi &&
1417 - ! use video_cards_nouveau &&
1418 - ! use video_cards_vmware; then
1419 - ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
1420 - fi
1421 - fi
1422 -
1423 - if use opencl; then
1424 - if ! use video_cards_r600 &&
1425 - ! use video_cards_radeonsi; then
1426 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
1427 - fi
1428 - fi
1429 -
1430 - if use vaapi; then
1431 - if ! use video_cards_r600 &&
1432 - ! use video_cards_radeonsi &&
1433 - ! use video_cards_nouveau; then
1434 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
1435 - fi
1436 - fi
1437 -
1438 - if use vdpau; then
1439 - if ! use video_cards_r300 &&
1440 - ! use video_cards_r600 &&
1441 - ! use video_cards_radeonsi &&
1442 - ! use video_cards_nouveau; then
1443 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
1444 - fi
1445 - fi
1446 -
1447 - if use xa; then
1448 - if ! use video_cards_freedreno &&
1449 - ! use video_cards_nouveau; then
1450 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno or nouveau"
1451 - fi
1452 - fi
1453 -
1454 - if use xvmc; then
1455 - if ! use video_cards_r600 &&
1456 - ! use video_cards_nouveau; then
1457 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
1458 - fi
1459 - fi
1460 -
1461 - if ! use gallium; then
1462 - use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
1463 - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
1464 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
1465 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
1466 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
1467 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
1468 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
1469 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
1470 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
1471 - fi
1472 -
1473 - if ! use llvm; then
1474 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
1475 - fi
1476 -}
1477 -
1478 -pkg_setup() {
1479 - # warning message for bug 459306
1480 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1481 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1482 - ewarn "detected! This can cause problems. For details, see bug 459306."
1483 - fi
1484 -
1485 - if use llvm; then
1486 - llvm_pkg_setup
1487 - fi
1488 - python-any-r1_pkg_setup
1489 -}
1490 -
1491 -multilib_src_configure() {
1492 - local emesonargs=()
1493 -
1494 - if use classic; then
1495 - # Intel code
1496 - dri_driver_enable video_cards_i915 i915
1497 - dri_driver_enable video_cards_i965 i965
1498 - if ! use video_cards_i915 && \
1499 - ! use video_cards_i965; then
1500 - dri_driver_enable video_cards_intel i915 i965
1501 - fi
1502 -
1503 - # Nouveau code
1504 - dri_driver_enable video_cards_nouveau nouveau
1505 -
1506 - # ATI code
1507 - dri_driver_enable video_cards_r100 r100
1508 - dri_driver_enable video_cards_r200 r200
1509 - if ! use video_cards_r100 && \
1510 - ! use video_cards_r200; then
1511 - dri_driver_enable video_cards_radeon r100 r200
1512 - fi
1513 - fi
1514 -
1515 - if use egl; then
1516 - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
1517 - fi
1518 -
1519 - if use gallium; then
1520 - emesonargs+=(
1521 - $(meson_use llvm)
1522 - $(meson_use lm_sensors lmsensors)
1523 - $(meson_use unwind libunwind)
1524 - )
1525 -
1526 - if use video_cards_r300 ||
1527 - use video_cards_r600 ||
1528 - use video_cards_radeonsi ||
1529 - use video_cards_nouveau ||
1530 - use video_cards_vmware; then
1531 - emesonargs+=($(meson_use d3d9 gallium-nine))
1532 - else
1533 - emesonargs+=(-Dgallium-nine=false)
1534 - fi
1535 -
1536 - if use video_cards_r600 ||
1537 - use video_cards_radeonsi ||
1538 - use video_cards_nouveau; then
1539 - emesonargs+=($(meson_use vaapi gallium-va))
1540 - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
1541 - else
1542 - emesonargs+=(-Dgallium-va=false)
1543 - fi
1544 -
1545 - if use video_cards_r300 ||
1546 - use video_cards_r600 ||
1547 - use video_cards_radeonsi ||
1548 - use video_cards_nouveau; then
1549 - emesonargs+=($(meson_use vdpau gallium-vdpau))
1550 - else
1551 - emesonargs+=(-Dgallium-vdpau=false)
1552 - fi
1553 -
1554 - if use video_cards_freedreno ||
1555 - use video_cards_nouveau; then
1556 - emesonargs+=($(meson_use xa gallium-xa))
1557 - else
1558 - emesonargs+=(-Dgallium-xa=false)
1559 - fi
1560 -
1561 - if use video_cards_r600 ||
1562 - use video_cards_nouveau; then
1563 - emesonargs+=($(meson_use xvmc gallium-xvmc))
1564 - else
1565 - emesonargs+=(-Dgallium-xvmc=false)
1566 - fi
1567 -
1568 - gallium_enable video_cards_vc4 vc4
1569 - gallium_enable video_cards_vivante etnaviv
1570 - gallium_enable video_cards_vmware svga
1571 - gallium_enable video_cards_nouveau nouveau
1572 - gallium_enable video_cards_imx imx
1573 -
1574 - # Only one i915 driver (classic vs gallium). Default to classic.
1575 - if ! use classic; then
1576 - gallium_enable video_cards_i915 i915
1577 - if ! use video_cards_i915 && \
1578 - ! use video_cards_i965; then
1579 - gallium_enable video_cards_intel i915
1580 - fi
1581 - fi
1582 -
1583 - gallium_enable video_cards_r300 r300
1584 - gallium_enable video_cards_r600 r600
1585 - gallium_enable video_cards_radeonsi radeonsi
1586 - if ! use video_cards_r300 && \
1587 - ! use video_cards_r600; then
1588 - gallium_enable video_cards_radeon r300 r600
1589 - fi
1590 -
1591 - gallium_enable video_cards_freedreno freedreno
1592 - # opencl stuff
1593 - if use opencl; then
1594 - emesonargs+=(
1595 - -Dgallium-opencl="$(usex opencl standalone disabled)"
1596 - )
1597 - fi
1598 -
1599 - gallium_enable video_cards_virgl virgl
1600 - fi
1601 -
1602 - if use vulkan; then
1603 - vulkan_enable video_cards_i965 intel
1604 - vulkan_enable video_cards_radeonsi amd
1605 - fi
1606 -
1607 - # x86 hardened pax_kernel needs glx-rts, bug 240956
1608 - if [[ ${ABI} == x86 ]]; then
1609 - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
1610 - fi
1611 -
1612 - # on abi_x86_32 hardened we need to have asm disable
1613 - if [[ ${ABI} == x86* ]] && use pic; then
1614 - emesonargs+=( -Dasm=false )
1615 - fi
1616 -
1617 - if use gallium; then
1618 - gallium_enable -- swrast
1619 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
1620 - else
1621 - dri_driver_enable -- swrast
1622 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
1623 - fi
1624 -
1625 - driver_list() {
1626 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
1627 - echo "${drivers//$'\n'/,}"
1628 - }
1629 -
1630 - emesonargs+=(
1631 - $(meson_use test build-tests)
1632 - -Dglx=dri
1633 - -Dshared-glapi=true
1634 - $(meson_use dri3)
1635 - $(meson_use egl)
1636 - $(meson_use gbm)
1637 - $(meson_use gles1)
1638 - $(meson_use gles2)
1639 - $(meson_use selinux)
1640 - -Dvalgrind=$(usex valgrind auto false)
1641 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
1642 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
1643 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
1644 - --buildtype $(usex debug debug plain)
1645 - )
1646 - meson_src_configure
1647 -}
1648 -
1649 -multilib_src_compile() {
1650 - meson_src_compile
1651 -}
1652 -
1653 -multilib_src_install() {
1654 - meson_src_install
1655 -
1656 - if use opencl; then
1657 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
1658 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
1659 - dodir ${cl_dir}/{lib,include}
1660 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
1661 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
1662 - "${ED}"${cl_dir}
1663 - fi
1664 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
1665 - mv -f "${ED}"/usr/include/CL \
1666 - "${ED}"${cl_dir}/include
1667 - fi
1668 - eend $?
1669 - fi
1670 -}
1671 -
1672 -multilib_src_install_all() {
1673 - einstalldocs
1674 -}
1675 -
1676 -multilib_src_test() {
1677 - meson_src_test
1678 -}
1679 -
1680 -pkg_postinst() {
1681 - # Switch to the xorg implementation.
1682 - echo
1683 - eselect opengl set --use-old ${OPENGL_DIR}
1684 -
1685 - # Switch to mesa opencl
1686 - if use opencl; then
1687 - eselect opencl set --use-old ${PN}
1688 - fi
1689 -}
1690 -
1691 -# $1 - VIDEO_CARDS flag (check skipped for "--")
1692 -# other args - names of DRI drivers to enable
1693 -dri_driver_enable() {
1694 - if [[ $1 == -- ]] || use $1; then
1695 - shift
1696 - DRI_DRIVERS+=("$@")
1697 - fi
1698 -}
1699 -
1700 -gallium_enable() {
1701 - if [[ $1 == -- ]] || use $1; then
1702 - shift
1703 - GALLIUM_DRIVERS+=("$@")
1704 - fi
1705 -}
1706 -
1707 -vulkan_enable() {
1708 - if [[ $1 == -- ]] || use $1; then
1709 - shift
1710 - VULKAN_DRIVERS+=("$@")
1711 - fi
1712 -}
1713
1714 diff --git a/media-libs/mesa/mesa-18.2.0_rc4.ebuild b/media-libs/mesa/mesa-18.2.0_rc4.ebuild
1715 deleted file mode 100644
1716 index 69d0cf600fc..00000000000
1717 --- a/media-libs/mesa/mesa-18.2.0_rc4.ebuild
1718 +++ /dev/null
1719 @@ -1,547 +0,0 @@
1720 -# Copyright 1999-2018 Gentoo Foundation
1721 -# Distributed under the terms of the GNU General Public License v2
1722 -
1723 -EAPI=6
1724 -
1725 -PYTHON_COMPAT=( python2_7 )
1726 -
1727 -inherit llvm meson multilib-minimal pax-utils python-any-r1
1728 -
1729 -OPENGL_DIR="xorg-x11"
1730 -
1731 -MY_P="${P/_/-}"
1732 -
1733 -DESCRIPTION="OpenGL-like graphic library for Linux"
1734 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1735 -
1736 -if [[ ${PV} == 9999 ]]; then
1737 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1738 - EXPERIMENTAL="true"
1739 - inherit git-r3
1740 -else
1741 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1742 - 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"
1743 -fi
1744 -
1745 -LICENSE="MIT"
1746 -SLOT="0"
1747 -RESTRICT="
1748 - !test? ( test )
1749 -"
1750 -
1751 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1752 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
1753 -for card in ${VIDEO_CARDS}; do
1754 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1755 -done
1756 -
1757 -IUSE="${IUSE_VIDEO_CARDS}
1758 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
1759 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
1760 - vulkan wayland xa xvmc"
1761 -
1762 -REQUIRED_USE="
1763 - d3d9? ( dri3 )
1764 - gles1? ( egl )
1765 - gles2? ( egl )
1766 - vulkan? ( dri3
1767 - || ( video_cards_i965 video_cards_radeonsi )
1768 - video_cards_radeonsi? ( llvm ) )
1769 - wayland? ( egl gbm )
1770 - video_cards_freedreno? ( gallium )
1771 - video_cards_intel? ( classic )
1772 - video_cards_i915? ( || ( classic gallium ) )
1773 - video_cards_i965? ( classic )
1774 - video_cards_imx? ( gallium video_cards_vivante )
1775 - video_cards_nouveau? ( || ( classic gallium ) )
1776 - video_cards_radeon? ( || ( classic gallium )
1777 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1778 - video_cards_r100? ( classic )
1779 - video_cards_r200? ( classic )
1780 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1781 - video_cards_r600? ( gallium )
1782 - video_cards_radeonsi? ( gallium llvm )
1783 - video_cards_vc4? ( gallium )
1784 - video_cards_virgl? ( gallium )
1785 - video_cards_vivante? ( gallium gbm )
1786 - video_cards_vmware? ( gallium )
1787 -"
1788 -
1789 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
1790 -RDEPEND="
1791 - !app-eselect/eselect-mesa
1792 - >=app-eselect/eselect-opengl-1.3.0
1793 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1794 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1795 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1796 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1797 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1798 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1799 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1800 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1801 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1802 - gallium? (
1803 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1804 - llvm? (
1805 - video_cards_radeonsi? (
1806 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1807 - )
1808 - video_cards_r600? (
1809 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1810 - )
1811 - video_cards_radeon? (
1812 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1813 - )
1814 - )
1815 - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
1816 - opencl? (
1817 - app-eselect/eselect-opencl
1818 - dev-libs/libclc
1819 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1820 - )
1821 - vaapi? (
1822 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1823 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
1824 - )
1825 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1826 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1827 - )
1828 - wayland? (
1829 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
1830 - >=dev-libs/wayland-protocols-1.8
1831 - )
1832 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1833 -
1834 - video_cards_intel? (
1835 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1836 - )
1837 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1838 -"
1839 -for card in ${RADEON_CARDS}; do
1840 - RDEPEND="${RDEPEND}
1841 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1842 - "
1843 -done
1844 -RDEPEND="${RDEPEND}
1845 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1846 -"
1847 -
1848 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1849 -# we need to *really* make sure we're not pulling one than more slot
1850 -# simultaneously.
1851 -#
1852 -# How to use it:
1853 -# 1. List all the working slots (with min versions) in ||, newest first.
1854 -# 2. Update the := to specify *max* version, e.g. < 7.
1855 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
1856 -LLVM_MAX_SLOT="7"
1857 -LLVM_DEPSTR="
1858 - || (
1859 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
1860 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
1861 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
1862 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
1863 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
1864 - )
1865 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
1866 -"
1867 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1868 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1869 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1870 -RDEPEND="${RDEPEND}
1871 - llvm? (
1872 - opencl? (
1873 - video_cards_r600? (
1874 - ${CLANG_DEPSTR_AMDGPU}
1875 - )
1876 - !video_cards_r600? (
1877 - video_cards_radeonsi? (
1878 - ${CLANG_DEPSTR_AMDGPU}
1879 - )
1880 - )
1881 - !video_cards_r600? (
1882 - !video_cards_radeonsi? (
1883 - video_cards_radeon? (
1884 - ${CLANG_DEPSTR_AMDGPU}
1885 - )
1886 - )
1887 - )
1888 - !video_cards_r600? (
1889 - !video_cards_radeon? (
1890 - !video_cards_radeonsi? (
1891 - ${CLANG_DEPSTR}
1892 - )
1893 - )
1894 - )
1895 - )
1896 - !opencl? (
1897 - video_cards_r600? (
1898 - ${LLVM_DEPSTR_AMDGPU}
1899 - )
1900 - !video_cards_r600? (
1901 - video_cards_radeonsi? (
1902 - ${LLVM_DEPSTR_AMDGPU}
1903 - )
1904 - )
1905 - !video_cards_r600? (
1906 - !video_cards_radeonsi? (
1907 - video_cards_radeon? (
1908 - ${LLVM_DEPSTR_AMDGPU}
1909 - )
1910 - )
1911 - )
1912 - !video_cards_r600? (
1913 - !video_cards_radeon? (
1914 - !video_cards_radeonsi? (
1915 - ${LLVM_DEPSTR}
1916 - )
1917 - )
1918 - )
1919 - )
1920 - )
1921 -"
1922 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1923 -
1924 -DEPEND="${RDEPEND}
1925 - ${PYTHON_DEPS}
1926 - opencl? (
1927 - >=sys-devel/gcc-4.6
1928 - )
1929 - sys-devel/bison
1930 - sys-devel/flex
1931 - sys-devel/gettext
1932 - virtual/pkgconfig
1933 - valgrind? ( dev-util/valgrind )
1934 - x11-base/xorg-proto
1935 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1936 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1937 -"
1938 -
1939 -S="${WORKDIR}/${MY_P}"
1940 -EGIT_CHECKOUT_DIR=${S}
1941 -
1942 -QA_WX_LOAD="
1943 -x86? (
1944 - !pic? (
1945 - usr/lib*/libglapi.so.0.0.0
1946 - usr/lib*/libGLESv1_CM.so.1.0.0
1947 - usr/lib*/libGLESv2.so.2.0.0
1948 - usr/lib*/libGL.so.1.2.0
1949 - usr/lib*/libOSMesa.so.8.0.0
1950 - )
1951 -)"
1952 -
1953 -llvm_check_deps() {
1954 - local flags=${MULTILIB_USEDEP}
1955 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1956 - then
1957 - flags+=",llvm_targets_AMDGPU(-)"
1958 - fi
1959 -
1960 - if use opencl; then
1961 - has_version "sys-devel/clang[${flags}]" || return 1
1962 - fi
1963 - has_version "sys-devel/llvm[${flags}]"
1964 -}
1965 -
1966 -pkg_pretend() {
1967 - if use d3d9; then
1968 - if ! use video_cards_r300 &&
1969 - ! use video_cards_r600 &&
1970 - ! use video_cards_radeonsi &&
1971 - ! use video_cards_nouveau &&
1972 - ! use video_cards_vmware; then
1973 - ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
1974 - fi
1975 - fi
1976 -
1977 - if use opencl; then
1978 - if ! use video_cards_r600 &&
1979 - ! use video_cards_radeonsi; then
1980 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
1981 - fi
1982 - fi
1983 -
1984 - if use vaapi; then
1985 - if ! use video_cards_r600 &&
1986 - ! use video_cards_radeonsi &&
1987 - ! use video_cards_nouveau; then
1988 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
1989 - fi
1990 - fi
1991 -
1992 - if use vdpau; then
1993 - if ! use video_cards_r300 &&
1994 - ! use video_cards_r600 &&
1995 - ! use video_cards_radeonsi &&
1996 - ! use video_cards_nouveau; then
1997 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
1998 - fi
1999 - fi
2000 -
2001 - if use xa; then
2002 - if ! use video_cards_freedreno &&
2003 - ! use video_cards_nouveau; then
2004 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno or nouveau"
2005 - fi
2006 - fi
2007 -
2008 - if use xvmc; then
2009 - if ! use video_cards_r600 &&
2010 - ! use video_cards_nouveau; then
2011 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
2012 - fi
2013 - fi
2014 -
2015 - if ! use gallium; then
2016 - use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
2017 - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
2018 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
2019 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
2020 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
2021 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
2022 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
2023 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
2024 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
2025 - fi
2026 -
2027 - if ! use llvm; then
2028 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
2029 - fi
2030 -}
2031 -
2032 -pkg_setup() {
2033 - # warning message for bug 459306
2034 - if use llvm && has_version sys-devel/llvm[!debug=]; then
2035 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
2036 - ewarn "detected! This can cause problems. For details, see bug 459306."
2037 - fi
2038 -
2039 - if use llvm; then
2040 - llvm_pkg_setup
2041 - fi
2042 - python-any-r1_pkg_setup
2043 -}
2044 -
2045 -multilib_src_configure() {
2046 - local emesonargs=()
2047 -
2048 - if use classic; then
2049 - # Intel code
2050 - dri_driver_enable video_cards_i915 i915
2051 - dri_driver_enable video_cards_i965 i965
2052 - if ! use video_cards_i915 && \
2053 - ! use video_cards_i965; then
2054 - dri_driver_enable video_cards_intel i915 i965
2055 - fi
2056 -
2057 - # Nouveau code
2058 - dri_driver_enable video_cards_nouveau nouveau
2059 -
2060 - # ATI code
2061 - dri_driver_enable video_cards_r100 r100
2062 - dri_driver_enable video_cards_r200 r200
2063 - if ! use video_cards_r100 && \
2064 - ! use video_cards_r200; then
2065 - dri_driver_enable video_cards_radeon r100 r200
2066 - fi
2067 - fi
2068 -
2069 - if use egl; then
2070 - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
2071 - fi
2072 -
2073 - if use gallium; then
2074 - emesonargs+=(
2075 - $(meson_use llvm)
2076 - $(meson_use lm_sensors lmsensors)
2077 - $(meson_use unwind libunwind)
2078 - )
2079 -
2080 - if use video_cards_r300 ||
2081 - use video_cards_r600 ||
2082 - use video_cards_radeonsi ||
2083 - use video_cards_nouveau ||
2084 - use video_cards_vmware; then
2085 - emesonargs+=($(meson_use d3d9 gallium-nine))
2086 - else
2087 - emesonargs+=(-Dgallium-nine=false)
2088 - fi
2089 -
2090 - if use video_cards_r600 ||
2091 - use video_cards_radeonsi ||
2092 - use video_cards_nouveau; then
2093 - emesonargs+=($(meson_use vaapi gallium-va))
2094 - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
2095 - else
2096 - emesonargs+=(-Dgallium-va=false)
2097 - fi
2098 -
2099 - if use video_cards_r300 ||
2100 - use video_cards_r600 ||
2101 - use video_cards_radeonsi ||
2102 - use video_cards_nouveau; then
2103 - emesonargs+=($(meson_use vdpau gallium-vdpau))
2104 - else
2105 - emesonargs+=(-Dgallium-vdpau=false)
2106 - fi
2107 -
2108 - if use video_cards_freedreno ||
2109 - use video_cards_nouveau; then
2110 - emesonargs+=($(meson_use xa gallium-xa))
2111 - else
2112 - emesonargs+=(-Dgallium-xa=false)
2113 - fi
2114 -
2115 - if use video_cards_r600 ||
2116 - use video_cards_nouveau; then
2117 - emesonargs+=($(meson_use xvmc gallium-xvmc))
2118 - else
2119 - emesonargs+=(-Dgallium-xvmc=false)
2120 - fi
2121 -
2122 - gallium_enable video_cards_vc4 vc4
2123 - gallium_enable video_cards_vivante etnaviv
2124 - gallium_enable video_cards_vmware svga
2125 - gallium_enable video_cards_nouveau nouveau
2126 - gallium_enable video_cards_imx imx
2127 -
2128 - # Only one i915 driver (classic vs gallium). Default to classic.
2129 - if ! use classic; then
2130 - gallium_enable video_cards_i915 i915
2131 - if ! use video_cards_i915 && \
2132 - ! use video_cards_i965; then
2133 - gallium_enable video_cards_intel i915
2134 - fi
2135 - fi
2136 -
2137 - gallium_enable video_cards_r300 r300
2138 - gallium_enable video_cards_r600 r600
2139 - gallium_enable video_cards_radeonsi radeonsi
2140 - if ! use video_cards_r300 && \
2141 - ! use video_cards_r600; then
2142 - gallium_enable video_cards_radeon r300 r600
2143 - fi
2144 -
2145 - gallium_enable video_cards_freedreno freedreno
2146 - # opencl stuff
2147 - if use opencl; then
2148 - emesonargs+=(
2149 - -Dgallium-opencl="$(usex opencl standalone disabled)"
2150 - )
2151 - fi
2152 -
2153 - gallium_enable video_cards_virgl virgl
2154 - fi
2155 -
2156 - if use vulkan; then
2157 - vulkan_enable video_cards_i965 intel
2158 - vulkan_enable video_cards_radeonsi amd
2159 - fi
2160 -
2161 - # x86 hardened pax_kernel needs glx-rts, bug 240956
2162 - if [[ ${ABI} == x86 ]]; then
2163 - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
2164 - fi
2165 -
2166 - # on abi_x86_32 hardened we need to have asm disable
2167 - if [[ ${ABI} == x86* ]] && use pic; then
2168 - emesonargs+=( -Dasm=false )
2169 - fi
2170 -
2171 - if use gallium; then
2172 - gallium_enable -- swrast
2173 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
2174 - else
2175 - dri_driver_enable -- swrast
2176 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
2177 - fi
2178 -
2179 - driver_list() {
2180 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
2181 - echo "${drivers//$'\n'/,}"
2182 - }
2183 -
2184 - emesonargs+=(
2185 - $(meson_use test build-tests)
2186 - -Dglx=dri
2187 - -Dshared-glapi=true
2188 - $(meson_use dri3)
2189 - $(meson_use egl)
2190 - $(meson_use gbm)
2191 - $(meson_use gles1)
2192 - $(meson_use gles2)
2193 - $(meson_use selinux)
2194 - -Dvalgrind=$(usex valgrind auto false)
2195 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
2196 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
2197 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
2198 - --buildtype $(usex debug debug plain)
2199 - )
2200 - meson_src_configure
2201 -}
2202 -
2203 -multilib_src_compile() {
2204 - meson_src_compile
2205 -}
2206 -
2207 -multilib_src_install() {
2208 - meson_src_install
2209 -
2210 - if use opencl; then
2211 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
2212 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
2213 - dodir ${cl_dir}/{lib,include}
2214 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
2215 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
2216 - "${ED}"${cl_dir}
2217 - fi
2218 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
2219 - mv -f "${ED}"/usr/include/CL \
2220 - "${ED}"${cl_dir}/include
2221 - fi
2222 - eend $?
2223 - fi
2224 -}
2225 -
2226 -multilib_src_install_all() {
2227 - einstalldocs
2228 -}
2229 -
2230 -multilib_src_test() {
2231 - meson_src_test
2232 -}
2233 -
2234 -pkg_postinst() {
2235 - # Switch to the xorg implementation.
2236 - echo
2237 - eselect opengl set --use-old ${OPENGL_DIR}
2238 -
2239 - # Switch to mesa opencl
2240 - if use opencl; then
2241 - eselect opencl set --use-old ${PN}
2242 - fi
2243 -}
2244 -
2245 -# $1 - VIDEO_CARDS flag (check skipped for "--")
2246 -# other args - names of DRI drivers to enable
2247 -dri_driver_enable() {
2248 - if [[ $1 == -- ]] || use $1; then
2249 - shift
2250 - DRI_DRIVERS+=("$@")
2251 - fi
2252 -}
2253 -
2254 -gallium_enable() {
2255 - if [[ $1 == -- ]] || use $1; then
2256 - shift
2257 - GALLIUM_DRIVERS+=("$@")
2258 - fi
2259 -}
2260 -
2261 -vulkan_enable() {
2262 - if [[ $1 == -- ]] || use $1; then
2263 - shift
2264 - VULKAN_DRIVERS+=("$@")
2265 - fi
2266 -}
2267
2268 diff --git a/media-libs/mesa/mesa-18.2.0_rc5.ebuild b/media-libs/mesa/mesa-18.2.0_rc5.ebuild
2269 deleted file mode 100644
2270 index ce53ca4e9ad..00000000000
2271 --- a/media-libs/mesa/mesa-18.2.0_rc5.ebuild
2272 +++ /dev/null
2273 @@ -1,547 +0,0 @@
2274 -# Copyright 1999-2018 Gentoo Foundation
2275 -# Distributed under the terms of the GNU General Public License v2
2276 -
2277 -EAPI=6
2278 -
2279 -PYTHON_COMPAT=( python2_7 )
2280 -
2281 -inherit llvm meson multilib-minimal pax-utils python-any-r1
2282 -
2283 -OPENGL_DIR="xorg-x11"
2284 -
2285 -MY_P="${P/_/-}"
2286 -
2287 -DESCRIPTION="OpenGL-like graphic library for Linux"
2288 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
2289 -
2290 -if [[ ${PV} == 9999 ]]; then
2291 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
2292 - EXPERIMENTAL="true"
2293 - inherit git-r3
2294 -else
2295 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
2296 - 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"
2297 -fi
2298 -
2299 -LICENSE="MIT"
2300 -SLOT="0"
2301 -RESTRICT="
2302 - !test? ( test )
2303 -"
2304 -
2305 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
2306 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
2307 -for card in ${VIDEO_CARDS}; do
2308 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
2309 -done
2310 -
2311 -IUSE="${IUSE_VIDEO_CARDS}
2312 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
2313 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
2314 - vulkan wayland xa xvmc"
2315 -
2316 -REQUIRED_USE="
2317 - d3d9? ( dri3 )
2318 - gles1? ( egl )
2319 - gles2? ( egl )
2320 - vulkan? ( dri3
2321 - || ( video_cards_i965 video_cards_radeonsi )
2322 - video_cards_radeonsi? ( llvm ) )
2323 - wayland? ( egl gbm )
2324 - video_cards_freedreno? ( gallium )
2325 - video_cards_intel? ( classic )
2326 - video_cards_i915? ( || ( classic gallium ) )
2327 - video_cards_i965? ( classic )
2328 - video_cards_imx? ( gallium video_cards_vivante )
2329 - video_cards_nouveau? ( || ( classic gallium ) )
2330 - video_cards_radeon? ( || ( classic gallium )
2331 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
2332 - video_cards_r100? ( classic )
2333 - video_cards_r200? ( classic )
2334 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
2335 - video_cards_r600? ( gallium )
2336 - video_cards_radeonsi? ( gallium llvm )
2337 - video_cards_vc4? ( gallium )
2338 - video_cards_virgl? ( gallium )
2339 - video_cards_vivante? ( gallium gbm )
2340 - video_cards_vmware? ( gallium )
2341 -"
2342 -
2343 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
2344 -RDEPEND="
2345 - !app-eselect/eselect-mesa
2346 - >=app-eselect/eselect-opengl-1.3.0
2347 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
2348 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
2349 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
2350 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
2351 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
2352 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
2353 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
2354 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
2355 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
2356 - gallium? (
2357 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
2358 - llvm? (
2359 - video_cards_radeonsi? (
2360 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2361 - )
2362 - video_cards_r600? (
2363 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2364 - )
2365 - video_cards_radeon? (
2366 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2367 - )
2368 - )
2369 - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
2370 - opencl? (
2371 - app-eselect/eselect-opencl
2372 - dev-libs/libclc
2373 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2374 - )
2375 - vaapi? (
2376 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
2377 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
2378 - )
2379 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
2380 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
2381 - )
2382 - wayland? (
2383 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
2384 - >=dev-libs/wayland-protocols-1.8
2385 - )
2386 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
2387 -
2388 - video_cards_intel? (
2389 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2390 - )
2391 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2392 -"
2393 -for card in ${RADEON_CARDS}; do
2394 - RDEPEND="${RDEPEND}
2395 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
2396 - "
2397 -done
2398 -RDEPEND="${RDEPEND}
2399 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
2400 -"
2401 -
2402 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
2403 -# we need to *really* make sure we're not pulling one than more slot
2404 -# simultaneously.
2405 -#
2406 -# How to use it:
2407 -# 1. List all the working slots (with min versions) in ||, newest first.
2408 -# 2. Update the := to specify *max* version, e.g. < 7.
2409 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
2410 -LLVM_MAX_SLOT="7"
2411 -LLVM_DEPSTR="
2412 - || (
2413 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
2414 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
2415 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
2416 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
2417 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
2418 - )
2419 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
2420 -"
2421 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2422 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
2423 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2424 -RDEPEND="${RDEPEND}
2425 - llvm? (
2426 - opencl? (
2427 - video_cards_r600? (
2428 - ${CLANG_DEPSTR_AMDGPU}
2429 - )
2430 - !video_cards_r600? (
2431 - video_cards_radeonsi? (
2432 - ${CLANG_DEPSTR_AMDGPU}
2433 - )
2434 - )
2435 - !video_cards_r600? (
2436 - !video_cards_radeonsi? (
2437 - video_cards_radeon? (
2438 - ${CLANG_DEPSTR_AMDGPU}
2439 - )
2440 - )
2441 - )
2442 - !video_cards_r600? (
2443 - !video_cards_radeon? (
2444 - !video_cards_radeonsi? (
2445 - ${CLANG_DEPSTR}
2446 - )
2447 - )
2448 - )
2449 - )
2450 - !opencl? (
2451 - video_cards_r600? (
2452 - ${LLVM_DEPSTR_AMDGPU}
2453 - )
2454 - !video_cards_r600? (
2455 - video_cards_radeonsi? (
2456 - ${LLVM_DEPSTR_AMDGPU}
2457 - )
2458 - )
2459 - !video_cards_r600? (
2460 - !video_cards_radeonsi? (
2461 - video_cards_radeon? (
2462 - ${LLVM_DEPSTR_AMDGPU}
2463 - )
2464 - )
2465 - )
2466 - !video_cards_r600? (
2467 - !video_cards_radeon? (
2468 - !video_cards_radeonsi? (
2469 - ${LLVM_DEPSTR}
2470 - )
2471 - )
2472 - )
2473 - )
2474 - )
2475 -"
2476 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
2477 -
2478 -DEPEND="${RDEPEND}
2479 - ${PYTHON_DEPS}
2480 - opencl? (
2481 - >=sys-devel/gcc-4.6
2482 - )
2483 - sys-devel/bison
2484 - sys-devel/flex
2485 - sys-devel/gettext
2486 - virtual/pkgconfig
2487 - valgrind? ( dev-util/valgrind )
2488 - x11-base/xorg-proto
2489 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
2490 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
2491 -"
2492 -
2493 -S="${WORKDIR}/${MY_P}"
2494 -EGIT_CHECKOUT_DIR=${S}
2495 -
2496 -QA_WX_LOAD="
2497 -x86? (
2498 - !pic? (
2499 - usr/lib*/libglapi.so.0.0.0
2500 - usr/lib*/libGLESv1_CM.so.1.0.0
2501 - usr/lib*/libGLESv2.so.2.0.0
2502 - usr/lib*/libGL.so.1.2.0
2503 - usr/lib*/libOSMesa.so.8.0.0
2504 - )
2505 -)"
2506 -
2507 -llvm_check_deps() {
2508 - local flags=${MULTILIB_USEDEP}
2509 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
2510 - then
2511 - flags+=",llvm_targets_AMDGPU(-)"
2512 - fi
2513 -
2514 - if use opencl; then
2515 - has_version "sys-devel/clang[${flags}]" || return 1
2516 - fi
2517 - has_version "sys-devel/llvm[${flags}]"
2518 -}
2519 -
2520 -pkg_pretend() {
2521 - if use d3d9; then
2522 - if ! use video_cards_r300 &&
2523 - ! use video_cards_r600 &&
2524 - ! use video_cards_radeonsi &&
2525 - ! use video_cards_nouveau &&
2526 - ! use video_cards_vmware; then
2527 - ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
2528 - fi
2529 - fi
2530 -
2531 - if use opencl; then
2532 - if ! use video_cards_r600 &&
2533 - ! use video_cards_radeonsi; then
2534 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
2535 - fi
2536 - fi
2537 -
2538 - if use vaapi; then
2539 - if ! use video_cards_r600 &&
2540 - ! use video_cards_radeonsi &&
2541 - ! use video_cards_nouveau; then
2542 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
2543 - fi
2544 - fi
2545 -
2546 - if use vdpau; then
2547 - if ! use video_cards_r300 &&
2548 - ! use video_cards_r600 &&
2549 - ! use video_cards_radeonsi &&
2550 - ! use video_cards_nouveau; then
2551 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
2552 - fi
2553 - fi
2554 -
2555 - if use xa; then
2556 - if ! use video_cards_freedreno &&
2557 - ! use video_cards_nouveau &&
2558 - ! use video_cards_vmware; then
2559 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
2560 - fi
2561 - fi
2562 -
2563 - if use xvmc; then
2564 - if ! use video_cards_r600 &&
2565 - ! use video_cards_nouveau; then
2566 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
2567 - fi
2568 - fi
2569 -
2570 - if ! use gallium; then
2571 - use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
2572 - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
2573 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
2574 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
2575 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
2576 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
2577 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
2578 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
2579 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
2580 - fi
2581 -
2582 - if ! use llvm; then
2583 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
2584 - fi
2585 -}
2586 -
2587 -pkg_setup() {
2588 - # warning message for bug 459306
2589 - if use llvm && has_version sys-devel/llvm[!debug=]; then
2590 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
2591 - ewarn "detected! This can cause problems. For details, see bug 459306."
2592 - fi
2593 -
2594 - if use llvm; then
2595 - llvm_pkg_setup
2596 - fi
2597 - python-any-r1_pkg_setup
2598 -}
2599 -
2600 -multilib_src_configure() {
2601 - local emesonargs=()
2602 -
2603 - if use classic; then
2604 - # Intel code
2605 - dri_driver_enable video_cards_i915 i915
2606 - dri_driver_enable video_cards_i965 i965
2607 - if ! use video_cards_i915 && \
2608 - ! use video_cards_i965; then
2609 - dri_driver_enable video_cards_intel i915 i965
2610 - fi
2611 -
2612 - # Nouveau code
2613 - dri_driver_enable video_cards_nouveau nouveau
2614 -
2615 - # ATI code
2616 - dri_driver_enable video_cards_r100 r100
2617 - dri_driver_enable video_cards_r200 r200
2618 - if ! use video_cards_r100 && \
2619 - ! use video_cards_r200; then
2620 - dri_driver_enable video_cards_radeon r100 r200
2621 - fi
2622 - fi
2623 -
2624 - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
2625 -
2626 - if use gallium; then
2627 - emesonargs+=(
2628 - $(meson_use llvm)
2629 - $(meson_use lm_sensors lmsensors)
2630 - $(meson_use unwind libunwind)
2631 - )
2632 -
2633 - if use video_cards_r300 ||
2634 - use video_cards_r600 ||
2635 - use video_cards_radeonsi ||
2636 - use video_cards_nouveau ||
2637 - use video_cards_vmware; then
2638 - emesonargs+=($(meson_use d3d9 gallium-nine))
2639 - else
2640 - emesonargs+=(-Dgallium-nine=false)
2641 - fi
2642 -
2643 - if use video_cards_r600 ||
2644 - use video_cards_radeonsi ||
2645 - use video_cards_nouveau; then
2646 - emesonargs+=($(meson_use vaapi gallium-va))
2647 - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
2648 - else
2649 - emesonargs+=(-Dgallium-va=false)
2650 - fi
2651 -
2652 - if use video_cards_r300 ||
2653 - use video_cards_r600 ||
2654 - use video_cards_radeonsi ||
2655 - use video_cards_nouveau; then
2656 - emesonargs+=($(meson_use vdpau gallium-vdpau))
2657 - else
2658 - emesonargs+=(-Dgallium-vdpau=false)
2659 - fi
2660 -
2661 - if use video_cards_freedreno ||
2662 - use video_cards_nouveau ||
2663 - use video_cards_vmware; then
2664 - emesonargs+=($(meson_use xa gallium-xa))
2665 - else
2666 - emesonargs+=(-Dgallium-xa=false)
2667 - fi
2668 -
2669 - if use video_cards_r600 ||
2670 - use video_cards_nouveau; then
2671 - emesonargs+=($(meson_use xvmc gallium-xvmc))
2672 - else
2673 - emesonargs+=(-Dgallium-xvmc=false)
2674 - fi
2675 -
2676 - gallium_enable video_cards_vc4 vc4
2677 - gallium_enable video_cards_vivante etnaviv
2678 - gallium_enable video_cards_vmware svga
2679 - gallium_enable video_cards_nouveau nouveau
2680 - gallium_enable video_cards_imx imx
2681 -
2682 - # Only one i915 driver (classic vs gallium). Default to classic.
2683 - if ! use classic; then
2684 - gallium_enable video_cards_i915 i915
2685 - if ! use video_cards_i915 && \
2686 - ! use video_cards_i965; then
2687 - gallium_enable video_cards_intel i915
2688 - fi
2689 - fi
2690 -
2691 - gallium_enable video_cards_r300 r300
2692 - gallium_enable video_cards_r600 r600
2693 - gallium_enable video_cards_radeonsi radeonsi
2694 - if ! use video_cards_r300 && \
2695 - ! use video_cards_r600; then
2696 - gallium_enable video_cards_radeon r300 r600
2697 - fi
2698 -
2699 - gallium_enable video_cards_freedreno freedreno
2700 - # opencl stuff
2701 - if use opencl; then
2702 - emesonargs+=(
2703 - -Dgallium-opencl="$(usex opencl standalone disabled)"
2704 - )
2705 - fi
2706 -
2707 - gallium_enable video_cards_virgl virgl
2708 - fi
2709 -
2710 - if use vulkan; then
2711 - vulkan_enable video_cards_i965 intel
2712 - vulkan_enable video_cards_radeonsi amd
2713 - fi
2714 -
2715 - # x86 hardened pax_kernel needs glx-rts, bug 240956
2716 - if [[ ${ABI} == x86 ]]; then
2717 - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
2718 - fi
2719 -
2720 - # on abi_x86_32 hardened we need to have asm disable
2721 - if [[ ${ABI} == x86* ]] && use pic; then
2722 - emesonargs+=( -Dasm=false )
2723 - fi
2724 -
2725 - if use gallium; then
2726 - gallium_enable -- swrast
2727 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
2728 - else
2729 - dri_driver_enable -- swrast
2730 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
2731 - fi
2732 -
2733 - driver_list() {
2734 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
2735 - echo "${drivers//$'\n'/,}"
2736 - }
2737 -
2738 - emesonargs+=(
2739 - $(meson_use test build-tests)
2740 - -Dglx=dri
2741 - -Dshared-glapi=true
2742 - $(meson_use dri3)
2743 - $(meson_use egl)
2744 - $(meson_use gbm)
2745 - $(meson_use gles1)
2746 - $(meson_use gles2)
2747 - $(meson_use selinux)
2748 - -Dvalgrind=$(usex valgrind auto false)
2749 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
2750 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
2751 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
2752 - --buildtype $(usex debug debug plain)
2753 - )
2754 - meson_src_configure
2755 -}
2756 -
2757 -multilib_src_compile() {
2758 - meson_src_compile
2759 -}
2760 -
2761 -multilib_src_install() {
2762 - meson_src_install
2763 -
2764 - if use opencl; then
2765 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
2766 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
2767 - dodir ${cl_dir}/{lib,include}
2768 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
2769 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
2770 - "${ED}"${cl_dir}
2771 - fi
2772 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
2773 - mv -f "${ED}"/usr/include/CL \
2774 - "${ED}"${cl_dir}/include
2775 - fi
2776 - eend $?
2777 - fi
2778 -}
2779 -
2780 -multilib_src_install_all() {
2781 - einstalldocs
2782 -}
2783 -
2784 -multilib_src_test() {
2785 - meson_src_test
2786 -}
2787 -
2788 -pkg_postinst() {
2789 - # Switch to the xorg implementation.
2790 - echo
2791 - eselect opengl set --use-old ${OPENGL_DIR}
2792 -
2793 - # Switch to mesa opencl
2794 - if use opencl; then
2795 - eselect opencl set --use-old ${PN}
2796 - fi
2797 -}
2798 -
2799 -# $1 - VIDEO_CARDS flag (check skipped for "--")
2800 -# other args - names of DRI drivers to enable
2801 -dri_driver_enable() {
2802 - if [[ $1 == -- ]] || use $1; then
2803 - shift
2804 - DRI_DRIVERS+=("$@")
2805 - fi
2806 -}
2807 -
2808 -gallium_enable() {
2809 - if [[ $1 == -- ]] || use $1; then
2810 - shift
2811 - GALLIUM_DRIVERS+=("$@")
2812 - fi
2813 -}
2814 -
2815 -vulkan_enable() {
2816 - if [[ $1 == -- ]] || use $1; then
2817 - shift
2818 - VULKAN_DRIVERS+=("$@")
2819 - fi
2820 -}
2821
2822 diff --git a/media-libs/mesa/mesa-18.2.0_rc6.ebuild b/media-libs/mesa/mesa-18.2.0_rc6.ebuild
2823 deleted file mode 100644
2824 index ce53ca4e9ad..00000000000
2825 --- a/media-libs/mesa/mesa-18.2.0_rc6.ebuild
2826 +++ /dev/null
2827 @@ -1,547 +0,0 @@
2828 -# Copyright 1999-2018 Gentoo Foundation
2829 -# Distributed under the terms of the GNU General Public License v2
2830 -
2831 -EAPI=6
2832 -
2833 -PYTHON_COMPAT=( python2_7 )
2834 -
2835 -inherit llvm meson multilib-minimal pax-utils python-any-r1
2836 -
2837 -OPENGL_DIR="xorg-x11"
2838 -
2839 -MY_P="${P/_/-}"
2840 -
2841 -DESCRIPTION="OpenGL-like graphic library for Linux"
2842 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
2843 -
2844 -if [[ ${PV} == 9999 ]]; then
2845 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
2846 - EXPERIMENTAL="true"
2847 - inherit git-r3
2848 -else
2849 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
2850 - 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"
2851 -fi
2852 -
2853 -LICENSE="MIT"
2854 -SLOT="0"
2855 -RESTRICT="
2856 - !test? ( test )
2857 -"
2858 -
2859 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
2860 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
2861 -for card in ${VIDEO_CARDS}; do
2862 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
2863 -done
2864 -
2865 -IUSE="${IUSE_VIDEO_CARDS}
2866 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
2867 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
2868 - vulkan wayland xa xvmc"
2869 -
2870 -REQUIRED_USE="
2871 - d3d9? ( dri3 )
2872 - gles1? ( egl )
2873 - gles2? ( egl )
2874 - vulkan? ( dri3
2875 - || ( video_cards_i965 video_cards_radeonsi )
2876 - video_cards_radeonsi? ( llvm ) )
2877 - wayland? ( egl gbm )
2878 - video_cards_freedreno? ( gallium )
2879 - video_cards_intel? ( classic )
2880 - video_cards_i915? ( || ( classic gallium ) )
2881 - video_cards_i965? ( classic )
2882 - video_cards_imx? ( gallium video_cards_vivante )
2883 - video_cards_nouveau? ( || ( classic gallium ) )
2884 - video_cards_radeon? ( || ( classic gallium )
2885 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
2886 - video_cards_r100? ( classic )
2887 - video_cards_r200? ( classic )
2888 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
2889 - video_cards_r600? ( gallium )
2890 - video_cards_radeonsi? ( gallium llvm )
2891 - video_cards_vc4? ( gallium )
2892 - video_cards_virgl? ( gallium )
2893 - video_cards_vivante? ( gallium gbm )
2894 - video_cards_vmware? ( gallium )
2895 -"
2896 -
2897 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
2898 -RDEPEND="
2899 - !app-eselect/eselect-mesa
2900 - >=app-eselect/eselect-opengl-1.3.0
2901 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
2902 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
2903 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
2904 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
2905 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
2906 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
2907 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
2908 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
2909 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
2910 - gallium? (
2911 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
2912 - llvm? (
2913 - video_cards_radeonsi? (
2914 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2915 - )
2916 - video_cards_r600? (
2917 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2918 - )
2919 - video_cards_radeon? (
2920 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2921 - )
2922 - )
2923 - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
2924 - opencl? (
2925 - app-eselect/eselect-opencl
2926 - dev-libs/libclc
2927 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2928 - )
2929 - vaapi? (
2930 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
2931 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
2932 - )
2933 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
2934 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
2935 - )
2936 - wayland? (
2937 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
2938 - >=dev-libs/wayland-protocols-1.8
2939 - )
2940 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
2941 -
2942 - video_cards_intel? (
2943 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2944 - )
2945 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2946 -"
2947 -for card in ${RADEON_CARDS}; do
2948 - RDEPEND="${RDEPEND}
2949 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
2950 - "
2951 -done
2952 -RDEPEND="${RDEPEND}
2953 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
2954 -"
2955 -
2956 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
2957 -# we need to *really* make sure we're not pulling one than more slot
2958 -# simultaneously.
2959 -#
2960 -# How to use it:
2961 -# 1. List all the working slots (with min versions) in ||, newest first.
2962 -# 2. Update the := to specify *max* version, e.g. < 7.
2963 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
2964 -LLVM_MAX_SLOT="7"
2965 -LLVM_DEPSTR="
2966 - || (
2967 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
2968 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
2969 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
2970 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
2971 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
2972 - )
2973 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
2974 -"
2975 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2976 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
2977 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2978 -RDEPEND="${RDEPEND}
2979 - llvm? (
2980 - opencl? (
2981 - video_cards_r600? (
2982 - ${CLANG_DEPSTR_AMDGPU}
2983 - )
2984 - !video_cards_r600? (
2985 - video_cards_radeonsi? (
2986 - ${CLANG_DEPSTR_AMDGPU}
2987 - )
2988 - )
2989 - !video_cards_r600? (
2990 - !video_cards_radeonsi? (
2991 - video_cards_radeon? (
2992 - ${CLANG_DEPSTR_AMDGPU}
2993 - )
2994 - )
2995 - )
2996 - !video_cards_r600? (
2997 - !video_cards_radeon? (
2998 - !video_cards_radeonsi? (
2999 - ${CLANG_DEPSTR}
3000 - )
3001 - )
3002 - )
3003 - )
3004 - !opencl? (
3005 - video_cards_r600? (
3006 - ${LLVM_DEPSTR_AMDGPU}
3007 - )
3008 - !video_cards_r600? (
3009 - video_cards_radeonsi? (
3010 - ${LLVM_DEPSTR_AMDGPU}
3011 - )
3012 - )
3013 - !video_cards_r600? (
3014 - !video_cards_radeonsi? (
3015 - video_cards_radeon? (
3016 - ${LLVM_DEPSTR_AMDGPU}
3017 - )
3018 - )
3019 - )
3020 - !video_cards_r600? (
3021 - !video_cards_radeon? (
3022 - !video_cards_radeonsi? (
3023 - ${LLVM_DEPSTR}
3024 - )
3025 - )
3026 - )
3027 - )
3028 - )
3029 -"
3030 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
3031 -
3032 -DEPEND="${RDEPEND}
3033 - ${PYTHON_DEPS}
3034 - opencl? (
3035 - >=sys-devel/gcc-4.6
3036 - )
3037 - sys-devel/bison
3038 - sys-devel/flex
3039 - sys-devel/gettext
3040 - virtual/pkgconfig
3041 - valgrind? ( dev-util/valgrind )
3042 - x11-base/xorg-proto
3043 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
3044 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
3045 -"
3046 -
3047 -S="${WORKDIR}/${MY_P}"
3048 -EGIT_CHECKOUT_DIR=${S}
3049 -
3050 -QA_WX_LOAD="
3051 -x86? (
3052 - !pic? (
3053 - usr/lib*/libglapi.so.0.0.0
3054 - usr/lib*/libGLESv1_CM.so.1.0.0
3055 - usr/lib*/libGLESv2.so.2.0.0
3056 - usr/lib*/libGL.so.1.2.0
3057 - usr/lib*/libOSMesa.so.8.0.0
3058 - )
3059 -)"
3060 -
3061 -llvm_check_deps() {
3062 - local flags=${MULTILIB_USEDEP}
3063 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
3064 - then
3065 - flags+=",llvm_targets_AMDGPU(-)"
3066 - fi
3067 -
3068 - if use opencl; then
3069 - has_version "sys-devel/clang[${flags}]" || return 1
3070 - fi
3071 - has_version "sys-devel/llvm[${flags}]"
3072 -}
3073 -
3074 -pkg_pretend() {
3075 - if use d3d9; then
3076 - if ! use video_cards_r300 &&
3077 - ! use video_cards_r600 &&
3078 - ! use video_cards_radeonsi &&
3079 - ! use video_cards_nouveau &&
3080 - ! use video_cards_vmware; then
3081 - ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
3082 - fi
3083 - fi
3084 -
3085 - if use opencl; then
3086 - if ! use video_cards_r600 &&
3087 - ! use video_cards_radeonsi; then
3088 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
3089 - fi
3090 - fi
3091 -
3092 - if use vaapi; then
3093 - if ! use video_cards_r600 &&
3094 - ! use video_cards_radeonsi &&
3095 - ! use video_cards_nouveau; then
3096 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
3097 - fi
3098 - fi
3099 -
3100 - if use vdpau; then
3101 - if ! use video_cards_r300 &&
3102 - ! use video_cards_r600 &&
3103 - ! use video_cards_radeonsi &&
3104 - ! use video_cards_nouveau; then
3105 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
3106 - fi
3107 - fi
3108 -
3109 - if use xa; then
3110 - if ! use video_cards_freedreno &&
3111 - ! use video_cards_nouveau &&
3112 - ! use video_cards_vmware; then
3113 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
3114 - fi
3115 - fi
3116 -
3117 - if use xvmc; then
3118 - if ! use video_cards_r600 &&
3119 - ! use video_cards_nouveau; then
3120 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
3121 - fi
3122 - fi
3123 -
3124 - if ! use gallium; then
3125 - use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
3126 - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
3127 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
3128 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
3129 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
3130 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
3131 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
3132 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
3133 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
3134 - fi
3135 -
3136 - if ! use llvm; then
3137 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
3138 - fi
3139 -}
3140 -
3141 -pkg_setup() {
3142 - # warning message for bug 459306
3143 - if use llvm && has_version sys-devel/llvm[!debug=]; then
3144 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
3145 - ewarn "detected! This can cause problems. For details, see bug 459306."
3146 - fi
3147 -
3148 - if use llvm; then
3149 - llvm_pkg_setup
3150 - fi
3151 - python-any-r1_pkg_setup
3152 -}
3153 -
3154 -multilib_src_configure() {
3155 - local emesonargs=()
3156 -
3157 - if use classic; then
3158 - # Intel code
3159 - dri_driver_enable video_cards_i915 i915
3160 - dri_driver_enable video_cards_i965 i965
3161 - if ! use video_cards_i915 && \
3162 - ! use video_cards_i965; then
3163 - dri_driver_enable video_cards_intel i915 i965
3164 - fi
3165 -
3166 - # Nouveau code
3167 - dri_driver_enable video_cards_nouveau nouveau
3168 -
3169 - # ATI code
3170 - dri_driver_enable video_cards_r100 r100
3171 - dri_driver_enable video_cards_r200 r200
3172 - if ! use video_cards_r100 && \
3173 - ! use video_cards_r200; then
3174 - dri_driver_enable video_cards_radeon r100 r200
3175 - fi
3176 - fi
3177 -
3178 - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
3179 -
3180 - if use gallium; then
3181 - emesonargs+=(
3182 - $(meson_use llvm)
3183 - $(meson_use lm_sensors lmsensors)
3184 - $(meson_use unwind libunwind)
3185 - )
3186 -
3187 - if use video_cards_r300 ||
3188 - use video_cards_r600 ||
3189 - use video_cards_radeonsi ||
3190 - use video_cards_nouveau ||
3191 - use video_cards_vmware; then
3192 - emesonargs+=($(meson_use d3d9 gallium-nine))
3193 - else
3194 - emesonargs+=(-Dgallium-nine=false)
3195 - fi
3196 -
3197 - if use video_cards_r600 ||
3198 - use video_cards_radeonsi ||
3199 - use video_cards_nouveau; then
3200 - emesonargs+=($(meson_use vaapi gallium-va))
3201 - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
3202 - else
3203 - emesonargs+=(-Dgallium-va=false)
3204 - fi
3205 -
3206 - if use video_cards_r300 ||
3207 - use video_cards_r600 ||
3208 - use video_cards_radeonsi ||
3209 - use video_cards_nouveau; then
3210 - emesonargs+=($(meson_use vdpau gallium-vdpau))
3211 - else
3212 - emesonargs+=(-Dgallium-vdpau=false)
3213 - fi
3214 -
3215 - if use video_cards_freedreno ||
3216 - use video_cards_nouveau ||
3217 - use video_cards_vmware; then
3218 - emesonargs+=($(meson_use xa gallium-xa))
3219 - else
3220 - emesonargs+=(-Dgallium-xa=false)
3221 - fi
3222 -
3223 - if use video_cards_r600 ||
3224 - use video_cards_nouveau; then
3225 - emesonargs+=($(meson_use xvmc gallium-xvmc))
3226 - else
3227 - emesonargs+=(-Dgallium-xvmc=false)
3228 - fi
3229 -
3230 - gallium_enable video_cards_vc4 vc4
3231 - gallium_enable video_cards_vivante etnaviv
3232 - gallium_enable video_cards_vmware svga
3233 - gallium_enable video_cards_nouveau nouveau
3234 - gallium_enable video_cards_imx imx
3235 -
3236 - # Only one i915 driver (classic vs gallium). Default to classic.
3237 - if ! use classic; then
3238 - gallium_enable video_cards_i915 i915
3239 - if ! use video_cards_i915 && \
3240 - ! use video_cards_i965; then
3241 - gallium_enable video_cards_intel i915
3242 - fi
3243 - fi
3244 -
3245 - gallium_enable video_cards_r300 r300
3246 - gallium_enable video_cards_r600 r600
3247 - gallium_enable video_cards_radeonsi radeonsi
3248 - if ! use video_cards_r300 && \
3249 - ! use video_cards_r600; then
3250 - gallium_enable video_cards_radeon r300 r600
3251 - fi
3252 -
3253 - gallium_enable video_cards_freedreno freedreno
3254 - # opencl stuff
3255 - if use opencl; then
3256 - emesonargs+=(
3257 - -Dgallium-opencl="$(usex opencl standalone disabled)"
3258 - )
3259 - fi
3260 -
3261 - gallium_enable video_cards_virgl virgl
3262 - fi
3263 -
3264 - if use vulkan; then
3265 - vulkan_enable video_cards_i965 intel
3266 - vulkan_enable video_cards_radeonsi amd
3267 - fi
3268 -
3269 - # x86 hardened pax_kernel needs glx-rts, bug 240956
3270 - if [[ ${ABI} == x86 ]]; then
3271 - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
3272 - fi
3273 -
3274 - # on abi_x86_32 hardened we need to have asm disable
3275 - if [[ ${ABI} == x86* ]] && use pic; then
3276 - emesonargs+=( -Dasm=false )
3277 - fi
3278 -
3279 - if use gallium; then
3280 - gallium_enable -- swrast
3281 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
3282 - else
3283 - dri_driver_enable -- swrast
3284 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
3285 - fi
3286 -
3287 - driver_list() {
3288 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
3289 - echo "${drivers//$'\n'/,}"
3290 - }
3291 -
3292 - emesonargs+=(
3293 - $(meson_use test build-tests)
3294 - -Dglx=dri
3295 - -Dshared-glapi=true
3296 - $(meson_use dri3)
3297 - $(meson_use egl)
3298 - $(meson_use gbm)
3299 - $(meson_use gles1)
3300 - $(meson_use gles2)
3301 - $(meson_use selinux)
3302 - -Dvalgrind=$(usex valgrind auto false)
3303 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
3304 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
3305 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
3306 - --buildtype $(usex debug debug plain)
3307 - )
3308 - meson_src_configure
3309 -}
3310 -
3311 -multilib_src_compile() {
3312 - meson_src_compile
3313 -}
3314 -
3315 -multilib_src_install() {
3316 - meson_src_install
3317 -
3318 - if use opencl; then
3319 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
3320 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
3321 - dodir ${cl_dir}/{lib,include}
3322 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
3323 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
3324 - "${ED}"${cl_dir}
3325 - fi
3326 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
3327 - mv -f "${ED}"/usr/include/CL \
3328 - "${ED}"${cl_dir}/include
3329 - fi
3330 - eend $?
3331 - fi
3332 -}
3333 -
3334 -multilib_src_install_all() {
3335 - einstalldocs
3336 -}
3337 -
3338 -multilib_src_test() {
3339 - meson_src_test
3340 -}
3341 -
3342 -pkg_postinst() {
3343 - # Switch to the xorg implementation.
3344 - echo
3345 - eselect opengl set --use-old ${OPENGL_DIR}
3346 -
3347 - # Switch to mesa opencl
3348 - if use opencl; then
3349 - eselect opencl set --use-old ${PN}
3350 - fi
3351 -}
3352 -
3353 -# $1 - VIDEO_CARDS flag (check skipped for "--")
3354 -# other args - names of DRI drivers to enable
3355 -dri_driver_enable() {
3356 - if [[ $1 == -- ]] || use $1; then
3357 - shift
3358 - DRI_DRIVERS+=("$@")
3359 - fi
3360 -}
3361 -
3362 -gallium_enable() {
3363 - if [[ $1 == -- ]] || use $1; then
3364 - shift
3365 - GALLIUM_DRIVERS+=("$@")
3366 - fi
3367 -}
3368 -
3369 -vulkan_enable() {
3370 - if [[ $1 == -- ]] || use $1; then
3371 - shift
3372 - VULKAN_DRIVERS+=("$@")
3373 - fi
3374 -}