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