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