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, 28 Nov 2018 19:20:22
Message-Id: 1543432804.94e29af9c6c17380f14fbaf10c99933bd5d9b345.mattst88@gentoo
1 commit: 94e29af9c6c17380f14fbaf10c99933bd5d9b345
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 28 19:19:12 2018 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 28 19:20:04 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94e29af9
7
8 media-libs/mesa: Version bump to 18.2.6
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 media-libs/mesa/Manifest | 1 +
13 media-libs/mesa/mesa-18.2.6.ebuild | 515 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 516 insertions(+)
15
16 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
17 index 7563e04e0fe..2d2812b945c 100644
18 --- a/media-libs/mesa/Manifest
19 +++ b/media-libs/mesa/Manifest
20 @@ -1,6 +1,7 @@
21 DIST mesa-18.1.9.tar.xz 11146188 BLAKE2B 753f0fa3780502d56927f9b0e6124b4728cb5aa3600de78585487fb8e178c6987a72b79fb56e6c310757d157f9f85f12b73a6889bd361b51b62fb1dc1c20eecd SHA512 22db2950d25a3d9393e7c622c783bd177c21695569c8a95683bf77e92318e1db85672a134d4bea30c1f49a24e52bc3a2c1a0ac15deafb3a8fcbfb6de6a18adc2
22 DIST mesa-18.2.4.tar.xz 11377556 BLAKE2B b11c33ade744fb976862fecccbcc4c97196a005e40a00ef02bd8d409b66b3aa11f97baee13f2aa92f2d7c5461b2ef44beae3103687dea9ee29e92439a068f08a SHA512 088d43b087f4005752e4db75eaa6897e0fcb6de7b9a1f2d2b2ce3b5557d1dff829022e0092e8b1038ff01182c863ca0f26c97b9adde34bca462d3fa24502bfde
23 DIST mesa-18.2.5.tar.xz 11365620 BLAKE2B 401fbbcb0e56a97122c11b7d47e506fe86795e942ca412abfa0c29010434447d96bc17fa0e7fc43090c94d7907fc0acaed5f7dada164e8906dca43da0b64a932 SHA512 dd454c720241dffa61f3380be62479979a43004b2a52293b817bd3ea95f75960edee680e7380a13fae09b67a90dc0393e4a022d543db91b2f142f2468a9661f0
24 +DIST mesa-18.2.6.tar.xz 11384440 BLAKE2B 33c2f5425a98d71ec813b52cc24e9934b0617438279f77c5f5d4bf9dba85931d387bf5c852ddf1f036c4baf7ca23761c8422eb2c61b84eeebea71e510c91335c SHA512 a7dd02f67384bb800dff70a0672a968ced96bb438605cdb39bde3e468d4dcf6162414a44e5da1abe7a1831fceb6f23e6c850eb5f80cfc5ee3861c14924c10ed4
25 DIST mesa-18.3.0-rc2.tar.xz 11862200 BLAKE2B 4776d1dbf9fdab9dffc36ce8cdd5531491251c9d6f8317ec962d0a0556201ecf72a8cbc9ef2870085041e12702bba2a8bbbbbe011d21ed440eec08fe81b2f96e SHA512 af12adafbeac33f1ee527a0c7f61c24251912b5ee0a9e55d46f0133e6897b0ca91486ae2b3236159e43addef4de474a7b71ec3932083e68b9e94e480ee91c9fa
26 DIST mesa-18.3.0-rc3.tar.xz 11862412 BLAKE2B b310ebdc2a62bc0ff9796cfafab1252d46eadc17c3e0abad894776c73b4c640eedc6481666a0ad111abd1dfd8f40f2419b6afca03804225a10ff53080d2f582b SHA512 5ddc7ba15c47aeb3b6239147a43ff79435fce7d8a9a14b63f14d6382f9e911899821ad3e07a0c2dc5dbf3735b2fe5ee534d34614fbf1f89029d2de5d95955eeb
27 DIST mesa-18.3.0-rc4.tar.xz 11863728 BLAKE2B 4b3ad84c09009c6555d97a24e276becc292ee9a63bd1f9f5abf8896e584aa5f7748f27c1a3d6059a908d9dc117aa6f26b6a444e63ee59a431b0b257049aa6b57 SHA512 ee1adf9f8237a4f72a8b44ba9aeeb58fad041240e98ab71da6203f2a634f4b9dcd2758b4b5c592104cd51e431acb5292e79d8dd5a61a21c18ae7f93a9d98af41
28
29 diff --git a/media-libs/mesa/mesa-18.2.6.ebuild b/media-libs/mesa/mesa-18.2.6.ebuild
30 new file mode 100644
31 index 00000000000..ee7b0483c94
32 --- /dev/null
33 +++ b/media-libs/mesa/mesa-18.2.6.ebuild
34 @@ -0,0 +1,515 @@
35 +# Copyright 1999-2018 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=6
39 +
40 +PYTHON_COMPAT=( python2_7 )
41 +
42 +inherit llvm meson multilib-minimal pax-utils python-any-r1
43 +
44 +OPENGL_DIR="xorg-x11"
45 +
46 +MY_P="${P/_/-}"
47 +
48 +DESCRIPTION="OpenGL-like graphic library for Linux"
49 +HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
50 +
51 +if [[ ${PV} == 9999 ]]; then
52 + EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
53 + EXPERIMENTAL="true"
54 + inherit git-r3
55 +else
56 + SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
57 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
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 imx intel nouveau 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 lm_sensors
74 + opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau
75 + vulkan wayland xa xvmc"
76 +
77 +REQUIRED_USE="
78 + d3d9? ( dri3 || ( video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
79 + gles1? ( egl )
80 + gles2? ( egl )
81 + vulkan? ( dri3
82 + || ( video_cards_i965 video_cards_radeonsi )
83 + video_cards_radeonsi? ( llvm ) )
84 + wayland? ( egl gbm )
85 + video_cards_freedreno? ( gallium )
86 + video_cards_intel? ( classic )
87 + video_cards_i915? ( || ( classic gallium ) )
88 + video_cards_i965? ( classic )
89 + video_cards_imx? ( gallium video_cards_vivante )
90 + video_cards_nouveau? ( || ( classic gallium ) )
91 + video_cards_radeon? ( || ( classic gallium )
92 + gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
93 + video_cards_r100? ( classic )
94 + video_cards_r200? ( classic )
95 + video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
96 + video_cards_r600? ( gallium )
97 + video_cards_radeonsi? ( gallium llvm )
98 + video_cards_vc4? ( gallium )
99 + video_cards_virgl? ( gallium )
100 + video_cards_vivante? ( gallium gbm )
101 + video_cards_vmware? ( gallium )
102 +"
103 +
104 +LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93"
105 +RDEPEND="
106 + !app-eselect/eselect-mesa
107 + >=app-eselect/eselect-opengl-1.3.0
108 + >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
109 + >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
110 + >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
111 + >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
112 + >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
113 + >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
114 + >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
115 + >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
116 + x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
117 + gallium? (
118 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
119 + llvm? (
120 + video_cards_radeonsi? (
121 + virtual/libelf:0=[${MULTILIB_USEDEP}]
122 + )
123 + video_cards_r600? (
124 + virtual/libelf:0=[${MULTILIB_USEDEP}]
125 + )
126 + video_cards_radeon? (
127 + virtual/libelf:0=[${MULTILIB_USEDEP}]
128 + )
129 + )
130 + lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] )
131 + opencl? (
132 + dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}]
133 + dev-libs/libclc
134 + virtual/libelf:0=[${MULTILIB_USEDEP}]
135 + )
136 + vaapi? (
137 + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
138 + video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
139 + )
140 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
141 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
142 + )
143 + wayland? (
144 + >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
145 + >=dev-libs/wayland-protocols-1.8
146 + )
147 + ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
148 +
149 + video_cards_intel? (
150 + !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
151 + )
152 + video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
153 +"
154 +for card in ${RADEON_CARDS}; do
155 + RDEPEND="${RDEPEND}
156 + video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
157 + "
158 +done
159 +RDEPEND="${RDEPEND}
160 + video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
161 +"
162 +
163 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
164 +# we need to *really* make sure we're not pulling one than more slot
165 +# simultaneously.
166 +#
167 +# How to use it:
168 +# 1. List all the working slots (with min versions) in ||, newest first.
169 +# 2. Update the := to specify *max* version, e.g. < 7.
170 +# 3. Specify LLVM_MAX_SLOT, e.g. 6.
171 +LLVM_MAX_SLOT="7"
172 +LLVM_DEPSTR="
173 + || (
174 + sys-devel/llvm:7[${MULTILIB_USEDEP}]
175 + sys-devel/llvm:6[${MULTILIB_USEDEP}]
176 + sys-devel/llvm:5[${MULTILIB_USEDEP}]
177 + sys-devel/llvm:4[${MULTILIB_USEDEP}]
178 + >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
179 + )
180 + sys-devel/llvm:=[${MULTILIB_USEDEP}]
181 +"
182 +LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
183 +CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
184 +CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
185 +RDEPEND="${RDEPEND}
186 + llvm? (
187 + opencl? (
188 + video_cards_r600? (
189 + ${CLANG_DEPSTR_AMDGPU}
190 + )
191 + !video_cards_r600? (
192 + video_cards_radeonsi? (
193 + ${CLANG_DEPSTR_AMDGPU}
194 + )
195 + )
196 + !video_cards_r600? (
197 + !video_cards_radeonsi? (
198 + video_cards_radeon? (
199 + ${CLANG_DEPSTR_AMDGPU}
200 + )
201 + )
202 + )
203 + !video_cards_r600? (
204 + !video_cards_radeon? (
205 + !video_cards_radeonsi? (
206 + ${CLANG_DEPSTR}
207 + )
208 + )
209 + )
210 + )
211 + !opencl? (
212 + video_cards_r600? (
213 + ${LLVM_DEPSTR_AMDGPU}
214 + )
215 + !video_cards_r600? (
216 + video_cards_radeonsi? (
217 + ${LLVM_DEPSTR_AMDGPU}
218 + )
219 + )
220 + !video_cards_r600? (
221 + !video_cards_radeonsi? (
222 + video_cards_radeon? (
223 + ${LLVM_DEPSTR_AMDGPU}
224 + )
225 + )
226 + )
227 + !video_cards_r600? (
228 + !video_cards_radeon? (
229 + !video_cards_radeonsi? (
230 + ${LLVM_DEPSTR}
231 + )
232 + )
233 + )
234 + )
235 + )
236 +"
237 +unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
238 +
239 +DEPEND="${RDEPEND}
240 + ${PYTHON_DEPS}
241 + opencl? (
242 + >=sys-devel/gcc-4.6
243 + )
244 + sys-devel/bison
245 + sys-devel/flex
246 + sys-devel/gettext
247 + virtual/pkgconfig
248 + valgrind? ( dev-util/valgrind )
249 + x11-base/xorg-proto
250 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
251 + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]")
252 +"
253 +
254 +S="${WORKDIR}/${MY_P}"
255 +EGIT_CHECKOUT_DIR=${S}
256 +
257 +QA_WX_LOAD="
258 +x86? (
259 + !pic? (
260 + usr/lib*/libglapi.so.0.0.0
261 + usr/lib*/libGLESv1_CM.so.1.0.0
262 + usr/lib*/libGLESv2.so.2.0.0
263 + usr/lib*/libGL.so.1.2.0
264 + usr/lib*/libOSMesa.so.8.0.0
265 + )
266 +)"
267 +
268 +llvm_check_deps() {
269 + local flags=${MULTILIB_USEDEP}
270 + if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
271 + then
272 + flags+=",llvm_targets_AMDGPU(-)"
273 + fi
274 +
275 + if use opencl; then
276 + has_version "sys-devel/clang[${flags}]" || return 1
277 + fi
278 + has_version "sys-devel/llvm[${flags}]"
279 +}
280 +
281 +pkg_pretend() {
282 + if use opencl; then
283 + if ! use video_cards_r600 &&
284 + ! use video_cards_radeonsi; then
285 + ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi"
286 + fi
287 + fi
288 +
289 + if use vaapi; then
290 + if ! use video_cards_r600 &&
291 + ! use video_cards_radeonsi &&
292 + ! use video_cards_nouveau; then
293 + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau"
294 + fi
295 + fi
296 +
297 + if use vdpau; then
298 + if ! use video_cards_r300 &&
299 + ! use video_cards_r600 &&
300 + ! use video_cards_radeonsi &&
301 + ! use video_cards_nouveau; then
302 + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau"
303 + fi
304 + fi
305 +
306 + if use xa; then
307 + if ! use video_cards_freedreno &&
308 + ! use video_cards_nouveau &&
309 + ! use video_cards_vmware; then
310 + ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware"
311 + fi
312 + fi
313 +
314 + if use xvmc; then
315 + if ! use video_cards_r600 &&
316 + ! use video_cards_nouveau; then
317 + ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau"
318 + fi
319 + fi
320 +
321 + if ! use gallium; then
322 + use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium"
323 + use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
324 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
325 + use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
326 + use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
327 + use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
328 + use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
329 + use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
330 + fi
331 +
332 + if ! use llvm; then
333 + use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
334 + fi
335 +}
336 +
337 +pkg_setup() {
338 + # warning message for bug 459306
339 + if use llvm && has_version sys-devel/llvm[!debug=]; then
340 + ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
341 + ewarn "detected! This can cause problems. For details, see bug 459306."
342 + fi
343 +
344 + if use llvm; then
345 + llvm_pkg_setup
346 + fi
347 + python-any-r1_pkg_setup
348 +}
349 +
350 +multilib_src_configure() {
351 + local emesonargs=()
352 +
353 + if use classic; then
354 + # Intel code
355 + dri_driver_enable video_cards_i915 i915
356 + dri_driver_enable video_cards_i965 i965
357 + if ! use video_cards_i915 && \
358 + ! use video_cards_i965; then
359 + dri_driver_enable video_cards_intel i915 i965
360 + fi
361 +
362 + # Nouveau code
363 + dri_driver_enable video_cards_nouveau nouveau
364 +
365 + # ATI code
366 + dri_driver_enable video_cards_r100 r100
367 + dri_driver_enable video_cards_r200 r200
368 + if ! use video_cards_r100 && \
369 + ! use video_cards_r200; then
370 + dri_driver_enable video_cards_radeon r100 r200
371 + fi
372 + fi
373 +
374 + emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
375 +
376 + if use gallium; then
377 + emesonargs+=(
378 + $(meson_use llvm)
379 + $(meson_use lm_sensors lmsensors)
380 + $(meson_use unwind libunwind)
381 + )
382 +
383 + if use video_cards_r300 ||
384 + use video_cards_r600 ||
385 + use video_cards_radeonsi ||
386 + use video_cards_nouveau ||
387 + use video_cards_vmware; then
388 + emesonargs+=($(meson_use d3d9 gallium-nine))
389 + else
390 + emesonargs+=(-Dgallium-nine=false)
391 + fi
392 +
393 + if use video_cards_r600 ||
394 + use video_cards_radeonsi ||
395 + use video_cards_nouveau; then
396 + emesonargs+=($(meson_use vaapi gallium-va))
397 + use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers )
398 + else
399 + emesonargs+=(-Dgallium-va=false)
400 + fi
401 +
402 + if use video_cards_r300 ||
403 + use video_cards_r600 ||
404 + use video_cards_radeonsi ||
405 + use video_cards_nouveau; then
406 + emesonargs+=($(meson_use vdpau gallium-vdpau))
407 + else
408 + emesonargs+=(-Dgallium-vdpau=false)
409 + fi
410 +
411 + if use video_cards_freedreno ||
412 + use video_cards_nouveau ||
413 + use video_cards_vmware; then
414 + emesonargs+=($(meson_use xa gallium-xa))
415 + else
416 + emesonargs+=(-Dgallium-xa=false)
417 + fi
418 +
419 + if use video_cards_r600 ||
420 + use video_cards_nouveau; then
421 + emesonargs+=($(meson_use xvmc gallium-xvmc))
422 + else
423 + emesonargs+=(-Dgallium-xvmc=false)
424 + fi
425 +
426 + gallium_enable video_cards_vc4 vc4
427 + gallium_enable video_cards_vivante etnaviv
428 + gallium_enable video_cards_vmware svga
429 + gallium_enable video_cards_nouveau nouveau
430 + gallium_enable video_cards_imx imx
431 +
432 + # Only one i915 driver (classic vs gallium). Default to classic.
433 + if ! use classic; then
434 + gallium_enable video_cards_i915 i915
435 + if ! use video_cards_i915 && \
436 + ! use video_cards_i965; then
437 + gallium_enable video_cards_intel i915
438 + fi
439 + fi
440 +
441 + gallium_enable video_cards_r300 r300
442 + gallium_enable video_cards_r600 r600
443 + gallium_enable video_cards_radeonsi radeonsi
444 + if ! use video_cards_r300 && \
445 + ! use video_cards_r600; then
446 + gallium_enable video_cards_radeon r300 r600
447 + fi
448 +
449 + gallium_enable video_cards_freedreno freedreno
450 + gallium_enable video_cards_virgl virgl
451 +
452 + # opencl stuff
453 + emesonargs+=(
454 + -Dgallium-opencl="$(usex opencl icd disabled)"
455 + )
456 + fi
457 +
458 + if use vulkan; then
459 + vulkan_enable video_cards_i965 intel
460 + vulkan_enable video_cards_radeonsi amd
461 + fi
462 +
463 + # x86 hardened pax_kernel needs glx-rts, bug 240956
464 + if [[ ${ABI} == x86 ]]; then
465 + emesonargs+=( $(meson_use pax_kernel glx-read-only-text) )
466 + fi
467 +
468 + # on abi_x86_32 hardened we need to have asm disable
469 + if [[ ${ABI} == x86* ]] && use pic; then
470 + emesonargs+=( -Dasm=false )
471 + fi
472 +
473 + if use gallium; then
474 + gallium_enable -- swrast
475 + emesonargs+=( -Dosmesa=$(usex osmesa gallium none) )
476 + else
477 + dri_driver_enable -- swrast
478 + emesonargs+=( -Dosmesa=$(usex osmesa classic none) )
479 + fi
480 +
481 + driver_list() {
482 + local drivers="$(sort -u <<< "${1// /$'\n'}")"
483 + echo "${drivers//$'\n'/,}"
484 + }
485 +
486 + emesonargs+=(
487 + $(meson_use test build-tests)
488 + -Dglx=dri
489 + -Dshared-glapi=true
490 + $(meson_use dri3)
491 + $(meson_use egl)
492 + $(meson_use gbm)
493 + $(meson_use gles1)
494 + $(meson_use gles2)
495 + $(meson_use selinux)
496 + -Dvalgrind=$(usex valgrind auto false)
497 + -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
498 + -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
499 + -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
500 + --buildtype $(usex debug debug plain)
501 + -Db_ndebug=$(usex debug false true)
502 + )
503 + meson_src_configure
504 +}
505 +
506 +multilib_src_compile() {
507 + meson_src_compile
508 +}
509 +
510 +multilib_src_install() {
511 + meson_src_install
512 +}
513 +
514 +multilib_src_install_all() {
515 + einstalldocs
516 +}
517 +
518 +multilib_src_test() {
519 + meson_src_test
520 +}
521 +
522 +pkg_postinst() {
523 + # Switch to the xorg implementation.
524 + echo
525 + eselect opengl set --use-old ${OPENGL_DIR}
526 +}
527 +
528 +# $1 - VIDEO_CARDS flag (check skipped for "--")
529 +# other args - names of DRI drivers to enable
530 +dri_driver_enable() {
531 + if [[ $1 == -- ]] || use $1; then
532 + shift
533 + DRI_DRIVERS+=("$@")
534 + fi
535 +}
536 +
537 +gallium_enable() {
538 + if [[ $1 == -- ]] || use $1; then
539 + shift
540 + GALLIUM_DRIVERS+=("$@")
541 + fi
542 +}
543 +
544 +vulkan_enable() {
545 + if [[ $1 == -- ]] || use $1; then
546 + shift
547 + VULKAN_DRIVERS+=("$@")
548 + fi
549 +}