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: Wed, 31 Oct 2018 19:10:49
Message-Id: 1541012994.874ed48344cef8761d932fdaf63ae39cbe048988.mattst88@gentoo
1 commit: 874ed48344cef8761d932fdaf63ae39cbe048988
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 31 19:09:38 2018 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 31 19:09:54 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=874ed483
7
8 media-libs/mesa: Drop old versions
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 4 -
13 media-libs/mesa/mesa-18.2.0-r1.ebuild | 548 ----------------------------------
14 media-libs/mesa/mesa-18.2.1.ebuild | 548 ----------------------------------
15 media-libs/mesa/mesa-18.2.2-r1.ebuild | 526 --------------------------------
16 media-libs/mesa/mesa-18.2.2.ebuild | 548 ----------------------------------
17 media-libs/mesa/mesa-18.2.3.ebuild | 526 --------------------------------
18 6 files changed, 2700 deletions(-)
19
20 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
21 index fc632fc5a65..160aba0fc91 100644
22 --- a/media-libs/mesa/Manifest
23 +++ b/media-libs/mesa/Manifest
24 @@ -1,6 +1,2 @@
25 DIST mesa-18.1.9.tar.xz 11146188 BLAKE2B 753f0fa3780502d56927f9b0e6124b4728cb5aa3600de78585487fb8e178c6987a72b79fb56e6c310757d157f9f85f12b73a6889bd361b51b62fb1dc1c20eecd SHA512 22db2950d25a3d9393e7c622c783bd177c21695569c8a95683bf77e92318e1db85672a134d4bea30c1f49a24e52bc3a2c1a0ac15deafb3a8fcbfb6de6a18adc2
26 -DIST mesa-18.2.0.tar.xz 11331164 BLAKE2B e4e7c65a0c3c0716451157f7d026df8836399b5a25ca7ce77746b34f82e0c14d0bfcb965732f67c979190c2c2db68f272ffafa51b49613a510f186e9e8a01c93 SHA512 e6e997e166845009f6b97da204384758c797c870b56332652c0a2636734638f9180b7e4dbad144495645308ae4d77981a2493a22d57973723338b658e0655557
27 -DIST mesa-18.2.1.tar.xz 11374476 BLAKE2B f0f3b766d68550f8c395a1b1d1ffc7a9e532c22ee6b91d698db33a270c152e03ab656d4219301bc2e0e95ba6f0583017c4361add928ad8ab26378a1ec6958f36 SHA512 d249bdf79aad36db9a8d291b3a1a100d283893ac741f58f85ae7e5c90ca25c37f80a5fa6fc57945ffeb0b67b788e7ea146543ec790b22f144578fc4c1525b84d
28 -DIST mesa-18.2.2.tar.xz 11375608 BLAKE2B 0b2a1b60e72885b2b48335645c04c4d5720c0b426c256781f3e84e22955ac87d9abe19550f996e3ff964befcc2b959e8639dcad585b3ec777dd629f06623e5ec SHA512 35c27f0673abd35d0581db34b6ad646058523dd826ff751df718e1f9d6a996409a0c5b313fbbf177058d9610a53d646f858fb86537e3ea1000df5edbddcf043a
29 -DIST mesa-18.2.3.tar.xz 11376632 BLAKE2B b693e42918be9980d86fedf136e872d785b92b49272cbd5374907f7c3bc857ef5991852de5cf7da1b4f16420b0cf9926541219d3b1717b78fe6fc6c3cf2c3788 SHA512 20f512b1f3835b1c78b1f05f2e2125dc3437b61b8857e7ec62e0f9ac3be2ccb5b7ebe7e18f444da1117bc100d75e4b03cd2a0180f0f0b1cf760714b43bc7a664
30 DIST mesa-18.2.4.tar.xz 11377556 BLAKE2B b11c33ade744fb976862fecccbcc4c97196a005e40a00ef02bd8d409b66b3aa11f97baee13f2aa92f2d7c5461b2ef44beae3103687dea9ee29e92439a068f08a SHA512 088d43b087f4005752e4db75eaa6897e0fcb6de7b9a1f2d2b2ce3b5557d1dff829022e0092e8b1038ff01182c863ca0f26c97b9adde34bca462d3fa24502bfde
31
32 diff --git a/media-libs/mesa/mesa-18.2.0-r1.ebuild b/media-libs/mesa/mesa-18.2.0-r1.ebuild
33 deleted file mode 100644
34 index df9403207de..00000000000
35 --- a/media-libs/mesa/mesa-18.2.0-r1.ebuild
36 +++ /dev/null
37 @@ -1,548 +0,0 @@
38 -# Copyright 1999-2018 Gentoo Foundation
39 -# Distributed under the terms of the GNU General Public License v2
40 -
41 -EAPI=6
42 -
43 -PYTHON_COMPAT=( python2_7 )
44 -
45 -inherit llvm meson multilib-minimal pax-utils python-any-r1
46 -
47 -OPENGL_DIR="xorg-x11"
48 -
49 -MY_P="${P/_/-}"
50 -
51 -DESCRIPTION="OpenGL-like graphic library for Linux"
52 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
53 -
54 -if [[ ${PV} == 9999 ]]; then
55 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
56 - EXPERIMENTAL="true"
57 - inherit git-r3
58 -else
59 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
60 - 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"
61 -fi
62 -
63 -LICENSE="MIT"
64 -SLOT="0"
65 -RESTRICT="
66 - !test? ( test )
67 -"
68 -
69 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
70 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
71 -for card in ${VIDEO_CARDS}; do
72 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
73 -done
74 -
75 -IUSE="${IUSE_VIDEO_CARDS}
76 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
77 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
78 - vulkan wayland xa xvmc"
79 -
80 -REQUIRED_USE="
81 - d3d9? ( dri3 )
82 - gles1? ( egl )
83 - gles2? ( egl )
84 - vulkan? ( dri3
85 - || ( video_cards_i965 video_cards_radeonsi )
86 - video_cards_radeonsi? ( llvm ) )
87 - wayland? ( egl gbm )
88 - video_cards_freedreno? ( gallium )
89 - video_cards_intel? ( classic )
90 - video_cards_i915? ( || ( classic gallium ) )
91 - video_cards_i965? ( classic )
92 - video_cards_imx? ( gallium video_cards_vivante )
93 - video_cards_nouveau? ( || ( classic gallium ) )
94 - video_cards_radeon? ( || ( classic gallium )
95 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
96 - video_cards_r100? ( classic )
97 - video_cards_r200? ( classic )
98 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
99 - video_cards_r600? ( gallium )
100 - video_cards_radeonsi? ( gallium llvm )
101 - video_cards_vc4? ( gallium )
102 - video_cards_virgl? ( gallium )
103 - video_cards_vivante? ( gallium gbm )
104 - video_cards_vmware? ( gallium )
105 -"
106 -
107 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
108 -RDEPEND="
109 - !app-eselect/eselect-mesa
110 - >=app-eselect/eselect-opengl-1.3.0
111 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
112 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
113 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
114 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
115 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
116 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
117 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
118 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
119 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
120 - gallium? (
121 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
122 - llvm? (
123 - video_cards_radeonsi? (
124 - virtual/libelf:0=[${MULTILIB_USEDEP}]
125 - )
126 - video_cards_r600? (
127 - virtual/libelf:0=[${MULTILIB_USEDEP}]
128 - )
129 - video_cards_radeon? (
130 - virtual/libelf:0=[${MULTILIB_USEDEP}]
131 - )
132 - )
133 - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
134 - opencl? (
135 - app-eselect/eselect-opencl
136 - dev-libs/libclc
137 - virtual/libelf:0=[${MULTILIB_USEDEP}]
138 - )
139 - vaapi? (
140 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
141 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
142 - )
143 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
144 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
145 - )
146 - wayland? (
147 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
148 - >=dev-libs/wayland-protocols-1.8
149 - )
150 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
151 -
152 - video_cards_intel? (
153 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
154 - )
155 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
156 -"
157 -for card in ${RADEON_CARDS}; do
158 - RDEPEND="${RDEPEND}
159 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
160 - "
161 -done
162 -RDEPEND="${RDEPEND}
163 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
164 -"
165 -
166 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
167 -# we need to *really* make sure we're not pulling one than more slot
168 -# simultaneously.
169 -#
170 -# How to use it:
171 -# 1. List all the working slots (with min versions) in ||, newest first.
172 -# 2. Update the := to specify *max* version, e.g. < 7.
173 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
174 -LLVM_MAX_SLOT="7"
175 -LLVM_DEPSTR="
176 - || (
177 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
178 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
179 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
180 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
181 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
182 - )
183 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
184 -"
185 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
186 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
187 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
188 -RDEPEND="${RDEPEND}
189 - llvm? (
190 - opencl? (
191 - video_cards_r600? (
192 - ${CLANG_DEPSTR_AMDGPU}
193 - )
194 - !video_cards_r600? (
195 - video_cards_radeonsi? (
196 - ${CLANG_DEPSTR_AMDGPU}
197 - )
198 - )
199 - !video_cards_r600? (
200 - !video_cards_radeonsi? (
201 - video_cards_radeon? (
202 - ${CLANG_DEPSTR_AMDGPU}
203 - )
204 - )
205 - )
206 - !video_cards_r600? (
207 - !video_cards_radeon? (
208 - !video_cards_radeonsi? (
209 - ${CLANG_DEPSTR}
210 - )
211 - )
212 - )
213 - )
214 - !opencl? (
215 - video_cards_r600? (
216 - ${LLVM_DEPSTR_AMDGPU}
217 - )
218 - !video_cards_r600? (
219 - video_cards_radeonsi? (
220 - ${LLVM_DEPSTR_AMDGPU}
221 - )
222 - )
223 - !video_cards_r600? (
224 - !video_cards_radeonsi? (
225 - video_cards_radeon? (
226 - ${LLVM_DEPSTR_AMDGPU}
227 - )
228 - )
229 - )
230 - !video_cards_r600? (
231 - !video_cards_radeon? (
232 - !video_cards_radeonsi? (
233 - ${LLVM_DEPSTR}
234 - )
235 - )
236 - )
237 - )
238 - )
239 -"
240 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
241 -
242 -DEPEND="${RDEPEND}
243 - ${PYTHON_DEPS}
244 - opencl? (
245 - >=sys-devel/gcc-4.6
246 - )
247 - sys-devel/bison
248 - sys-devel/flex
249 - sys-devel/gettext
250 - virtual/pkgconfig
251 - valgrind? ( dev-util/valgrind )
252 - x11-base/xorg-proto
253 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
254 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
255 -"
256 -
257 -S="${WORKDIR}/${MY_P}"
258 -EGIT_CHECKOUT_DIR=${S}
259 -
260 -QA_WX_LOAD="
261 -x86? (
262 - !pic? (
263 - usr/lib*/libglapi.so.0.0.0
264 - usr/lib*/libGLESv1_CM.so.1.0.0
265 - usr/lib*/libGLESv2.so.2.0.0
266 - usr/lib*/libGL.so.1.2.0
267 - usr/lib*/libOSMesa.so.8.0.0
268 - )
269 -)"
270 -
271 -llvm_check_deps() {
272 - local flags=${MULTILIB_USEDEP}
273 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
274 - then
275 - flags+=",llvm_targets_AMDGPU(-)"
276 - fi
277 -
278 - if use opencl; then
279 - has_version "sys-devel/clang[${flags}]" || return 1
280 - fi
281 - has_version "sys-devel/llvm[${flags}]"
282 -}
283 -
284 -pkg_pretend() {
285 - if use d3d9; then
286 - if ! use video_cards_r300 &&
287 - ! use video_cards_r600 &&
288 - ! use video_cards_radeonsi &&
289 - ! use video_cards_nouveau &&
290 - ! use video_cards_vmware; then
291 - ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
292 - fi
293 - fi
294 -
295 - if use opencl; then
296 - if ! use video_cards_r600 &&
297 - ! use video_cards_radeonsi; then
298 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
299 - fi
300 - fi
301 -
302 - if use vaapi; then
303 - if ! use video_cards_r600 &&
304 - ! use video_cards_radeonsi &&
305 - ! use video_cards_nouveau; then
306 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
307 - fi
308 - fi
309 -
310 - if use vdpau; then
311 - if ! use video_cards_r300 &&
312 - ! use video_cards_r600 &&
313 - ! use video_cards_radeonsi &&
314 - ! use video_cards_nouveau; then
315 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
316 - fi
317 - fi
318 -
319 - if use xa; then
320 - if ! use video_cards_freedreno &&
321 - ! use video_cards_nouveau &&
322 - ! use video_cards_vmware; then
323 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
324 - fi
325 - fi
326 -
327 - if use xvmc; then
328 - if ! use video_cards_r600 &&
329 - ! use video_cards_nouveau; then
330 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
331 - fi
332 - fi
333 -
334 - if ! use gallium; then
335 - use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
336 - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
337 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
338 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
339 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
340 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
341 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
342 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
343 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
344 - fi
345 -
346 - if ! use llvm; then
347 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
348 - fi
349 -}
350 -
351 -pkg_setup() {
352 - # warning message for bug 459306
353 - if use llvm && has_version sys-devel/llvm[!debug=]; then
354 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
355 - ewarn "detected! This can cause problems. For details, see bug 459306."
356 - fi
357 -
358 - if use llvm; then
359 - llvm_pkg_setup
360 - fi
361 - python-any-r1_pkg_setup
362 -}
363 -
364 -multilib_src_configure() {
365 - local emesonargs=()
366 -
367 - if use classic; then
368 - # Intel code
369 - dri_driver_enable video_cards_i915 i915
370 - dri_driver_enable video_cards_i965 i965
371 - if ! use video_cards_i915 && \
372 - ! use video_cards_i965; then
373 - dri_driver_enable video_cards_intel i915 i965
374 - fi
375 -
376 - # Nouveau code
377 - dri_driver_enable video_cards_nouveau nouveau
378 -
379 - # ATI code
380 - dri_driver_enable video_cards_r100 r100
381 - dri_driver_enable video_cards_r200 r200
382 - if ! use video_cards_r100 && \
383 - ! use video_cards_r200; then
384 - dri_driver_enable video_cards_radeon r100 r200
385 - fi
386 - fi
387 -
388 - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
389 -
390 - if use gallium; then
391 - emesonargs+=(
392 - $(meson_use llvm)
393 - $(meson_use lm_sensors lmsensors)
394 - $(meson_use unwind libunwind)
395 - )
396 -
397 - if use video_cards_r300 ||
398 - use video_cards_r600 ||
399 - use video_cards_radeonsi ||
400 - use video_cards_nouveau ||
401 - use video_cards_vmware; then
402 - emesonargs+=($(meson_use d3d9 gallium-nine))
403 - else
404 - emesonargs+=(-Dgallium-nine=false)
405 - fi
406 -
407 - if use video_cards_r600 ||
408 - use video_cards_radeonsi ||
409 - use video_cards_nouveau; then
410 - emesonargs+=($(meson_use vaapi gallium-va))
411 - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
412 - else
413 - emesonargs+=(-Dgallium-va=false)
414 - fi
415 -
416 - if use video_cards_r300 ||
417 - use video_cards_r600 ||
418 - use video_cards_radeonsi ||
419 - use video_cards_nouveau; then
420 - emesonargs+=($(meson_use vdpau gallium-vdpau))
421 - else
422 - emesonargs+=(-Dgallium-vdpau=false)
423 - fi
424 -
425 - if use video_cards_freedreno ||
426 - use video_cards_nouveau ||
427 - use video_cards_vmware; then
428 - emesonargs+=($(meson_use xa gallium-xa))
429 - else
430 - emesonargs+=(-Dgallium-xa=false)
431 - fi
432 -
433 - if use video_cards_r600 ||
434 - use video_cards_nouveau; then
435 - emesonargs+=($(meson_use xvmc gallium-xvmc))
436 - else
437 - emesonargs+=(-Dgallium-xvmc=false)
438 - fi
439 -
440 - gallium_enable video_cards_vc4 vc4
441 - gallium_enable video_cards_vivante etnaviv
442 - gallium_enable video_cards_vmware svga
443 - gallium_enable video_cards_nouveau nouveau
444 - gallium_enable video_cards_imx imx
445 -
446 - # Only one i915 driver (classic vs gallium). Default to classic.
447 - if ! use classic; then
448 - gallium_enable video_cards_i915 i915
449 - if ! use video_cards_i915 && \
450 - ! use video_cards_i965; then
451 - gallium_enable video_cards_intel i915
452 - fi
453 - fi
454 -
455 - gallium_enable video_cards_r300 r300
456 - gallium_enable video_cards_r600 r600
457 - gallium_enable video_cards_radeonsi radeonsi
458 - if ! use video_cards_r300 && \
459 - ! use video_cards_r600; then
460 - gallium_enable video_cards_radeon r300 r600
461 - fi
462 -
463 - gallium_enable video_cards_freedreno freedreno
464 - # opencl stuff
465 - if use opencl; then
466 - emesonargs+=(
467 - -Dgallium-opencl="$(usex opencl standalone disabled)"
468 - )
469 - fi
470 -
471 - gallium_enable video_cards_virgl virgl
472 - fi
473 -
474 - if use vulkan; then
475 - vulkan_enable video_cards_i965 intel
476 - vulkan_enable video_cards_radeonsi amd
477 - fi
478 -
479 - # x86 hardened pax_kernel needs glx-rts, bug 240956
480 - if [[ ${ABI} == x86 ]]; then
481 - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
482 - fi
483 -
484 - # on abi_x86_32 hardened we need to have asm disable
485 - if [[ ${ABI} == x86* ]] && use pic; then
486 - emesonargs+=( -Dasm=false )
487 - fi
488 -
489 - if use gallium; then
490 - gallium_enable -- swrast
491 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
492 - else
493 - dri_driver_enable -- swrast
494 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
495 - fi
496 -
497 - driver_list() {
498 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
499 - echo "${drivers//$'\n'/,}"
500 - }
501 -
502 - emesonargs+=(
503 - $(meson_use test build-tests)
504 - -Dglx=dri
505 - -Dshared-glapi=true
506 - $(meson_use dri3)
507 - $(meson_use egl)
508 - $(meson_use gbm)
509 - $(meson_use gles1)
510 - $(meson_use gles2)
511 - $(meson_use selinux)
512 - -Dvalgrind=$(usex valgrind auto false)
513 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
514 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
515 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
516 - --buildtype $(usex debug debug plain)
517 - -Db_ndebug=$(usex debug false true)
518 - )
519 - meson_src_configure
520 -}
521 -
522 -multilib_src_compile() {
523 - meson_src_compile
524 -}
525 -
526 -multilib_src_install() {
527 - meson_src_install
528 -
529 - if use opencl; then
530 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
531 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
532 - dodir ${cl_dir}/{lib,include}
533 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
534 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
535 - "${ED}"${cl_dir}
536 - fi
537 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
538 - mv -f "${ED}"/usr/include/CL \
539 - "${ED}"${cl_dir}/include
540 - fi
541 - eend $?
542 - fi
543 -}
544 -
545 -multilib_src_install_all() {
546 - einstalldocs
547 -}
548 -
549 -multilib_src_test() {
550 - meson_src_test
551 -}
552 -
553 -pkg_postinst() {
554 - # Switch to the xorg implementation.
555 - echo
556 - eselect opengl set --use-old ${OPENGL_DIR}
557 -
558 - # Switch to mesa opencl
559 - if use opencl; then
560 - eselect opencl set --use-old ${PN}
561 - fi
562 -}
563 -
564 -# $1 - VIDEO_CARDS flag (check skipped for "--")
565 -# other args - names of DRI drivers to enable
566 -dri_driver_enable() {
567 - if [[ $1 == -- ]] || use $1; then
568 - shift
569 - DRI_DRIVERS+=("$@")
570 - fi
571 -}
572 -
573 -gallium_enable() {
574 - if [[ $1 == -- ]] || use $1; then
575 - shift
576 - GALLIUM_DRIVERS+=("$@")
577 - fi
578 -}
579 -
580 -vulkan_enable() {
581 - if [[ $1 == -- ]] || use $1; then
582 - shift
583 - VULKAN_DRIVERS+=("$@")
584 - fi
585 -}
586
587 diff --git a/media-libs/mesa/mesa-18.2.1.ebuild b/media-libs/mesa/mesa-18.2.1.ebuild
588 deleted file mode 100644
589 index df9403207de..00000000000
590 --- a/media-libs/mesa/mesa-18.2.1.ebuild
591 +++ /dev/null
592 @@ -1,548 +0,0 @@
593 -# Copyright 1999-2018 Gentoo Foundation
594 -# Distributed under the terms of the GNU General Public License v2
595 -
596 -EAPI=6
597 -
598 -PYTHON_COMPAT=( python2_7 )
599 -
600 -inherit llvm meson multilib-minimal pax-utils python-any-r1
601 -
602 -OPENGL_DIR="xorg-x11"
603 -
604 -MY_P="${P/_/-}"
605 -
606 -DESCRIPTION="OpenGL-like graphic library for Linux"
607 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
608 -
609 -if [[ ${PV} == 9999 ]]; then
610 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
611 - EXPERIMENTAL="true"
612 - inherit git-r3
613 -else
614 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
615 - 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"
616 -fi
617 -
618 -LICENSE="MIT"
619 -SLOT="0"
620 -RESTRICT="
621 - !test? ( test )
622 -"
623 -
624 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
625 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
626 -for card in ${VIDEO_CARDS}; do
627 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
628 -done
629 -
630 -IUSE="${IUSE_VIDEO_CARDS}
631 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
632 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
633 - vulkan wayland xa xvmc"
634 -
635 -REQUIRED_USE="
636 - d3d9? ( dri3 )
637 - gles1? ( egl )
638 - gles2? ( egl )
639 - vulkan? ( dri3
640 - || ( video_cards_i965 video_cards_radeonsi )
641 - video_cards_radeonsi? ( llvm ) )
642 - wayland? ( egl gbm )
643 - video_cards_freedreno? ( gallium )
644 - video_cards_intel? ( classic )
645 - video_cards_i915? ( || ( classic gallium ) )
646 - video_cards_i965? ( classic )
647 - video_cards_imx? ( gallium video_cards_vivante )
648 - video_cards_nouveau? ( || ( classic gallium ) )
649 - video_cards_radeon? ( || ( classic gallium )
650 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
651 - video_cards_r100? ( classic )
652 - video_cards_r200? ( classic )
653 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
654 - video_cards_r600? ( gallium )
655 - video_cards_radeonsi? ( gallium llvm )
656 - video_cards_vc4? ( gallium )
657 - video_cards_virgl? ( gallium )
658 - video_cards_vivante? ( gallium gbm )
659 - video_cards_vmware? ( gallium )
660 -"
661 -
662 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
663 -RDEPEND="
664 - !app-eselect/eselect-mesa
665 - >=app-eselect/eselect-opengl-1.3.0
666 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
667 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
668 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
669 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
670 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
671 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
672 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
673 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
674 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
675 - gallium? (
676 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
677 - llvm? (
678 - video_cards_radeonsi? (
679 - virtual/libelf:0=[${MULTILIB_USEDEP}]
680 - )
681 - video_cards_r600? (
682 - virtual/libelf:0=[${MULTILIB_USEDEP}]
683 - )
684 - video_cards_radeon? (
685 - virtual/libelf:0=[${MULTILIB_USEDEP}]
686 - )
687 - )
688 - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
689 - opencl? (
690 - app-eselect/eselect-opencl
691 - dev-libs/libclc
692 - virtual/libelf:0=[${MULTILIB_USEDEP}]
693 - )
694 - vaapi? (
695 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
696 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
697 - )
698 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
699 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
700 - )
701 - wayland? (
702 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
703 - >=dev-libs/wayland-protocols-1.8
704 - )
705 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
706 -
707 - video_cards_intel? (
708 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
709 - )
710 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
711 -"
712 -for card in ${RADEON_CARDS}; do
713 - RDEPEND="${RDEPEND}
714 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
715 - "
716 -done
717 -RDEPEND="${RDEPEND}
718 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
719 -"
720 -
721 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
722 -# we need to *really* make sure we're not pulling one than more slot
723 -# simultaneously.
724 -#
725 -# How to use it:
726 -# 1. List all the working slots (with min versions) in ||, newest first.
727 -# 2. Update the := to specify *max* version, e.g. < 7.
728 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
729 -LLVM_MAX_SLOT="7"
730 -LLVM_DEPSTR="
731 - || (
732 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
733 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
734 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
735 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
736 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
737 - )
738 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
739 -"
740 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
741 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
742 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
743 -RDEPEND="${RDEPEND}
744 - llvm? (
745 - opencl? (
746 - video_cards_r600? (
747 - ${CLANG_DEPSTR_AMDGPU}
748 - )
749 - !video_cards_r600? (
750 - video_cards_radeonsi? (
751 - ${CLANG_DEPSTR_AMDGPU}
752 - )
753 - )
754 - !video_cards_r600? (
755 - !video_cards_radeonsi? (
756 - video_cards_radeon? (
757 - ${CLANG_DEPSTR_AMDGPU}
758 - )
759 - )
760 - )
761 - !video_cards_r600? (
762 - !video_cards_radeon? (
763 - !video_cards_radeonsi? (
764 - ${CLANG_DEPSTR}
765 - )
766 - )
767 - )
768 - )
769 - !opencl? (
770 - video_cards_r600? (
771 - ${LLVM_DEPSTR_AMDGPU}
772 - )
773 - !video_cards_r600? (
774 - video_cards_radeonsi? (
775 - ${LLVM_DEPSTR_AMDGPU}
776 - )
777 - )
778 - !video_cards_r600? (
779 - !video_cards_radeonsi? (
780 - video_cards_radeon? (
781 - ${LLVM_DEPSTR_AMDGPU}
782 - )
783 - )
784 - )
785 - !video_cards_r600? (
786 - !video_cards_radeon? (
787 - !video_cards_radeonsi? (
788 - ${LLVM_DEPSTR}
789 - )
790 - )
791 - )
792 - )
793 - )
794 -"
795 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
796 -
797 -DEPEND="${RDEPEND}
798 - ${PYTHON_DEPS}
799 - opencl? (
800 - >=sys-devel/gcc-4.6
801 - )
802 - sys-devel/bison
803 - sys-devel/flex
804 - sys-devel/gettext
805 - virtual/pkgconfig
806 - valgrind? ( dev-util/valgrind )
807 - x11-base/xorg-proto
808 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
809 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
810 -"
811 -
812 -S="${WORKDIR}/${MY_P}"
813 -EGIT_CHECKOUT_DIR=${S}
814 -
815 -QA_WX_LOAD="
816 -x86? (
817 - !pic? (
818 - usr/lib*/libglapi.so.0.0.0
819 - usr/lib*/libGLESv1_CM.so.1.0.0
820 - usr/lib*/libGLESv2.so.2.0.0
821 - usr/lib*/libGL.so.1.2.0
822 - usr/lib*/libOSMesa.so.8.0.0
823 - )
824 -)"
825 -
826 -llvm_check_deps() {
827 - local flags=${MULTILIB_USEDEP}
828 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
829 - then
830 - flags+=",llvm_targets_AMDGPU(-)"
831 - fi
832 -
833 - if use opencl; then
834 - has_version "sys-devel/clang[${flags}]" || return 1
835 - fi
836 - has_version "sys-devel/llvm[${flags}]"
837 -}
838 -
839 -pkg_pretend() {
840 - if use d3d9; then
841 - if ! use video_cards_r300 &&
842 - ! use video_cards_r600 &&
843 - ! use video_cards_radeonsi &&
844 - ! use video_cards_nouveau &&
845 - ! use video_cards_vmware; then
846 - ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
847 - fi
848 - fi
849 -
850 - if use opencl; then
851 - if ! use video_cards_r600 &&
852 - ! use video_cards_radeonsi; then
853 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
854 - fi
855 - fi
856 -
857 - if use vaapi; then
858 - if ! use video_cards_r600 &&
859 - ! use video_cards_radeonsi &&
860 - ! use video_cards_nouveau; then
861 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
862 - fi
863 - fi
864 -
865 - if use vdpau; then
866 - if ! use video_cards_r300 &&
867 - ! use video_cards_r600 &&
868 - ! use video_cards_radeonsi &&
869 - ! use video_cards_nouveau; then
870 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
871 - fi
872 - fi
873 -
874 - if use xa; then
875 - if ! use video_cards_freedreno &&
876 - ! use video_cards_nouveau &&
877 - ! use video_cards_vmware; then
878 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
879 - fi
880 - fi
881 -
882 - if use xvmc; then
883 - if ! use video_cards_r600 &&
884 - ! use video_cards_nouveau; then
885 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
886 - fi
887 - fi
888 -
889 - if ! use gallium; then
890 - use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
891 - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
892 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
893 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
894 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
895 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
896 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
897 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
898 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
899 - fi
900 -
901 - if ! use llvm; then
902 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
903 - fi
904 -}
905 -
906 -pkg_setup() {
907 - # warning message for bug 459306
908 - if use llvm && has_version sys-devel/llvm[!debug=]; then
909 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
910 - ewarn "detected! This can cause problems. For details, see bug 459306."
911 - fi
912 -
913 - if use llvm; then
914 - llvm_pkg_setup
915 - fi
916 - python-any-r1_pkg_setup
917 -}
918 -
919 -multilib_src_configure() {
920 - local emesonargs=()
921 -
922 - if use classic; then
923 - # Intel code
924 - dri_driver_enable video_cards_i915 i915
925 - dri_driver_enable video_cards_i965 i965
926 - if ! use video_cards_i915 && \
927 - ! use video_cards_i965; then
928 - dri_driver_enable video_cards_intel i915 i965
929 - fi
930 -
931 - # Nouveau code
932 - dri_driver_enable video_cards_nouveau nouveau
933 -
934 - # ATI code
935 - dri_driver_enable video_cards_r100 r100
936 - dri_driver_enable video_cards_r200 r200
937 - if ! use video_cards_r100 && \
938 - ! use video_cards_r200; then
939 - dri_driver_enable video_cards_radeon r100 r200
940 - fi
941 - fi
942 -
943 - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
944 -
945 - if use gallium; then
946 - emesonargs+=(
947 - $(meson_use llvm)
948 - $(meson_use lm_sensors lmsensors)
949 - $(meson_use unwind libunwind)
950 - )
951 -
952 - if use video_cards_r300 ||
953 - use video_cards_r600 ||
954 - use video_cards_radeonsi ||
955 - use video_cards_nouveau ||
956 - use video_cards_vmware; then
957 - emesonargs+=($(meson_use d3d9 gallium-nine))
958 - else
959 - emesonargs+=(-Dgallium-nine=false)
960 - fi
961 -
962 - if use video_cards_r600 ||
963 - use video_cards_radeonsi ||
964 - use video_cards_nouveau; then
965 - emesonargs+=($(meson_use vaapi gallium-va))
966 - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
967 - else
968 - emesonargs+=(-Dgallium-va=false)
969 - fi
970 -
971 - if use video_cards_r300 ||
972 - use video_cards_r600 ||
973 - use video_cards_radeonsi ||
974 - use video_cards_nouveau; then
975 - emesonargs+=($(meson_use vdpau gallium-vdpau))
976 - else
977 - emesonargs+=(-Dgallium-vdpau=false)
978 - fi
979 -
980 - if use video_cards_freedreno ||
981 - use video_cards_nouveau ||
982 - use video_cards_vmware; then
983 - emesonargs+=($(meson_use xa gallium-xa))
984 - else
985 - emesonargs+=(-Dgallium-xa=false)
986 - fi
987 -
988 - if use video_cards_r600 ||
989 - use video_cards_nouveau; then
990 - emesonargs+=($(meson_use xvmc gallium-xvmc))
991 - else
992 - emesonargs+=(-Dgallium-xvmc=false)
993 - fi
994 -
995 - gallium_enable video_cards_vc4 vc4
996 - gallium_enable video_cards_vivante etnaviv
997 - gallium_enable video_cards_vmware svga
998 - gallium_enable video_cards_nouveau nouveau
999 - gallium_enable video_cards_imx imx
1000 -
1001 - # Only one i915 driver (classic vs gallium). Default to classic.
1002 - if ! use classic; then
1003 - gallium_enable video_cards_i915 i915
1004 - if ! use video_cards_i915 && \
1005 - ! use video_cards_i965; then
1006 - gallium_enable video_cards_intel i915
1007 - fi
1008 - fi
1009 -
1010 - gallium_enable video_cards_r300 r300
1011 - gallium_enable video_cards_r600 r600
1012 - gallium_enable video_cards_radeonsi radeonsi
1013 - if ! use video_cards_r300 && \
1014 - ! use video_cards_r600; then
1015 - gallium_enable video_cards_radeon r300 r600
1016 - fi
1017 -
1018 - gallium_enable video_cards_freedreno freedreno
1019 - # opencl stuff
1020 - if use opencl; then
1021 - emesonargs+=(
1022 - -Dgallium-opencl="$(usex opencl standalone disabled)"
1023 - )
1024 - fi
1025 -
1026 - gallium_enable video_cards_virgl virgl
1027 - fi
1028 -
1029 - if use vulkan; then
1030 - vulkan_enable video_cards_i965 intel
1031 - vulkan_enable video_cards_radeonsi amd
1032 - fi
1033 -
1034 - # x86 hardened pax_kernel needs glx-rts, bug 240956
1035 - if [[ ${ABI} == x86 ]]; then
1036 - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
1037 - fi
1038 -
1039 - # on abi_x86_32 hardened we need to have asm disable
1040 - if [[ ${ABI} == x86* ]] && use pic; then
1041 - emesonargs+=( -Dasm=false )
1042 - fi
1043 -
1044 - if use gallium; then
1045 - gallium_enable -- swrast
1046 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
1047 - else
1048 - dri_driver_enable -- swrast
1049 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
1050 - fi
1051 -
1052 - driver_list() {
1053 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
1054 - echo "${drivers//$'\n'/,}"
1055 - }
1056 -
1057 - emesonargs+=(
1058 - $(meson_use test build-tests)
1059 - -Dglx=dri
1060 - -Dshared-glapi=true
1061 - $(meson_use dri3)
1062 - $(meson_use egl)
1063 - $(meson_use gbm)
1064 - $(meson_use gles1)
1065 - $(meson_use gles2)
1066 - $(meson_use selinux)
1067 - -Dvalgrind=$(usex valgrind auto false)
1068 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
1069 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
1070 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
1071 - --buildtype $(usex debug debug plain)
1072 - -Db_ndebug=$(usex debug false true)
1073 - )
1074 - meson_src_configure
1075 -}
1076 -
1077 -multilib_src_compile() {
1078 - meson_src_compile
1079 -}
1080 -
1081 -multilib_src_install() {
1082 - meson_src_install
1083 -
1084 - if use opencl; then
1085 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
1086 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
1087 - dodir ${cl_dir}/{lib,include}
1088 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
1089 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
1090 - "${ED}"${cl_dir}
1091 - fi
1092 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
1093 - mv -f "${ED}"/usr/include/CL \
1094 - "${ED}"${cl_dir}/include
1095 - fi
1096 - eend $?
1097 - fi
1098 -}
1099 -
1100 -multilib_src_install_all() {
1101 - einstalldocs
1102 -}
1103 -
1104 -multilib_src_test() {
1105 - meson_src_test
1106 -}
1107 -
1108 -pkg_postinst() {
1109 - # Switch to the xorg implementation.
1110 - echo
1111 - eselect opengl set --use-old ${OPENGL_DIR}
1112 -
1113 - # Switch to mesa opencl
1114 - if use opencl; then
1115 - eselect opencl set --use-old ${PN}
1116 - fi
1117 -}
1118 -
1119 -# $1 - VIDEO_CARDS flag (check skipped for "--")
1120 -# other args - names of DRI drivers to enable
1121 -dri_driver_enable() {
1122 - if [[ $1 == -- ]] || use $1; then
1123 - shift
1124 - DRI_DRIVERS+=("$@")
1125 - fi
1126 -}
1127 -
1128 -gallium_enable() {
1129 - if [[ $1 == -- ]] || use $1; then
1130 - shift
1131 - GALLIUM_DRIVERS+=("$@")
1132 - fi
1133 -}
1134 -
1135 -vulkan_enable() {
1136 - if [[ $1 == -- ]] || use $1; then
1137 - shift
1138 - VULKAN_DRIVERS+=("$@")
1139 - fi
1140 -}
1141
1142 diff --git a/media-libs/mesa/mesa-18.2.2-r1.ebuild b/media-libs/mesa/mesa-18.2.2-r1.ebuild
1143 deleted file mode 100644
1144 index 7728fa3de19..00000000000
1145 --- a/media-libs/mesa/mesa-18.2.2-r1.ebuild
1146 +++ /dev/null
1147 @@ -1,526 +0,0 @@
1148 -# Copyright 1999-2018 Gentoo Authors
1149 -# Distributed under the terms of the GNU General Public License v2
1150 -
1151 -EAPI=6
1152 -
1153 -PYTHON_COMPAT=( python2_7 )
1154 -
1155 -inherit llvm meson multilib-minimal pax-utils python-any-r1
1156 -
1157 -OPENGL_DIR="xorg-x11"
1158 -
1159 -MY_P="${P/_/-}"
1160 -
1161 -DESCRIPTION="OpenGL-like graphic library for Linux"
1162 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1163 -
1164 -if [[ ${PV} == 9999 ]]; then
1165 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1166 - EXPERIMENTAL="true"
1167 - inherit git-r3
1168 -else
1169 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1170 - 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"
1171 -fi
1172 -
1173 -LICENSE="MIT"
1174 -SLOT="0"
1175 -RESTRICT="
1176 - !test? ( test )
1177 -"
1178 -
1179 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1180 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
1181 -for card in ${VIDEO_CARDS}; do
1182 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1183 -done
1184 -
1185 -IUSE="${IUSE_VIDEO_CARDS}
1186 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
1187 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
1188 - vulkan wayland xa xvmc"
1189 -
1190 -REQUIRED_USE="
1191 - d3d9? ( dri3 )
1192 - gles1? ( egl )
1193 - gles2? ( egl )
1194 - vulkan? ( dri3
1195 - || ( video_cards_i965 video_cards_radeonsi )
1196 - video_cards_radeonsi? ( llvm ) )
1197 - wayland? ( egl gbm )
1198 - video_cards_freedreno? ( gallium )
1199 - video_cards_intel? ( classic )
1200 - video_cards_i915? ( || ( classic gallium ) )
1201 - video_cards_i965? ( classic )
1202 - video_cards_imx? ( gallium video_cards_vivante )
1203 - video_cards_nouveau? ( || ( classic gallium ) )
1204 - video_cards_radeon? ( || ( classic gallium )
1205 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1206 - video_cards_r100? ( classic )
1207 - video_cards_r200? ( classic )
1208 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1209 - video_cards_r600? ( gallium )
1210 - video_cards_radeonsi? ( gallium llvm )
1211 - video_cards_vc4? ( gallium )
1212 - video_cards_virgl? ( gallium )
1213 - video_cards_vivante? ( gallium gbm )
1214 - video_cards_vmware? ( gallium )
1215 -"
1216 -
1217 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
1218 -RDEPEND="
1219 - !app-eselect/eselect-mesa
1220 - >=app-eselect/eselect-opengl-1.3.0
1221 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1222 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1223 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1224 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1225 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1226 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1227 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1228 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1229 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1230 - gallium? (
1231 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1232 - llvm? (
1233 - video_cards_radeonsi? (
1234 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1235 - )
1236 - video_cards_r600? (
1237 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1238 - )
1239 - video_cards_radeon? (
1240 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1241 - )
1242 - )
1243 - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
1244 - opencl? (
1245 - dev-libs/ocl-icd[khronos-headers]
1246 - dev-libs/libclc
1247 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1248 - )
1249 - vaapi? (
1250 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1251 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
1252 - )
1253 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1254 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1255 - )
1256 - wayland? (
1257 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
1258 - >=dev-libs/wayland-protocols-1.8
1259 - )
1260 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1261 -
1262 - video_cards_intel? (
1263 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1264 - )
1265 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1266 -"
1267 -for card in ${RADEON_CARDS}; do
1268 - RDEPEND="${RDEPEND}
1269 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1270 - "
1271 -done
1272 -RDEPEND="${RDEPEND}
1273 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1274 -"
1275 -
1276 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1277 -# we need to *really* make sure we're not pulling one than more slot
1278 -# simultaneously.
1279 -#
1280 -# How to use it:
1281 -# 1. List all the working slots (with min versions) in ||, newest first.
1282 -# 2. Update the := to specify *max* version, e.g. < 7.
1283 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
1284 -LLVM_MAX_SLOT="7"
1285 -LLVM_DEPSTR="
1286 - || (
1287 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
1288 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
1289 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
1290 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
1291 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
1292 - )
1293 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
1294 -"
1295 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1296 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1297 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1298 -RDEPEND="${RDEPEND}
1299 - llvm? (
1300 - opencl? (
1301 - video_cards_r600? (
1302 - ${CLANG_DEPSTR_AMDGPU}
1303 - )
1304 - !video_cards_r600? (
1305 - video_cards_radeonsi? (
1306 - ${CLANG_DEPSTR_AMDGPU}
1307 - )
1308 - )
1309 - !video_cards_r600? (
1310 - !video_cards_radeonsi? (
1311 - video_cards_radeon? (
1312 - ${CLANG_DEPSTR_AMDGPU}
1313 - )
1314 - )
1315 - )
1316 - !video_cards_r600? (
1317 - !video_cards_radeon? (
1318 - !video_cards_radeonsi? (
1319 - ${CLANG_DEPSTR}
1320 - )
1321 - )
1322 - )
1323 - )
1324 - !opencl? (
1325 - video_cards_r600? (
1326 - ${LLVM_DEPSTR_AMDGPU}
1327 - )
1328 - !video_cards_r600? (
1329 - video_cards_radeonsi? (
1330 - ${LLVM_DEPSTR_AMDGPU}
1331 - )
1332 - )
1333 - !video_cards_r600? (
1334 - !video_cards_radeonsi? (
1335 - video_cards_radeon? (
1336 - ${LLVM_DEPSTR_AMDGPU}
1337 - )
1338 - )
1339 - )
1340 - !video_cards_r600? (
1341 - !video_cards_radeon? (
1342 - !video_cards_radeonsi? (
1343 - ${LLVM_DEPSTR}
1344 - )
1345 - )
1346 - )
1347 - )
1348 - )
1349 -"
1350 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1351 -
1352 -DEPEND="${RDEPEND}
1353 - ${PYTHON_DEPS}
1354 - opencl? (
1355 - >=sys-devel/gcc-4.6
1356 - )
1357 - sys-devel/bison
1358 - sys-devel/flex
1359 - sys-devel/gettext
1360 - virtual/pkgconfig
1361 - valgrind? ( dev-util/valgrind )
1362 - x11-base/xorg-proto
1363 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1364 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1365 -"
1366 -
1367 -S="${WORKDIR}/${MY_P}"
1368 -EGIT_CHECKOUT_DIR=${S}
1369 -
1370 -QA_WX_LOAD="
1371 -x86? (
1372 - !pic? (
1373 - usr/lib*/libglapi.so.0.0.0
1374 - usr/lib*/libGLESv1_CM.so.1.0.0
1375 - usr/lib*/libGLESv2.so.2.0.0
1376 - usr/lib*/libGL.so.1.2.0
1377 - usr/lib*/libOSMesa.so.8.0.0
1378 - )
1379 -)"
1380 -
1381 -llvm_check_deps() {
1382 - local flags=${MULTILIB_USEDEP}
1383 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1384 - then
1385 - flags+=",llvm_targets_AMDGPU(-)"
1386 - fi
1387 -
1388 - if use opencl; then
1389 - has_version "sys-devel/clang[${flags}]" || return 1
1390 - fi
1391 - has_version "sys-devel/llvm[${flags}]"
1392 -}
1393 -
1394 -pkg_pretend() {
1395 - if use d3d9; then
1396 - if ! use video_cards_r300 &&
1397 - ! use video_cards_r600 &&
1398 - ! use video_cards_radeonsi &&
1399 - ! use video_cards_nouveau &&
1400 - ! use video_cards_vmware; then
1401 - ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
1402 - fi
1403 - fi
1404 -
1405 - if use opencl; then
1406 - if ! use video_cards_r600 &&
1407 - ! use video_cards_radeonsi; then
1408 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
1409 - fi
1410 - fi
1411 -
1412 - if use vaapi; then
1413 - if ! use video_cards_r600 &&
1414 - ! use video_cards_radeonsi &&
1415 - ! use video_cards_nouveau; then
1416 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
1417 - fi
1418 - fi
1419 -
1420 - if use vdpau; then
1421 - if ! use video_cards_r300 &&
1422 - ! use video_cards_r600 &&
1423 - ! use video_cards_radeonsi &&
1424 - ! use video_cards_nouveau; then
1425 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
1426 - fi
1427 - fi
1428 -
1429 - if use xa; then
1430 - if ! use video_cards_freedreno &&
1431 - ! use video_cards_nouveau &&
1432 - ! use video_cards_vmware; then
1433 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
1434 - fi
1435 - fi
1436 -
1437 - if use xvmc; then
1438 - if ! use video_cards_r600 &&
1439 - ! use video_cards_nouveau; then
1440 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
1441 - fi
1442 - fi
1443 -
1444 - if ! use gallium; then
1445 - use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
1446 - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
1447 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
1448 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
1449 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
1450 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
1451 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
1452 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
1453 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
1454 - fi
1455 -
1456 - if ! use llvm; then
1457 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
1458 - fi
1459 -}
1460 -
1461 -pkg_setup() {
1462 - # warning message for bug 459306
1463 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1464 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1465 - ewarn "detected! This can cause problems. For details, see bug 459306."
1466 - fi
1467 -
1468 - if use llvm; then
1469 - llvm_pkg_setup
1470 - fi
1471 - python-any-r1_pkg_setup
1472 -}
1473 -
1474 -multilib_src_configure() {
1475 - local emesonargs=()
1476 -
1477 - if use classic; then
1478 - # Intel code
1479 - dri_driver_enable video_cards_i915 i915
1480 - dri_driver_enable video_cards_i965 i965
1481 - if ! use video_cards_i915 && \
1482 - ! use video_cards_i965; then
1483 - dri_driver_enable video_cards_intel i915 i965
1484 - fi
1485 -
1486 - # Nouveau code
1487 - dri_driver_enable video_cards_nouveau nouveau
1488 -
1489 - # ATI code
1490 - dri_driver_enable video_cards_r100 r100
1491 - dri_driver_enable video_cards_r200 r200
1492 - if ! use video_cards_r100 && \
1493 - ! use video_cards_r200; then
1494 - dri_driver_enable video_cards_radeon r100 r200
1495 - fi
1496 - fi
1497 -
1498 - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
1499 -
1500 - if use gallium; then
1501 - emesonargs+=(
1502 - $(meson_use llvm)
1503 - $(meson_use lm_sensors lmsensors)
1504 - $(meson_use unwind libunwind)
1505 - )
1506 -
1507 - if use video_cards_r300 ||
1508 - use video_cards_r600 ||
1509 - use video_cards_radeonsi ||
1510 - use video_cards_nouveau ||
1511 - use video_cards_vmware; then
1512 - emesonargs+=($(meson_use d3d9 gallium-nine))
1513 - else
1514 - emesonargs+=(-Dgallium-nine=false)
1515 - fi
1516 -
1517 - if use video_cards_r600 ||
1518 - use video_cards_radeonsi ||
1519 - use video_cards_nouveau; then
1520 - emesonargs+=($(meson_use vaapi gallium-va))
1521 - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
1522 - else
1523 - emesonargs+=(-Dgallium-va=false)
1524 - fi
1525 -
1526 - if use video_cards_r300 ||
1527 - use video_cards_r600 ||
1528 - use video_cards_radeonsi ||
1529 - use video_cards_nouveau; then
1530 - emesonargs+=($(meson_use vdpau gallium-vdpau))
1531 - else
1532 - emesonargs+=(-Dgallium-vdpau=false)
1533 - fi
1534 -
1535 - if use video_cards_freedreno ||
1536 - use video_cards_nouveau ||
1537 - use video_cards_vmware; then
1538 - emesonargs+=($(meson_use xa gallium-xa))
1539 - else
1540 - emesonargs+=(-Dgallium-xa=false)
1541 - fi
1542 -
1543 - if use video_cards_r600 ||
1544 - use video_cards_nouveau; then
1545 - emesonargs+=($(meson_use xvmc gallium-xvmc))
1546 - else
1547 - emesonargs+=(-Dgallium-xvmc=false)
1548 - fi
1549 -
1550 - gallium_enable video_cards_vc4 vc4
1551 - gallium_enable video_cards_vivante etnaviv
1552 - gallium_enable video_cards_vmware svga
1553 - gallium_enable video_cards_nouveau nouveau
1554 - gallium_enable video_cards_imx imx
1555 -
1556 - # Only one i915 driver (classic vs gallium). Default to classic.
1557 - if ! use classic; then
1558 - gallium_enable video_cards_i915 i915
1559 - if ! use video_cards_i915 && \
1560 - ! use video_cards_i965; then
1561 - gallium_enable video_cards_intel i915
1562 - fi
1563 - fi
1564 -
1565 - gallium_enable video_cards_r300 r300
1566 - gallium_enable video_cards_r600 r600
1567 - gallium_enable video_cards_radeonsi radeonsi
1568 - if ! use video_cards_r300 && \
1569 - ! use video_cards_r600; then
1570 - gallium_enable video_cards_radeon r300 r600
1571 - fi
1572 -
1573 - gallium_enable video_cards_freedreno freedreno
1574 - gallium_enable video_cards_virgl virgl
1575 -
1576 - # opencl stuff
1577 - emesonargs+=(
1578 - -Dgallium-opencl="$(usex opencl icd disabled)"
1579 - )
1580 - fi
1581 -
1582 - if use vulkan; then
1583 - vulkan_enable video_cards_i965 intel
1584 - vulkan_enable video_cards_radeonsi amd
1585 - fi
1586 -
1587 - # x86 hardened pax_kernel needs glx-rts, bug 240956
1588 - if [[ ${ABI} == x86 ]]; then
1589 - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
1590 - fi
1591 -
1592 - # on abi_x86_32 hardened we need to have asm disable
1593 - if [[ ${ABI} == x86* ]] && use pic; then
1594 - emesonargs+=( -Dasm=false )
1595 - fi
1596 -
1597 - if use gallium; then
1598 - gallium_enable -- swrast
1599 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
1600 - else
1601 - dri_driver_enable -- swrast
1602 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
1603 - fi
1604 -
1605 - driver_list() {
1606 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
1607 - echo "${drivers//$'\n'/,}"
1608 - }
1609 -
1610 - emesonargs+=(
1611 - $(meson_use test build-tests)
1612 - -Dglx=dri
1613 - -Dshared-glapi=true
1614 - $(meson_use dri3)
1615 - $(meson_use egl)
1616 - $(meson_use gbm)
1617 - $(meson_use gles1)
1618 - $(meson_use gles2)
1619 - $(meson_use selinux)
1620 - -Dvalgrind=$(usex valgrind auto false)
1621 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
1622 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
1623 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
1624 - --buildtype $(usex debug debug plain)
1625 - -Db_ndebug=$(usex debug false true)
1626 - )
1627 - meson_src_configure
1628 -}
1629 -
1630 -multilib_src_compile() {
1631 - meson_src_compile
1632 -}
1633 -
1634 -multilib_src_install() {
1635 - meson_src_install
1636 -}
1637 -
1638 -multilib_src_install_all() {
1639 - einstalldocs
1640 -}
1641 -
1642 -multilib_src_test() {
1643 - meson_src_test
1644 -}
1645 -
1646 -pkg_postinst() {
1647 - # Switch to the xorg implementation.
1648 - echo
1649 - eselect opengl set --use-old ${OPENGL_DIR}
1650 -}
1651 -
1652 -# $1 - VIDEO_CARDS flag (check skipped for "--")
1653 -# other args - names of DRI drivers to enable
1654 -dri_driver_enable() {
1655 - if [[ $1 == -- ]] || use $1; then
1656 - shift
1657 - DRI_DRIVERS+=("$@")
1658 - fi
1659 -}
1660 -
1661 -gallium_enable() {
1662 - if [[ $1 == -- ]] || use $1; then
1663 - shift
1664 - GALLIUM_DRIVERS+=("$@")
1665 - fi
1666 -}
1667 -
1668 -vulkan_enable() {
1669 - if [[ $1 == -- ]] || use $1; then
1670 - shift
1671 - VULKAN_DRIVERS+=("$@")
1672 - fi
1673 -}
1674
1675 diff --git a/media-libs/mesa/mesa-18.2.2.ebuild b/media-libs/mesa/mesa-18.2.2.ebuild
1676 deleted file mode 100644
1677 index df9403207de..00000000000
1678 --- a/media-libs/mesa/mesa-18.2.2.ebuild
1679 +++ /dev/null
1680 @@ -1,548 +0,0 @@
1681 -# Copyright 1999-2018 Gentoo Foundation
1682 -# Distributed under the terms of the GNU General Public License v2
1683 -
1684 -EAPI=6
1685 -
1686 -PYTHON_COMPAT=( python2_7 )
1687 -
1688 -inherit llvm meson multilib-minimal pax-utils python-any-r1
1689 -
1690 -OPENGL_DIR="xorg-x11"
1691 -
1692 -MY_P="${P/_/-}"
1693 -
1694 -DESCRIPTION="OpenGL-like graphic library for Linux"
1695 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1696 -
1697 -if [[ ${PV} == 9999 ]]; then
1698 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1699 - EXPERIMENTAL="true"
1700 - inherit git-r3
1701 -else
1702 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1703 - 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"
1704 -fi
1705 -
1706 -LICENSE="MIT"
1707 -SLOT="0"
1708 -RESTRICT="
1709 - !test? ( test )
1710 -"
1711 -
1712 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1713 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
1714 -for card in ${VIDEO_CARDS}; do
1715 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1716 -done
1717 -
1718 -IUSE="${IUSE_VIDEO_CARDS}
1719 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
1720 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
1721 - vulkan wayland xa xvmc"
1722 -
1723 -REQUIRED_USE="
1724 - d3d9? ( dri3 )
1725 - gles1? ( egl )
1726 - gles2? ( egl )
1727 - vulkan? ( dri3
1728 - || ( video_cards_i965 video_cards_radeonsi )
1729 - video_cards_radeonsi? ( llvm ) )
1730 - wayland? ( egl gbm )
1731 - video_cards_freedreno? ( gallium )
1732 - video_cards_intel? ( classic )
1733 - video_cards_i915? ( || ( classic gallium ) )
1734 - video_cards_i965? ( classic )
1735 - video_cards_imx? ( gallium video_cards_vivante )
1736 - video_cards_nouveau? ( || ( classic gallium ) )
1737 - video_cards_radeon? ( || ( classic gallium )
1738 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1739 - video_cards_r100? ( classic )
1740 - video_cards_r200? ( classic )
1741 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1742 - video_cards_r600? ( gallium )
1743 - video_cards_radeonsi? ( gallium llvm )
1744 - video_cards_vc4? ( gallium )
1745 - video_cards_virgl? ( gallium )
1746 - video_cards_vivante? ( gallium gbm )
1747 - video_cards_vmware? ( gallium )
1748 -"
1749 -
1750 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
1751 -RDEPEND="
1752 - !app-eselect/eselect-mesa
1753 - >=app-eselect/eselect-opengl-1.3.0
1754 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1755 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1756 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1757 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1758 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1759 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1760 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1761 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1762 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1763 - gallium? (
1764 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1765 - llvm? (
1766 - video_cards_radeonsi? (
1767 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1768 - )
1769 - video_cards_r600? (
1770 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1771 - )
1772 - video_cards_radeon? (
1773 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1774 - )
1775 - )
1776 - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
1777 - opencl? (
1778 - app-eselect/eselect-opencl
1779 - dev-libs/libclc
1780 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1781 - )
1782 - vaapi? (
1783 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1784 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
1785 - )
1786 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1787 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1788 - )
1789 - wayland? (
1790 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
1791 - >=dev-libs/wayland-protocols-1.8
1792 - )
1793 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1794 -
1795 - video_cards_intel? (
1796 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1797 - )
1798 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1799 -"
1800 -for card in ${RADEON_CARDS}; do
1801 - RDEPEND="${RDEPEND}
1802 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1803 - "
1804 -done
1805 -RDEPEND="${RDEPEND}
1806 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1807 -"
1808 -
1809 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1810 -# we need to *really* make sure we're not pulling one than more slot
1811 -# simultaneously.
1812 -#
1813 -# How to use it:
1814 -# 1. List all the working slots (with min versions) in ||, newest first.
1815 -# 2. Update the := to specify *max* version, e.g. < 7.
1816 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
1817 -LLVM_MAX_SLOT="7"
1818 -LLVM_DEPSTR="
1819 - || (
1820 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
1821 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
1822 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
1823 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
1824 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
1825 - )
1826 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
1827 -"
1828 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1829 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1830 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1831 -RDEPEND="${RDEPEND}
1832 - llvm? (
1833 - opencl? (
1834 - video_cards_r600? (
1835 - ${CLANG_DEPSTR_AMDGPU}
1836 - )
1837 - !video_cards_r600? (
1838 - video_cards_radeonsi? (
1839 - ${CLANG_DEPSTR_AMDGPU}
1840 - )
1841 - )
1842 - !video_cards_r600? (
1843 - !video_cards_radeonsi? (
1844 - video_cards_radeon? (
1845 - ${CLANG_DEPSTR_AMDGPU}
1846 - )
1847 - )
1848 - )
1849 - !video_cards_r600? (
1850 - !video_cards_radeon? (
1851 - !video_cards_radeonsi? (
1852 - ${CLANG_DEPSTR}
1853 - )
1854 - )
1855 - )
1856 - )
1857 - !opencl? (
1858 - video_cards_r600? (
1859 - ${LLVM_DEPSTR_AMDGPU}
1860 - )
1861 - !video_cards_r600? (
1862 - video_cards_radeonsi? (
1863 - ${LLVM_DEPSTR_AMDGPU}
1864 - )
1865 - )
1866 - !video_cards_r600? (
1867 - !video_cards_radeonsi? (
1868 - video_cards_radeon? (
1869 - ${LLVM_DEPSTR_AMDGPU}
1870 - )
1871 - )
1872 - )
1873 - !video_cards_r600? (
1874 - !video_cards_radeon? (
1875 - !video_cards_radeonsi? (
1876 - ${LLVM_DEPSTR}
1877 - )
1878 - )
1879 - )
1880 - )
1881 - )
1882 -"
1883 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1884 -
1885 -DEPEND="${RDEPEND}
1886 - ${PYTHON_DEPS}
1887 - opencl? (
1888 - >=sys-devel/gcc-4.6
1889 - )
1890 - sys-devel/bison
1891 - sys-devel/flex
1892 - sys-devel/gettext
1893 - virtual/pkgconfig
1894 - valgrind? ( dev-util/valgrind )
1895 - x11-base/xorg-proto
1896 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1897 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1898 -"
1899 -
1900 -S="${WORKDIR}/${MY_P}"
1901 -EGIT_CHECKOUT_DIR=${S}
1902 -
1903 -QA_WX_LOAD="
1904 -x86? (
1905 - !pic? (
1906 - usr/lib*/libglapi.so.0.0.0
1907 - usr/lib*/libGLESv1_CM.so.1.0.0
1908 - usr/lib*/libGLESv2.so.2.0.0
1909 - usr/lib*/libGL.so.1.2.0
1910 - usr/lib*/libOSMesa.so.8.0.0
1911 - )
1912 -)"
1913 -
1914 -llvm_check_deps() {
1915 - local flags=${MULTILIB_USEDEP}
1916 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1917 - then
1918 - flags+=",llvm_targets_AMDGPU(-)"
1919 - fi
1920 -
1921 - if use opencl; then
1922 - has_version "sys-devel/clang[${flags}]" || return 1
1923 - fi
1924 - has_version "sys-devel/llvm[${flags}]"
1925 -}
1926 -
1927 -pkg_pretend() {
1928 - if use d3d9; then
1929 - if ! use video_cards_r300 &&
1930 - ! use video_cards_r600 &&
1931 - ! use video_cards_radeonsi &&
1932 - ! use video_cards_nouveau &&
1933 - ! use video_cards_vmware; then
1934 - ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
1935 - fi
1936 - fi
1937 -
1938 - if use opencl; then
1939 - if ! use video_cards_r600 &&
1940 - ! use video_cards_radeonsi; then
1941 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
1942 - fi
1943 - fi
1944 -
1945 - if use vaapi; then
1946 - if ! use video_cards_r600 &&
1947 - ! use video_cards_radeonsi &&
1948 - ! use video_cards_nouveau; then
1949 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
1950 - fi
1951 - fi
1952 -
1953 - if use vdpau; then
1954 - if ! use video_cards_r300 &&
1955 - ! use video_cards_r600 &&
1956 - ! use video_cards_radeonsi &&
1957 - ! use video_cards_nouveau; then
1958 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
1959 - fi
1960 - fi
1961 -
1962 - if use xa; then
1963 - if ! use video_cards_freedreno &&
1964 - ! use video_cards_nouveau &&
1965 - ! use video_cards_vmware; then
1966 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
1967 - fi
1968 - fi
1969 -
1970 - if use xvmc; then
1971 - if ! use video_cards_r600 &&
1972 - ! use video_cards_nouveau; then
1973 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
1974 - fi
1975 - fi
1976 -
1977 - if ! use gallium; then
1978 - use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
1979 - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
1980 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
1981 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
1982 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
1983 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
1984 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
1985 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
1986 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
1987 - fi
1988 -
1989 - if ! use llvm; then
1990 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
1991 - fi
1992 -}
1993 -
1994 -pkg_setup() {
1995 - # warning message for bug 459306
1996 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1997 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1998 - ewarn "detected! This can cause problems. For details, see bug 459306."
1999 - fi
2000 -
2001 - if use llvm; then
2002 - llvm_pkg_setup
2003 - fi
2004 - python-any-r1_pkg_setup
2005 -}
2006 -
2007 -multilib_src_configure() {
2008 - local emesonargs=()
2009 -
2010 - if use classic; then
2011 - # Intel code
2012 - dri_driver_enable video_cards_i915 i915
2013 - dri_driver_enable video_cards_i965 i965
2014 - if ! use video_cards_i915 && \
2015 - ! use video_cards_i965; then
2016 - dri_driver_enable video_cards_intel i915 i965
2017 - fi
2018 -
2019 - # Nouveau code
2020 - dri_driver_enable video_cards_nouveau nouveau
2021 -
2022 - # ATI code
2023 - dri_driver_enable video_cards_r100 r100
2024 - dri_driver_enable video_cards_r200 r200
2025 - if ! use video_cards_r100 && \
2026 - ! use video_cards_r200; then
2027 - dri_driver_enable video_cards_radeon r100 r200
2028 - fi
2029 - fi
2030 -
2031 - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
2032 -
2033 - if use gallium; then
2034 - emesonargs+=(
2035 - $(meson_use llvm)
2036 - $(meson_use lm_sensors lmsensors)
2037 - $(meson_use unwind libunwind)
2038 - )
2039 -
2040 - if use video_cards_r300 ||
2041 - use video_cards_r600 ||
2042 - use video_cards_radeonsi ||
2043 - use video_cards_nouveau ||
2044 - use video_cards_vmware; then
2045 - emesonargs+=($(meson_use d3d9 gallium-nine))
2046 - else
2047 - emesonargs+=(-Dgallium-nine=false)
2048 - fi
2049 -
2050 - if use video_cards_r600 ||
2051 - use video_cards_radeonsi ||
2052 - use video_cards_nouveau; then
2053 - emesonargs+=($(meson_use vaapi gallium-va))
2054 - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
2055 - else
2056 - emesonargs+=(-Dgallium-va=false)
2057 - fi
2058 -
2059 - if use video_cards_r300 ||
2060 - use video_cards_r600 ||
2061 - use video_cards_radeonsi ||
2062 - use video_cards_nouveau; then
2063 - emesonargs+=($(meson_use vdpau gallium-vdpau))
2064 - else
2065 - emesonargs+=(-Dgallium-vdpau=false)
2066 - fi
2067 -
2068 - if use video_cards_freedreno ||
2069 - use video_cards_nouveau ||
2070 - use video_cards_vmware; then
2071 - emesonargs+=($(meson_use xa gallium-xa))
2072 - else
2073 - emesonargs+=(-Dgallium-xa=false)
2074 - fi
2075 -
2076 - if use video_cards_r600 ||
2077 - use video_cards_nouveau; then
2078 - emesonargs+=($(meson_use xvmc gallium-xvmc))
2079 - else
2080 - emesonargs+=(-Dgallium-xvmc=false)
2081 - fi
2082 -
2083 - gallium_enable video_cards_vc4 vc4
2084 - gallium_enable video_cards_vivante etnaviv
2085 - gallium_enable video_cards_vmware svga
2086 - gallium_enable video_cards_nouveau nouveau
2087 - gallium_enable video_cards_imx imx
2088 -
2089 - # Only one i915 driver (classic vs gallium). Default to classic.
2090 - if ! use classic; then
2091 - gallium_enable video_cards_i915 i915
2092 - if ! use video_cards_i915 && \
2093 - ! use video_cards_i965; then
2094 - gallium_enable video_cards_intel i915
2095 - fi
2096 - fi
2097 -
2098 - gallium_enable video_cards_r300 r300
2099 - gallium_enable video_cards_r600 r600
2100 - gallium_enable video_cards_radeonsi radeonsi
2101 - if ! use video_cards_r300 && \
2102 - ! use video_cards_r600; then
2103 - gallium_enable video_cards_radeon r300 r600
2104 - fi
2105 -
2106 - gallium_enable video_cards_freedreno freedreno
2107 - # opencl stuff
2108 - if use opencl; then
2109 - emesonargs+=(
2110 - -Dgallium-opencl="$(usex opencl standalone disabled)"
2111 - )
2112 - fi
2113 -
2114 - gallium_enable video_cards_virgl virgl
2115 - fi
2116 -
2117 - if use vulkan; then
2118 - vulkan_enable video_cards_i965 intel
2119 - vulkan_enable video_cards_radeonsi amd
2120 - fi
2121 -
2122 - # x86 hardened pax_kernel needs glx-rts, bug 240956
2123 - if [[ ${ABI} == x86 ]]; then
2124 - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
2125 - fi
2126 -
2127 - # on abi_x86_32 hardened we need to have asm disable
2128 - if [[ ${ABI} == x86* ]] && use pic; then
2129 - emesonargs+=( -Dasm=false )
2130 - fi
2131 -
2132 - if use gallium; then
2133 - gallium_enable -- swrast
2134 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
2135 - else
2136 - dri_driver_enable -- swrast
2137 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
2138 - fi
2139 -
2140 - driver_list() {
2141 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
2142 - echo "${drivers//$'\n'/,}"
2143 - }
2144 -
2145 - emesonargs+=(
2146 - $(meson_use test build-tests)
2147 - -Dglx=dri
2148 - -Dshared-glapi=true
2149 - $(meson_use dri3)
2150 - $(meson_use egl)
2151 - $(meson_use gbm)
2152 - $(meson_use gles1)
2153 - $(meson_use gles2)
2154 - $(meson_use selinux)
2155 - -Dvalgrind=$(usex valgrind auto false)
2156 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
2157 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
2158 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
2159 - --buildtype $(usex debug debug plain)
2160 - -Db_ndebug=$(usex debug false true)
2161 - )
2162 - meson_src_configure
2163 -}
2164 -
2165 -multilib_src_compile() {
2166 - meson_src_compile
2167 -}
2168 -
2169 -multilib_src_install() {
2170 - meson_src_install
2171 -
2172 - if use opencl; then
2173 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
2174 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
2175 - dodir ${cl_dir}/{lib,include}
2176 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
2177 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
2178 - "${ED}"${cl_dir}
2179 - fi
2180 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
2181 - mv -f "${ED}"/usr/include/CL \
2182 - "${ED}"${cl_dir}/include
2183 - fi
2184 - eend $?
2185 - fi
2186 -}
2187 -
2188 -multilib_src_install_all() {
2189 - einstalldocs
2190 -}
2191 -
2192 -multilib_src_test() {
2193 - meson_src_test
2194 -}
2195 -
2196 -pkg_postinst() {
2197 - # Switch to the xorg implementation.
2198 - echo
2199 - eselect opengl set --use-old ${OPENGL_DIR}
2200 -
2201 - # Switch to mesa opencl
2202 - if use opencl; then
2203 - eselect opencl set --use-old ${PN}
2204 - fi
2205 -}
2206 -
2207 -# $1 - VIDEO_CARDS flag (check skipped for "--")
2208 -# other args - names of DRI drivers to enable
2209 -dri_driver_enable() {
2210 - if [[ $1 == -- ]] || use $1; then
2211 - shift
2212 - DRI_DRIVERS+=("$@")
2213 - fi
2214 -}
2215 -
2216 -gallium_enable() {
2217 - if [[ $1 == -- ]] || use $1; then
2218 - shift
2219 - GALLIUM_DRIVERS+=("$@")
2220 - fi
2221 -}
2222 -
2223 -vulkan_enable() {
2224 - if [[ $1 == -- ]] || use $1; then
2225 - shift
2226 - VULKAN_DRIVERS+=("$@")
2227 - fi
2228 -}
2229
2230 diff --git a/media-libs/mesa/mesa-18.2.3.ebuild b/media-libs/mesa/mesa-18.2.3.ebuild
2231 deleted file mode 100644
2232 index 2b4e1542fc5..00000000000
2233 --- a/media-libs/mesa/mesa-18.2.3.ebuild
2234 +++ /dev/null
2235 @@ -1,526 +0,0 @@
2236 -# Copyright 1999-2018 Gentoo Authors
2237 -# Distributed under the terms of the GNU General Public License v2
2238 -
2239 -EAPI=6
2240 -
2241 -PYTHON_COMPAT=( python2_7 )
2242 -
2243 -inherit llvm meson multilib-minimal pax-utils python-any-r1
2244 -
2245 -OPENGL_DIR="xorg-x11"
2246 -
2247 -MY_P="${P/_/-}"
2248 -
2249 -DESCRIPTION="OpenGL-like graphic library for Linux"
2250 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
2251 -
2252 -if [[ ${PV} == 9999 ]]; then
2253 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
2254 - EXPERIMENTAL="true"
2255 - inherit git-r3
2256 -else
2257 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
2258 - 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"
2259 -fi
2260 -
2261 -LICENSE="MIT"
2262 -SLOT="0"
2263 -RESTRICT="
2264 - !test? ( test )
2265 -"
2266 -
2267 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
2268 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
2269 -for card in ${VIDEO_CARDS}; do
2270 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
2271 -done
2272 -
2273 -IUSE="${IUSE_VIDEO_CARDS}
2274 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors
2275 - opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
2276 - vulkan wayland xa xvmc"
2277 -
2278 -REQUIRED_USE="
2279 - d3d9? ( dri3 )
2280 - gles1? ( egl )
2281 - gles2? ( egl )
2282 - vulkan? ( dri3
2283 - || ( video_cards_i965 video_cards_radeonsi )
2284 - video_cards_radeonsi? ( llvm ) )
2285 - wayland? ( egl gbm )
2286 - video_cards_freedreno? ( gallium )
2287 - video_cards_intel? ( classic )
2288 - video_cards_i915? ( || ( classic gallium ) )
2289 - video_cards_i965? ( classic )
2290 - video_cards_imx? ( gallium video_cards_vivante )
2291 - video_cards_nouveau? ( || ( classic gallium ) )
2292 - video_cards_radeon? ( || ( classic gallium )
2293 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
2294 - video_cards_r100? ( classic )
2295 - video_cards_r200? ( classic )
2296 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
2297 - video_cards_r600? ( gallium )
2298 - video_cards_radeonsi? ( gallium llvm )
2299 - video_cards_vc4? ( gallium )
2300 - video_cards_virgl? ( gallium )
2301 - video_cards_vivante? ( gallium gbm )
2302 - video_cards_vmware? ( gallium )
2303 -"
2304 -
2305 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
2306 -RDEPEND="
2307 - !app-eselect/eselect-mesa
2308 - >=app-eselect/eselect-opengl-1.3.0
2309 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
2310 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
2311 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
2312 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
2313 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
2314 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
2315 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
2316 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
2317 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
2318 - gallium? (
2319 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
2320 - llvm? (
2321 - video_cards_radeonsi? (
2322 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2323 - )
2324 - video_cards_r600? (
2325 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2326 - )
2327 - video_cards_radeon? (
2328 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2329 - )
2330 - )
2331 - lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
2332 - opencl? (
2333 - dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
2334 - dev-libs/libclc
2335 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2336 - )
2337 - vaapi? (
2338 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
2339 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
2340 - )
2341 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
2342 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
2343 - )
2344 - wayland? (
2345 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
2346 - >=dev-libs/wayland-protocols-1.8
2347 - )
2348 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
2349 -
2350 - video_cards_intel? (
2351 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2352 - )
2353 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2354 -"
2355 -for card in ${RADEON_CARDS}; do
2356 - RDEPEND="${RDEPEND}
2357 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
2358 - "
2359 -done
2360 -RDEPEND="${RDEPEND}
2361 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
2362 -"
2363 -
2364 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
2365 -# we need to *really* make sure we're not pulling one than more slot
2366 -# simultaneously.
2367 -#
2368 -# How to use it:
2369 -# 1. List all the working slots (with min versions) in ||, newest first.
2370 -# 2. Update the := to specify *max* version, e.g. < 7.
2371 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
2372 -LLVM_MAX_SLOT="7"
2373 -LLVM_DEPSTR="
2374 - || (
2375 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
2376 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
2377 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
2378 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
2379 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
2380 - )
2381 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
2382 -"
2383 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2384 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
2385 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2386 -RDEPEND="${RDEPEND}
2387 - llvm? (
2388 - opencl? (
2389 - video_cards_r600? (
2390 - ${CLANG_DEPSTR_AMDGPU}
2391 - )
2392 - !video_cards_r600? (
2393 - video_cards_radeonsi? (
2394 - ${CLANG_DEPSTR_AMDGPU}
2395 - )
2396 - )
2397 - !video_cards_r600? (
2398 - !video_cards_radeonsi? (
2399 - video_cards_radeon? (
2400 - ${CLANG_DEPSTR_AMDGPU}
2401 - )
2402 - )
2403 - )
2404 - !video_cards_r600? (
2405 - !video_cards_radeon? (
2406 - !video_cards_radeonsi? (
2407 - ${CLANG_DEPSTR}
2408 - )
2409 - )
2410 - )
2411 - )
2412 - !opencl? (
2413 - video_cards_r600? (
2414 - ${LLVM_DEPSTR_AMDGPU}
2415 - )
2416 - !video_cards_r600? (
2417 - video_cards_radeonsi? (
2418 - ${LLVM_DEPSTR_AMDGPU}
2419 - )
2420 - )
2421 - !video_cards_r600? (
2422 - !video_cards_radeonsi? (
2423 - video_cards_radeon? (
2424 - ${LLVM_DEPSTR_AMDGPU}
2425 - )
2426 - )
2427 - )
2428 - !video_cards_r600? (
2429 - !video_cards_radeon? (
2430 - !video_cards_radeonsi? (
2431 - ${LLVM_DEPSTR}
2432 - )
2433 - )
2434 - )
2435 - )
2436 - )
2437 -"
2438 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
2439 -
2440 -DEPEND="${RDEPEND}
2441 - ${PYTHON_DEPS}
2442 - opencl? (
2443 - >=sys-devel/gcc-4.6
2444 - )
2445 - sys-devel/bison
2446 - sys-devel/flex
2447 - sys-devel/gettext
2448 - virtual/pkgconfig
2449 - valgrind? ( dev-util/valgrind )
2450 - x11-base/xorg-proto
2451 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
2452 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
2453 -"
2454 -
2455 -S="${WORKDIR}/${MY_P}"
2456 -EGIT_CHECKOUT_DIR=${S}
2457 -
2458 -QA_WX_LOAD="
2459 -x86? (
2460 - !pic? (
2461 - usr/lib*/libglapi.so.0.0.0
2462 - usr/lib*/libGLESv1_CM.so.1.0.0
2463 - usr/lib*/libGLESv2.so.2.0.0
2464 - usr/lib*/libGL.so.1.2.0
2465 - usr/lib*/libOSMesa.so.8.0.0
2466 - )
2467 -)"
2468 -
2469 -llvm_check_deps() {
2470 - local flags=${MULTILIB_USEDEP}
2471 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
2472 - then
2473 - flags+=",llvm_targets_AMDGPU(-)"
2474 - fi
2475 -
2476 - if use opencl; then
2477 - has_version "sys-devel/clang[${flags}]" || return 1
2478 - fi
2479 - has_version "sys-devel/llvm[${flags}]"
2480 -}
2481 -
2482 -pkg_pretend() {
2483 - if use d3d9; then
2484 - if ! use video_cards_r300 &&
2485 - ! use video_cards_r600 &&
2486 - ! use video_cards_radeonsi &&
2487 - ! use video_cards_nouveau &&
2488 - ! use video_cards_vmware; then
2489 - ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware"
2490 - fi
2491 - fi
2492 -
2493 - if use opencl; then
2494 - if ! use video_cards_r600 &&
2495 - ! use video_cards_radeonsi; then
2496 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
2497 - fi
2498 - fi
2499 -
2500 - if use vaapi; then
2501 - if ! use video_cards_r600 &&
2502 - ! use video_cards_radeonsi &&
2503 - ! use video_cards_nouveau; then
2504 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
2505 - fi
2506 - fi
2507 -
2508 - if use vdpau; then
2509 - if ! use video_cards_r300 &&
2510 - ! use video_cards_r600 &&
2511 - ! use video_cards_radeonsi &&
2512 - ! use video_cards_nouveau; then
2513 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
2514 - fi
2515 - fi
2516 -
2517 - if use xa; then
2518 - if ! use video_cards_freedreno &&
2519 - ! use video_cards_nouveau &&
2520 - ! use video_cards_vmware; then
2521 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
2522 - fi
2523 - fi
2524 -
2525 - if use xvmc; then
2526 - if ! use video_cards_r600 &&
2527 - ! use video_cards_nouveau; then
2528 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
2529 - fi
2530 - fi
2531 -
2532 - if ! use gallium; then
2533 - use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium"
2534 - use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
2535 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
2536 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
2537 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
2538 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
2539 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
2540 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
2541 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
2542 - fi
2543 -
2544 - if ! use llvm; then
2545 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
2546 - fi
2547 -}
2548 -
2549 -pkg_setup() {
2550 - # warning message for bug 459306
2551 - if use llvm && has_version sys-devel/llvm[!debug=]; then
2552 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
2553 - ewarn "detected! This can cause problems. For details, see bug 459306."
2554 - fi
2555 -
2556 - if use llvm; then
2557 - llvm_pkg_setup
2558 - fi
2559 - python-any-r1_pkg_setup
2560 -}
2561 -
2562 -multilib_src_configure() {
2563 - local emesonargs=()
2564 -
2565 - if use classic; then
2566 - # Intel code
2567 - dri_driver_enable video_cards_i915 i915
2568 - dri_driver_enable video_cards_i965 i965
2569 - if ! use video_cards_i915 && \
2570 - ! use video_cards_i965; then
2571 - dri_driver_enable video_cards_intel i915 i965
2572 - fi
2573 -
2574 - # Nouveau code
2575 - dri_driver_enable video_cards_nouveau nouveau
2576 -
2577 - # ATI code
2578 - dri_driver_enable video_cards_r100 r100
2579 - dri_driver_enable video_cards_r200 r200
2580 - if ! use video_cards_r100 && \
2581 - ! use video_cards_r200; then
2582 - dri_driver_enable video_cards_radeon r100 r200
2583 - fi
2584 - fi
2585 -
2586 - emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
2587 -
2588 - if use gallium; then
2589 - emesonargs+=(
2590 - $(meson_use llvm)
2591 - $(meson_use lm_sensors lmsensors)
2592 - $(meson_use unwind libunwind)
2593 - )
2594 -
2595 - if use video_cards_r300 ||
2596 - use video_cards_r600 ||
2597 - use video_cards_radeonsi ||
2598 - use video_cards_nouveau ||
2599 - use video_cards_vmware; then
2600 - emesonargs+=($(meson_use d3d9 gallium-nine))
2601 - else
2602 - emesonargs+=(-Dgallium-nine=false)
2603 - fi
2604 -
2605 - if use video_cards_r600 ||
2606 - use video_cards_radeonsi ||
2607 - use video_cards_nouveau; then
2608 - emesonargs+=($(meson_use vaapi gallium-va))
2609 - use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
2610 - else
2611 - emesonargs+=(-Dgallium-va=false)
2612 - fi
2613 -
2614 - if use video_cards_r300 ||
2615 - use video_cards_r600 ||
2616 - use video_cards_radeonsi ||
2617 - use video_cards_nouveau; then
2618 - emesonargs+=($(meson_use vdpau gallium-vdpau))
2619 - else
2620 - emesonargs+=(-Dgallium-vdpau=false)
2621 - fi
2622 -
2623 - if use video_cards_freedreno ||
2624 - use video_cards_nouveau ||
2625 - use video_cards_vmware; then
2626 - emesonargs+=($(meson_use xa gallium-xa))
2627 - else
2628 - emesonargs+=(-Dgallium-xa=false)
2629 - fi
2630 -
2631 - if use video_cards_r600 ||
2632 - use video_cards_nouveau; then
2633 - emesonargs+=($(meson_use xvmc gallium-xvmc))
2634 - else
2635 - emesonargs+=(-Dgallium-xvmc=false)
2636 - fi
2637 -
2638 - gallium_enable video_cards_vc4 vc4
2639 - gallium_enable video_cards_vivante etnaviv
2640 - gallium_enable video_cards_vmware svga
2641 - gallium_enable video_cards_nouveau nouveau
2642 - gallium_enable video_cards_imx imx
2643 -
2644 - # Only one i915 driver (classic vs gallium). Default to classic.
2645 - if ! use classic; then
2646 - gallium_enable video_cards_i915 i915
2647 - if ! use video_cards_i915 && \
2648 - ! use video_cards_i965; then
2649 - gallium_enable video_cards_intel i915
2650 - fi
2651 - fi
2652 -
2653 - gallium_enable video_cards_r300 r300
2654 - gallium_enable video_cards_r600 r600
2655 - gallium_enable video_cards_radeonsi radeonsi
2656 - if ! use video_cards_r300 && \
2657 - ! use video_cards_r600; then
2658 - gallium_enable video_cards_radeon r300 r600
2659 - fi
2660 -
2661 - gallium_enable video_cards_freedreno freedreno
2662 - gallium_enable video_cards_virgl virgl
2663 -
2664 - # opencl stuff
2665 - emesonargs+=(
2666 - -Dgallium-opencl="$(usex opencl icd disabled)"
2667 - )
2668 - fi
2669 -
2670 - if use vulkan; then
2671 - vulkan_enable video_cards_i965 intel
2672 - vulkan_enable video_cards_radeonsi amd
2673 - fi
2674 -
2675 - # x86 hardened pax_kernel needs glx-rts, bug 240956
2676 - if [[ ${ABI} == x86 ]]; then
2677 - emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
2678 - fi
2679 -
2680 - # on abi_x86_32 hardened we need to have asm disable
2681 - if [[ ${ABI} == x86* ]] && use pic; then
2682 - emesonargs+=( -Dasm=false )
2683 - fi
2684 -
2685 - if use gallium; then
2686 - gallium_enable -- swrast
2687 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
2688 - else
2689 - dri_driver_enable -- swrast
2690 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
2691 - fi
2692 -
2693 - driver_list() {
2694 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
2695 - echo "${drivers//$'\n'/,}"
2696 - }
2697 -
2698 - emesonargs+=(
2699 - $(meson_use test build-tests)
2700 - -Dglx=dri
2701 - -Dshared-glapi=true
2702 - $(meson_use dri3)
2703 - $(meson_use egl)
2704 - $(meson_use gbm)
2705 - $(meson_use gles1)
2706 - $(meson_use gles2)
2707 - $(meson_use selinux)
2708 - -Dvalgrind=$(usex valgrind auto false)
2709 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
2710 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
2711 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
2712 - --buildtype $(usex debug debug plain)
2713 - -Db_ndebug=$(usex debug false true)
2714 - )
2715 - meson_src_configure
2716 -}
2717 -
2718 -multilib_src_compile() {
2719 - meson_src_compile
2720 -}
2721 -
2722 -multilib_src_install() {
2723 - meson_src_install
2724 -}
2725 -
2726 -multilib_src_install_all() {
2727 - einstalldocs
2728 -}
2729 -
2730 -multilib_src_test() {
2731 - meson_src_test
2732 -}
2733 -
2734 -pkg_postinst() {
2735 - # Switch to the xorg implementation.
2736 - echo
2737 - eselect opengl set --use-old ${OPENGL_DIR}
2738 -}
2739 -
2740 -# $1 - VIDEO_CARDS flag (check skipped for "--")
2741 -# other args - names of DRI drivers to enable
2742 -dri_driver_enable() {
2743 - if [[ $1 == -- ]] || use $1; then
2744 - shift
2745 - DRI_DRIVERS+=("$@")
2746 - fi
2747 -}
2748 -
2749 -gallium_enable() {
2750 - if [[ $1 == -- ]] || use $1; then
2751 - shift
2752 - GALLIUM_DRIVERS+=("$@")
2753 - fi
2754 -}
2755 -
2756 -vulkan_enable() {
2757 - if [[ $1 == -- ]] || use $1; then
2758 - shift
2759 - VULKAN_DRIVERS+=("$@")
2760 - fi
2761 -}