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