Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: media-libs/mesa/
Date: Sun, 19 Aug 2018 17:46:18
Message-Id: 1534700763.46489d7a2a74021f56ca2b3826f86dc210e873e2.blueness@gentoo
1 commit: 46489d7a2a74021f56ca2b3826f86dc210e873e2
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 19 17:46:03 2018 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 19 17:46:03 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=46489d7a
7
8 media-libs/mesa: remove older unstable versions
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 media-libs/mesa/Manifest | 3 -
13 media-libs/mesa/mesa-18.0.5.ebuild | 578 -------------------------------------
14 media-libs/mesa/mesa-18.1.1.ebuild | 538 ----------------------------------
15 media-libs/mesa/mesa-18.1.3.ebuild | 549 -----------------------------------
16 4 files changed, 1668 deletions(-)
17
18 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
19 index c0fde9c..e35e427 100644
20 --- a/media-libs/mesa/Manifest
21 +++ b/media-libs/mesa/Manifest
22 @@ -1,5 +1,2 @@
23 DIST mesa-17.3.9.tar.xz 10660456 BLAKE2B 54f4a75f9040e50e9eea8f5c52a276578379d25d2a01ac4767ab12bee85fe5dae1492d5bb1df06b6e8c6b0fe960bbd5ea38691c75d08a6b4302c64377ce58e54 SHA512 83deffbc6b9823b8e93cccf57d7952106f3d55fea881e3924f9f9586f0e9347a6e3a1a36cc19c24af819f2fde3af9496652a6ff56132511a5618d5774404f63f
24 -DIST mesa-18.0.5.tar.xz 10952996 BLAKE2B 708cdb2ef95a618430cd4e7eb45bcab0f6575774065b61f53787aa378385fe0dfa0b04f9c80c5426f9581851edc545a75c137777dc304ac8ba57465d365fcd50 SHA512 63b47cdca7f8282aab7aaa66233411f02918e5c4804b7a0010de2b1867fe90171e492ff031dfc4aa20968dfc99bd7dceb5d35fd44c709e54a2ece61175a60f3d
25 -DIST mesa-18.1.1.tar.xz 11110892 BLAKE2B 05d48379109c1c3800d3d07b9f52e96b2cd4bc087517711ee752f89619afce0a0e09b7a9ede8b5d1807ceae3e2b506518657a0760c947f466121e2252f7eada3 SHA512 7783adc1ec7a1c3d092acfcca6b4ba19450c15a7f0d7f41fbf25e482236615d79ce24afe60959066ea7aa851df4f74fa3c569fa6d847ea79e6bfe046b8c65e90
26 -DIST mesa-18.1.3.tar.xz 11126236 BLAKE2B 2315cdc95130ef604a86e3886abf9b15e6c7944fab3b3cc020358dd08a76f2b876904516e5c081d549b16240ae4dedd647402dd7bd8de4c91015bb601c0c2923 SHA512 f6e5b81a80a309a36a04759d18364d3c71c48d1cb88f87b2f5432ef003092a22046e88ce2082031d5d52b60ba36f585d8df52e06ecc7a5158079936236f36887
27 DIST mesa-18.1.6.tar.xz 11142884 BLAKE2B fdd156fe7debf5223285dfa238070a2bd7d8ec684dec168afab78b9d2d38d53c10d939aaa64f34c2910e542dce3869adfca6383fca6a854c6dd03287a044b0e3 SHA512 2966210800215f5ced2720691063a8519b51ebeab9fb1e99bde4b1bd7ccc719d6395a1c29f25c88efe62d1592cf14ceafc163aca349490b1f8cee81070d46fcc
28
29 diff --git a/media-libs/mesa/mesa-18.0.5.ebuild b/media-libs/mesa/mesa-18.0.5.ebuild
30 deleted file mode 100644
31 index 1c3486f..0000000
32 --- a/media-libs/mesa/mesa-18.0.5.ebuild
33 +++ /dev/null
34 @@ -1,578 +0,0 @@
35 -# Copyright 1999-2018 Gentoo Foundation
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -EAPI=6
39 -
40 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
41 -
42 -if [[ ${PV} = 9999 ]]; then
43 - GIT_ECLASS="git-r3"
44 - EXPERIMENTAL="true"
45 -fi
46 -
47 -PYTHON_COMPAT=( python2_7 )
48 -
49 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
50 -
51 -OPENGL_DIR="xorg-x11"
52 -
53 -MY_P="${P/_/-}"
54 -
55 -DESCRIPTION="OpenGL-like graphic library for Linux"
56 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
57 -
58 -if [[ $PV == 9999 ]]; then
59 - SRC_URI=""
60 -else
61 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
62 - KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~sh ~sparc ~x86"
63 -fi
64 -
65 -LICENSE="MIT"
66 -SLOT="0"
67 -RESTRICT="!bindist? ( bindist )"
68 -
69 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
70 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau 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 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
77 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
78 - vdpau vulkan wayland xvmc xa"
79 -
80 -REQUIRED_USE="
81 - d3d9? ( dri3 gallium )
82 - llvm? ( gallium )
83 - opencl? ( gallium llvm )
84 - openmax? ( gallium )
85 - gles1? ( egl )
86 - gles2? ( egl )
87 - vaapi? ( gallium )
88 - vdpau? ( gallium )
89 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
90 - video_cards_radeonsi? ( llvm ) )
91 - wayland? ( egl gbm )
92 - xa? ( gallium )
93 - video_cards_freedreno? ( gallium )
94 - video_cards_intel? ( classic )
95 - video_cards_i915? ( || ( classic gallium ) )
96 - video_cards_i965? ( classic )
97 - video_cards_imx? ( gallium video_cards_vivante )
98 - video_cards_nouveau? ( || ( classic gallium ) )
99 - video_cards_radeon? ( || ( classic gallium )
100 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
101 - video_cards_r100? ( classic )
102 - video_cards_r200? ( classic )
103 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
104 - video_cards_r600? ( gallium )
105 - video_cards_radeonsi? ( gallium llvm )
106 - video_cards_vc4? ( gallium )
107 - video_cards_virgl? ( gallium )
108 - video_cards_vivante? ( gallium gbm )
109 - video_cards_vmware? ( gallium )
110 -"
111 -
112 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.89"
113 -RDEPEND="
114 - classic? ( app-eselect/eselect-mesa )
115 - gallium? ( app-eselect/eselect-mesa )
116 - >=app-eselect/eselect-opengl-1.3.0
117 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
118 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
119 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
120 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
121 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
122 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
123 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
124 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
125 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
126 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
127 - llvm? (
128 - video_cards_radeonsi? (
129 - virtual/libelf:0=[${MULTILIB_USEDEP}]
130 - )
131 - video_cards_r600? (
132 - virtual/libelf:0=[${MULTILIB_USEDEP}]
133 - )
134 - video_cards_radeon? (
135 - virtual/libelf:0=[${MULTILIB_USEDEP}]
136 - )
137 - )
138 - opencl? (
139 - app-eselect/eselect-opencl
140 - dev-libs/libclc
141 - virtual/libelf:0=[${MULTILIB_USEDEP}]
142 - )
143 - openmax? (
144 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
145 - x11-misc/xdg-utils
146 - )
147 - vaapi? (
148 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
149 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
150 - )
151 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
152 - wayland? (
153 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
154 - >=dev-libs/wayland-protocols-1.8
155 - )
156 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
157 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
158 -
159 - video_cards_intel? (
160 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
161 - )
162 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
163 -"
164 -for card in ${RADEON_CARDS}; do
165 - RDEPEND="${RDEPEND}
166 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
167 - "
168 -done
169 -RDEPEND="${RDEPEND}
170 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
171 -"
172 -
173 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
174 -# we need to *really* make sure we're not pulling one than more slot
175 -# simultaneously.
176 -#
177 -# How to use it:
178 -# 1. List all the working slots (with min versions) in ||, newest first.
179 -# 2. Update the := to specify *max* version, e.g. < 7.
180 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
181 -LLVM_DEPSTR="
182 - || (
183 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
184 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
185 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
186 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
187 - )
188 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
189 -"
190 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
191 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
192 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
193 -RDEPEND="${RDEPEND}
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 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
246 -
247 -DEPEND="${RDEPEND}
248 - ${PYTHON_DEPS}
249 - opencl? (
250 - >=sys-devel/gcc-4.6
251 - )
252 - sys-devel/gettext
253 - virtual/pkgconfig
254 - valgrind? ( dev-util/valgrind )
255 - x11-base/xorg-proto
256 - vulkan? (
257 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
258 - )
259 -"
260 -[[ ${PV} == 9999 ]] && DEPEND+="
261 - sys-devel/bison
262 - sys-devel/flex
263 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
264 -"
265 -
266 -S="${WORKDIR}/${MY_P}"
267 -EGIT_CHECKOUT_DIR=${S}
268 -
269 -QA_WX_LOAD="
270 -x86? (
271 - !pic? (
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 - )
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[${flags}]" || return 1
289 - fi
290 - has_version "sys-devel/llvm[${flags}]"
291 -}
292 -
293 -pkg_setup() {
294 - # warning message for bug 459306
295 - if use llvm && has_version sys-devel/llvm[!debug=]; then
296 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
297 - ewarn "detected! This can cause problems. For details, see bug 459306."
298 - fi
299 -
300 - if use llvm; then
301 - llvm_pkg_setup
302 - fi
303 - python-any-r1_pkg_setup
304 -}
305 -
306 -src_prepare() {
307 - eapply "${FILESDIR}"/${PN}-17-execinfo.patch
308 - eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
309 - eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
310 - eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
311 - eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
312 -
313 - eautoreconf
314 -
315 - eapply_user
316 -}
317 -
318 -multilib_src_configure() {
319 - local myconf
320 -
321 - if use classic; then
322 - # Configurable DRI drivers
323 - driver_enable swrast
324 -
325 - # Intel code
326 - driver_enable video_cards_i915 i915
327 - driver_enable video_cards_i965 i965
328 - if ! use video_cards_i915 && \
329 - ! use video_cards_i965; then
330 - driver_enable video_cards_intel i915 i965
331 - fi
332 -
333 - # Nouveau code
334 - driver_enable video_cards_nouveau nouveau
335 -
336 - # ATI code
337 - driver_enable video_cards_r100 radeon
338 - driver_enable video_cards_r200 r200
339 - if ! use video_cards_r100 && \
340 - ! use video_cards_r200; then
341 - driver_enable video_cards_radeon radeon r200
342 - fi
343 - fi
344 -
345 - if use egl; then
346 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
347 - fi
348 -
349 - if use gallium; then
350 - myconf+="
351 - $(use_enable d3d9 nine)
352 - $(use_enable llvm)
353 - $(use_enable openmax omx-bellagio)
354 - $(use_enable vaapi va)
355 - $(use_enable vdpau)
356 - $(use_enable xa)
357 - $(use_enable xvmc)
358 - "
359 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
360 -
361 - gallium_enable swrast
362 - gallium_enable video_cards_vc4 vc4
363 - gallium_enable video_cards_vivante etnaviv
364 - gallium_enable video_cards_vmware svga
365 - gallium_enable video_cards_nouveau nouveau
366 - gallium_enable video_cards_i915 i915
367 - gallium_enable video_cards_imx imx
368 - if ! use video_cards_i915 && \
369 - ! use video_cards_i965; then
370 - gallium_enable video_cards_intel i915
371 - fi
372 -
373 - gallium_enable video_cards_r300 r300
374 - gallium_enable video_cards_r600 r600
375 - gallium_enable video_cards_radeonsi radeonsi
376 - if ! use video_cards_r300 && \
377 - ! use video_cards_r600; then
378 - gallium_enable video_cards_radeon r300 r600
379 - fi
380 -
381 - gallium_enable video_cards_freedreno freedreno
382 - # opencl stuff
383 - if use opencl; then
384 - myconf+="
385 - $(use_enable opencl)
386 - --with-clang-libdir="${EPREFIX}/usr/lib"
387 - "
388 - fi
389 -
390 - gallium_enable video_cards_virgl virgl
391 - fi
392 -
393 - if use vulkan; then
394 - vulkan_enable video_cards_i965 intel
395 - vulkan_enable video_cards_radeonsi radeon
396 - fi
397 -
398 - # x86 hardened pax_kernel needs glx-rts, bug 240956
399 - if [[ ${ABI} == x86 ]]; then
400 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
401 - fi
402 -
403 - # on abi_x86_32 hardened we need to have asm disable
404 - if [[ ${ABI} == x86* ]] && use pic; then
405 - myconf+=" --disable-asm"
406 - fi
407 -
408 - if use gallium; then
409 - myconf+=" $(use_enable osmesa gallium-osmesa)"
410 - else
411 - myconf+=" $(use_enable osmesa)"
412 - fi
413 -
414 - # build fails with BSD indent, bug #428112
415 - use userland_GNU || export INDENT=cat
416 -
417 - ECONF_SOURCE="${S}" \
418 - econf \
419 - --enable-dri \
420 - --enable-glx \
421 - --enable-shared-glapi \
422 - $(use_enable !bindist texture-float) \
423 - $(use_enable d3d9 nine) \
424 - $(use_enable debug) \
425 - $(use_enable dri3) \
426 - $(use_enable egl) \
427 - $(use_enable gbm) \
428 - $(use_enable gles1) \
429 - $(use_enable gles2) \
430 - $(use_enable nptl glx-tls) \
431 - $(use_enable unwind libunwind) \
432 - --enable-valgrind=$(usex valgrind auto no) \
433 - --enable-llvm-shared-libs \
434 - --disable-opencl-icd \
435 - --with-dri-drivers=${DRI_DRIVERS} \
436 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
437 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
438 - PYTHON2="${PYTHON}" \
439 - ${myconf}
440 -}
441 -
442 -multilib_src_install() {
443 - emake install DESTDIR="${D}"
444 -
445 - if use classic || use gallium; then
446 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
447 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
448 - keepdir /usr/$(get_libdir)/dri
449 - dodir /usr/$(get_libdir)/mesa
450 - for x in ${gallium_drivers[@]}; do
451 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
452 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
453 - || die "Failed to move ${x}"
454 - fi
455 - done
456 - if use classic; then
457 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
458 - fi
459 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
460 - if [ -f ${x} -o -L ${x} ]; then
461 - mv -f "${x}" "${x/dri/mesa}" \
462 - || die "Failed to move ${x}"
463 - fi
464 - done
465 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
466 - ln -s ../mesa/*.so . || die "Creating symlink failed"
467 - # remove symlinks to drivers known to eselect
468 - for x in ${gallium_drivers[@]}; do
469 - if [ -f ${x} -o -L ${x} ]; then
470 - rm "${x}" || die "Failed to remove ${x}"
471 - fi
472 - done
473 - popd
474 - eend $?
475 - fi
476 - if use opencl; then
477 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
478 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
479 - dodir ${cl_dir}/{lib,include}
480 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
481 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
482 - "${ED}"${cl_dir}
483 - fi
484 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
485 - mv -f "${ED}"/usr/include/CL \
486 - "${ED}"${cl_dir}/include
487 - fi
488 - eend $?
489 - fi
490 -
491 - if use openmax; then
492 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
493 - doenvd "${T}"/99mesaxdgomx
494 - keepdir /usr/share/mesa/xdg
495 - fi
496 -}
497 -
498 -multilib_src_install_all() {
499 - find "${ED}" -name '*.la' -delete
500 - einstalldocs
501 -
502 - if use !bindist; then
503 - dodoc docs/patents.txt
504 - fi
505 -
506 - # Install config file for eselect mesa
507 - insinto /usr/share/mesa
508 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
509 -}
510 -
511 -multilib_src_test() {
512 - if use llvm; then
513 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
514 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
515 - emake ${llvm_tests}
516 - pax-mark m ${llvm_tests}
517 - popd >/dev/null || die
518 - fi
519 - emake check
520 -}
521 -
522 -pkg_postinst() {
523 - # Switch to the xorg implementation.
524 - echo
525 - eselect opengl set --use-old ${OPENGL_DIR}
526 -
527 - # Select classic/gallium drivers
528 - if use classic || use gallium; then
529 - eselect mesa set --auto
530 - fi
531 -
532 - # Switch to mesa opencl
533 - if use opencl; then
534 - eselect opencl set --use-old ${PN}
535 - fi
536 -
537 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
538 - if use openmax; then
539 - ebegin "Registering OpenMAX drivers"
540 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
541 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
542 - omxregister-bellagio
543 - eend $?
544 - fi
545 -
546 - # warn about patent encumbered texture-float
547 - if use !bindist; then
548 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
549 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
550 - elog "explanation."
551 - fi
552 -}
553 -
554 -pkg_prerm() {
555 - if use openmax; then
556 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
557 - fi
558 -}
559 -
560 -# $1 - VIDEO_CARDS flag
561 -# other args - names of DRI drivers to enable
562 -# TODO: avoid code duplication for a more elegant implementation
563 -driver_enable() {
564 - case $# in
565 - # for enabling unconditionally
566 - 1)
567 - DRI_DRIVERS+=",$1"
568 - ;;
569 - *)
570 - if use $1; then
571 - shift
572 - for i in $@; do
573 - DRI_DRIVERS+=",${i}"
574 - done
575 - fi
576 - ;;
577 - esac
578 -}
579 -
580 -gallium_enable() {
581 - case $# in
582 - # for enabling unconditionally
583 - 1)
584 - GALLIUM_DRIVERS+=",$1"
585 - ;;
586 - *)
587 - if use $1; then
588 - shift
589 - for i in $@; do
590 - GALLIUM_DRIVERS+=",${i}"
591 - done
592 - fi
593 - ;;
594 - esac
595 -}
596 -
597 -vulkan_enable() {
598 - case $# in
599 - # for enabling unconditionally
600 - 1)
601 - VULKAN_DRIVERS+=",$1"
602 - ;;
603 - *)
604 - if use $1; then
605 - shift
606 - for i in $@; do
607 - VULKAN_DRIVERS+=",${i}"
608 - done
609 - fi
610 - ;;
611 - esac
612 -}
613
614 diff --git a/media-libs/mesa/mesa-18.1.1.ebuild b/media-libs/mesa/mesa-18.1.1.ebuild
615 deleted file mode 100644
616 index 2d43b0e..0000000
617 --- a/media-libs/mesa/mesa-18.1.1.ebuild
618 +++ /dev/null
619 @@ -1,538 +0,0 @@
620 -# Copyright 1999-2018 Gentoo Foundation
621 -# Distributed under the terms of the GNU General Public License v2
622 -
623 -EAPI=6
624 -
625 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
626 -
627 -if [[ ${PV} = 9999 ]]; then
628 - GIT_ECLASS="git-r3"
629 - EXPERIMENTAL="true"
630 -fi
631 -
632 -PYTHON_COMPAT=( python2_7 )
633 -
634 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
635 -
636 -OPENGL_DIR="xorg-x11"
637 -
638 -MY_P="${P/_/-}"
639 -
640 -DESCRIPTION="OpenGL-like graphic library for Linux"
641 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
642 -
643 -if [[ $PV == 9999 ]]; then
644 - SRC_URI=""
645 -else
646 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
647 - KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~sh ~sparc ~x86"
648 -fi
649 -
650 -LICENSE="MIT"
651 -SLOT="0"
652 -RESTRICT="!bindist? ( bindist )"
653 -
654 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
655 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
656 -for card in ${VIDEO_CARDS}; do
657 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
658 -done
659 -
660 -IUSE="${IUSE_VIDEO_CARDS}
661 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
662 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
663 - vdpau vulkan wayland xvmc xa"
664 -
665 -REQUIRED_USE="
666 - d3d9? ( dri3 gallium )
667 - llvm? ( gallium )
668 - opencl? ( gallium llvm )
669 - openmax? ( gallium )
670 - gles1? ( egl )
671 - gles2? ( egl )
672 - vaapi? ( gallium )
673 - vdpau? ( gallium )
674 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
675 - video_cards_radeonsi? ( llvm ) )
676 - wayland? ( egl gbm )
677 - xa? ( gallium )
678 - video_cards_freedreno? ( gallium )
679 - video_cards_intel? ( classic )
680 - video_cards_i915? ( || ( classic gallium ) )
681 - video_cards_i965? ( classic )
682 - video_cards_imx? ( gallium video_cards_vivante )
683 - video_cards_nouveau? ( || ( classic gallium ) )
684 - video_cards_radeon? ( || ( classic gallium )
685 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
686 - video_cards_r100? ( classic )
687 - video_cards_r200? ( classic )
688 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
689 - video_cards_r600? ( gallium )
690 - video_cards_radeonsi? ( gallium llvm )
691 - video_cards_vc4? ( gallium )
692 - video_cards_virgl? ( gallium )
693 - video_cards_vivante? ( gallium gbm )
694 - video_cards_vmware? ( gallium )
695 -"
696 -
697 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
698 -RDEPEND="
699 - !app-eselect/eselect-mesa
700 - >=app-eselect/eselect-opengl-1.3.0
701 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
702 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
703 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
704 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
705 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
706 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
707 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
708 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
709 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
710 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
711 - llvm? (
712 - video_cards_radeonsi? (
713 - virtual/libelf:0=[${MULTILIB_USEDEP}]
714 - )
715 - video_cards_r600? (
716 - virtual/libelf:0=[${MULTILIB_USEDEP}]
717 - )
718 - video_cards_radeon? (
719 - virtual/libelf:0=[${MULTILIB_USEDEP}]
720 - )
721 - )
722 - opencl? (
723 - app-eselect/eselect-opencl
724 - dev-libs/libclc
725 - virtual/libelf:0=[${MULTILIB_USEDEP}]
726 - )
727 - openmax? (
728 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
729 - x11-misc/xdg-utils
730 - )
731 - vaapi? (
732 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
733 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
734 - )
735 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
736 - wayland? (
737 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
738 - >=dev-libs/wayland-protocols-1.8
739 - )
740 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
741 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
742 -
743 - video_cards_intel? (
744 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
745 - )
746 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
747 -"
748 -for card in ${RADEON_CARDS}; do
749 - RDEPEND="${RDEPEND}
750 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
751 - "
752 -done
753 -RDEPEND="${RDEPEND}
754 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
755 -"
756 -
757 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
758 -# we need to *really* make sure we're not pulling one than more slot
759 -# simultaneously.
760 -#
761 -# How to use it:
762 -# 1. List all the working slots (with min versions) in ||, newest first.
763 -# 2. Update the := to specify *max* version, e.g. < 7.
764 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
765 -LLVM_DEPSTR="
766 - || (
767 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
768 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
769 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
770 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
771 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
772 - )
773 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
774 -"
775 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
776 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
777 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
778 -RDEPEND="${RDEPEND}
779 - llvm? (
780 - opencl? (
781 - video_cards_r600? (
782 - ${CLANG_DEPSTR_AMDGPU}
783 - )
784 - !video_cards_r600? (
785 - video_cards_radeonsi? (
786 - ${CLANG_DEPSTR_AMDGPU}
787 - )
788 - )
789 - !video_cards_r600? (
790 - !video_cards_radeonsi? (
791 - video_cards_radeon? (
792 - ${CLANG_DEPSTR_AMDGPU}
793 - )
794 - )
795 - )
796 - !video_cards_r600? (
797 - !video_cards_radeon? (
798 - !video_cards_radeonsi? (
799 - ${CLANG_DEPSTR}
800 - )
801 - )
802 - )
803 - )
804 - !opencl? (
805 - video_cards_r600? (
806 - ${LLVM_DEPSTR_AMDGPU}
807 - )
808 - !video_cards_r600? (
809 - video_cards_radeonsi? (
810 - ${LLVM_DEPSTR_AMDGPU}
811 - )
812 - )
813 - !video_cards_r600? (
814 - !video_cards_radeonsi? (
815 - video_cards_radeon? (
816 - ${LLVM_DEPSTR_AMDGPU}
817 - )
818 - )
819 - )
820 - !video_cards_r600? (
821 - !video_cards_radeon? (
822 - !video_cards_radeonsi? (
823 - ${LLVM_DEPSTR}
824 - )
825 - )
826 - )
827 - )
828 - )
829 -"
830 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
831 -
832 -DEPEND="${RDEPEND}
833 - ${PYTHON_DEPS}
834 - opencl? (
835 - >=sys-devel/gcc-4.6
836 - )
837 - sys-devel/gettext
838 - virtual/pkgconfig
839 - valgrind? ( dev-util/valgrind )
840 - x11-base/xorg-proto
841 - vulkan? (
842 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
843 - )
844 -"
845 -[[ ${PV} == 9999 ]] && DEPEND+="
846 - sys-devel/bison
847 - sys-devel/flex
848 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
849 -"
850 -
851 -S="${WORKDIR}/${MY_P}"
852 -EGIT_CHECKOUT_DIR=${S}
853 -
854 -QA_WX_LOAD="
855 -x86? (
856 - !pic? (
857 - usr/lib*/libglapi.so.0.0.0
858 - usr/lib*/libGLESv1_CM.so.1.1.0
859 - usr/lib*/libGLESv2.so.2.0.0
860 - usr/lib*/libGL.so.1.2.0
861 - usr/lib*/libOSMesa.so.8.0.0
862 - )
863 -)"
864 -
865 -llvm_check_deps() {
866 - local flags=${MULTILIB_USEDEP}
867 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
868 - then
869 - flags+=",llvm_targets_AMDGPU(-)"
870 - fi
871 -
872 - if use opencl; then
873 - has_version "sys-devel/clang[${flags}]" || return 1
874 - fi
875 - has_version "sys-devel/llvm[${flags}]"
876 -}
877 -
878 -pkg_setup() {
879 - # warning message for bug 459306
880 - if use llvm && has_version sys-devel/llvm[!debug=]; then
881 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
882 - ewarn "detected! This can cause problems. For details, see bug 459306."
883 - fi
884 -
885 - if use llvm; then
886 - llvm_pkg_setup
887 - fi
888 - python-any-r1_pkg_setup
889 -}
890 -
891 -src_prepare() {
892 - eapply "${FILESDIR}"/${PN}-17-execinfo.patch
893 - eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
894 - eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
895 - eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
896 - eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
897 - eapply "${FILESDIR}"/${PN}-18-musl-amdgpu-include-pthread.patch
898 - eautoreconf
899 -
900 - eapply_user
901 -}
902 -
903 -multilib_src_configure() {
904 - local myconf
905 -
906 - if use classic; then
907 - # Configurable DRI drivers
908 - driver_enable swrast
909 -
910 - # Intel code
911 - driver_enable video_cards_i915 i915
912 - driver_enable video_cards_i965 i965
913 - if ! use video_cards_i915 && \
914 - ! use video_cards_i965; then
915 - driver_enable video_cards_intel i915 i965
916 - fi
917 -
918 - # Nouveau code
919 - driver_enable video_cards_nouveau nouveau
920 -
921 - # ATI code
922 - driver_enable video_cards_r100 radeon
923 - driver_enable video_cards_r200 r200
924 - if ! use video_cards_r100 && \
925 - ! use video_cards_r200; then
926 - driver_enable video_cards_radeon radeon r200
927 - fi
928 - fi
929 -
930 - if use egl; then
931 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
932 - fi
933 -
934 - if use gallium; then
935 - myconf+="
936 - $(use_enable d3d9 nine)
937 - $(use_enable llvm)
938 - $(use_enable openmax omx-bellagio)
939 - $(use_enable vaapi va)
940 - $(use_enable vdpau)
941 - $(use_enable xa)
942 - $(use_enable xvmc)
943 - "
944 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
945 -
946 - gallium_enable swrast
947 - gallium_enable video_cards_vc4 vc4
948 - gallium_enable video_cards_vivante etnaviv
949 - gallium_enable video_cards_vmware svga
950 - gallium_enable video_cards_nouveau nouveau
951 - gallium_enable video_cards_i915 i915
952 - gallium_enable video_cards_imx imx
953 - if ! use video_cards_i915 && \
954 - ! use video_cards_i965; then
955 - gallium_enable video_cards_intel i915
956 - fi
957 -
958 - gallium_enable video_cards_r300 r300
959 - gallium_enable video_cards_r600 r600
960 - gallium_enable video_cards_radeonsi radeonsi
961 - if ! use video_cards_r300 && \
962 - ! use video_cards_r600; then
963 - gallium_enable video_cards_radeon r300 r600
964 - fi
965 -
966 - gallium_enable video_cards_freedreno freedreno
967 - # opencl stuff
968 - if use opencl; then
969 - myconf+="
970 - $(use_enable opencl)
971 - --with-clang-libdir="${EPREFIX}/usr/lib"
972 - "
973 - fi
974 -
975 - gallium_enable video_cards_virgl virgl
976 - fi
977 -
978 - if use vulkan; then
979 - vulkan_enable video_cards_i965 intel
980 - vulkan_enable video_cards_radeonsi radeon
981 - fi
982 -
983 - # x86 hardened pax_kernel needs glx-rts, bug 240956
984 - if [[ ${ABI} == x86 ]]; then
985 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
986 - fi
987 -
988 - # on abi_x86_32 hardened we need to have asm disable
989 - if [[ ${ABI} == x86* ]] && use pic; then
990 - myconf+=" --disable-asm"
991 - fi
992 -
993 - if use gallium; then
994 - myconf+=" $(use_enable osmesa gallium-osmesa)"
995 - else
996 - myconf+=" $(use_enable osmesa)"
997 - fi
998 -
999 - # build fails with BSD indent, bug #428112
1000 - use userland_GNU || export INDENT=cat
1001 -
1002 - ECONF_SOURCE="${S}" \
1003 - econf \
1004 - --enable-dri \
1005 - --enable-glx \
1006 - --enable-shared-glapi \
1007 - $(use_enable !bindist texture-float) \
1008 - $(use_enable d3d9 nine) \
1009 - $(use_enable debug) \
1010 - $(use_enable dri3) \
1011 - $(use_enable egl) \
1012 - $(use_enable gbm) \
1013 - $(use_enable gles1) \
1014 - $(use_enable gles2) \
1015 - $(use_enable nptl glx-tls) \
1016 - $(use_enable unwind libunwind) \
1017 - --enable-valgrind=$(usex valgrind auto no) \
1018 - --enable-llvm-shared-libs \
1019 - --disable-opencl-icd \
1020 - --with-dri-drivers=${DRI_DRIVERS} \
1021 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
1022 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
1023 - PYTHON2="${PYTHON}" \
1024 - ${myconf}
1025 -}
1026 -
1027 -multilib_src_install() {
1028 - emake install DESTDIR="${D}"
1029 -
1030 - if use opencl; then
1031 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
1032 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
1033 - dodir ${cl_dir}/{lib,include}
1034 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
1035 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
1036 - "${ED}"${cl_dir}
1037 - fi
1038 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
1039 - mv -f "${ED}"/usr/include/CL \
1040 - "${ED}"${cl_dir}/include
1041 - fi
1042 - eend $?
1043 - fi
1044 -
1045 - if use openmax; then
1046 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
1047 - doenvd "${T}"/99mesaxdgomx
1048 - keepdir /usr/share/mesa/xdg
1049 - fi
1050 -}
1051 -
1052 -multilib_src_install_all() {
1053 - find "${ED}" -name '*.la' -delete
1054 - einstalldocs
1055 -
1056 - if use !bindist; then
1057 - dodoc docs/patents.txt
1058 - fi
1059 -}
1060 -
1061 -multilib_src_test() {
1062 - if use llvm; then
1063 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
1064 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
1065 - emake ${llvm_tests}
1066 - pax-mark m ${llvm_tests}
1067 - popd >/dev/null || die
1068 - fi
1069 - emake check
1070 -}
1071 -
1072 -pkg_postinst() {
1073 - # Switch to the xorg implementation.
1074 - echo
1075 - eselect opengl set --use-old ${OPENGL_DIR}
1076 -
1077 - # Switch to mesa opencl
1078 - if use opencl; then
1079 - eselect opencl set --use-old ${PN}
1080 - fi
1081 -
1082 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
1083 - if use openmax; then
1084 - ebegin "Registering OpenMAX drivers"
1085 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
1086 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
1087 - omxregister-bellagio
1088 - eend $?
1089 - fi
1090 -
1091 - # warn about patent encumbered texture-float
1092 - if use !bindist; then
1093 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
1094 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
1095 - elog "explanation."
1096 - fi
1097 -}
1098 -
1099 -pkg_prerm() {
1100 - if use openmax; then
1101 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
1102 - fi
1103 -}
1104 -
1105 -# $1 - VIDEO_CARDS flag
1106 -# other args - names of DRI drivers to enable
1107 -# TODO: avoid code duplication for a more elegant implementation
1108 -driver_enable() {
1109 - case $# in
1110 - # for enabling unconditionally
1111 - 1)
1112 - DRI_DRIVERS+=",$1"
1113 - ;;
1114 - *)
1115 - if use $1; then
1116 - shift
1117 - for i in $@; do
1118 - DRI_DRIVERS+=",${i}"
1119 - done
1120 - fi
1121 - ;;
1122 - esac
1123 -}
1124 -
1125 -gallium_enable() {
1126 - case $# in
1127 - # for enabling unconditionally
1128 - 1)
1129 - GALLIUM_DRIVERS+=",$1"
1130 - ;;
1131 - *)
1132 - if use $1; then
1133 - shift
1134 - for i in $@; do
1135 - GALLIUM_DRIVERS+=",${i}"
1136 - done
1137 - fi
1138 - ;;
1139 - esac
1140 -}
1141 -
1142 -vulkan_enable() {
1143 - case $# in
1144 - # for enabling unconditionally
1145 - 1)
1146 - VULKAN_DRIVERS+=",$1"
1147 - ;;
1148 - *)
1149 - if use $1; then
1150 - shift
1151 - for i in $@; do
1152 - VULKAN_DRIVERS+=",${i}"
1153 - done
1154 - fi
1155 - ;;
1156 - esac
1157 -}
1158
1159 diff --git a/media-libs/mesa/mesa-18.1.3.ebuild b/media-libs/mesa/mesa-18.1.3.ebuild
1160 deleted file mode 100644
1161 index 1a602e6..0000000
1162 --- a/media-libs/mesa/mesa-18.1.3.ebuild
1163 +++ /dev/null
1164 @@ -1,549 +0,0 @@
1165 -# Copyright 1999-2018 Gentoo Foundation
1166 -# Distributed under the terms of the GNU General Public License v2
1167 -
1168 -EAPI=6
1169 -
1170 -EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
1171 -
1172 -if [[ ${PV} = 9999 ]]; then
1173 - GIT_ECLASS="git-r3"
1174 - EXPERIMENTAL="true"
1175 -fi
1176 -
1177 -PYTHON_COMPAT=( python2_7 )
1178 -
1179 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
1180 -
1181 -OPENGL_DIR="xorg-x11"
1182 -
1183 -MY_P="${P/_/-}"
1184 -
1185 -DESCRIPTION="OpenGL-like graphic library for Linux"
1186 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1187 -
1188 -if [[ $PV == 9999 ]]; then
1189 - SRC_URI=""
1190 -else
1191 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1192 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
1193 -fi
1194 -
1195 -LICENSE="MIT"
1196 -SLOT="0"
1197 -RESTRICT="!bindist? ( bindist )"
1198 -
1199 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1200 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
1201 -for card in ${VIDEO_CARDS}; do
1202 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1203 -done
1204 -
1205 -IUSE="${IUSE_VIDEO_CARDS}
1206 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
1207 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
1208 - vdpau vulkan wayland xvmc xa"
1209 -
1210 -REQUIRED_USE="
1211 - d3d9? ( dri3 gallium )
1212 - llvm? ( gallium )
1213 - opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) )
1214 - openmax? ( gallium )
1215 - gles1? ( egl )
1216 - gles2? ( egl )
1217 - vaapi? ( gallium )
1218 - vdpau? ( gallium )
1219 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
1220 - video_cards_radeonsi? ( llvm ) )
1221 - wayland? ( egl gbm )
1222 - xa? ( gallium )
1223 - video_cards_freedreno? ( gallium )
1224 - video_cards_intel? ( classic )
1225 - video_cards_i915? ( || ( classic gallium ) )
1226 - video_cards_i965? ( classic )
1227 - video_cards_imx? ( gallium video_cards_vivante )
1228 - video_cards_nouveau? ( || ( classic gallium ) )
1229 - video_cards_radeon? ( || ( classic gallium )
1230 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1231 - video_cards_r100? ( classic )
1232 - video_cards_r200? ( classic )
1233 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1234 - video_cards_r600? ( gallium )
1235 - video_cards_radeonsi? ( gallium llvm )
1236 - video_cards_vc4? ( gallium )
1237 - video_cards_virgl? ( gallium )
1238 - video_cards_vivante? ( gallium gbm )
1239 - video_cards_vmware? ( gallium )
1240 -"
1241 -
1242 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
1243 -RDEPEND="
1244 - !app-eselect/eselect-mesa
1245 - >=app-eselect/eselect-opengl-1.3.0
1246 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1247 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1248 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1249 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1250 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1251 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1252 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1253 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
1254 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1255 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1256 - llvm? (
1257 - video_cards_radeonsi? (
1258 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1259 - )
1260 - video_cards_r600? (
1261 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1262 - )
1263 - video_cards_radeon? (
1264 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1265 - )
1266 - )
1267 - opencl? (
1268 - app-eselect/eselect-opencl
1269 - dev-libs/libclc
1270 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1271 - )
1272 - openmax? (
1273 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
1274 - x11-misc/xdg-utils
1275 - )
1276 - vaapi? (
1277 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1278 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
1279 - )
1280 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1281 - wayland? (
1282 - >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}]
1283 - >=dev-libs/wayland-protocols-1.8
1284 - )
1285 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1286 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1287 -
1288 - video_cards_intel? (
1289 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1290 - )
1291 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1292 -"
1293 -for card in ${RADEON_CARDS}; do
1294 - RDEPEND="${RDEPEND}
1295 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1296 - "
1297 -done
1298 -RDEPEND="${RDEPEND}
1299 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1300 -"
1301 -
1302 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1303 -# we need to *really* make sure we're not pulling one than more slot
1304 -# simultaneously.
1305 -#
1306 -# How to use it:
1307 -# 1. List all the working slots (with min versions) in ||, newest first.
1308 -# 2. Update the := to specify *max* version, e.g. < 7.
1309 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
1310 -LLVM_MAX_SLOT="6"
1311 -LLVM_DEPSTR="
1312 - || (
1313 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
1314 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
1315 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
1316 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
1317 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
1318 - )
1319 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
1320 -"
1321 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1322 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1323 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1324 -RDEPEND="${RDEPEND}
1325 - llvm? (
1326 - opencl? (
1327 - video_cards_r600? (
1328 - ${CLANG_DEPSTR_AMDGPU}
1329 - )
1330 - !video_cards_r600? (
1331 - video_cards_radeonsi? (
1332 - ${CLANG_DEPSTR_AMDGPU}
1333 - )
1334 - )
1335 - !video_cards_r600? (
1336 - !video_cards_radeonsi? (
1337 - video_cards_radeon? (
1338 - ${CLANG_DEPSTR_AMDGPU}
1339 - )
1340 - )
1341 - )
1342 - !video_cards_r600? (
1343 - !video_cards_radeon? (
1344 - !video_cards_radeonsi? (
1345 - ${CLANG_DEPSTR}
1346 - )
1347 - )
1348 - )
1349 - )
1350 - !opencl? (
1351 - video_cards_r600? (
1352 - ${LLVM_DEPSTR_AMDGPU}
1353 - )
1354 - !video_cards_r600? (
1355 - video_cards_radeonsi? (
1356 - ${LLVM_DEPSTR_AMDGPU}
1357 - )
1358 - )
1359 - !video_cards_r600? (
1360 - !video_cards_radeonsi? (
1361 - video_cards_radeon? (
1362 - ${LLVM_DEPSTR_AMDGPU}
1363 - )
1364 - )
1365 - )
1366 - !video_cards_r600? (
1367 - !video_cards_radeon? (
1368 - !video_cards_radeonsi? (
1369 - ${LLVM_DEPSTR}
1370 - )
1371 - )
1372 - )
1373 - )
1374 - )
1375 -"
1376 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1377 -
1378 -DEPEND="${RDEPEND}
1379 - ${PYTHON_DEPS}
1380 - opencl? (
1381 - >=sys-devel/gcc-4.6
1382 - )
1383 - sys-devel/gettext
1384 - virtual/pkgconfig
1385 - valgrind? ( dev-util/valgrind )
1386 - x11-base/xorg-proto
1387 - vulkan? (
1388 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
1389 - )
1390 -"
1391 -[[ ${PV} == 9999 ]] && DEPEND+="
1392 - sys-devel/bison
1393 - sys-devel/flex
1394 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
1395 -"
1396 -
1397 -S="${WORKDIR}/${MY_P}"
1398 -EGIT_CHECKOUT_DIR=${S}
1399 -
1400 -QA_WX_LOAD="
1401 -x86? (
1402 - !pic? (
1403 - usr/lib*/libglapi.so.0.0.0
1404 - usr/lib*/libGLESv1_CM.so.1.1.0
1405 - usr/lib*/libGLESv2.so.2.0.0
1406 - usr/lib*/libGL.so.1.2.0
1407 - usr/lib*/libOSMesa.so.8.0.0
1408 - )
1409 -)"
1410 -
1411 -llvm_check_deps() {
1412 - local flags=${MULTILIB_USEDEP}
1413 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1414 - then
1415 - flags+=",llvm_targets_AMDGPU(-)"
1416 - fi
1417 -
1418 - if use opencl; then
1419 - has_version "sys-devel/clang[${flags}]" || return 1
1420 - fi
1421 - has_version "sys-devel/llvm[${flags}]"
1422 -}
1423 -
1424 -pkg_setup() {
1425 - # warning message for bug 459306
1426 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1427 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1428 - ewarn "detected! This can cause problems. For details, see bug 459306."
1429 - fi
1430 -
1431 - if use llvm; then
1432 - llvm_pkg_setup
1433 - fi
1434 - python-any-r1_pkg_setup
1435 -}
1436 -
1437 -src_prepare() {
1438 - eapply "${FILESDIR}"/${PN}-17-execinfo.patch
1439 - eapply "${FILESDIR}"/${PN}-17-musl-string_h.patch
1440 - eapply "${FILESDIR}"/${PN}-17-musl-invocation_name.patch
1441 - eapply "${FILESDIR}"/${PN}-18-musl-pthread.patch
1442 - eapply "${FILESDIR}"/${PN}-18-intel-missing-time_t.patch
1443 - eapply "${FILESDIR}"/${PN}-18-missing-includes.patch
1444 -
1445 - eapply_user
1446 - [[ ${PV} == 9999 ]] && eautoreconf
1447 -
1448 - eautoreconf
1449 -}
1450 -
1451 -multilib_src_configure() {
1452 - local myconf
1453 -
1454 - if use classic; then
1455 - # Configurable DRI drivers
1456 - driver_enable swrast
1457 -
1458 - # Intel code
1459 - driver_enable video_cards_i915 i915
1460 - driver_enable video_cards_i965 i965
1461 - if ! use video_cards_i915 && \
1462 - ! use video_cards_i965; then
1463 - driver_enable video_cards_intel i915 i965
1464 - fi
1465 -
1466 - # Nouveau code
1467 - driver_enable video_cards_nouveau nouveau
1468 -
1469 - # ATI code
1470 - driver_enable video_cards_r100 radeon
1471 - driver_enable video_cards_r200 r200
1472 - if ! use video_cards_r100 && \
1473 - ! use video_cards_r200; then
1474 - driver_enable video_cards_radeon radeon r200
1475 - fi
1476 - fi
1477 -
1478 - if use egl; then
1479 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
1480 - fi
1481 -
1482 - if use gallium; then
1483 - myconf+="
1484 - $(use_enable d3d9 nine)
1485 - $(use_enable llvm)
1486 - $(use_enable openmax omx-bellagio)
1487 - $(use_enable vaapi va)
1488 - $(use_enable vdpau)
1489 - $(use_enable xa)
1490 - $(use_enable xvmc)
1491 - "
1492 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
1493 -
1494 - gallium_enable swrast
1495 - gallium_enable video_cards_vc4 vc4
1496 - gallium_enable video_cards_vivante etnaviv
1497 - gallium_enable video_cards_vmware svga
1498 - gallium_enable video_cards_nouveau nouveau
1499 - gallium_enable video_cards_i915 i915
1500 - gallium_enable video_cards_imx imx
1501 - if ! use video_cards_i915 && \
1502 - ! use video_cards_i965; then
1503 - gallium_enable video_cards_intel i915
1504 - fi
1505 -
1506 - gallium_enable video_cards_r300 r300
1507 - gallium_enable video_cards_r600 r600
1508 - gallium_enable video_cards_radeonsi radeonsi
1509 - if ! use video_cards_r300 && \
1510 - ! use video_cards_r600; then
1511 - gallium_enable video_cards_radeon r300 r600
1512 - fi
1513 -
1514 - gallium_enable video_cards_freedreno freedreno
1515 - # opencl stuff
1516 - if use opencl; then
1517 - myconf+="
1518 - $(use_enable opencl)
1519 - --with-clang-libdir="${EPREFIX}/usr/lib"
1520 - "
1521 - fi
1522 -
1523 - gallium_enable video_cards_virgl virgl
1524 - fi
1525 -
1526 - if use vulkan; then
1527 - vulkan_enable video_cards_i965 intel
1528 - vulkan_enable video_cards_radeonsi radeon
1529 - fi
1530 -
1531 - # x86 hardened pax_kernel needs glx-rts, bug 240956
1532 - if [[ ${ABI} == x86 ]]; then
1533 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
1534 - fi
1535 -
1536 - # on abi_x86_32 hardened we need to have asm disable
1537 - if [[ ${ABI} == x86* ]] && use pic; then
1538 - myconf+=" --disable-asm"
1539 - fi
1540 -
1541 - if use gallium; then
1542 - myconf+=" $(use_enable osmesa gallium-osmesa)"
1543 - else
1544 - myconf+=" $(use_enable osmesa)"
1545 - fi
1546 -
1547 - # build fails with BSD indent, bug #428112
1548 - use userland_GNU || export INDENT=cat
1549 -
1550 - ECONF_SOURCE="${S}" \
1551 - econf \
1552 - --enable-dri \
1553 - --enable-glx \
1554 - --enable-shared-glapi \
1555 - $(use_enable !bindist texture-float) \
1556 - $(use_enable d3d9 nine) \
1557 - $(use_enable debug) \
1558 - $(use_enable dri3) \
1559 - $(use_enable egl) \
1560 - $(use_enable gbm) \
1561 - $(use_enable gles1) \
1562 - $(use_enable gles2) \
1563 - $(use_enable nptl glx-tls) \
1564 - $(use_enable unwind libunwind) \
1565 - --enable-valgrind=$(usex valgrind auto no) \
1566 - --enable-llvm-shared-libs \
1567 - --disable-opencl-icd \
1568 - --with-dri-drivers=${DRI_DRIVERS} \
1569 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
1570 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
1571 - PYTHON2="${PYTHON}" \
1572 - ${myconf}
1573 -}
1574 -
1575 -multilib_src_install() {
1576 - emake install DESTDIR="${D}"
1577 -
1578 - if use wayland; then
1579 - # These files are now provided by >=dev-libs/wayland-1.15.0
1580 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
1581 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
1582 - rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
1583 - rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
1584 - fi
1585 -
1586 - if use opencl; then
1587 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
1588 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
1589 - dodir ${cl_dir}/{lib,include}
1590 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
1591 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
1592 - "${ED}"${cl_dir}
1593 - fi
1594 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
1595 - mv -f "${ED}"/usr/include/CL \
1596 - "${ED}"${cl_dir}/include
1597 - fi
1598 - eend $?
1599 - fi
1600 -
1601 - if use openmax; then
1602 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
1603 - doenvd "${T}"/99mesaxdgomx
1604 - keepdir /usr/share/mesa/xdg
1605 - fi
1606 -}
1607 -
1608 -multilib_src_install_all() {
1609 - find "${ED}" -name '*.la' -delete
1610 - einstalldocs
1611 -
1612 - if use !bindist; then
1613 - dodoc docs/patents.txt
1614 - fi
1615 -}
1616 -
1617 -multilib_src_test() {
1618 - if use llvm; then
1619 - local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
1620 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
1621 - emake ${llvm_tests}
1622 - pax-mark m ${llvm_tests}
1623 - popd >/dev/null || die
1624 - fi
1625 - emake check
1626 -}
1627 -
1628 -pkg_postinst() {
1629 - # Switch to the xorg implementation.
1630 - echo
1631 - eselect opengl set --use-old ${OPENGL_DIR}
1632 -
1633 - # Switch to mesa opencl
1634 - if use opencl; then
1635 - eselect opencl set --use-old ${PN}
1636 - fi
1637 -
1638 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
1639 - if use openmax; then
1640 - ebegin "Registering OpenMAX drivers"
1641 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
1642 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
1643 - omxregister-bellagio
1644 - eend $?
1645 - fi
1646 -
1647 - # warn about patent encumbered texture-float
1648 - if use !bindist; then
1649 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
1650 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
1651 - elog "explanation."
1652 - fi
1653 -}
1654 -
1655 -pkg_prerm() {
1656 - if use openmax; then
1657 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
1658 - fi
1659 -}
1660 -
1661 -# $1 - VIDEO_CARDS flag
1662 -# other args - names of DRI drivers to enable
1663 -# TODO: avoid code duplication for a more elegant implementation
1664 -driver_enable() {
1665 - case $# in
1666 - # for enabling unconditionally
1667 - 1)
1668 - DRI_DRIVERS+=",$1"
1669 - ;;
1670 - *)
1671 - if use $1; then
1672 - shift
1673 - for i in $@; do
1674 - DRI_DRIVERS+=",${i}"
1675 - done
1676 - fi
1677 - ;;
1678 - esac
1679 -}
1680 -
1681 -gallium_enable() {
1682 - case $# in
1683 - # for enabling unconditionally
1684 - 1)
1685 - GALLIUM_DRIVERS+=",$1"
1686 - ;;
1687 - *)
1688 - if use $1; then
1689 - shift
1690 - for i in $@; do
1691 - GALLIUM_DRIVERS+=",${i}"
1692 - done
1693 - fi
1694 - ;;
1695 - esac
1696 -}
1697 -
1698 -vulkan_enable() {
1699 - case $# in
1700 - # for enabling unconditionally
1701 - 1)
1702 - VULKAN_DRIVERS+=",$1"
1703 - ;;
1704 - *)
1705 - if use $1; then
1706 - shift
1707 - for i in $@; do
1708 - VULKAN_DRIVERS+=",${i}"
1709 - done
1710 - fi
1711 - ;;
1712 - esac
1713 -}