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: Mon, 19 Feb 2018 22:28:25
Message-Id: 1519079293.2b82c351737e9a1277308bb2743330022e6202d3.mattst88@gentoo
1 commit: 2b82c351737e9a1277308bb2743330022e6202d3
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 19 22:27:52 2018 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 19 22:28:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b82c351
7
8 media-libs/mesa: Drop old versions
9
10 media-libs/mesa/Manifest | 2 -
11 media-libs/mesa/mesa-17.3.3.ebuild | 580 -------------------------------------
12 media-libs/mesa/mesa-17.3.4.ebuild | 580 -------------------------------------
13 3 files changed, 1162 deletions(-)
14
15 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
16 index 684d4faf494..9b46f2a1312 100644
17 --- a/media-libs/mesa/Manifest
18 +++ b/media-libs/mesa/Manifest
19 @@ -1,6 +1,4 @@
20 DIST mesa-17.1.10.tar.xz 9872168 BLAKE2B 205ece7b016fcc1de5bb72711775cd8f4b90f5d6c26db77d1576752fcd4a99a36cbcd902bb6ad1041d476d1c3b32479baceb4087c902ce598ede3d57851c6b9d SHA512 728dbd41f5d3a7a1c33fc18c08a8b8eb1f6d236c5f00781209f46b144dd66a27ecd723ab1635868b7ad77de3a18ad53f1a88c932f17c0be97605a2775e3b3a9b
21 DIST mesa-17.2.8.tar.xz 10393304 BLAKE2B 558321eefc6d599aaedfe468f03c2f1f99b5c96c253637db00b7da3265ec38e031d15f77623db1f4408f15912c93347e0f5769b01d92329be7f55e45f6f6bf75 SHA512 ce05ad2d3e1b55ffe9c8ef65023a840c04b29014c7876b23182a6a6dd0b768f248ec21bc5b738d21b846f59f4b73501a9fe834d6a87e7dba16c6f821008e0f01
22 -DIST mesa-17.3.3.tar.xz 10637708 BLAKE2B a2cec4abc58eb71c1ec92d073ac3a128e1f993f69b163c9f6e474fef4520fe074d84ca8d972a7822a76226e132230f6e7fac320b940ea3462553d398ef6bcfce SHA512 7ac8ecdcf3b2b43239835bc2c5da7f2730f80a2db945fe00df03d1548920fbc074dd4806ddd345a1ce682fd29d75b2209ef81b6b06e657f9c8ae8622a34a03c1
23 -DIST mesa-17.3.4.tar.xz 10722704 BLAKE2B 991b9a629c30dfbfcb0ee6b7fe2e1bade7ff6fad61cb7d0f8b862c864e8b2dbbe8ae6157ea31113969dabc39bce1774d887f0d29b86464a854ccb85c6291a170 SHA512 8a077aa89b9d314188e62a215abe8e0db890afbbdd9c1ba9d214735d5304956b55723132f19e8a4ac3e3f404eca1dd9b5fbc936de9ac63d91562c0bc62708fe3
24 DIST mesa-17.3.5.tar.xz 10724492 BLAKE2B f4a8595997f3a4f3377c2880d9cf923941527fb497d95cca9d6440600a2817b8685972aa91458e0e1d0d2a6602f781252ca3ccd778032bc865e03fbd32e12f2c SHA512 39ada2480aa12c42bbff6a1b5c957f99934193d19eb5f44e102ef8302d26f777cee63af1140aa8623bbc1ebd6d69e172cecca798780b8eb594f2ebbb217afd29
25 DIST mesa-18.0.0-rc4.tar.xz 11027596 BLAKE2B 96554acd69636b91d1b79e7fefa4ba6e3f701ef7ef6c16718493070d62ab41c7bbd66e2f4d4a97fac8c236ac4c9150b2ce41e4e57b865fff6122b3f60b047e25 SHA512 91dd0a4396715a7896fc47aabf38c4b486df3b50c9764795805550ef01724d2e2281ba9b000e82760ea0e199c58d8c9943dbc732b2adab46554ff5c2f9e2ece1
26
27 diff --git a/media-libs/mesa/mesa-17.3.3.ebuild b/media-libs/mesa/mesa-17.3.3.ebuild
28 deleted file mode 100644
29 index bf3fa77a49c..00000000000
30 --- a/media-libs/mesa/mesa-17.3.3.ebuild
31 +++ /dev/null
32 @@ -1,580 +0,0 @@
33 -# Copyright 1999-2018 Gentoo Foundation
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI=6
37 -
38 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
39 -
40 -if [[ ${PV} = 9999 ]]; then
41 - GIT_ECLASS="git-r3"
42 - EXPERIMENTAL="true"
43 -fi
44 -
45 -PYTHON_COMPAT=( python2_7 )
46 -
47 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
48 -
49 -OPENGL_DIR="xorg-x11"
50 -
51 -MY_P="${P/_/-}"
52 -
53 -DESCRIPTION="OpenGL-like graphic library for Linux"
54 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
55 -
56 -if [[ $PV == 9999 ]]; then
57 - SRC_URI=""
58 -else
59 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
60 - 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"
61 -fi
62 -
63 -LICENSE="MIT"
64 -SLOT="0"
65 -RESTRICT="!bindist? ( bindist )"
66 -
67 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
68 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
69 -for card in ${VIDEO_CARDS}; do
70 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
71 -done
72 -
73 -IUSE="${IUSE_VIDEO_CARDS}
74 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
75 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
76 - vdpau vulkan wayland xvmc xa"
77 -
78 -REQUIRED_USE="
79 - d3d9? ( dri3 gallium )
80 - llvm? ( gallium )
81 - opencl? ( gallium llvm )
82 - openmax? ( gallium )
83 - gles1? ( egl )
84 - gles2? ( egl )
85 - vaapi? ( gallium )
86 - vdpau? ( gallium )
87 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
88 - video_cards_radeonsi? ( llvm ) )
89 - wayland? ( egl gbm )
90 - xa? ( gallium )
91 - video_cards_freedreno? ( gallium )
92 - video_cards_intel? ( classic )
93 - video_cards_i915? ( || ( classic gallium ) )
94 - video_cards_i965? ( classic )
95 - video_cards_imx? ( gallium video_cards_vivante )
96 - video_cards_nouveau? ( || ( classic gallium ) )
97 - video_cards_radeon? ( || ( classic gallium )
98 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
99 - video_cards_r100? ( classic )
100 - video_cards_r200? ( classic )
101 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
102 - video_cards_r600? ( gallium )
103 - video_cards_radeonsi? ( gallium llvm )
104 - video_cards_vc4? ( gallium )
105 - video_cards_virgl? ( gallium )
106 - video_cards_vivante? ( gallium gbm )
107 - video_cards_vmware? ( gallium )
108 -"
109 -
110 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.85"
111 -# keep correct libdrm and dri2proto dep
112 -# keep blocks in rdepend for binpkg
113 -RDEPEND="
114 - !<x11-base/xorg-server-1.7
115 - !<=x11-proto/xf86driproto-2.0.3
116 - abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
117 - classic? ( app-eselect/eselect-mesa )
118 - gallium? ( app-eselect/eselect-mesa )
119 - >=app-eselect/eselect-opengl-1.3.0
120 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
121 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
122 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
123 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
124 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
125 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
126 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
127 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
128 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
129 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
130 - llvm? (
131 - video_cards_radeonsi? (
132 - virtual/libelf:0=[${MULTILIB_USEDEP}]
133 - )
134 - video_cards_r600? (
135 - virtual/libelf:0=[${MULTILIB_USEDEP}]
136 - )
137 - video_cards_radeon? (
138 - virtual/libelf:0=[${MULTILIB_USEDEP}]
139 - )
140 - )
141 - opencl? (
142 - app-eselect/eselect-opencl
143 - dev-libs/libclc
144 - virtual/libelf:0=[${MULTILIB_USEDEP}]
145 - )
146 - openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
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_MAX_SLOT="5"
182 -LLVM_DEPSTR="
183 - || (
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-6:=[${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-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
256 - dri3? (
257 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
258 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
259 - )
260 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
261 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
262 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
263 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
264 - vulkan? (
265 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
266 - )
267 -"
268 -[[ ${PV} == 9999 ]] && DEPEND+="
269 - sys-devel/bison
270 - sys-devel/flex
271 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
272 -"
273 -
274 -S="${WORKDIR}/${MY_P}"
275 -EGIT_CHECKOUT_DIR=${S}
276 -
277 -QA_WX_LOAD="
278 -x86? (
279 - !pic? (
280 - usr/lib*/libglapi.so.0.0.0
281 - usr/lib*/libGLESv1_CM.so.1.1.0
282 - usr/lib*/libGLESv2.so.2.0.0
283 - usr/lib*/libGL.so.1.2.0
284 - usr/lib*/libOSMesa.so.8.0.0
285 - )
286 -)"
287 -
288 -llvm_check_deps() {
289 - local flags=${MULTILIB_USEDEP}
290 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
291 - then
292 - flags+=",llvm_targets_AMDGPU(-)"
293 - fi
294 -
295 - if use opencl; then
296 - has_version "sys-devel/clang[${flags}]" || return 1
297 - fi
298 - has_version "sys-devel/llvm[${flags}]"
299 -}
300 -
301 -pkg_setup() {
302 - # warning message for bug 459306
303 - if use llvm && has_version sys-devel/llvm[!debug=]; then
304 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
305 - ewarn "detected! This can cause problems. For details, see bug 459306."
306 - fi
307 -
308 - if use llvm; then
309 - llvm_pkg_setup
310 - fi
311 - python-any-r1_pkg_setup
312 -}
313 -
314 -src_prepare() {
315 - [[ ${PV} == 9999 ]] && eautoreconf
316 - eapply_user
317 -}
318 -
319 -multilib_src_configure() {
320 - local myconf
321 -
322 - if use classic; then
323 - # Configurable DRI drivers
324 - driver_enable swrast
325 -
326 - # Intel code
327 - driver_enable video_cards_i915 i915
328 - driver_enable video_cards_i965 i965
329 - if ! use video_cards_i915 && \
330 - ! use video_cards_i965; then
331 - driver_enable video_cards_intel i915 i965
332 - fi
333 -
334 - # Nouveau code
335 - driver_enable video_cards_nouveau nouveau
336 -
337 - # ATI code
338 - driver_enable video_cards_r100 radeon
339 - driver_enable video_cards_r200 r200
340 - if ! use video_cards_r100 && \
341 - ! use video_cards_r200; then
342 - driver_enable video_cards_radeon radeon r200
343 - fi
344 - fi
345 -
346 - if use egl; then
347 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
348 - fi
349 -
350 - if use gallium; then
351 - myconf+="
352 - $(use_enable d3d9 nine)
353 - $(use_enable llvm)
354 - $(use_enable openmax omx-bellagio)
355 - $(use_enable vaapi va)
356 - $(use_enable vdpau)
357 - $(use_enable xa)
358 - $(use_enable xvmc)
359 - "
360 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
361 -
362 - gallium_enable swrast
363 - gallium_enable video_cards_vc4 vc4
364 - gallium_enable video_cards_vivante etnaviv
365 - gallium_enable video_cards_vmware svga
366 - gallium_enable video_cards_nouveau nouveau
367 - gallium_enable video_cards_i915 i915
368 - gallium_enable video_cards_imx imx
369 - if ! use video_cards_i915 && \
370 - ! use video_cards_i965; then
371 - gallium_enable video_cards_intel i915
372 - fi
373 -
374 - gallium_enable video_cards_r300 r300
375 - gallium_enable video_cards_r600 r600
376 - gallium_enable video_cards_radeonsi radeonsi
377 - if ! use video_cards_r300 && \
378 - ! use video_cards_r600; then
379 - gallium_enable video_cards_radeon r300 r600
380 - fi
381 -
382 - gallium_enable video_cards_freedreno freedreno
383 - # opencl stuff
384 - if use opencl; then
385 - myconf+="
386 - $(use_enable opencl)
387 - --with-clang-libdir="${EPREFIX}/usr/lib"
388 - "
389 - fi
390 -
391 - gallium_enable video_cards_virgl virgl
392 - fi
393 -
394 - if use vulkan; then
395 - vulkan_enable video_cards_i965 intel
396 - vulkan_enable video_cards_radeonsi radeon
397 - fi
398 -
399 - # x86 hardened pax_kernel needs glx-rts, bug 240956
400 - if [[ ${ABI} == x86 ]]; then
401 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
402 - fi
403 -
404 - # on abi_x86_32 hardened we need to have asm disable
405 - if [[ ${ABI} == x86* ]] && use pic; then
406 - myconf+=" --disable-asm"
407 - fi
408 -
409 - if use gallium; then
410 - myconf+=" $(use_enable osmesa gallium-osmesa)"
411 - else
412 - myconf+=" $(use_enable osmesa)"
413 - fi
414 -
415 - # build fails with BSD indent, bug #428112
416 - use userland_GNU || export INDENT=cat
417 -
418 - ECONF_SOURCE="${S}" \
419 - econf \
420 - --enable-dri \
421 - --enable-glx \
422 - --enable-shared-glapi \
423 - $(use_enable !bindist texture-float) \
424 - $(use_enable d3d9 nine) \
425 - $(use_enable debug) \
426 - $(use_enable dri3) \
427 - $(use_enable egl) \
428 - $(use_enable gbm) \
429 - $(use_enable gles1) \
430 - $(use_enable gles2) \
431 - $(use_enable nptl glx-tls) \
432 - $(use_enable unwind libunwind) \
433 - --enable-valgrind=$(usex valgrind auto no) \
434 - --enable-llvm-shared-libs \
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-17.3.4.ebuild b/media-libs/mesa/mesa-17.3.4.ebuild
615 deleted file mode 100644
616 index bf3fa77a49c..00000000000
617 --- a/media-libs/mesa/mesa-17.3.4.ebuild
618 +++ /dev/null
619 @@ -1,580 +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="~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"
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.85"
698 -# keep correct libdrm and dri2proto dep
699 -# keep blocks in rdepend for binpkg
700 -RDEPEND="
701 - !<x11-base/xorg-server-1.7
702 - !<=x11-proto/xf86driproto-2.0.3
703 - abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
704 - classic? ( app-eselect/eselect-mesa )
705 - gallium? ( app-eselect/eselect-mesa )
706 - >=app-eselect/eselect-opengl-1.3.0
707 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
708 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
709 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
710 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
711 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
712 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
713 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
714 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
715 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
716 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
717 - llvm? (
718 - video_cards_radeonsi? (
719 - virtual/libelf:0=[${MULTILIB_USEDEP}]
720 - )
721 - video_cards_r600? (
722 - virtual/libelf:0=[${MULTILIB_USEDEP}]
723 - )
724 - video_cards_radeon? (
725 - virtual/libelf:0=[${MULTILIB_USEDEP}]
726 - )
727 - )
728 - opencl? (
729 - app-eselect/eselect-opencl
730 - dev-libs/libclc
731 - virtual/libelf:0=[${MULTILIB_USEDEP}]
732 - )
733 - openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
734 - vaapi? (
735 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
736 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
737 - )
738 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
739 - wayland? (
740 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
741 - >=dev-libs/wayland-protocols-1.8
742 - )
743 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
744 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
745 -
746 - video_cards_intel? (
747 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
748 - )
749 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
750 -"
751 -for card in ${RADEON_CARDS}; do
752 - RDEPEND="${RDEPEND}
753 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
754 - "
755 -done
756 -RDEPEND="${RDEPEND}
757 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
758 -"
759 -
760 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
761 -# we need to *really* make sure we're not pulling one than more slot
762 -# simultaneously.
763 -#
764 -# How to use it:
765 -# 1. List all the working slots (with min versions) in ||, newest first.
766 -# 2. Update the := to specify *max* version, e.g. < 7.
767 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
768 -LLVM_MAX_SLOT="5"
769 -LLVM_DEPSTR="
770 - || (
771 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
772 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
773 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
774 - )
775 - <sys-devel/llvm-6:=[${MULTILIB_USEDEP}]
776 -"
777 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
778 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
779 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
780 -RDEPEND="${RDEPEND}
781 - llvm? (
782 - opencl? (
783 - video_cards_r600? (
784 - ${CLANG_DEPSTR_AMDGPU}
785 - )
786 - !video_cards_r600? (
787 - video_cards_radeonsi? (
788 - ${CLANG_DEPSTR_AMDGPU}
789 - )
790 - )
791 - !video_cards_r600? (
792 - !video_cards_radeonsi? (
793 - video_cards_radeon? (
794 - ${CLANG_DEPSTR_AMDGPU}
795 - )
796 - )
797 - )
798 - !video_cards_r600? (
799 - !video_cards_radeon? (
800 - !video_cards_radeonsi? (
801 - ${CLANG_DEPSTR}
802 - )
803 - )
804 - )
805 - )
806 - !opencl? (
807 - video_cards_r600? (
808 - ${LLVM_DEPSTR_AMDGPU}
809 - )
810 - !video_cards_r600? (
811 - video_cards_radeonsi? (
812 - ${LLVM_DEPSTR_AMDGPU}
813 - )
814 - )
815 - !video_cards_r600? (
816 - !video_cards_radeonsi? (
817 - video_cards_radeon? (
818 - ${LLVM_DEPSTR_AMDGPU}
819 - )
820 - )
821 - )
822 - !video_cards_r600? (
823 - !video_cards_radeon? (
824 - !video_cards_radeonsi? (
825 - ${LLVM_DEPSTR}
826 - )
827 - )
828 - )
829 - )
830 - )
831 -"
832 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
833 -
834 -DEPEND="${RDEPEND}
835 - ${PYTHON_DEPS}
836 - opencl? (
837 - >=sys-devel/gcc-4.6
838 - )
839 - sys-devel/gettext
840 - virtual/pkgconfig
841 - valgrind? ( dev-util/valgrind )
842 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
843 - dri3? (
844 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
845 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
846 - )
847 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
848 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
849 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
850 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
851 - vulkan? (
852 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
853 - )
854 -"
855 -[[ ${PV} == 9999 ]] && DEPEND+="
856 - sys-devel/bison
857 - sys-devel/flex
858 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
859 -"
860 -
861 -S="${WORKDIR}/${MY_P}"
862 -EGIT_CHECKOUT_DIR=${S}
863 -
864 -QA_WX_LOAD="
865 -x86? (
866 - !pic? (
867 - usr/lib*/libglapi.so.0.0.0
868 - usr/lib*/libGLESv1_CM.so.1.1.0
869 - usr/lib*/libGLESv2.so.2.0.0
870 - usr/lib*/libGL.so.1.2.0
871 - usr/lib*/libOSMesa.so.8.0.0
872 - )
873 -)"
874 -
875 -llvm_check_deps() {
876 - local flags=${MULTILIB_USEDEP}
877 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
878 - then
879 - flags+=",llvm_targets_AMDGPU(-)"
880 - fi
881 -
882 - if use opencl; then
883 - has_version "sys-devel/clang[${flags}]" || return 1
884 - fi
885 - has_version "sys-devel/llvm[${flags}]"
886 -}
887 -
888 -pkg_setup() {
889 - # warning message for bug 459306
890 - if use llvm && has_version sys-devel/llvm[!debug=]; then
891 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
892 - ewarn "detected! This can cause problems. For details, see bug 459306."
893 - fi
894 -
895 - if use llvm; then
896 - llvm_pkg_setup
897 - fi
898 - python-any-r1_pkg_setup
899 -}
900 -
901 -src_prepare() {
902 - [[ ${PV} == 9999 ]] && eautoreconf
903 - eapply_user
904 -}
905 -
906 -multilib_src_configure() {
907 - local myconf
908 -
909 - if use classic; then
910 - # Configurable DRI drivers
911 - driver_enable swrast
912 -
913 - # Intel code
914 - driver_enable video_cards_i915 i915
915 - driver_enable video_cards_i965 i965
916 - if ! use video_cards_i915 && \
917 - ! use video_cards_i965; then
918 - driver_enable video_cards_intel i915 i965
919 - fi
920 -
921 - # Nouveau code
922 - driver_enable video_cards_nouveau nouveau
923 -
924 - # ATI code
925 - driver_enable video_cards_r100 radeon
926 - driver_enable video_cards_r200 r200
927 - if ! use video_cards_r100 && \
928 - ! use video_cards_r200; then
929 - driver_enable video_cards_radeon radeon r200
930 - fi
931 - fi
932 -
933 - if use egl; then
934 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
935 - fi
936 -
937 - if use gallium; then
938 - myconf+="
939 - $(use_enable d3d9 nine)
940 - $(use_enable llvm)
941 - $(use_enable openmax omx-bellagio)
942 - $(use_enable vaapi va)
943 - $(use_enable vdpau)
944 - $(use_enable xa)
945 - $(use_enable xvmc)
946 - "
947 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
948 -
949 - gallium_enable swrast
950 - gallium_enable video_cards_vc4 vc4
951 - gallium_enable video_cards_vivante etnaviv
952 - gallium_enable video_cards_vmware svga
953 - gallium_enable video_cards_nouveau nouveau
954 - gallium_enable video_cards_i915 i915
955 - gallium_enable video_cards_imx imx
956 - if ! use video_cards_i915 && \
957 - ! use video_cards_i965; then
958 - gallium_enable video_cards_intel i915
959 - fi
960 -
961 - gallium_enable video_cards_r300 r300
962 - gallium_enable video_cards_r600 r600
963 - gallium_enable video_cards_radeonsi radeonsi
964 - if ! use video_cards_r300 && \
965 - ! use video_cards_r600; then
966 - gallium_enable video_cards_radeon r300 r600
967 - fi
968 -
969 - gallium_enable video_cards_freedreno freedreno
970 - # opencl stuff
971 - if use opencl; then
972 - myconf+="
973 - $(use_enable opencl)
974 - --with-clang-libdir="${EPREFIX}/usr/lib"
975 - "
976 - fi
977 -
978 - gallium_enable video_cards_virgl virgl
979 - fi
980 -
981 - if use vulkan; then
982 - vulkan_enable video_cards_i965 intel
983 - vulkan_enable video_cards_radeonsi radeon
984 - fi
985 -
986 - # x86 hardened pax_kernel needs glx-rts, bug 240956
987 - if [[ ${ABI} == x86 ]]; then
988 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
989 - fi
990 -
991 - # on abi_x86_32 hardened we need to have asm disable
992 - if [[ ${ABI} == x86* ]] && use pic; then
993 - myconf+=" --disable-asm"
994 - fi
995 -
996 - if use gallium; then
997 - myconf+=" $(use_enable osmesa gallium-osmesa)"
998 - else
999 - myconf+=" $(use_enable osmesa)"
1000 - fi
1001 -
1002 - # build fails with BSD indent, bug #428112
1003 - use userland_GNU || export INDENT=cat
1004 -
1005 - ECONF_SOURCE="${S}" \
1006 - econf \
1007 - --enable-dri \
1008 - --enable-glx \
1009 - --enable-shared-glapi \
1010 - $(use_enable !bindist texture-float) \
1011 - $(use_enable d3d9 nine) \
1012 - $(use_enable debug) \
1013 - $(use_enable dri3) \
1014 - $(use_enable egl) \
1015 - $(use_enable gbm) \
1016 - $(use_enable gles1) \
1017 - $(use_enable gles2) \
1018 - $(use_enable nptl glx-tls) \
1019 - $(use_enable unwind libunwind) \
1020 - --enable-valgrind=$(usex valgrind auto no) \
1021 - --enable-llvm-shared-libs \
1022 - --with-dri-drivers=${DRI_DRIVERS} \
1023 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
1024 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
1025 - PYTHON2="${PYTHON}" \
1026 - ${myconf}
1027 -}
1028 -
1029 -multilib_src_install() {
1030 - emake install DESTDIR="${D}"
1031 -
1032 - if use classic || use gallium; then
1033 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
1034 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
1035 - keepdir /usr/$(get_libdir)/dri
1036 - dodir /usr/$(get_libdir)/mesa
1037 - for x in ${gallium_drivers[@]}; do
1038 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
1039 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
1040 - || die "Failed to move ${x}"
1041 - fi
1042 - done
1043 - if use classic; then
1044 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
1045 - fi
1046 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
1047 - if [ -f ${x} -o -L ${x} ]; then
1048 - mv -f "${x}" "${x/dri/mesa}" \
1049 - || die "Failed to move ${x}"
1050 - fi
1051 - done
1052 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
1053 - ln -s ../mesa/*.so . || die "Creating symlink failed"
1054 - # remove symlinks to drivers known to eselect
1055 - for x in ${gallium_drivers[@]}; do
1056 - if [ -f ${x} -o -L ${x} ]; then
1057 - rm "${x}" || die "Failed to remove ${x}"
1058 - fi
1059 - done
1060 - popd
1061 - eend $?
1062 - fi
1063 - if use opencl; then
1064 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
1065 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
1066 - dodir ${cl_dir}/{lib,include}
1067 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
1068 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
1069 - "${ED}"${cl_dir}
1070 - fi
1071 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
1072 - mv -f "${ED}"/usr/include/CL \
1073 - "${ED}"${cl_dir}/include
1074 - fi
1075 - eend $?
1076 - fi
1077 -
1078 - if use openmax; then
1079 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
1080 - doenvd "${T}"/99mesaxdgomx
1081 - keepdir /usr/share/mesa/xdg
1082 - fi
1083 -}
1084 -
1085 -multilib_src_install_all() {
1086 - find "${ED}" -name '*.la' -delete
1087 - einstalldocs
1088 -
1089 - if use !bindist; then
1090 - dodoc docs/patents.txt
1091 - fi
1092 -
1093 - # Install config file for eselect mesa
1094 - insinto /usr/share/mesa
1095 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
1096 -}
1097 -
1098 -multilib_src_test() {
1099 - if use llvm; then
1100 - 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'
1101 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
1102 - emake ${llvm_tests}
1103 - pax-mark m ${llvm_tests}
1104 - popd >/dev/null || die
1105 - fi
1106 - emake check
1107 -}
1108 -
1109 -pkg_postinst() {
1110 - # Switch to the xorg implementation.
1111 - echo
1112 - eselect opengl set --use-old ${OPENGL_DIR}
1113 -
1114 - # Select classic/gallium drivers
1115 - if use classic || use gallium; then
1116 - eselect mesa set --auto
1117 - fi
1118 -
1119 - # Switch to mesa opencl
1120 - if use opencl; then
1121 - eselect opencl set --use-old ${PN}
1122 - fi
1123 -
1124 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
1125 - if use openmax; then
1126 - ebegin "Registering OpenMAX drivers"
1127 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
1128 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
1129 - omxregister-bellagio
1130 - eend $?
1131 - fi
1132 -
1133 - # warn about patent encumbered texture-float
1134 - if use !bindist; then
1135 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
1136 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
1137 - elog "explanation."
1138 - fi
1139 -}
1140 -
1141 -pkg_prerm() {
1142 - if use openmax; then
1143 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
1144 - fi
1145 -}
1146 -
1147 -# $1 - VIDEO_CARDS flag
1148 -# other args - names of DRI drivers to enable
1149 -# TODO: avoid code duplication for a more elegant implementation
1150 -driver_enable() {
1151 - case $# in
1152 - # for enabling unconditionally
1153 - 1)
1154 - DRI_DRIVERS+=",$1"
1155 - ;;
1156 - *)
1157 - if use $1; then
1158 - shift
1159 - for i in $@; do
1160 - DRI_DRIVERS+=",${i}"
1161 - done
1162 - fi
1163 - ;;
1164 - esac
1165 -}
1166 -
1167 -gallium_enable() {
1168 - case $# in
1169 - # for enabling unconditionally
1170 - 1)
1171 - GALLIUM_DRIVERS+=",$1"
1172 - ;;
1173 - *)
1174 - if use $1; then
1175 - shift
1176 - for i in $@; do
1177 - GALLIUM_DRIVERS+=",${i}"
1178 - done
1179 - fi
1180 - ;;
1181 - esac
1182 -}
1183 -
1184 -vulkan_enable() {
1185 - case $# in
1186 - # for enabling unconditionally
1187 - 1)
1188 - VULKAN_DRIVERS+=",$1"
1189 - ;;
1190 - *)
1191 - if use $1; then
1192 - shift
1193 - for i in $@; do
1194 - VULKAN_DRIVERS+=",${i}"
1195 - done
1196 - fi
1197 - ;;
1198 - esac
1199 -}