Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/
Date: Wed, 06 May 2020 21:18:26
Message-Id: 1588799893.1fa57d7d111914a76ee997e87220c037b94d329b.mattst88@gentoo
1 commit: 1fa57d7d111914a76ee997e87220c037b94d329b
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 6 21:11:33 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Wed May 6 21:18:13 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fa57d7d
7
8 media-libs/mesa: Version bump to 20.1.0_rc2
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 1 +
13 media-libs/mesa/mesa-20.1.0_rc2.ebuild | 550 +++++++++++++++++++++++++++++++++
14 2 files changed, 551 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index 14c6256f537..383f6d054d4 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -2,3 +2,4 @@ DIST mesa-19.3.5.tar.xz 12064980 BLAKE2B a20ebfb149624f13951795e07154ab70dc1856a
21 DIST mesa-20.0.4.tar.xz 12292888 BLAKE2B a14b747045ee4ff3bc07e527ad43d5b22047d6c9700cf290ba9c95e07bd88b9252bdd14380d4f0033dcb8fb652664987889d972db09462bcc69c8a7e843b606f SHA512 17d8bc3b56779a8e5648d81da9ee97b66bcec015710801edce4e8055fbb314cd9ebc1d112e3035480ba844c7d9ae6b5b1f1eac0cc0817e69e9253a7748451a55
22 DIST mesa-20.0.5.tar.xz 12257484 BLAKE2B 12d2530fa77dffadea74908e0b8e52f19023f0e2d012c607d7d5fc8b1380efad13dee50eee99a453b751340a3633b6260a3f1c82e5b16c03051df2fca6947740 SHA512 6f5780f7574400fea54978b40eb97faca35826a8a7bed96362d7bebcda78e2cadd44585ef8dd7dc126e0cc62cff61bee9b2ea360fedcc09a1fbb4c1f20c6aa08
23 DIST mesa-20.0.6.tar.xz 12275708 BLAKE2B 9f6d9ae9c260e396670a3980ba83914ad0c1b7dc5f08471a78e4ab76e6ce3c18b96152fefc3846d89840be971180a2f4c176d40beb2c4b1f572011cb4b913f58 SHA512 a93dc3ed57ed7469b7c60cdbdcf4f29c5da4ec3986171c7b534e009e136ca21fec16207ffab38a6747437a9b1060e2e6c4b74c4e5cdc168b9aba0fc1940b5e90
24 +DIST mesa-20.1.0-rc2.tar.xz 12577196 BLAKE2B 8dc88b2546fd85874fad03258b8b8c7d1dbe681f568e5947e1d758234a8f6559b60810142c125bb56142be6926c50a8c20aebf45271f0e8270ff057dbce472aa SHA512 b912b1af69d9c33f1d0855887d4e5c1ea3dc10e7ed875d3285ca13b62314647b56470149484f270e8c8ff0ce4818fafd1537a71b59852957aab26f36e53edfbd
25
26 diff --git a/media-libs/mesa/mesa-20.1.0_rc2.ebuild b/media-libs/mesa/mesa-20.1.0_rc2.ebuild
27 new file mode 100644
28 index 00000000000..03083871b14
29 --- /dev/null
30 +++ b/media-libs/mesa/mesa-20.1.0_rc2.ebuild
31 @@ -0,0 +1,550 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python3_{6,7,8} )
38 +
39 +inherit llvm meson multilib-minimal python-any-r1
40 +
41 +OPENGL_DIR="xorg-x11"
42 +
43 +MY_P="${P/_/-}"
44 +
45 +DESCRIPTION="OpenGL-like graphic library for Linux"
46 +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
47 +
48 +if [[ ${PV} == 9999 ]]; then
49 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
50 + inherit git-r3
51 +else
52 + SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
53 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
54 +fi
55 +
56 +LICENSE="MIT"
57 +SLOT="0"
58 +RESTRICT="
59 + !test? ( test )
60 +"
61 +
62 +RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
63 +VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost vc4 virgl vivante vmware"
64 +for card in ${VIDEO_CARDS}; do
65 + IUSE_VIDEO_CARDS+=" video_cards_${card}"
66 +done
67 +
68 +IUSE="${IUSE_VIDEO_CARDS}
69 + +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +libglvnd +llvm
70 + lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
71 + vulkan-overlay wayland +X xa xvmc +zstd"
72 +
73 +REQUIRED_USE="
74 + d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
75 + gles1? ( egl )
76 + gles2? ( egl )
77 + vulkan? ( dri3
78 + video_cards_radeonsi? ( llvm ) )
79 + vulkan-overlay? ( vulkan )
80 + wayland? ( egl gbm )
81 + video_cards_freedreno? ( gallium )
82 + video_cards_intel? ( classic )
83 + video_cards_i915? ( || ( classic gallium ) )
84 + video_cards_i965? ( classic )
85 + video_cards_iris? ( gallium )
86 + video_cards_lima? ( gallium )
87 + video_cards_nouveau? ( || ( classic gallium ) )
88 + video_cards_panfrost? ( gallium )
89 + video_cards_radeon? ( || ( classic gallium )
90 + gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
91 + video_cards_r100? ( classic )
92 + video_cards_r200? ( classic )
93 + video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
94 + video_cards_r600? ( gallium )
95 + video_cards_radeonsi? ( gallium llvm )
96 + video_cards_vc4? ( gallium )
97 + video_cards_virgl? ( gallium )
98 + video_cards_vivante? ( gallium gbm )
99 + video_cards_vmware? ( gallium )
100 + xa? ( X )
101 + xvmc? ( X )
102 +"
103 +
104 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.100"
105 +RDEPEND="
106 + !app-eselect/eselect-mesa
107 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
108 + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
109 + libglvnd? (
110 + >=media-libs/libglvnd-1.2.0-r1[X?,${MULTILIB_USEDEP}]
111 + !app-eselect/eselect-opengl
112 + )
113 + !libglvnd? (
114 + >=app-eselect/eselect-opengl-1.3.0
115 + )
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.15.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/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
156 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
157 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
158 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
159 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
160 + )
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="10"
181 +LLVM_DEPSTR="
182 + || (
183 + sys-devel/llvm:10[${MULTILIB_USEDEP}]
184 + sys-devel/llvm:9[${MULTILIB_USEDEP}]
185 + sys-devel/llvm:8[${MULTILIB_USEDEP}]
186 + )
187 + <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}]
188 +"
189 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
190 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
191 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
192 +RDEPEND="${RDEPEND}
193 + gallium? (
194 + llvm? (
195 + opencl? (
196 + video_cards_r600? (
197 + ${CLANG_DEPSTR_AMDGPU}
198 + )
199 + !video_cards_r600? (
200 + video_cards_radeonsi? (
201 + ${CLANG_DEPSTR_AMDGPU}
202 + )
203 + )
204 + !video_cards_r600? (
205 + !video_cards_radeonsi? (
206 + video_cards_radeon? (
207 + ${CLANG_DEPSTR_AMDGPU}
208 + )
209 + )
210 + )
211 + !video_cards_r600? (
212 + !video_cards_radeon? (
213 + !video_cards_radeonsi? (
214 + ${CLANG_DEPSTR}
215 + )
216 + )
217 + )
218 + )
219 + !opencl? (
220 + video_cards_r600? (
221 + ${LLVM_DEPSTR_AMDGPU}
222 + )
223 + !video_cards_r600? (
224 + video_cards_radeonsi? (
225 + ${LLVM_DEPSTR_AMDGPU}
226 + )
227 + )
228 + !video_cards_r600? (
229 + !video_cards_radeonsi? (
230 + video_cards_radeon? (
231 + ${LLVM_DEPSTR_AMDGPU}
232 + )
233 + )
234 + )
235 + !video_cards_r600? (
236 + !video_cards_radeon? (
237 + !video_cards_radeonsi? (
238 + ${LLVM_DEPSTR}
239 + )
240 + )
241 + )
242 + )
243 + )
244 + )
245 +"
246 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
247 +
248 +DEPEND="${RDEPEND}
249 + valgrind? ( dev-util/valgrind )
250 + X? (
251 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
252 + x11-base/xorg-proto
253 + )
254 +"
255 +BDEPEND="
256 + ${PYTHON_DEPS}
257 + opencl? (
258 + >=sys-devel/gcc-4.6
259 + )
260 + sys-devel/bison
261 + sys-devel/flex
262 + sys-devel/gettext
263 + virtual/pkgconfig
264 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
265 +"
266 +
267 +S="${WORKDIR}/${MY_P}"
268 +EGIT_CHECKOUT_DIR=${S}
269 +
270 +QA_WX_LOAD="
271 +x86? (
272 + usr/lib*/libglapi.so.0.0.0
273 + usr/lib*/libGLESv1_CM.so.1.1.0
274 + usr/lib*/libGLESv2.so.2.0.0
275 + usr/lib*/libGL.so.1.2.0
276 + usr/lib*/libOSMesa.so.8.0.0
277 + libglvnd? ( usr/lib/libGLX_mesa.so.0.0.0 )
278 +)"
279 +
280 +llvm_check_deps() {
281 + local flags=${MULTILIB_USEDEP}
282 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
283 + then
284 + flags+=",llvm_targets_AMDGPU(-)"
285 + fi
286 +
287 + if use opencl; then
288 + has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1
289 + fi
290 + has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]"
291 +}
292 +
293 +pkg_pretend() {
294 + if use vulkan; then
295 + if ! use video_cards_i965 &&
296 + ! use video_cards_iris &&
297 + ! use video_cards_radeonsi; then
298 + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, or radeonsi"
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 +
357 +python_check_deps() {
358 + has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]"
359 +}
360 +
361 +pkg_setup() {
362 + # warning message for bug 459306
363 + if use llvm && has_version sys-devel/llvm[!debug=]; then
364 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
365 + ewarn "detected! This can cause problems. For details, see bug 459306."
366 + fi
367 +
368 + if use gallium && use llvm; then
369 + llvm_pkg_setup
370 + fi
371 + python-any-r1_pkg_setup
372 +}
373 +
374 +multilib_src_configure() {
375 + local emesonargs=()
376 +
377 + if use classic; then
378 + # Intel code
379 + dri_driver_enable video_cards_i915 i915
380 + dri_driver_enable video_cards_i965 i965
381 + if ! use video_cards_i915 && \
382 + ! use video_cards_i965; then
383 + dri_driver_enable video_cards_intel i915 i965
384 + fi
385 +
386 + # Nouveau code
387 + dri_driver_enable video_cards_nouveau nouveau
388 +
389 + # ATI code
390 + dri_driver_enable video_cards_r100 r100
391 + dri_driver_enable video_cards_r200 r200
392 + if ! use video_cards_r100 && \
393 + ! use video_cards_r200; then
394 + dri_driver_enable video_cards_radeon r100 r200
395 + fi
396 + fi
397 +
398 + emesonargs+=( -Dplatforms=$(use X && echo "x11,")$(use wayland && echo "wayland,")$(use gbm && echo "drm,")surfaceless )
399 +
400 + if use gallium; then
401 + emesonargs+=(
402 + $(meson_use llvm)
403 + $(meson_use lm-sensors lmsensors)
404 + $(meson_use unwind libunwind)
405 + )
406 +
407 + if use video_cards_iris ||
408 + use video_cards_r300 ||
409 + use video_cards_r600 ||
410 + use video_cards_radeonsi ||
411 + use video_cards_nouveau ||
412 + use video_cards_vmware; then
413 + emesonargs+=($(meson_use d3d9 gallium-nine))
414 + else
415 + emesonargs+=(-Dgallium-nine=false)
416 + fi
417 +
418 + if use video_cards_r600 ||
419 + use video_cards_radeonsi ||
420 + use video_cards_nouveau; then
421 + emesonargs+=($(meson_use vaapi gallium-va))
422 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
423 + else
424 + emesonargs+=(-Dgallium-va=false)
425 + fi
426 +
427 + if use video_cards_r300 ||
428 + use video_cards_r600 ||
429 + use video_cards_radeonsi ||
430 + use video_cards_nouveau; then
431 + emesonargs+=($(meson_use vdpau gallium-vdpau))
432 + else
433 + emesonargs+=(-Dgallium-vdpau=false)
434 + fi
435 +
436 + if use video_cards_freedreno ||
437 + use video_cards_nouveau ||
438 + use video_cards_vmware; then
439 + emesonargs+=($(meson_use xa gallium-xa))
440 + else
441 + emesonargs+=(-Dgallium-xa=false)
442 + fi
443 +
444 + if use video_cards_r600 ||
445 + use video_cards_nouveau; then
446 + emesonargs+=($(meson_use xvmc gallium-xvmc))
447 + else
448 + emesonargs+=(-Dgallium-xvmc=false)
449 + fi
450 +
451 + if use video_cards_freedreno ||
452 + use video_cards_lima ||
453 + use video_cards_panfrost ||
454 + use video_cards_vc4 ||
455 + use video_cards_vivante; then
456 + gallium_enable -- kmsro
457 + fi
458 +
459 + gallium_enable video_cards_lima lima
460 + gallium_enable video_cards_panfrost panfrost
461 + gallium_enable video_cards_vc4 vc4
462 + gallium_enable video_cards_vivante etnaviv
463 + gallium_enable video_cards_vmware svga
464 + gallium_enable video_cards_nouveau nouveau
465 +
466 + # Only one i915 driver (classic vs gallium). Default to classic.
467 + if ! use classic; then
468 + gallium_enable video_cards_i915 i915
469 + if ! use video_cards_i915 && \
470 + ! use video_cards_i965; then
471 + gallium_enable video_cards_intel i915
472 + fi
473 + fi
474 +
475 + gallium_enable video_cards_iris iris
476 +
477 + gallium_enable video_cards_r300 r300
478 + gallium_enable video_cards_r600 r600
479 + gallium_enable video_cards_radeonsi radeonsi
480 + if ! use video_cards_r300 && \
481 + ! use video_cards_r600; then
482 + gallium_enable video_cards_radeon r300 r600
483 + fi
484 +
485 + gallium_enable video_cards_freedreno freedreno
486 + gallium_enable video_cards_virgl virgl
487 +
488 + # opencl stuff
489 + emesonargs+=(
490 + -Dgallium-opencl="$(usex opencl icd disabled)"
491 + )
492 + fi
493 +
494 + if use vulkan; then
495 + vulkan_enable video_cards_i965 intel
496 + vulkan_enable video_cards_iris intel
497 + vulkan_enable video_cards_radeonsi amd
498 + fi
499 +
500 + if use gallium; then
501 + gallium_enable -- swrast
502 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
503 + else
504 + dri_driver_enable -- swrast
505 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
506 + fi
507 +
508 + driver_list() {
509 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
510 + echo "${drivers//$'\n'/,}"
511 + }
512 +
513 + emesonargs+=(
514 + $(meson_use test build-tests)
515 + -Dglx=$(usex X dri disabled)
516 + -Dshared-glapi=true
517 + $(meson_use dri3)
518 + $(meson_use egl)
519 + $(meson_use gbm)
520 + $(meson_use gles1)
521 + $(meson_use gles2)
522 + $(meson_use libglvnd glvnd)
523 + $(meson_use selinux)
524 + $(meson_use zstd)
525 + -Dvalgrind=$(usex valgrind auto false)
526 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
527 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
528 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
529 + $(meson_use vulkan-overlay vulkan-overlay-layer)
530 + --buildtype $(usex debug debug plain)
531 + -Db_ndebug=$(usex debug false true)
532 + )
533 + meson_src_configure
534 +}
535 +
536 +multilib_src_compile() {
537 + meson_src_compile
538 +}
539 +
540 +multilib_src_install() {
541 + meson_src_install
542 +}
543 +
544 +multilib_src_install_all() {
545 + einstalldocs
546 +}
547 +
548 +multilib_src_test() {
549 + meson test -v -C "${BUILD_DIR}" -t 100
550 +}
551 +
552 +pkg_postinst() {
553 + if ! use libglvnd; then
554 + # Switch to the xorg implementation.
555 + echo
556 + eselect opengl set --use-old ${OPENGL_DIR}
557 + fi
558 +}
559 +
560 +# $1 - VIDEO_CARDS flag (check skipped for "--")
561 +# other args - names of DRI drivers to enable
562 +dri_driver_enable() {
563 + if [[ $1 == -- ]] || use $1; then
564 + shift
565 + DRI_DRIVERS+=("$@")
566 + fi
567 +}
568 +
569 +gallium_enable() {
570 + if [[ $1 == -- ]] || use $1; then
571 + shift
572 + GALLIUM_DRIVERS+=("$@")
573 + fi
574 +}
575 +
576 +vulkan_enable() {
577 + if [[ $1 == -- ]] || use $1; then
578 + shift
579 + VULKAN_DRIVERS+=("$@")
580 + fi
581 +}