Gentoo Archives: gentoo-commits

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