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, 25 Sep 2020 04:53:42
Message-Id: 1601009584.9a307cd54ca6be4345ebe3d785c53423463ff5ed.mattst88@gentoo
1 commit: 9a307cd54ca6be4345ebe3d785c53423463ff5ed
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 25 04:47:20 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 25 04:53:04 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a307cd5
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-20.0.8.ebuild | 557 --------------------------------
14 media-libs/mesa/mesa-20.1.6.ebuild | 557 --------------------------------
15 media-libs/mesa/mesa-20.2.0_rc2.ebuild | 565 ---------------------------------
16 media-libs/mesa/mesa-20.2.0_rc3.ebuild | 565 ---------------------------------
17 5 files changed, 2248 deletions(-)
18
19 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
20 index 025fe6df8f1..2dca688555b 100644
21 --- a/media-libs/mesa/Manifest
22 +++ b/media-libs/mesa/Manifest
23 @@ -1,7 +1,3 @@
24 -DIST mesa-20.0.8.tar.xz 12360736 BLAKE2B 19e3f8a40b34b5f17ed76077c5d92f728a134b2479c43d86674ed1818ab99639a9b732041f67488251df808564f6abe5b587d756ef9c7c13dcada87cd0fc05de SHA512 d906330c412899907dd05a84034a929107fccaf3044814c4b1f30ba5690cbcf1587b5f17534c6345111f3cb7cf292afd5984a60486643ff6f534b57cec615374
25 -DIST mesa-20.1.6.tar.xz 12805724 BLAKE2B d652b59e4987436d2e05de9138f2e2fb4a8bf435c24d9c7ad08bcb82a3bf7c9c64bc71b15b4b6d334f8b574341719f372aa1b893283abc21191a4d71d9d30fee SHA512 5ef28334ecb7effaaf597ea3efe0406af62419e6fa629e835d843161ab8d83515626ec0f0495c4cc66af9e5669398ac96c16ca626e4965a9831e1704c995fb09
26 DIST mesa-20.1.7.tar.xz 12825368 BLAKE2B 2fedda518ff29bfda49af12d714dc258e48fca3492d2327ce5080d11bbaea5ad646d438f3e2d5ddabeffae83211976fb15001c650cd6ab4052ab09d97342afdc SHA512 5ff614c3f7568db7673cd2398615e5398c7f50093abdabd0730e07fe9c358310793fea3f130058110c9a2aa284c6efd207e1bdca3d1a1ba46fb18d76e34f361a
27 DIST mesa-20.1.8.tar.xz 12846348 BLAKE2B b31680458100fc4394819a379a14237cfe39befea91f53641dc181d29891cb3e508c45f5ea1b07deee97f6bf04b6d8b2ca9cd8270bf79ab4a524035fbdc58c36 SHA512 519b0e2837982d097c362d974a90c94efd1cdf14505fc43eaa740a23c042bc0c3f04d0edaf6b371966d82667cade6d0c68c92528e1be6c12884b38c67fd064c1
28 -DIST mesa-20.2.0-rc2.tar.xz 13528208 BLAKE2B 6505446829ec2c01c0de7a7d9c1187db874111402da5ffe2f9f5872df7b6a5e53a3b628c190172bb9a806851b3b85aa0e3b53a4fcfb40f99adfc48cc3876c9f5 SHA512 36d9a74db50335bd31a8d5c47f7c657f05eeda044530fe123c06c472ed27c9b5dff19716d11d95256449223e82dde38895547cf6ae60b7460d3b1e9ed440704a
29 -DIST mesa-20.2.0-rc3.tar.xz 13550928 BLAKE2B b3e8a257422c06d1cbd7b7309b73d988be51adf4a60c4cd8e401c8fb86a430c7059956ef8264bbbce45ee5e38535916903dc915ab3660b0e5bc14b980d557d67 SHA512 56a692e02abed95ee16be17930f4c71519191def1a6465d465af6ebbf9d8b7e204a240e720b0fc512f4f18da3e4f37dbf8d96c3231ffba15e7114c240be71444
30 DIST mesa-20.2.0-rc4.tar.xz 13569628 BLAKE2B 54068c298a57f2c19113828e2e9b94dd15070ecc0c899f7e3dc527b27579e4f8c3c84c7b841c8d0b8313556cca41bfefd3e08b360dd0e364cbc29e0609ff6f3d SHA512 1f718bfbadbc15b7216864226adb737f3a4a7801dc60ca9294effd4be5f260fffd31c988eed9550e8a7a7430acb05ba0c7d65693c1f375eab4b95d2d029755bb
31
32 diff --git a/media-libs/mesa/mesa-20.0.8.ebuild b/media-libs/mesa/mesa-20.0.8.ebuild
33 deleted file mode 100644
34 index f8e02ddc8cd..00000000000
35 --- a/media-libs/mesa/mesa-20.0.8.ebuild
36 +++ /dev/null
37 @@ -1,557 +0,0 @@
38 -# Copyright 1999-2020 Gentoo Authors
39 -# Distributed under the terms of the GNU General Public License v2
40 -
41 -EAPI=7
42 -
43 -PYTHON_COMPAT=( python3_{6,7,8} )
44 -
45 -inherit llvm meson multilib-minimal python-any-r1 linux-info
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 - inherit git-r3
57 -else
58 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
59 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
60 -fi
61 -
62 -LICENSE="MIT"
63 -SLOT="0"
64 -RESTRICT="
65 - !test? ( test )
66 -"
67 -
68 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
69 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost vc4 virgl vivante vmware"
70 -for card in ${VIDEO_CARDS}; do
71 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
72 -done
73 -
74 -IUSE="${IUSE_VIDEO_CARDS}
75 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm
76 - lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
77 - vulkan-overlay wayland +X xa xvmc +zstd"
78 -
79 -REQUIRED_USE="
80 - d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
81 - gles1? ( egl )
82 - gles2? ( egl )
83 - vulkan? ( dri3
84 - video_cards_radeonsi? ( llvm ) )
85 - vulkan-overlay? ( vulkan )
86 - wayland? ( egl gbm )
87 - video_cards_freedreno? ( gallium )
88 - video_cards_intel? ( classic )
89 - video_cards_i915? ( || ( classic gallium ) )
90 - video_cards_i965? ( classic )
91 - video_cards_iris? ( gallium )
92 - video_cards_lima? ( gallium )
93 - video_cards_nouveau? ( || ( classic gallium ) )
94 - video_cards_panfrost? ( gallium )
95 - video_cards_radeon? ( || ( classic gallium )
96 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
97 - video_cards_r100? ( classic )
98 - video_cards_r200? ( classic )
99 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
100 - video_cards_r600? ( gallium )
101 - video_cards_radeonsi? ( gallium llvm )
102 - video_cards_vc4? ( gallium )
103 - video_cards_virgl? ( gallium )
104 - video_cards_vivante? ( gallium gbm )
105 - video_cards_vmware? ( gallium )
106 - xa? ( X )
107 - xvmc? ( X )
108 -"
109 -
110 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.100"
111 -RDEPEND="
112 - !app-eselect/eselect-mesa
113 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
114 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
115 - libglvnd? (
116 - >=media-libs/libglvnd-1.2.0-r1[X?,${MULTILIB_USEDEP}]
117 - !app-eselect/eselect-opengl
118 - )
119 - !libglvnd? (
120 - >=app-eselect/eselect-opengl-1.3.0
121 - )
122 - gallium? (
123 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
124 - llvm? (
125 - video_cards_radeonsi? (
126 - virtual/libelf:0=[${MULTILIB_USEDEP}]
127 - )
128 - video_cards_r600? (
129 - virtual/libelf:0=[${MULTILIB_USEDEP}]
130 - )
131 - video_cards_radeon? (
132 - virtual/libelf:0=[${MULTILIB_USEDEP}]
133 - )
134 - )
135 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
136 - opencl? (
137 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
138 - dev-libs/libclc
139 - virtual/libelf:0=[${MULTILIB_USEDEP}]
140 - )
141 - vaapi? (
142 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
143 - )
144 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
145 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
146 - )
147 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
148 - wayland? (
149 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
150 - >=dev-libs/wayland-protocols-1.8
151 - )
152 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
153 - video_cards_intel? (
154 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
155 - )
156 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
157 - vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
158 - X? (
159 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
160 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
161 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
162 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
163 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
164 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
165 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
166 - )
167 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
168 -"
169 -for card in ${RADEON_CARDS}; do
170 - RDEPEND="${RDEPEND}
171 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
172 - "
173 -done
174 -RDEPEND="${RDEPEND}
175 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
176 -"
177 -
178 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
179 -# we need to *really* make sure we're not pulling one than more slot
180 -# simultaneously.
181 -#
182 -# How to use it:
183 -# 1. List all the working slots (with min versions) in ||, newest first.
184 -# 2. Update the := to specify *max* version, e.g. < 10.
185 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
186 -LLVM_MAX_SLOT="10"
187 -LLVM_DEPSTR="
188 - || (
189 - sys-devel/llvm:10[${MULTILIB_USEDEP}]
190 - sys-devel/llvm:9[${MULTILIB_USEDEP}]
191 - sys-devel/llvm:8[${MULTILIB_USEDEP}]
192 - )
193 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
194 -"
195 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
196 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
197 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
198 -RDEPEND="${RDEPEND}
199 - gallium? (
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 -"
252 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
253 -
254 -DEPEND="${RDEPEND}
255 - valgrind? ( dev-util/valgrind )
256 - X? (
257 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
258 - x11-base/xorg-proto
259 - )
260 -"
261 -BDEPEND="
262 - ${PYTHON_DEPS}
263 - opencl? (
264 - >=sys-devel/gcc-4.6
265 - )
266 - sys-devel/bison
267 - sys-devel/flex
268 - sys-devel/gettext
269 - virtual/pkgconfig
270 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
271 -"
272 -
273 -S="${WORKDIR}/${MY_P}"
274 -EGIT_CHECKOUT_DIR=${S}
275 -
276 -QA_WX_LOAD="
277 -x86? (
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 - libglvnd? ( usr/lib/libGLX_mesa.so.0.0.0 )
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:${LLVM_SLOT}[${flags}]" || return 1
295 - fi
296 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
297 -}
298 -
299 -pkg_pretend() {
300 - if use vulkan; then
301 - if ! use video_cards_i965 &&
302 - ! use video_cards_iris &&
303 - ! use video_cards_radeonsi; then
304 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, or radeonsi"
305 - fi
306 - fi
307 -
308 - if use opencl; then
309 - if ! use video_cards_r600 &&
310 - ! use video_cards_radeonsi; then
311 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
312 - fi
313 - fi
314 -
315 - if use vaapi; then
316 - if ! use video_cards_r600 &&
317 - ! use video_cards_radeonsi &&
318 - ! use video_cards_nouveau; then
319 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
320 - fi
321 - fi
322 -
323 - if use vdpau; then
324 - if ! use video_cards_r300 &&
325 - ! use video_cards_r600 &&
326 - ! use video_cards_radeonsi &&
327 - ! use video_cards_nouveau; then
328 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
329 - fi
330 - fi
331 -
332 - if use xa; then
333 - if ! use video_cards_freedreno &&
334 - ! use video_cards_nouveau &&
335 - ! use video_cards_vmware; then
336 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
337 - fi
338 - fi
339 -
340 - if use xvmc; then
341 - if ! use video_cards_r600 &&
342 - ! use video_cards_nouveau; then
343 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
344 - fi
345 - fi
346 -
347 - if ! use gallium; then
348 - use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
349 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
350 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
351 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
352 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
353 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
354 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
355 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
356 - fi
357 -
358 - if ! use llvm; then
359 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
360 - fi
361 -}
362 -
363 -python_check_deps() {
364 - has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
365 -}
366 -
367 -pkg_setup() {
368 - # warning message for bug 459306
369 - if use llvm && has_version sys-devel/llvm[!debug=]; then
370 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
371 - ewarn "detected! This can cause problems. For details, see bug 459306."
372 - fi
373 -
374 - if use video_cards_i965 ||
375 - use video_cards_iris ||
376 - use video_cards_radeonsi; then
377 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
378 - linux-info_pkg_setup
379 - fi
380 -
381 - if use gallium && use llvm; then
382 - llvm_pkg_setup
383 - fi
384 - python-any-r1_pkg_setup
385 -}
386 -
387 -multilib_src_configure() {
388 - local emesonargs=()
389 -
390 - if use classic; then
391 - # Intel code
392 - dri_driver_enable video_cards_i915 i915
393 - dri_driver_enable video_cards_i965 i965
394 - if ! use video_cards_i915 && \
395 - ! use video_cards_i965; then
396 - dri_driver_enable video_cards_intel i915 i965
397 - fi
398 -
399 - # Nouveau code
400 - dri_driver_enable video_cards_nouveau nouveau
401 -
402 - # ATI code
403 - dri_driver_enable video_cards_r100 r100
404 - dri_driver_enable video_cards_r200 r200
405 - if ! use video_cards_r100 && \
406 - ! use video_cards_r200; then
407 - dri_driver_enable video_cards_radeon r100 r200
408 - fi
409 - fi
410 -
411 - emesonargs+=( -Dplatforms=$(use X && echo "x11,")$(use wayland && echo "wayland,")$(use gbm && echo "drm,")surfaceless )
412 -
413 - if use gallium; then
414 - emesonargs+=(
415 - $(meson_use llvm)
416 - $(meson_use lm-sensors lmsensors)
417 - $(meson_use unwind libunwind)
418 - )
419 -
420 - if use video_cards_iris ||
421 - use video_cards_r300 ||
422 - use video_cards_r600 ||
423 - use video_cards_radeonsi ||
424 - use video_cards_nouveau ||
425 - use video_cards_vmware; then
426 - emesonargs+=($(meson_use d3d9 gallium-nine))
427 - else
428 - emesonargs+=(-Dgallium-nine=false)
429 - fi
430 -
431 - if use video_cards_r600 ||
432 - use video_cards_radeonsi ||
433 - use video_cards_nouveau; then
434 - emesonargs+=($(meson_use vaapi gallium-va))
435 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
436 - else
437 - emesonargs+=(-Dgallium-va=false)
438 - fi
439 -
440 - if use video_cards_r300 ||
441 - use video_cards_r600 ||
442 - use video_cards_radeonsi ||
443 - use video_cards_nouveau; then
444 - emesonargs+=($(meson_use vdpau gallium-vdpau))
445 - else
446 - emesonargs+=(-Dgallium-vdpau=false)
447 - fi
448 -
449 - if use video_cards_freedreno ||
450 - use video_cards_nouveau ||
451 - use video_cards_vmware; then
452 - emesonargs+=($(meson_use xa gallium-xa))
453 - else
454 - emesonargs+=(-Dgallium-xa=false)
455 - fi
456 -
457 - if use video_cards_r600 ||
458 - use video_cards_nouveau; then
459 - emesonargs+=($(meson_use xvmc gallium-xvmc))
460 - else
461 - emesonargs+=(-Dgallium-xvmc=false)
462 - fi
463 -
464 - if use video_cards_freedreno ||
465 - use video_cards_lima ||
466 - use video_cards_panfrost ||
467 - use video_cards_vc4 ||
468 - use video_cards_vivante; then
469 - gallium_enable -- kmsro
470 - fi
471 -
472 - gallium_enable video_cards_lima lima
473 - gallium_enable video_cards_panfrost panfrost
474 - gallium_enable video_cards_vc4 vc4
475 - gallium_enable video_cards_vivante etnaviv
476 - gallium_enable video_cards_vmware svga
477 - gallium_enable video_cards_nouveau nouveau
478 -
479 - # Only one i915 driver (classic vs gallium). Default to classic.
480 - if ! use classic; then
481 - gallium_enable video_cards_i915 i915
482 - if ! use video_cards_i915 && \
483 - ! use video_cards_i965; then
484 - gallium_enable video_cards_intel i915
485 - fi
486 - fi
487 -
488 - gallium_enable video_cards_iris iris
489 -
490 - gallium_enable video_cards_r300 r300
491 - gallium_enable video_cards_r600 r600
492 - gallium_enable video_cards_radeonsi radeonsi
493 - if ! use video_cards_r300 && \
494 - ! use video_cards_r600; then
495 - gallium_enable video_cards_radeon r300 r600
496 - fi
497 -
498 - gallium_enable video_cards_freedreno freedreno
499 - gallium_enable video_cards_virgl virgl
500 -
501 - # opencl stuff
502 - emesonargs+=(
503 - -Dgallium-opencl="$(usex opencl icd disabled)"
504 - )
505 - fi
506 -
507 - if use vulkan; then
508 - vulkan_enable video_cards_i965 intel
509 - vulkan_enable video_cards_iris intel
510 - vulkan_enable video_cards_radeonsi amd
511 - fi
512 -
513 - if use gallium; then
514 - gallium_enable -- swrast
515 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
516 - else
517 - dri_driver_enable -- swrast
518 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
519 - fi
520 -
521 - driver_list() {
522 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
523 - echo "${drivers//$'\n'/,}"
524 - }
525 -
526 - emesonargs+=(
527 - $(meson_use test build-tests)
528 - -Dglx=$(usex X dri disabled)
529 - -Dshared-glapi=true
530 - $(meson_use dri3)
531 - $(meson_use egl)
532 - $(meson_use gbm)
533 - $(meson_use gles1)
534 - $(meson_use gles2)
535 - $(meson_use libglvnd glvnd)
536 - $(meson_use selinux)
537 - $(meson_use zstd)
538 - -Dvalgrind=$(usex valgrind auto false)
539 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
540 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
541 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
542 - $(meson_use vulkan-overlay vulkan-overlay-layer)
543 - --buildtype $(usex debug debug plain)
544 - -Db_ndebug=$(usex debug false true)
545 - )
546 - meson_src_configure
547 -}
548 -
549 -multilib_src_compile() {
550 - meson_src_compile
551 -}
552 -
553 -multilib_src_install() {
554 - meson_src_install
555 -}
556 -
557 -multilib_src_install_all() {
558 - einstalldocs
559 -}
560 -
561 -multilib_src_test() {
562 - meson test -v -C "${BUILD_DIR}" -t 100
563 -}
564 -
565 -pkg_postinst() {
566 - if ! use libglvnd; then
567 - # Switch to the xorg implementation.
568 - echo
569 - eselect opengl set --use-old ${OPENGL_DIR}
570 - fi
571 -}
572 -
573 -# $1 - VIDEO_CARDS flag (check skipped for "--")
574 -# other args - names of DRI drivers to enable
575 -dri_driver_enable() {
576 - if [[ $1 == -- ]] || use $1; then
577 - shift
578 - DRI_DRIVERS+=("$@")
579 - fi
580 -}
581 -
582 -gallium_enable() {
583 - if [[ $1 == -- ]] || use $1; then
584 - shift
585 - GALLIUM_DRIVERS+=("$@")
586 - fi
587 -}
588 -
589 -vulkan_enable() {
590 - if [[ $1 == -- ]] || use $1; then
591 - shift
592 - VULKAN_DRIVERS+=("$@")
593 - fi
594 -}
595
596 diff --git a/media-libs/mesa/mesa-20.1.6.ebuild b/media-libs/mesa/mesa-20.1.6.ebuild
597 deleted file mode 100644
598 index f50ead67947..00000000000
599 --- a/media-libs/mesa/mesa-20.1.6.ebuild
600 +++ /dev/null
601 @@ -1,557 +0,0 @@
602 -# Copyright 1999-2020 Gentoo Authors
603 -# Distributed under the terms of the GNU General Public License v2
604 -
605 -EAPI=7
606 -
607 -PYTHON_COMPAT=( python3_{6,7,8} )
608 -
609 -inherit llvm meson multilib-minimal python-any-r1 linux-info
610 -
611 -OPENGL_DIR="xorg-x11"
612 -
613 -MY_P="${P/_/-}"
614 -
615 -DESCRIPTION="OpenGL-like graphic library for Linux"
616 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
617 -
618 -if [[ ${PV} == 9999 ]]; then
619 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
620 - inherit git-r3
621 -else
622 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
623 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
624 -fi
625 -
626 -LICENSE="MIT"
627 -SLOT="0"
628 -RESTRICT="
629 - !test? ( test )
630 -"
631 -
632 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
633 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost vc4 virgl vivante vmware"
634 -for card in ${VIDEO_CARDS}; do
635 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
636 -done
637 -
638 -IUSE="${IUSE_VIDEO_CARDS}
639 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm
640 - lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
641 - vulkan-overlay wayland +X xa xvmc +zstd"
642 -
643 -REQUIRED_USE="
644 - d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
645 - gles1? ( egl )
646 - gles2? ( egl )
647 - vulkan? ( dri3
648 - video_cards_radeonsi? ( llvm ) )
649 - vulkan-overlay? ( vulkan )
650 - wayland? ( egl gbm )
651 - video_cards_freedreno? ( gallium )
652 - video_cards_intel? ( classic )
653 - video_cards_i915? ( || ( classic gallium ) )
654 - video_cards_i965? ( classic )
655 - video_cards_iris? ( gallium )
656 - video_cards_lima? ( gallium )
657 - video_cards_nouveau? ( || ( classic gallium ) )
658 - video_cards_panfrost? ( gallium )
659 - video_cards_radeon? ( || ( classic gallium )
660 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
661 - video_cards_r100? ( classic )
662 - video_cards_r200? ( classic )
663 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
664 - video_cards_r600? ( gallium )
665 - video_cards_radeonsi? ( gallium llvm )
666 - video_cards_vc4? ( gallium )
667 - video_cards_virgl? ( gallium )
668 - video_cards_vivante? ( gallium gbm )
669 - video_cards_vmware? ( gallium )
670 - xa? ( X )
671 - xvmc? ( X )
672 -"
673 -
674 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.100"
675 -RDEPEND="
676 - !app-eselect/eselect-mesa
677 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
678 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
679 - libglvnd? (
680 - >=media-libs/libglvnd-1.2.0-r1[X?,${MULTILIB_USEDEP}]
681 - !app-eselect/eselect-opengl
682 - )
683 - !libglvnd? (
684 - >=app-eselect/eselect-opengl-1.3.0
685 - )
686 - gallium? (
687 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
688 - llvm? (
689 - video_cards_radeonsi? (
690 - virtual/libelf:0=[${MULTILIB_USEDEP}]
691 - )
692 - video_cards_r600? (
693 - virtual/libelf:0=[${MULTILIB_USEDEP}]
694 - )
695 - video_cards_radeon? (
696 - virtual/libelf:0=[${MULTILIB_USEDEP}]
697 - )
698 - )
699 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
700 - opencl? (
701 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
702 - dev-libs/libclc
703 - virtual/libelf:0=[${MULTILIB_USEDEP}]
704 - )
705 - vaapi? (
706 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
707 - )
708 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
709 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
710 - )
711 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
712 - wayland? (
713 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
714 - >=dev-libs/wayland-protocols-1.8
715 - )
716 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
717 - video_cards_intel? (
718 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
719 - )
720 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
721 - vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
722 - X? (
723 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
724 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
725 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
726 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
727 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
728 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
729 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
730 - )
731 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
732 -"
733 -for card in ${RADEON_CARDS}; do
734 - RDEPEND="${RDEPEND}
735 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
736 - "
737 -done
738 -RDEPEND="${RDEPEND}
739 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
740 -"
741 -
742 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
743 -# we need to *really* make sure we're not pulling one than more slot
744 -# simultaneously.
745 -#
746 -# How to use it:
747 -# 1. List all the working slots (with min versions) in ||, newest first.
748 -# 2. Update the := to specify *max* version, e.g. < 10.
749 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
750 -LLVM_MAX_SLOT="10"
751 -LLVM_DEPSTR="
752 - || (
753 - sys-devel/llvm:10[${MULTILIB_USEDEP}]
754 - sys-devel/llvm:9[${MULTILIB_USEDEP}]
755 - )
756 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
757 -"
758 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
759 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
760 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
761 -RDEPEND="${RDEPEND}
762 - gallium? (
763 - llvm? (
764 - opencl? (
765 - video_cards_r600? (
766 - ${CLANG_DEPSTR_AMDGPU}
767 - )
768 - !video_cards_r600? (
769 - video_cards_radeonsi? (
770 - ${CLANG_DEPSTR_AMDGPU}
771 - )
772 - )
773 - !video_cards_r600? (
774 - !video_cards_radeonsi? (
775 - video_cards_radeon? (
776 - ${CLANG_DEPSTR_AMDGPU}
777 - )
778 - )
779 - )
780 - !video_cards_r600? (
781 - !video_cards_radeon? (
782 - !video_cards_radeonsi? (
783 - ${CLANG_DEPSTR}
784 - )
785 - )
786 - )
787 - )
788 - !opencl? (
789 - video_cards_r600? (
790 - ${LLVM_DEPSTR_AMDGPU}
791 - )
792 - !video_cards_r600? (
793 - video_cards_radeonsi? (
794 - ${LLVM_DEPSTR_AMDGPU}
795 - )
796 - )
797 - !video_cards_r600? (
798 - !video_cards_radeonsi? (
799 - video_cards_radeon? (
800 - ${LLVM_DEPSTR_AMDGPU}
801 - )
802 - )
803 - )
804 - !video_cards_r600? (
805 - !video_cards_radeon? (
806 - !video_cards_radeonsi? (
807 - ${LLVM_DEPSTR}
808 - )
809 - )
810 - )
811 - )
812 - )
813 - )
814 -"
815 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
816 -
817 -DEPEND="${RDEPEND}
818 - valgrind? ( dev-util/valgrind )
819 - X? (
820 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
821 - x11-base/xorg-proto
822 - )
823 -"
824 -BDEPEND="
825 - ${PYTHON_DEPS}
826 - opencl? (
827 - >=sys-devel/gcc-4.6
828 - )
829 - sys-devel/bison
830 - sys-devel/flex
831 - sys-devel/gettext
832 - virtual/pkgconfig
833 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
834 -"
835 -
836 -S="${WORKDIR}/${MY_P}"
837 -EGIT_CHECKOUT_DIR=${S}
838 -
839 -QA_WX_LOAD="
840 -x86? (
841 - usr/lib*/libglapi.so.0.0.0
842 - usr/lib*/libGLESv1_CM.so.1.1.0
843 - usr/lib*/libGLESv2.so.2.0.0
844 - usr/lib*/libGL.so.1.2.0
845 - usr/lib*/libOSMesa.so.8.0.0
846 - libglvnd? ( usr/lib/libGLX_mesa.so.0.0.0 )
847 -)"
848 -
849 -llvm_check_deps() {
850 - local flags=${MULTILIB_USEDEP}
851 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
852 - then
853 - flags+=",llvm_targets_AMDGPU(-)"
854 - fi
855 -
856 - if use opencl; then
857 - has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
858 - fi
859 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
860 -}
861 -
862 -pkg_pretend() {
863 - if use vulkan; then
864 - if ! use video_cards_i965 &&
865 - ! use video_cards_iris &&
866 - ! use video_cards_radeonsi; then
867 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, or radeonsi"
868 - fi
869 - fi
870 -
871 - if use opencl; then
872 - if ! use video_cards_r600 &&
873 - ! use video_cards_radeonsi; then
874 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
875 - fi
876 - fi
877 -
878 - if use vaapi; then
879 - if ! use video_cards_r600 &&
880 - ! use video_cards_radeonsi &&
881 - ! use video_cards_nouveau; then
882 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
883 - fi
884 - fi
885 -
886 - if use vdpau; then
887 - if ! use video_cards_r300 &&
888 - ! use video_cards_r600 &&
889 - ! use video_cards_radeonsi &&
890 - ! use video_cards_nouveau; then
891 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
892 - fi
893 - fi
894 -
895 - if use xa; then
896 - if ! use video_cards_freedreno &&
897 - ! use video_cards_nouveau &&
898 - ! use video_cards_vmware; then
899 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
900 - fi
901 - fi
902 -
903 - if use xvmc; then
904 - if ! use video_cards_r600 &&
905 - ! use video_cards_nouveau; then
906 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
907 - fi
908 - fi
909 -
910 - if ! use gallium; then
911 - use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
912 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
913 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
914 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
915 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
916 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
917 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
918 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
919 - fi
920 -
921 - if ! use llvm; then
922 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
923 - fi
924 -}
925 -
926 -python_check_deps() {
927 - has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
928 -}
929 -
930 -pkg_setup() {
931 - # warning message for bug 459306
932 - if use llvm && has_version sys-devel/llvm[!debug=]; then
933 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
934 - ewarn "detected! This can cause problems. For details, see bug 459306."
935 - fi
936 -
937 - if use video_cards_i965 ||
938 - use video_cards_iris ||
939 - use video_cards_radeonsi; then
940 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
941 - linux-info_pkg_setup
942 - fi
943 -
944 - if use gallium && use llvm; then
945 - llvm_pkg_setup
946 - fi
947 - python-any-r1_pkg_setup
948 -}
949 -
950 -multilib_src_configure() {
951 - local emesonargs=()
952 -
953 - if use classic; then
954 - # Intel code
955 - dri_driver_enable video_cards_i915 i915
956 - dri_driver_enable video_cards_i965 i965
957 - if ! use video_cards_i915 && \
958 - ! use video_cards_i965; then
959 - dri_driver_enable video_cards_intel i915 i965
960 - fi
961 -
962 - # Nouveau code
963 - dri_driver_enable video_cards_nouveau nouveau
964 -
965 - # ATI code
966 - dri_driver_enable video_cards_r100 r100
967 - dri_driver_enable video_cards_r200 r200
968 - if ! use video_cards_r100 && \
969 - ! use video_cards_r200; then
970 - dri_driver_enable video_cards_radeon r100 r200
971 - fi
972 - fi
973 -
974 - emesonargs+=( -Dplatforms=$(use X && echo "x11,")$(use wayland && echo "wayland,")$(use gbm && echo "drm,")surfaceless )
975 -
976 - if use gallium; then
977 - emesonargs+=(
978 - $(meson_use llvm)
979 - $(meson_use lm-sensors lmsensors)
980 - $(meson_use unwind libunwind)
981 - )
982 -
983 - if use video_cards_iris ||
984 - use video_cards_r300 ||
985 - use video_cards_r600 ||
986 - use video_cards_radeonsi ||
987 - use video_cards_nouveau ||
988 - use video_cards_vmware; then
989 - emesonargs+=($(meson_use d3d9 gallium-nine))
990 - else
991 - emesonargs+=(-Dgallium-nine=false)
992 - fi
993 -
994 - if use video_cards_r600 ||
995 - use video_cards_radeonsi ||
996 - use video_cards_nouveau; then
997 - emesonargs+=($(meson_use vaapi gallium-va))
998 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
999 - else
1000 - emesonargs+=(-Dgallium-va=false)
1001 - fi
1002 -
1003 - if use video_cards_r300 ||
1004 - use video_cards_r600 ||
1005 - use video_cards_radeonsi ||
1006 - use video_cards_nouveau; then
1007 - emesonargs+=($(meson_use vdpau gallium-vdpau))
1008 - else
1009 - emesonargs+=(-Dgallium-vdpau=false)
1010 - fi
1011 -
1012 - if use video_cards_freedreno ||
1013 - use video_cards_nouveau ||
1014 - use video_cards_vmware; then
1015 - emesonargs+=($(meson_use xa gallium-xa))
1016 - else
1017 - emesonargs+=(-Dgallium-xa=false)
1018 - fi
1019 -
1020 - if use video_cards_r600 ||
1021 - use video_cards_nouveau; then
1022 - emesonargs+=($(meson_use xvmc gallium-xvmc))
1023 - else
1024 - emesonargs+=(-Dgallium-xvmc=false)
1025 - fi
1026 -
1027 - if use video_cards_freedreno ||
1028 - use video_cards_lima ||
1029 - use video_cards_panfrost ||
1030 - use video_cards_vc4 ||
1031 - use video_cards_vivante; then
1032 - gallium_enable -- kmsro
1033 - fi
1034 -
1035 - gallium_enable video_cards_lima lima
1036 - gallium_enable video_cards_panfrost panfrost
1037 - gallium_enable video_cards_vc4 vc4
1038 - gallium_enable video_cards_vivante etnaviv
1039 - gallium_enable video_cards_vmware svga
1040 - gallium_enable video_cards_nouveau nouveau
1041 -
1042 - # Only one i915 driver (classic vs gallium). Default to classic.
1043 - if ! use classic; then
1044 - gallium_enable video_cards_i915 i915
1045 - if ! use video_cards_i915 && \
1046 - ! use video_cards_i965; then
1047 - gallium_enable video_cards_intel i915
1048 - fi
1049 - fi
1050 -
1051 - gallium_enable video_cards_iris iris
1052 -
1053 - gallium_enable video_cards_r300 r300
1054 - gallium_enable video_cards_r600 r600
1055 - gallium_enable video_cards_radeonsi radeonsi
1056 - if ! use video_cards_r300 && \
1057 - ! use video_cards_r600; then
1058 - gallium_enable video_cards_radeon r300 r600
1059 - fi
1060 -
1061 - gallium_enable video_cards_freedreno freedreno
1062 - gallium_enable video_cards_virgl virgl
1063 -
1064 - # opencl stuff
1065 - emesonargs+=(
1066 - -Dgallium-opencl="$(usex opencl icd disabled)"
1067 - )
1068 - fi
1069 -
1070 - if use vulkan; then
1071 - vulkan_enable video_cards_i965 intel
1072 - vulkan_enable video_cards_iris intel
1073 - vulkan_enable video_cards_radeonsi amd
1074 - fi
1075 -
1076 - if use gallium; then
1077 - gallium_enable -- swrast
1078 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
1079 - else
1080 - dri_driver_enable -- swrast
1081 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
1082 - fi
1083 -
1084 - driver_list() {
1085 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
1086 - echo "${drivers//$'\n'/,}"
1087 - }
1088 -
1089 - emesonargs+=(
1090 - $(meson_use test build-tests)
1091 - -Dglx=$(usex X dri disabled)
1092 - -Dshared-glapi=true
1093 - $(meson_use dri3)
1094 - $(meson_use egl)
1095 - $(meson_use gbm)
1096 - $(meson_use gles1)
1097 - $(meson_use gles2)
1098 - $(meson_use libglvnd glvnd)
1099 - $(meson_use selinux)
1100 - $(meson_use zstd)
1101 - -Dvalgrind=$(usex valgrind auto false)
1102 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
1103 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
1104 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
1105 - $(meson_use vulkan vulkan-device-select-layer)
1106 - $(meson_use vulkan-overlay vulkan-overlay-layer)
1107 - --buildtype $(usex debug debug plain)
1108 - -Db_ndebug=$(usex debug false true)
1109 - )
1110 - meson_src_configure
1111 -}
1112 -
1113 -multilib_src_compile() {
1114 - meson_src_compile
1115 -}
1116 -
1117 -multilib_src_install() {
1118 - meson_src_install
1119 -}
1120 -
1121 -multilib_src_install_all() {
1122 - einstalldocs
1123 -}
1124 -
1125 -multilib_src_test() {
1126 - meson test -v -C "${BUILD_DIR}" -t 100
1127 -}
1128 -
1129 -pkg_postinst() {
1130 - if ! use libglvnd; then
1131 - # Switch to the xorg implementation.
1132 - echo
1133 - eselect opengl set --use-old ${OPENGL_DIR}
1134 - fi
1135 -}
1136 -
1137 -# $1 - VIDEO_CARDS flag (check skipped for "--")
1138 -# other args - names of DRI drivers to enable
1139 -dri_driver_enable() {
1140 - if [[ $1 == -- ]] || use $1; then
1141 - shift
1142 - DRI_DRIVERS+=("$@")
1143 - fi
1144 -}
1145 -
1146 -gallium_enable() {
1147 - if [[ $1 == -- ]] || use $1; then
1148 - shift
1149 - GALLIUM_DRIVERS+=("$@")
1150 - fi
1151 -}
1152 -
1153 -vulkan_enable() {
1154 - if [[ $1 == -- ]] || use $1; then
1155 - shift
1156 - VULKAN_DRIVERS+=("$@")
1157 - fi
1158 -}
1159
1160 diff --git a/media-libs/mesa/mesa-20.2.0_rc2.ebuild b/media-libs/mesa/mesa-20.2.0_rc2.ebuild
1161 deleted file mode 100644
1162 index 01f47e9da29..00000000000
1163 --- a/media-libs/mesa/mesa-20.2.0_rc2.ebuild
1164 +++ /dev/null
1165 @@ -1,565 +0,0 @@
1166 -# Copyright 1999-2020 Gentoo Authors
1167 -# Distributed under the terms of the GNU General Public License v2
1168 -
1169 -EAPI=7
1170 -
1171 -PYTHON_COMPAT=( python3_{6,7,8} )
1172 -
1173 -inherit llvm meson multilib-minimal python-any-r1 linux-info
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 - inherit git-r3
1185 -else
1186 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1187 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
1188 -fi
1189 -
1190 -LICENSE="MIT"
1191 -SLOT="0"
1192 -RESTRICT="
1193 - !test? ( test )
1194 -"
1195 -
1196 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1197 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware"
1198 -for card in ${VIDEO_CARDS}; do
1199 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1200 -done
1201 -
1202 -IUSE="${IUSE_VIDEO_CARDS}
1203 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm
1204 - lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
1205 - vulkan-overlay wayland +X xa xvmc zink +zstd"
1206 -
1207 -REQUIRED_USE="
1208 - d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
1209 - gles1? ( egl )
1210 - gles2? ( egl )
1211 - vulkan? ( dri3
1212 - video_cards_radeonsi? ( llvm ) )
1213 - vulkan-overlay? ( vulkan )
1214 - wayland? ( egl gbm )
1215 - video_cards_freedreno? ( gallium )
1216 - video_cards_intel? ( classic )
1217 - video_cards_i915? ( || ( classic gallium ) )
1218 - video_cards_i965? ( classic )
1219 - video_cards_iris? ( gallium )
1220 - video_cards_lima? ( gallium )
1221 - video_cards_nouveau? ( || ( classic gallium ) )
1222 - video_cards_panfrost? ( gallium )
1223 - video_cards_radeon? ( || ( classic gallium )
1224 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1225 - video_cards_r100? ( classic )
1226 - video_cards_r200? ( classic )
1227 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1228 - video_cards_r600? ( gallium )
1229 - video_cards_radeonsi? ( gallium llvm )
1230 - video_cards_v3d? ( gallium )
1231 - video_cards_vc4? ( gallium )
1232 - video_cards_virgl? ( gallium )
1233 - video_cards_vivante? ( gallium gbm )
1234 - video_cards_vmware? ( gallium )
1235 - xa? ( X )
1236 - xvmc? ( X )
1237 - zink? ( gallium vulkan )
1238 -"
1239 -
1240 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.100"
1241 -RDEPEND="
1242 - !app-eselect/eselect-mesa
1243 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1244 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1245 - libglvnd? (
1246 - >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
1247 - !app-eselect/eselect-opengl
1248 - )
1249 - !libglvnd? (
1250 - >=app-eselect/eselect-opengl-1.3.0
1251 - )
1252 - gallium? (
1253 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1254 - llvm? (
1255 - video_cards_radeonsi? (
1256 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1257 - )
1258 - video_cards_r600? (
1259 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1260 - )
1261 - video_cards_radeon? (
1262 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1263 - )
1264 - )
1265 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
1266 - opencl? (
1267 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
1268 - dev-libs/libclc
1269 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1270 - )
1271 - vaapi? (
1272 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1273 - )
1274 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1275 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1276 - )
1277 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
1278 - wayland? (
1279 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
1280 - >=dev-libs/wayland-protocols-1.8
1281 - )
1282 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1283 - video_cards_intel? (
1284 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1285 - )
1286 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1287 - vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
1288 - X? (
1289 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1290 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1291 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1292 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1293 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1294 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1295 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1296 - )
1297 - zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
1298 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
1299 -"
1300 -for card in ${RADEON_CARDS}; do
1301 - RDEPEND="${RDEPEND}
1302 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1303 - "
1304 -done
1305 -RDEPEND="${RDEPEND}
1306 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1307 -"
1308 -
1309 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1310 -# we need to *really* make sure we're not pulling one than more slot
1311 -# simultaneously.
1312 -#
1313 -# How to use it:
1314 -# 1. List all the working slots (with min versions) in ||, newest first.
1315 -# 2. Update the := to specify *max* version, e.g. < 10.
1316 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
1317 -LLVM_MAX_SLOT="10"
1318 -LLVM_DEPSTR="
1319 - || (
1320 - sys-devel/llvm:10[${MULTILIB_USEDEP}]
1321 - sys-devel/llvm:9[${MULTILIB_USEDEP}]
1322 - )
1323 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
1324 -"
1325 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1326 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1327 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1328 -RDEPEND="${RDEPEND}
1329 - gallium? (
1330 - llvm? (
1331 - opencl? (
1332 - video_cards_r600? (
1333 - ${CLANG_DEPSTR_AMDGPU}
1334 - )
1335 - !video_cards_r600? (
1336 - video_cards_radeonsi? (
1337 - ${CLANG_DEPSTR_AMDGPU}
1338 - )
1339 - )
1340 - !video_cards_r600? (
1341 - !video_cards_radeonsi? (
1342 - video_cards_radeon? (
1343 - ${CLANG_DEPSTR_AMDGPU}
1344 - )
1345 - )
1346 - )
1347 - !video_cards_r600? (
1348 - !video_cards_radeon? (
1349 - !video_cards_radeonsi? (
1350 - ${CLANG_DEPSTR}
1351 - )
1352 - )
1353 - )
1354 - )
1355 - !opencl? (
1356 - video_cards_r600? (
1357 - ${LLVM_DEPSTR_AMDGPU}
1358 - )
1359 - !video_cards_r600? (
1360 - video_cards_radeonsi? (
1361 - ${LLVM_DEPSTR_AMDGPU}
1362 - )
1363 - )
1364 - !video_cards_r600? (
1365 - !video_cards_radeonsi? (
1366 - video_cards_radeon? (
1367 - ${LLVM_DEPSTR_AMDGPU}
1368 - )
1369 - )
1370 - )
1371 - !video_cards_r600? (
1372 - !video_cards_radeon? (
1373 - !video_cards_radeonsi? (
1374 - ${LLVM_DEPSTR}
1375 - )
1376 - )
1377 - )
1378 - )
1379 - )
1380 - )
1381 -"
1382 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1383 -
1384 -DEPEND="${RDEPEND}
1385 - valgrind? ( dev-util/valgrind )
1386 - X? (
1387 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1388 - x11-base/xorg-proto
1389 - )
1390 -"
1391 -BDEPEND="
1392 - ${PYTHON_DEPS}
1393 - opencl? (
1394 - >=sys-devel/gcc-4.6
1395 - )
1396 - sys-devel/bison
1397 - sys-devel/flex
1398 - virtual/pkgconfig
1399 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1400 -"
1401 -
1402 -S="${WORKDIR}/${MY_P}"
1403 -EGIT_CHECKOUT_DIR=${S}
1404 -
1405 -QA_WX_LOAD="
1406 -x86? (
1407 - usr/lib*/libglapi.so.0.0.0
1408 - usr/lib*/libGLESv1_CM.so.1.1.0
1409 - usr/lib*/libGLESv2.so.2.0.0
1410 - usr/lib*/libGL.so.1.2.0
1411 - usr/lib*/libOSMesa.so.8.0.0
1412 - libglvnd? ( usr/lib/libGLX_mesa.so.0.0.0 )
1413 -)"
1414 -
1415 -llvm_check_deps() {
1416 - local flags=${MULTILIB_USEDEP}
1417 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1418 - then
1419 - flags+=",llvm_targets_AMDGPU(-)"
1420 - fi
1421 -
1422 - if use opencl; then
1423 - has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
1424 - fi
1425 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
1426 -}
1427 -
1428 -pkg_pretend() {
1429 - if use vulkan; then
1430 - if ! use video_cards_i965 &&
1431 - ! use video_cards_iris &&
1432 - ! use video_cards_radeonsi; then
1433 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, or radeonsi"
1434 - fi
1435 - fi
1436 -
1437 - if use opencl; then
1438 - if ! use video_cards_r600 &&
1439 - ! use video_cards_radeonsi; then
1440 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
1441 - fi
1442 - fi
1443 -
1444 - if use vaapi; then
1445 - if ! use video_cards_r600 &&
1446 - ! use video_cards_radeonsi &&
1447 - ! use video_cards_nouveau; then
1448 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
1449 - fi
1450 - fi
1451 -
1452 - if use vdpau; then
1453 - if ! use video_cards_r300 &&
1454 - ! use video_cards_r600 &&
1455 - ! use video_cards_radeonsi &&
1456 - ! use video_cards_nouveau; then
1457 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
1458 - fi
1459 - fi
1460 -
1461 - if use xa; then
1462 - if ! use video_cards_freedreno &&
1463 - ! use video_cards_nouveau &&
1464 - ! use video_cards_vmware; then
1465 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
1466 - fi
1467 - fi
1468 -
1469 - if use xvmc; then
1470 - if ! use video_cards_r600 &&
1471 - ! use video_cards_nouveau; then
1472 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
1473 - fi
1474 - fi
1475 -
1476 - if ! use gallium; then
1477 - use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
1478 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
1479 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
1480 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
1481 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
1482 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
1483 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
1484 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
1485 - fi
1486 -
1487 - if ! use llvm; then
1488 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
1489 - fi
1490 -}
1491 -
1492 -python_check_deps() {
1493 - has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
1494 -}
1495 -
1496 -pkg_setup() {
1497 - # warning message for bug 459306
1498 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1499 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1500 - ewarn "detected! This can cause problems. For details, see bug 459306."
1501 - fi
1502 -
1503 - if use video_cards_i965 ||
1504 - use video_cards_iris ||
1505 - use video_cards_radeonsi; then
1506 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
1507 - linux-info_pkg_setup
1508 - fi
1509 -
1510 - if use gallium && use llvm; then
1511 - llvm_pkg_setup
1512 - fi
1513 - python-any-r1_pkg_setup
1514 -}
1515 -
1516 -multilib_src_configure() {
1517 - local emesonargs=()
1518 -
1519 - if use classic; then
1520 - # Intel code
1521 - dri_driver_enable video_cards_i915 i915
1522 - dri_driver_enable video_cards_i965 i965
1523 - if ! use video_cards_i915 && \
1524 - ! use video_cards_i965; then
1525 - dri_driver_enable video_cards_intel i915 i965
1526 - fi
1527 -
1528 - # Nouveau code
1529 - dri_driver_enable video_cards_nouveau nouveau
1530 -
1531 - # ATI code
1532 - dri_driver_enable video_cards_r100 r100
1533 - dri_driver_enable video_cards_r200 r200
1534 - if ! use video_cards_r100 && \
1535 - ! use video_cards_r200; then
1536 - dri_driver_enable video_cards_radeon r100 r200
1537 - fi
1538 - fi
1539 -
1540 - local platforms
1541 - use X && platforms+="x11"
1542 - use wayland && platforms+=",wayland"
1543 - [[ -n $platforms ]] && emesonargs+=(-Dplatforms=${platforms#,})
1544 -
1545 - if use gallium; then
1546 - emesonargs+=(
1547 - $(meson_feature llvm)
1548 - $(meson_feature lm-sensors lmsensors)
1549 - $(meson_feature unwind libunwind)
1550 - )
1551 -
1552 - if use video_cards_iris ||
1553 - use video_cards_r300 ||
1554 - use video_cards_r600 ||
1555 - use video_cards_radeonsi ||
1556 - use video_cards_nouveau ||
1557 - use video_cards_vmware; then
1558 - emesonargs+=($(meson_use d3d9 gallium-nine))
1559 - else
1560 - emesonargs+=(-Dgallium-nine=false)
1561 - fi
1562 -
1563 - if use video_cards_r600 ||
1564 - use video_cards_radeonsi ||
1565 - use video_cards_nouveau; then
1566 - emesonargs+=($(meson_feature vaapi gallium-va))
1567 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
1568 - else
1569 - emesonargs+=(-Dgallium-va=disabled)
1570 - fi
1571 -
1572 - if use video_cards_r300 ||
1573 - use video_cards_r600 ||
1574 - use video_cards_radeonsi ||
1575 - use video_cards_nouveau; then
1576 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
1577 - else
1578 - emesonargs+=(-Dgallium-vdpau=disabled)
1579 - fi
1580 -
1581 - if use video_cards_freedreno ||
1582 - use video_cards_nouveau ||
1583 - use video_cards_vmware; then
1584 - emesonargs+=($(meson_feature xa gallium-xa))
1585 - else
1586 - emesonargs+=(-Dgallium-xa=disabled)
1587 - fi
1588 -
1589 - if use video_cards_r600 ||
1590 - use video_cards_nouveau; then
1591 - emesonargs+=($(meson_feature xvmc gallium-xvmc))
1592 - else
1593 - emesonargs+=(-Dgallium-xvmc=disabled)
1594 - fi
1595 -
1596 - if use video_cards_freedreno ||
1597 - use video_cards_lima ||
1598 - use video_cards_panfrost ||
1599 - use video_cards_v3d ||
1600 - use video_cards_vc4 ||
1601 - use video_cards_vivante; then
1602 - gallium_enable -- kmsro
1603 - fi
1604 -
1605 - gallium_enable video_cards_lima lima
1606 - gallium_enable video_cards_panfrost panfrost
1607 - gallium_enable video_cards_v3d v3d
1608 - gallium_enable video_cards_vc4 vc4
1609 - gallium_enable video_cards_vivante etnaviv
1610 - gallium_enable video_cards_vmware svga
1611 - gallium_enable video_cards_nouveau nouveau
1612 - gallium_enable zink zink
1613 -
1614 - # Only one i915 driver (classic vs gallium). Default to classic.
1615 - if ! use classic; then
1616 - gallium_enable video_cards_i915 i915
1617 - if ! use video_cards_i915 && \
1618 - ! use video_cards_i965; then
1619 - gallium_enable video_cards_intel i915
1620 - fi
1621 - fi
1622 -
1623 - gallium_enable video_cards_iris iris
1624 -
1625 - gallium_enable video_cards_r300 r300
1626 - gallium_enable video_cards_r600 r600
1627 - gallium_enable video_cards_radeonsi radeonsi
1628 - if ! use video_cards_r300 && \
1629 - ! use video_cards_r600; then
1630 - gallium_enable video_cards_radeon r300 r600
1631 - fi
1632 -
1633 - gallium_enable video_cards_freedreno freedreno
1634 - gallium_enable video_cards_virgl virgl
1635 -
1636 - # opencl stuff
1637 - emesonargs+=(
1638 - -Dgallium-opencl="$(usex opencl icd disabled)"
1639 - )
1640 - fi
1641 -
1642 - if use vulkan; then
1643 - vulkan_enable video_cards_i965 intel
1644 - vulkan_enable video_cards_iris intel
1645 - vulkan_enable video_cards_radeonsi amd
1646 - fi
1647 -
1648 - if use gallium; then
1649 - gallium_enable -- swrast
1650 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
1651 - else
1652 - dri_driver_enable -- swrast
1653 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
1654 - fi
1655 -
1656 - driver_list() {
1657 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
1658 - echo "${drivers//$'\n'/,}"
1659 - }
1660 -
1661 - emesonargs+=(
1662 - $(meson_use test build-tests)
1663 - -Dglx=$(usex X dri disabled)
1664 - -Dshared-glapi=enabled
1665 - $(meson_feature dri3)
1666 - $(meson_feature egl)
1667 - $(meson_feature gbm)
1668 - $(meson_feature gles1)
1669 - $(meson_feature gles2)
1670 - $(meson_use libglvnd glvnd)
1671 - $(meson_use selinux)
1672 - $(meson_feature zstd)
1673 - -Dvalgrind=$(usex valgrind auto false)
1674 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
1675 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
1676 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
1677 - $(meson_use vulkan vulkan-device-select-layer)
1678 - $(meson_use vulkan-overlay vulkan-overlay-layer)
1679 - --buildtype $(usex debug debug plain)
1680 - -Db_ndebug=$(usex debug false true)
1681 - )
1682 - meson_src_configure
1683 -}
1684 -
1685 -multilib_src_compile() {
1686 - meson_src_compile
1687 -}
1688 -
1689 -multilib_src_install() {
1690 - meson_src_install
1691 -}
1692 -
1693 -multilib_src_install_all() {
1694 - einstalldocs
1695 -}
1696 -
1697 -multilib_src_test() {
1698 - meson test -v -C "${BUILD_DIR}" -t 100
1699 -}
1700 -
1701 -pkg_postinst() {
1702 - if ! use libglvnd; then
1703 - # Switch to the xorg implementation.
1704 - echo
1705 - eselect opengl set --use-old ${OPENGL_DIR}
1706 - fi
1707 -}
1708 -
1709 -# $1 - VIDEO_CARDS flag (check skipped for "--")
1710 -# other args - names of DRI drivers to enable
1711 -dri_driver_enable() {
1712 - if [[ $1 == -- ]] || use $1; then
1713 - shift
1714 - DRI_DRIVERS+=("$@")
1715 - fi
1716 -}
1717 -
1718 -gallium_enable() {
1719 - if [[ $1 == -- ]] || use $1; then
1720 - shift
1721 - GALLIUM_DRIVERS+=("$@")
1722 - fi
1723 -}
1724 -
1725 -vulkan_enable() {
1726 - if [[ $1 == -- ]] || use $1; then
1727 - shift
1728 - VULKAN_DRIVERS+=("$@")
1729 - fi
1730 -}
1731
1732 diff --git a/media-libs/mesa/mesa-20.2.0_rc3.ebuild b/media-libs/mesa/mesa-20.2.0_rc3.ebuild
1733 deleted file mode 100644
1734 index 01f47e9da29..00000000000
1735 --- a/media-libs/mesa/mesa-20.2.0_rc3.ebuild
1736 +++ /dev/null
1737 @@ -1,565 +0,0 @@
1738 -# Copyright 1999-2020 Gentoo Authors
1739 -# Distributed under the terms of the GNU General Public License v2
1740 -
1741 -EAPI=7
1742 -
1743 -PYTHON_COMPAT=( python3_{6,7,8} )
1744 -
1745 -inherit llvm meson multilib-minimal python-any-r1 linux-info
1746 -
1747 -OPENGL_DIR="xorg-x11"
1748 -
1749 -MY_P="${P/_/-}"
1750 -
1751 -DESCRIPTION="OpenGL-like graphic library for Linux"
1752 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1753 -
1754 -if [[ ${PV} == 9999 ]]; then
1755 - EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1756 - inherit git-r3
1757 -else
1758 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1759 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
1760 -fi
1761 -
1762 -LICENSE="MIT"
1763 -SLOT="0"
1764 -RESTRICT="
1765 - !test? ( test )
1766 -"
1767 -
1768 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1769 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware"
1770 -for card in ${VIDEO_CARDS}; do
1771 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1772 -done
1773 -
1774 -IUSE="${IUSE_VIDEO_CARDS}
1775 - +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm
1776 - lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
1777 - vulkan-overlay wayland +X xa xvmc zink +zstd"
1778 -
1779 -REQUIRED_USE="
1780 - d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
1781 - gles1? ( egl )
1782 - gles2? ( egl )
1783 - vulkan? ( dri3
1784 - video_cards_radeonsi? ( llvm ) )
1785 - vulkan-overlay? ( vulkan )
1786 - wayland? ( egl gbm )
1787 - video_cards_freedreno? ( gallium )
1788 - video_cards_intel? ( classic )
1789 - video_cards_i915? ( || ( classic gallium ) )
1790 - video_cards_i965? ( classic )
1791 - video_cards_iris? ( gallium )
1792 - video_cards_lima? ( gallium )
1793 - video_cards_nouveau? ( || ( classic gallium ) )
1794 - video_cards_panfrost? ( gallium )
1795 - video_cards_radeon? ( || ( classic gallium )
1796 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1797 - video_cards_r100? ( classic )
1798 - video_cards_r200? ( classic )
1799 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1800 - video_cards_r600? ( gallium )
1801 - video_cards_radeonsi? ( gallium llvm )
1802 - video_cards_v3d? ( gallium )
1803 - video_cards_vc4? ( gallium )
1804 - video_cards_virgl? ( gallium )
1805 - video_cards_vivante? ( gallium gbm )
1806 - video_cards_vmware? ( gallium )
1807 - xa? ( X )
1808 - xvmc? ( X )
1809 - zink? ( gallium vulkan )
1810 -"
1811 -
1812 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.100"
1813 -RDEPEND="
1814 - !app-eselect/eselect-mesa
1815 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1816 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1817 - libglvnd? (
1818 - >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
1819 - !app-eselect/eselect-opengl
1820 - )
1821 - !libglvnd? (
1822 - >=app-eselect/eselect-opengl-1.3.0
1823 - )
1824 - gallium? (
1825 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1826 - llvm? (
1827 - video_cards_radeonsi? (
1828 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1829 - )
1830 - video_cards_r600? (
1831 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1832 - )
1833 - video_cards_radeon? (
1834 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1835 - )
1836 - )
1837 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
1838 - opencl? (
1839 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
1840 - dev-libs/libclc
1841 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1842 - )
1843 - vaapi? (
1844 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1845 - )
1846 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1847 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1848 - )
1849 - selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
1850 - wayland? (
1851 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
1852 - >=dev-libs/wayland-protocols-1.8
1853 - )
1854 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1855 - video_cards_intel? (
1856 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1857 - )
1858 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1859 - vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
1860 - X? (
1861 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1862 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1863 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1864 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1865 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1866 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1867 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1868 - )
1869 - zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] )
1870 - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
1871 -"
1872 -for card in ${RADEON_CARDS}; do
1873 - RDEPEND="${RDEPEND}
1874 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1875 - "
1876 -done
1877 -RDEPEND="${RDEPEND}
1878 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1879 -"
1880 -
1881 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1882 -# we need to *really* make sure we're not pulling one than more slot
1883 -# simultaneously.
1884 -#
1885 -# How to use it:
1886 -# 1. List all the working slots (with min versions) in ||, newest first.
1887 -# 2. Update the := to specify *max* version, e.g. < 10.
1888 -# 3. Specify LLVM_MAX_SLOT, e.g. 9.
1889 -LLVM_MAX_SLOT="10"
1890 -LLVM_DEPSTR="
1891 - || (
1892 - sys-devel/llvm:10[${MULTILIB_USEDEP}]
1893 - sys-devel/llvm:9[${MULTILIB_USEDEP}]
1894 - )
1895 - <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
1896 -"
1897 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1898 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1899 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1900 -RDEPEND="${RDEPEND}
1901 - gallium? (
1902 - llvm? (
1903 - opencl? (
1904 - video_cards_r600? (
1905 - ${CLANG_DEPSTR_AMDGPU}
1906 - )
1907 - !video_cards_r600? (
1908 - video_cards_radeonsi? (
1909 - ${CLANG_DEPSTR_AMDGPU}
1910 - )
1911 - )
1912 - !video_cards_r600? (
1913 - !video_cards_radeonsi? (
1914 - video_cards_radeon? (
1915 - ${CLANG_DEPSTR_AMDGPU}
1916 - )
1917 - )
1918 - )
1919 - !video_cards_r600? (
1920 - !video_cards_radeon? (
1921 - !video_cards_radeonsi? (
1922 - ${CLANG_DEPSTR}
1923 - )
1924 - )
1925 - )
1926 - )
1927 - !opencl? (
1928 - video_cards_r600? (
1929 - ${LLVM_DEPSTR_AMDGPU}
1930 - )
1931 - !video_cards_r600? (
1932 - video_cards_radeonsi? (
1933 - ${LLVM_DEPSTR_AMDGPU}
1934 - )
1935 - )
1936 - !video_cards_r600? (
1937 - !video_cards_radeonsi? (
1938 - video_cards_radeon? (
1939 - ${LLVM_DEPSTR_AMDGPU}
1940 - )
1941 - )
1942 - )
1943 - !video_cards_r600? (
1944 - !video_cards_radeon? (
1945 - !video_cards_radeonsi? (
1946 - ${LLVM_DEPSTR}
1947 - )
1948 - )
1949 - )
1950 - )
1951 - )
1952 - )
1953 -"
1954 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1955 -
1956 -DEPEND="${RDEPEND}
1957 - valgrind? ( dev-util/valgrind )
1958 - X? (
1959 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1960 - x11-base/xorg-proto
1961 - )
1962 -"
1963 -BDEPEND="
1964 - ${PYTHON_DEPS}
1965 - opencl? (
1966 - >=sys-devel/gcc-4.6
1967 - )
1968 - sys-devel/bison
1969 - sys-devel/flex
1970 - virtual/pkgconfig
1971 - $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
1972 -"
1973 -
1974 -S="${WORKDIR}/${MY_P}"
1975 -EGIT_CHECKOUT_DIR=${S}
1976 -
1977 -QA_WX_LOAD="
1978 -x86? (
1979 - usr/lib*/libglapi.so.0.0.0
1980 - usr/lib*/libGLESv1_CM.so.1.1.0
1981 - usr/lib*/libGLESv2.so.2.0.0
1982 - usr/lib*/libGL.so.1.2.0
1983 - usr/lib*/libOSMesa.so.8.0.0
1984 - libglvnd? ( usr/lib/libGLX_mesa.so.0.0.0 )
1985 -)"
1986 -
1987 -llvm_check_deps() {
1988 - local flags=${MULTILIB_USEDEP}
1989 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1990 - then
1991 - flags+=",llvm_targets_AMDGPU(-)"
1992 - fi
1993 -
1994 - if use opencl; then
1995 - has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
1996 - fi
1997 - has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
1998 -}
1999 -
2000 -pkg_pretend() {
2001 - if use vulkan; then
2002 - if ! use video_cards_i965 &&
2003 - ! use video_cards_iris &&
2004 - ! use video_cards_radeonsi; then
2005 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, or radeonsi"
2006 - fi
2007 - fi
2008 -
2009 - if use opencl; then
2010 - if ! use video_cards_r600 &&
2011 - ! use video_cards_radeonsi; then
2012 - ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
2013 - fi
2014 - fi
2015 -
2016 - if use vaapi; then
2017 - if ! use video_cards_r600 &&
2018 - ! use video_cards_radeonsi &&
2019 - ! use video_cards_nouveau; then
2020 - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
2021 - fi
2022 - fi
2023 -
2024 - if use vdpau; then
2025 - if ! use video_cards_r300 &&
2026 - ! use video_cards_r600 &&
2027 - ! use video_cards_radeonsi &&
2028 - ! use video_cards_nouveau; then
2029 - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
2030 - fi
2031 - fi
2032 -
2033 - if use xa; then
2034 - if ! use video_cards_freedreno &&
2035 - ! use video_cards_nouveau &&
2036 - ! use video_cards_vmware; then
2037 - ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
2038 - fi
2039 - fi
2040 -
2041 - if use xvmc; then
2042 - if ! use video_cards_r600 &&
2043 - ! use video_cards_nouveau; then
2044 - ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
2045 - fi
2046 - fi
2047 -
2048 - if ! use gallium; then
2049 - use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
2050 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
2051 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
2052 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
2053 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
2054 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
2055 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
2056 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
2057 - fi
2058 -
2059 - if ! use llvm; then
2060 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
2061 - fi
2062 -}
2063 -
2064 -python_check_deps() {
2065 - has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
2066 -}
2067 -
2068 -pkg_setup() {
2069 - # warning message for bug 459306
2070 - if use llvm && has_version sys-devel/llvm[!debug=]; then
2071 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
2072 - ewarn "detected! This can cause problems. For details, see bug 459306."
2073 - fi
2074 -
2075 - if use video_cards_i965 ||
2076 - use video_cards_iris ||
2077 - use video_cards_radeonsi; then
2078 - CONFIG_CHECK="~CHECKPOINT_RESTORE"
2079 - linux-info_pkg_setup
2080 - fi
2081 -
2082 - if use gallium && use llvm; then
2083 - llvm_pkg_setup
2084 - fi
2085 - python-any-r1_pkg_setup
2086 -}
2087 -
2088 -multilib_src_configure() {
2089 - local emesonargs=()
2090 -
2091 - if use classic; then
2092 - # Intel code
2093 - dri_driver_enable video_cards_i915 i915
2094 - dri_driver_enable video_cards_i965 i965
2095 - if ! use video_cards_i915 && \
2096 - ! use video_cards_i965; then
2097 - dri_driver_enable video_cards_intel i915 i965
2098 - fi
2099 -
2100 - # Nouveau code
2101 - dri_driver_enable video_cards_nouveau nouveau
2102 -
2103 - # ATI code
2104 - dri_driver_enable video_cards_r100 r100
2105 - dri_driver_enable video_cards_r200 r200
2106 - if ! use video_cards_r100 && \
2107 - ! use video_cards_r200; then
2108 - dri_driver_enable video_cards_radeon r100 r200
2109 - fi
2110 - fi
2111 -
2112 - local platforms
2113 - use X && platforms+="x11"
2114 - use wayland && platforms+=",wayland"
2115 - [[ -n $platforms ]] && emesonargs+=(-Dplatforms=${platforms#,})
2116 -
2117 - if use gallium; then
2118 - emesonargs+=(
2119 - $(meson_feature llvm)
2120 - $(meson_feature lm-sensors lmsensors)
2121 - $(meson_feature unwind libunwind)
2122 - )
2123 -
2124 - if use video_cards_iris ||
2125 - use video_cards_r300 ||
2126 - use video_cards_r600 ||
2127 - use video_cards_radeonsi ||
2128 - use video_cards_nouveau ||
2129 - use video_cards_vmware; then
2130 - emesonargs+=($(meson_use d3d9 gallium-nine))
2131 - else
2132 - emesonargs+=(-Dgallium-nine=false)
2133 - fi
2134 -
2135 - if use video_cards_r600 ||
2136 - use video_cards_radeonsi ||
2137 - use video_cards_nouveau; then
2138 - emesonargs+=($(meson_feature vaapi gallium-va))
2139 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
2140 - else
2141 - emesonargs+=(-Dgallium-va=disabled)
2142 - fi
2143 -
2144 - if use video_cards_r300 ||
2145 - use video_cards_r600 ||
2146 - use video_cards_radeonsi ||
2147 - use video_cards_nouveau; then
2148 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
2149 - else
2150 - emesonargs+=(-Dgallium-vdpau=disabled)
2151 - fi
2152 -
2153 - if use video_cards_freedreno ||
2154 - use video_cards_nouveau ||
2155 - use video_cards_vmware; then
2156 - emesonargs+=($(meson_feature xa gallium-xa))
2157 - else
2158 - emesonargs+=(-Dgallium-xa=disabled)
2159 - fi
2160 -
2161 - if use video_cards_r600 ||
2162 - use video_cards_nouveau; then
2163 - emesonargs+=($(meson_feature xvmc gallium-xvmc))
2164 - else
2165 - emesonargs+=(-Dgallium-xvmc=disabled)
2166 - fi
2167 -
2168 - if use video_cards_freedreno ||
2169 - use video_cards_lima ||
2170 - use video_cards_panfrost ||
2171 - use video_cards_v3d ||
2172 - use video_cards_vc4 ||
2173 - use video_cards_vivante; then
2174 - gallium_enable -- kmsro
2175 - fi
2176 -
2177 - gallium_enable video_cards_lima lima
2178 - gallium_enable video_cards_panfrost panfrost
2179 - gallium_enable video_cards_v3d v3d
2180 - gallium_enable video_cards_vc4 vc4
2181 - gallium_enable video_cards_vivante etnaviv
2182 - gallium_enable video_cards_vmware svga
2183 - gallium_enable video_cards_nouveau nouveau
2184 - gallium_enable zink zink
2185 -
2186 - # Only one i915 driver (classic vs gallium). Default to classic.
2187 - if ! use classic; then
2188 - gallium_enable video_cards_i915 i915
2189 - if ! use video_cards_i915 && \
2190 - ! use video_cards_i965; then
2191 - gallium_enable video_cards_intel i915
2192 - fi
2193 - fi
2194 -
2195 - gallium_enable video_cards_iris iris
2196 -
2197 - gallium_enable video_cards_r300 r300
2198 - gallium_enable video_cards_r600 r600
2199 - gallium_enable video_cards_radeonsi radeonsi
2200 - if ! use video_cards_r300 && \
2201 - ! use video_cards_r600; then
2202 - gallium_enable video_cards_radeon r300 r600
2203 - fi
2204 -
2205 - gallium_enable video_cards_freedreno freedreno
2206 - gallium_enable video_cards_virgl virgl
2207 -
2208 - # opencl stuff
2209 - emesonargs+=(
2210 - -Dgallium-opencl="$(usex opencl icd disabled)"
2211 - )
2212 - fi
2213 -
2214 - if use vulkan; then
2215 - vulkan_enable video_cards_i965 intel
2216 - vulkan_enable video_cards_iris intel
2217 - vulkan_enable video_cards_radeonsi amd
2218 - fi
2219 -
2220 - if use gallium; then
2221 - gallium_enable -- swrast
2222 - emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
2223 - else
2224 - dri_driver_enable -- swrast
2225 - emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
2226 - fi
2227 -
2228 - driver_list() {
2229 - local drivers="$(sort -u <<< "${1// /$'\n'}")"
2230 - echo "${drivers//$'\n'/,}"
2231 - }
2232 -
2233 - emesonargs+=(
2234 - $(meson_use test build-tests)
2235 - -Dglx=$(usex X dri disabled)
2236 - -Dshared-glapi=enabled
2237 - $(meson_feature dri3)
2238 - $(meson_feature egl)
2239 - $(meson_feature gbm)
2240 - $(meson_feature gles1)
2241 - $(meson_feature gles2)
2242 - $(meson_use libglvnd glvnd)
2243 - $(meson_use selinux)
2244 - $(meson_feature zstd)
2245 - -Dvalgrind=$(usex valgrind auto false)
2246 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
2247 - -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
2248 - -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
2249 - $(meson_use vulkan vulkan-device-select-layer)
2250 - $(meson_use vulkan-overlay vulkan-overlay-layer)
2251 - --buildtype $(usex debug debug plain)
2252 - -Db_ndebug=$(usex debug false true)
2253 - )
2254 - meson_src_configure
2255 -}
2256 -
2257 -multilib_src_compile() {
2258 - meson_src_compile
2259 -}
2260 -
2261 -multilib_src_install() {
2262 - meson_src_install
2263 -}
2264 -
2265 -multilib_src_install_all() {
2266 - einstalldocs
2267 -}
2268 -
2269 -multilib_src_test() {
2270 - meson test -v -C "${BUILD_DIR}" -t 100
2271 -}
2272 -
2273 -pkg_postinst() {
2274 - if ! use libglvnd; then
2275 - # Switch to the xorg implementation.
2276 - echo
2277 - eselect opengl set --use-old ${OPENGL_DIR}
2278 - fi
2279 -}
2280 -
2281 -# $1 - VIDEO_CARDS flag (check skipped for "--")
2282 -# other args - names of DRI drivers to enable
2283 -dri_driver_enable() {
2284 - if [[ $1 == -- ]] || use $1; then
2285 - shift
2286 - DRI_DRIVERS+=("$@")
2287 - fi
2288 -}
2289 -
2290 -gallium_enable() {
2291 - if [[ $1 == -- ]] || use $1; then
2292 - shift
2293 - GALLIUM_DRIVERS+=("$@")
2294 - fi
2295 -}
2296 -
2297 -vulkan_enable() {
2298 - if [[ $1 == -- ]] || use $1; then
2299 - shift
2300 - VULKAN_DRIVERS+=("$@")
2301 - fi
2302 -}