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