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, 30 Apr 2018 18:54:20
Message-Id: 1525114433.84cb13e54f0eb737db417d599ce74ca58ffeb6b0.mattst88@gentoo
1 commit: 84cb13e54f0eb737db417d599ce74ca58ffeb6b0
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 30 18:53:30 2018 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 30 18:53:53 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84cb13e5
7
8 media-libs/mesa: Drop old versions
9
10 media-libs/mesa/Manifest | 6 -
11 media-libs/mesa/mesa-17.1.10.ebuild | 505 ----------------------------
12 media-libs/mesa/mesa-17.2.8.ebuild | 584 ---------------------------------
13 media-libs/mesa/mesa-17.3.8.ebuild | 582 --------------------------------
14 media-libs/mesa/mesa-18.0.0.ebuild | 583 --------------------------------
15 media-libs/mesa/mesa-18.0.1.ebuild | 583 --------------------------------
16 media-libs/mesa/mesa-18.1.0_rc1.ebuild | 584 ---------------------------------
17 7 files changed, 3427 deletions(-)
18
19 diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest
20 index d8673e6d07b..d72581e4f46 100644
21 --- a/media-libs/mesa/Manifest
22 +++ b/media-libs/mesa/Manifest
23 @@ -1,9 +1,3 @@
24 -DIST mesa-17.1.10.tar.xz 9872168 BLAKE2B 205ece7b016fcc1de5bb72711775cd8f4b90f5d6c26db77d1576752fcd4a99a36cbcd902bb6ad1041d476d1c3b32479baceb4087c902ce598ede3d57851c6b9d SHA512 728dbd41f5d3a7a1c33fc18c08a8b8eb1f6d236c5f00781209f46b144dd66a27ecd723ab1635868b7ad77de3a18ad53f1a88c932f17c0be97605a2775e3b3a9b
25 -DIST mesa-17.2.8.tar.xz 10393304 BLAKE2B 558321eefc6d599aaedfe468f03c2f1f99b5c96c253637db00b7da3265ec38e031d15f77623db1f4408f15912c93347e0f5769b01d92329be7f55e45f6f6bf75 SHA512 ce05ad2d3e1b55ffe9c8ef65023a840c04b29014c7876b23182a6a6dd0b768f248ec21bc5b738d21b846f59f4b73501a9fe834d6a87e7dba16c6f821008e0f01
26 -DIST mesa-17.3.8.tar.xz 10660896 BLAKE2B 432deefad4b0a42914efc24c558d5c766443f55ff8324317980a4f91a5e560207c3c142d9547868c6cd480ad751c2b11a76da06dea891a044016868b3dcdaaa2 SHA512 4a63b760d5c64425e2d4dddf6ab8167c1845020f173bd56ec1d2e483e3bf2afb9ca483fcf329d37cc0bce82ab5134ee43ea82a2e3a4ee9463de16a9f75bc6e16
27 DIST mesa-17.3.9.tar.xz 10660456 BLAKE2B 54f4a75f9040e50e9eea8f5c52a276578379d25d2a01ac4767ab12bee85fe5dae1492d5bb1df06b6e8c6b0fe960bbd5ea38691c75d08a6b4302c64377ce58e54 SHA512 83deffbc6b9823b8e93cccf57d7952106f3d55fea881e3924f9f9586f0e9347a6e3a1a36cc19c24af819f2fde3af9496652a6ff56132511a5618d5774404f63f
28 -DIST mesa-18.0.0.tar.xz 11056544 BLAKE2B 467c100bcbc0a60e3868e718331192255fd16394c21b08c128a054e066740cd071e0b272aba011873fe239821f53442e9a07ae860d94b425275bd68c3db3b7fc SHA512 1494bb09357896a2505b3dcfec772268e28c765804f21e144948a314f1d79d99ff9f21062ef5860eb5a5a568b305a9c954585924a7ac8890fe1ebd8df3bcc396
29 -DIST mesa-18.0.1.tar.xz 10945308 BLAKE2B 03dad0961aafeb954a50f1db305288682e6b0dc58631b66de2f331dc95756b881bf7f73b5e2fa4ec04640054c27aab236acdf6b89bd7cd89ca1dbe9134a6a2d0 SHA512 b0d610904b6f179a27b42aee5f479339e341926915cdc6adb08ac999a4a12539abc3776577e86af83e10381d9703ef1bca70bab81b43daf2c000622c9c3612d2
30 DIST mesa-18.0.2.tar.xz 10949364 BLAKE2B 8b0557db70f61ac39df96e923383e41008f483ae2f89b3723e94e644cb2ced81a7996d61009acaebaf7813843742a24351a573c80f1173615e6c0302552cf621 SHA512 77d24d01c4c22596d28421aeb74932ff232730a4f556ae1a2e8777ece2876e4e352679575385c065505df4a2a83d2c1cf30db92dcf88038417e36a2768332d7e
31 -DIST mesa-18.1.0-rc1.tar.xz 11118324 BLAKE2B e5a89c8469b6716463c9efb0e7059022bc986da83d55a020156a3466cb44c283828bacb340ef4dceda9e14a82f737b6809f742b49a8b38d7e871ff1864e8bb3e SHA512 5b179b4ece6fd0e04ef00744d975607b6678c4c333c47fdd7442768ac15b375c7faeb8472b0dba19c0b8755067effd6243803ce17739a50c17efc8e69e6ae401
32 DIST mesa-18.1.0-rc2.tar.xz 11117872 BLAKE2B a95096ed573031eed17b880f725d68af062e0f7d9513d391d83c51e996fa238add93e05ae98ad4ed77d731f7521736b73566687be798029293d88f8b4b75db1c SHA512 43ddb27c436ab6ad08c4f5f764855e0681c10995e5279146c01e03e6e8af98dd23d96a20d3ac50107a6ca89cc3dd094bc472ddd70d290d0357cef3059ae34cfc
33
34 diff --git a/media-libs/mesa/mesa-17.1.10.ebuild b/media-libs/mesa/mesa-17.1.10.ebuild
35 deleted file mode 100644
36 index ed0e205a3b4..00000000000
37 --- a/media-libs/mesa/mesa-17.1.10.ebuild
38 +++ /dev/null
39 @@ -1,505 +0,0 @@
40 -# Copyright 1999-2018 Gentoo Foundation
41 -# Distributed under the terms of the GNU General Public License v2
42 -
43 -EAPI=6
44 -
45 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
46 -
47 -if [[ ${PV} = 9999 ]]; then
48 - GIT_ECLASS="git-r3"
49 - EXPERIMENTAL="true"
50 -fi
51 -
52 -PYTHON_COMPAT=( python2_7 )
53 -
54 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
55 -
56 -OPENGL_DIR="xorg-x11"
57 -
58 -MY_P="${P/_/-}"
59 -
60 -DESCRIPTION="OpenGL-like graphic library for Linux"
61 -HOMEPAGE="https://www.mesa3d.org/"
62 -
63 -if [[ $PV == 9999 ]]; then
64 - SRC_URI=""
65 -else
66 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
67 - KEYWORDS="arm"
68 -fi
69 -
70 -LICENSE="MIT"
71 -SLOT="0"
72 -RESTRICT="!bindist? ( bindist )"
73 -
74 -INTEL_CARDS="i915 i965 intel"
75 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
76 -VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno imx nouveau vc4 vivante vmware"
77 -for card in ${VIDEO_CARDS}; do
78 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
79 -done
80 -
81 -IUSE="${IUSE_VIDEO_CARDS}
82 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
83 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
84 - vdpau vulkan wayland xvmc xa"
85 -
86 -REQUIRED_USE="
87 - d3d9? ( dri3 gallium )
88 - llvm? ( gallium )
89 - opencl? ( gallium llvm )
90 - openmax? ( gallium )
91 - gles1? ( egl )
92 - gles2? ( egl )
93 - vaapi? ( gallium )
94 - vdpau? ( gallium )
95 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
96 - video_cards_radeonsi? ( llvm ) )
97 - wayland? ( egl gbm )
98 - xa? ( gallium )
99 - video_cards_freedreno? ( gallium )
100 - video_cards_intel? ( classic )
101 - video_cards_i915? ( || ( classic gallium ) )
102 - video_cards_i965? ( classic )
103 - video_cards_imx? ( gallium )
104 - video_cards_nouveau? ( || ( classic gallium ) )
105 - video_cards_radeon? ( || ( classic gallium )
106 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
107 - video_cards_r100? ( classic )
108 - video_cards_r200? ( classic )
109 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
110 - video_cards_r600? ( gallium )
111 - video_cards_radeonsi? ( gallium llvm )
112 - video_cards_vc4? ( gallium )
113 - video_cards_vivante? ( gallium gbm )
114 - video_cards_vmware? ( gallium )
115 -"
116 -
117 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.77"
118 -# keep correct libdrm and dri2proto dep
119 -# keep blocks in rdepend for binpkg
120 -RDEPEND="
121 - !<x11-base/xorg-server-1.7
122 - !<=x11-proto/xf86driproto-2.0.3
123 - classic? ( app-eselect/eselect-mesa )
124 - gallium? ( app-eselect/eselect-mesa )
125 - >=app-eselect/eselect-opengl-1.3.0
126 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
127 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
128 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
129 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
130 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
131 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
132 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
133 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
134 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
135 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
136 - llvm? (
137 - video_cards_radeonsi? (
138 - virtual/libelf:0=[${MULTILIB_USEDEP}]
139 - vulkan? ( >=sys-devel/llvm-3.9.0:0=[${MULTILIB_USEDEP}] )
140 - )
141 - video_cards_r600? (
142 - virtual/libelf:0=[${MULTILIB_USEDEP}]
143 - )
144 - video_cards_radeon? (
145 - virtual/libelf:0=[${MULTILIB_USEDEP}]
146 - )
147 - >=sys-devel/llvm-3.6.0:0=[${MULTILIB_USEDEP}]
148 - )
149 - opencl? (
150 - app-eselect/eselect-opencl
151 - dev-libs/libclc
152 - virtual/libelf:0=[${MULTILIB_USEDEP}]
153 - )
154 - openmax? (
155 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
156 - x11-misc/xdg-utils
157 - )
158 - vaapi? (
159 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
160 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
161 - )
162 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
163 - wayland? ( >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] )
164 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
165 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
166 -"
167 -for card in ${INTEL_CARDS}; do
168 - RDEPEND="${RDEPEND}
169 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
170 - "
171 -done
172 -
173 -for card in ${RADEON_CARDS}; do
174 - RDEPEND="${RDEPEND}
175 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
176 - "
177 -done
178 -RDEPEND="${RDEPEND}
179 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
180 -"
181 -
182 -# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once
183 -# LLVM < 3.9 is out of the game
184 -DEPEND="${RDEPEND}
185 - ${PYTHON_DEPS}
186 - llvm? (
187 - video_cards_radeonsi? ( || (
188 - sys-devel/llvm:0[llvm_targets_AMDGPU]
189 - sys-devel/llvm:0[video_cards_radeon]
190 - ) )
191 - )
192 - opencl? (
193 - >=sys-devel/llvm-3.6.0:0=[${MULTILIB_USEDEP}]
194 - >=sys-devel/clang-3.6.0:0=[${MULTILIB_USEDEP}]
195 - >=sys-devel/gcc-4.6
196 - )
197 - sys-devel/gettext
198 - virtual/pkgconfig
199 - valgrind? ( dev-util/valgrind )
200 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
201 - dri3? (
202 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
203 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
204 - )
205 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
206 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
207 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
208 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
209 -"
210 -[[ ${PV} == 9999 ]] && DEPEND+="
211 - sys-devel/bison
212 - sys-devel/flex
213 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
214 -"
215 -
216 -S="${WORKDIR}/${MY_P}"
217 -EGIT_CHECKOUT_DIR=${S}
218 -
219 -QA_WX_LOAD="
220 -x86? (
221 - !pic? (
222 - usr/lib*/libglapi.so.0.0.0
223 - usr/lib*/libGLESv1_CM.so.1.1.0
224 - usr/lib*/libGLESv2.so.2.0.0
225 - usr/lib*/libGL.so.1.2.0
226 - usr/lib*/libOSMesa.so.8.0.0
227 - )
228 -)"
229 -
230 -pkg_setup() {
231 - # warning message for bug 459306
232 - if use llvm && has_version "sys-devel/llvm:0[!debug=]"; then
233 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
234 - ewarn "detected! This can cause problems. For details, see bug 459306."
235 - fi
236 -
237 - if use llvm || use opencl; then
238 - llvm_pkg_setup
239 - fi
240 - python-any-r1_pkg_setup
241 -}
242 -
243 -src_prepare() {
244 - [[ ${PV} == 9999 ]] && eautoreconf
245 - eapply_user
246 -}
247 -
248 -multilib_src_configure() {
249 - local myconf
250 -
251 - if use classic; then
252 - # Configurable DRI drivers
253 - driver_enable swrast
254 -
255 - # Intel code
256 - driver_enable video_cards_i915 i915
257 - driver_enable video_cards_i965 i965
258 - if ! use video_cards_i915 && \
259 - ! use video_cards_i965; then
260 - driver_enable video_cards_intel i915 i965
261 - fi
262 -
263 - # Nouveau code
264 - driver_enable video_cards_nouveau nouveau
265 -
266 - # ATI code
267 - driver_enable video_cards_r100 radeon
268 - driver_enable video_cards_r200 r200
269 - if ! use video_cards_r100 && \
270 - ! use video_cards_r200; then
271 - driver_enable video_cards_radeon radeon r200
272 - fi
273 - fi
274 -
275 - if use egl; then
276 - myconf+=" --with-egl-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
277 - fi
278 -
279 - if use gallium; then
280 - myconf+="
281 - $(use_enable d3d9 nine)
282 - $(use_enable llvm)
283 - $(use_enable openmax omx)
284 - $(use_enable vaapi va)
285 - $(use_enable vdpau)
286 - $(use_enable xa)
287 - $(use_enable xvmc)
288 - "
289 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
290 -
291 - gallium_enable swrast
292 - gallium_enable video_cards_vc4 vc4
293 - gallium_enable video_cards_vivante etnaviv
294 - gallium_enable video_cards_vmware svga
295 - gallium_enable video_cards_nouveau nouveau
296 - gallium_enable video_cards_i915 i915
297 - gallium_enable video_cards_imx imx
298 - if ! use video_cards_i915 && \
299 - ! use video_cards_i965; then
300 - gallium_enable video_cards_intel i915
301 - fi
302 -
303 - gallium_enable video_cards_r300 r300
304 - gallium_enable video_cards_r600 r600
305 - gallium_enable video_cards_radeonsi radeonsi
306 - if ! use video_cards_r300 && \
307 - ! use video_cards_r600; then
308 - gallium_enable video_cards_radeon r300 r600
309 - fi
310 -
311 - gallium_enable video_cards_freedreno freedreno
312 - # opencl stuff
313 - if use opencl; then
314 - myconf+="
315 - $(use_enable opencl)
316 - --with-clang-libdir="${EPREFIX}/usr/lib"
317 - "
318 - fi
319 - fi
320 -
321 - if use vulkan; then
322 - vulkan_enable video_cards_i965 intel
323 - vulkan_enable video_cards_radeonsi radeon
324 - fi
325 -
326 - # x86 hardened pax_kernel needs glx-rts, bug 240956
327 - if [[ ${ABI} == x86 ]]; then
328 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
329 - fi
330 -
331 - # on abi_x86_32 hardened we need to have asm disable
332 - if [[ ${ABI} == x86* ]] && use pic; then
333 - myconf+=" --disable-asm"
334 - fi
335 -
336 - if use gallium; then
337 - myconf+=" $(use_enable osmesa gallium-osmesa)"
338 - else
339 - myconf+=" $(use_enable osmesa)"
340 - fi
341 -
342 - # build fails with BSD indent, bug #428112
343 - use userland_GNU || export INDENT=cat
344 -
345 - ECONF_SOURCE="${S}" \
346 - econf \
347 - --enable-dri \
348 - --enable-glx \
349 - --enable-shared-glapi \
350 - $(use_enable !bindist texture-float) \
351 - $(use_enable d3d9 nine) \
352 - $(use_enable debug) \
353 - $(use_enable dri3) \
354 - $(use_enable egl) \
355 - $(use_enable gbm) \
356 - $(use_enable gles1) \
357 - $(use_enable gles2) \
358 - $(use_enable nptl glx-tls) \
359 - $(use_enable unwind libunwind) \
360 - --enable-valgrind=$(usex valgrind auto no) \
361 - --enable-llvm-shared-libs \
362 - --with-dri-drivers=${DRI_DRIVERS} \
363 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
364 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
365 - PYTHON2="${PYTHON}" \
366 - ${myconf}
367 -}
368 -
369 -multilib_src_install() {
370 - emake install DESTDIR="${D}"
371 -
372 - if use classic || use gallium; then
373 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
374 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
375 - keepdir /usr/$(get_libdir)/dri
376 - dodir /usr/$(get_libdir)/mesa
377 - for x in ${gallium_drivers[@]}; do
378 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
379 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
380 - || die "Failed to move ${x}"
381 - fi
382 - done
383 - if use classic; then
384 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
385 - fi
386 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
387 - if [ -f ${x} -o -L ${x} ]; then
388 - mv -f "${x}" "${x/dri/mesa}" \
389 - || die "Failed to move ${x}"
390 - fi
391 - done
392 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
393 - ln -s ../mesa/*.so . || die "Creating symlink failed"
394 - # remove symlinks to drivers known to eselect
395 - for x in ${gallium_drivers[@]}; do
396 - if [ -f ${x} -o -L ${x} ]; then
397 - rm "${x}" || die "Failed to remove ${x}"
398 - fi
399 - done
400 - popd
401 - eend $?
402 - fi
403 - if use opencl; then
404 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
405 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
406 - dodir ${cl_dir}/{lib,include}
407 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
408 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
409 - "${ED}"${cl_dir}
410 - fi
411 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
412 - mv -f "${ED}"/usr/include/CL \
413 - "${ED}"${cl_dir}/include
414 - fi
415 - eend $?
416 - fi
417 -
418 - if use openmax; then
419 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
420 - doenvd "${T}"/99mesaxdgomx
421 - keepdir /usr/share/mesa/xdg
422 - fi
423 -}
424 -
425 -multilib_src_install_all() {
426 - find "${ED}" -name '*.la' -delete
427 - einstalldocs
428 -
429 - if use !bindist; then
430 - dodoc docs/patents.txt
431 - fi
432 -
433 - # Install config file for eselect mesa
434 - insinto /usr/share/mesa
435 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
436 -}
437 -
438 -multilib_src_test() {
439 - if use llvm; then
440 - 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'
441 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
442 - emake ${llvm_tests}
443 - pax-mark m ${llvm_tests}
444 - popd >/dev/null || die
445 - fi
446 - emake check
447 -}
448 -
449 -pkg_postinst() {
450 - # Switch to the xorg implementation.
451 - echo
452 - eselect opengl set --use-old ${OPENGL_DIR}
453 -
454 - # Select classic/gallium drivers
455 - if use classic || use gallium; then
456 - eselect mesa set --auto
457 - fi
458 -
459 - # Switch to mesa opencl
460 - if use opencl; then
461 - eselect opencl set --use-old ${PN}
462 - fi
463 -
464 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
465 - if use openmax; then
466 - ebegin "Registering OpenMAX drivers"
467 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
468 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
469 - omxregister-bellagio
470 - eend $?
471 - fi
472 -
473 - # warn about patent encumbered texture-float
474 - if use !bindist; then
475 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
476 - elog "enabled. Please see patents.txt for an explanation."
477 - fi
478 -
479 - if ! has_version media-libs/libtxc_dxtn; then
480 - elog "Note that in order to have full S3TC support, it is necessary to install"
481 - elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
482 - elog "textures in some apps, and some others even require this to run."
483 - fi
484 -}
485 -
486 -pkg_prerm() {
487 - if use openmax; then
488 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
489 - fi
490 -}
491 -
492 -# $1 - VIDEO_CARDS flag
493 -# other args - names of DRI drivers to enable
494 -# TODO: avoid code duplication for a more elegant implementation
495 -driver_enable() {
496 - case $# in
497 - # for enabling unconditionally
498 - 1)
499 - DRI_DRIVERS+=",$1"
500 - ;;
501 - *)
502 - if use $1; then
503 - shift
504 - for i in $@; do
505 - DRI_DRIVERS+=",${i}"
506 - done
507 - fi
508 - ;;
509 - esac
510 -}
511 -
512 -gallium_enable() {
513 - case $# in
514 - # for enabling unconditionally
515 - 1)
516 - GALLIUM_DRIVERS+=",$1"
517 - ;;
518 - *)
519 - if use $1; then
520 - shift
521 - for i in $@; do
522 - GALLIUM_DRIVERS+=",${i}"
523 - done
524 - fi
525 - ;;
526 - esac
527 -}
528 -
529 -vulkan_enable() {
530 - case $# in
531 - # for enabling unconditionally
532 - 1)
533 - VULKAN_DRIVERS+=",$1"
534 - ;;
535 - *)
536 - if use $1; then
537 - shift
538 - for i in $@; do
539 - VULKAN_DRIVERS+=",${i}"
540 - done
541 - fi
542 - ;;
543 - esac
544 -}
545
546 diff --git a/media-libs/mesa/mesa-17.2.8.ebuild b/media-libs/mesa/mesa-17.2.8.ebuild
547 deleted file mode 100644
548 index b009828a1ad..00000000000
549 --- a/media-libs/mesa/mesa-17.2.8.ebuild
550 +++ /dev/null
551 @@ -1,584 +0,0 @@
552 -# Copyright 1999-2018 Gentoo Foundation
553 -# Distributed under the terms of the GNU General Public License v2
554 -
555 -EAPI=6
556 -
557 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
558 -
559 -if [[ ${PV} = 9999 ]]; then
560 - GIT_ECLASS="git-r3"
561 - EXPERIMENTAL="true"
562 -fi
563 -
564 -PYTHON_COMPAT=( python2_7 )
565 -
566 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
567 -
568 -OPENGL_DIR="xorg-x11"
569 -
570 -MY_P="${P/_/-}"
571 -
572 -DESCRIPTION="OpenGL-like graphic library for Linux"
573 -HOMEPAGE="https://www.mesa3d.org/"
574 -
575 -if [[ $PV == 9999 ]]; then
576 - SRC_URI=""
577 -else
578 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
579 - 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"
580 -fi
581 -
582 -LICENSE="MIT"
583 -SLOT="0"
584 -RESTRICT="!bindist? ( bindist )"
585 -
586 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
587 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
588 -for card in ${VIDEO_CARDS}; do
589 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
590 -done
591 -
592 -IUSE="${IUSE_VIDEO_CARDS}
593 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
594 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
595 - vdpau vulkan wayland xvmc xa"
596 -
597 -REQUIRED_USE="
598 - d3d9? ( dri3 gallium )
599 - llvm? ( gallium )
600 - opencl? ( gallium llvm )
601 - openmax? ( gallium )
602 - gles1? ( egl )
603 - gles2? ( egl )
604 - vaapi? ( gallium )
605 - vdpau? ( gallium )
606 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
607 - video_cards_radeonsi? ( llvm ) )
608 - wayland? ( egl gbm )
609 - xa? ( gallium )
610 - video_cards_freedreno? ( gallium )
611 - video_cards_intel? ( classic )
612 - video_cards_i915? ( || ( classic gallium ) )
613 - video_cards_i965? ( classic )
614 - video_cards_imx? ( gallium )
615 - video_cards_nouveau? ( || ( classic gallium ) )
616 - video_cards_radeon? ( || ( classic gallium )
617 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
618 - video_cards_r100? ( classic )
619 - video_cards_r200? ( classic )
620 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
621 - video_cards_r600? ( gallium )
622 - video_cards_radeonsi? ( gallium llvm )
623 - video_cards_vc4? ( gallium )
624 - video_cards_virgl? ( gallium )
625 - video_cards_vivante? ( gallium gbm )
626 - video_cards_vmware? ( gallium )
627 -"
628 -
629 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.82"
630 -# keep correct libdrm and dri2proto dep
631 -# keep blocks in rdepend for binpkg
632 -RDEPEND="
633 - !<x11-base/xorg-server-1.7
634 - !<=x11-proto/xf86driproto-2.0.3
635 - classic? ( app-eselect/eselect-mesa )
636 - gallium? ( app-eselect/eselect-mesa )
637 - >=app-eselect/eselect-opengl-1.3.0
638 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
639 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
640 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
641 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
642 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
643 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
644 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
645 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
646 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
647 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
648 - llvm? (
649 - video_cards_radeonsi? (
650 - virtual/libelf:0=[${MULTILIB_USEDEP}]
651 - )
652 - video_cards_r600? (
653 - virtual/libelf:0=[${MULTILIB_USEDEP}]
654 - )
655 - video_cards_radeon? (
656 - virtual/libelf:0=[${MULTILIB_USEDEP}]
657 - )
658 - )
659 - opencl? (
660 - app-eselect/eselect-opencl
661 - dev-libs/libclc
662 - virtual/libelf:0=[${MULTILIB_USEDEP}]
663 - )
664 - openmax? (
665 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
666 - x11-misc/xdg-utils
667 - )
668 - vaapi? (
669 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
670 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
671 - )
672 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
673 - wayland? (
674 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
675 - >=dev-libs/wayland-protocols-1.8
676 - )
677 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
678 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
679 -
680 - video_cards_intel? (
681 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
682 - )
683 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
684 -"
685 -for card in ${RADEON_CARDS}; do
686 - RDEPEND="${RDEPEND}
687 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
688 - "
689 -done
690 -RDEPEND="${RDEPEND}
691 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
692 -"
693 -
694 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
695 -# we need to *really* make sure we're not pulling one than more slot
696 -# simultaneously.
697 -#
698 -# How to use it:
699 -# 1. List all the working slots (with min versions) in ||, newest first.
700 -# 2. Update the := to specify *max* version, e.g. < 7.
701 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
702 -LLVM_MAX_SLOT="5"
703 -LLVM_DEPSTR="
704 - || (
705 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
706 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
707 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
708 - )
709 - <sys-devel/llvm-6:=[${MULTILIB_USEDEP}]
710 -"
711 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
712 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
713 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
714 -RDEPEND="${RDEPEND}
715 - llvm? (
716 - opencl? (
717 - video_cards_r600? (
718 - ${CLANG_DEPSTR_AMDGPU}
719 - )
720 - !video_cards_r600? (
721 - video_cards_radeonsi? (
722 - ${CLANG_DEPSTR_AMDGPU}
723 - )
724 - )
725 - !video_cards_r600? (
726 - !video_cards_radeonsi? (
727 - video_cards_radeon? (
728 - ${CLANG_DEPSTR_AMDGPU}
729 - )
730 - )
731 - )
732 - !video_cards_r600? (
733 - !video_cards_radeon? (
734 - !video_cards_radeonsi? (
735 - ${CLANG_DEPSTR}
736 - )
737 - )
738 - )
739 - )
740 - !opencl? (
741 - video_cards_r600? (
742 - ${LLVM_DEPSTR_AMDGPU}
743 - )
744 - !video_cards_r600? (
745 - video_cards_radeonsi? (
746 - ${LLVM_DEPSTR_AMDGPU}
747 - )
748 - )
749 - !video_cards_r600? (
750 - !video_cards_radeonsi? (
751 - video_cards_radeon? (
752 - ${LLVM_DEPSTR_AMDGPU}
753 - )
754 - )
755 - )
756 - !video_cards_r600? (
757 - !video_cards_radeon? (
758 - !video_cards_radeonsi? (
759 - ${LLVM_DEPSTR}
760 - )
761 - )
762 - )
763 - )
764 - )
765 -"
766 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
767 -
768 -DEPEND="${RDEPEND}
769 - ${PYTHON_DEPS}
770 - opencl? (
771 - >=sys-devel/gcc-4.6
772 - )
773 - sys-devel/gettext
774 - virtual/pkgconfig
775 - valgrind? ( dev-util/valgrind )
776 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
777 - dri3? (
778 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
779 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
780 - )
781 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
782 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
783 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
784 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
785 -"
786 -[[ ${PV} == 9999 ]] && DEPEND+="
787 - sys-devel/bison
788 - sys-devel/flex
789 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
790 -"
791 -
792 -S="${WORKDIR}/${MY_P}"
793 -EGIT_CHECKOUT_DIR=${S}
794 -
795 -QA_WX_LOAD="
796 -x86? (
797 - !pic? (
798 - usr/lib*/libglapi.so.0.0.0
799 - usr/lib*/libGLESv1_CM.so.1.1.0
800 - usr/lib*/libGLESv2.so.2.0.0
801 - usr/lib*/libGL.so.1.2.0
802 - usr/lib*/libOSMesa.so.8.0.0
803 - )
804 -)"
805 -
806 -llvm_check_deps() {
807 - local flags=${MULTILIB_USEDEP}
808 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
809 - then
810 - flags+=",llvm_targets_AMDGPU(-)"
811 - fi
812 -
813 - if use opencl; then
814 - has_version "sys-devel/clang[${flags}]" || return 1
815 - fi
816 - has_version "sys-devel/llvm[${flags}]"
817 -}
818 -
819 -pkg_setup() {
820 - # warning message for bug 459306
821 - if use llvm && has_version sys-devel/llvm[!debug=]; then
822 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
823 - ewarn "detected! This can cause problems. For details, see bug 459306."
824 - fi
825 -
826 - if use llvm; then
827 - llvm_pkg_setup
828 - fi
829 - python-any-r1_pkg_setup
830 -}
831 -
832 -src_prepare() {
833 - [[ ${PV} == 9999 ]] && eautoreconf
834 - eapply_user
835 -}
836 -
837 -multilib_src_configure() {
838 - local myconf
839 -
840 - if use classic; then
841 - # Configurable DRI drivers
842 - driver_enable swrast
843 -
844 - # Intel code
845 - driver_enable video_cards_i915 i915
846 - driver_enable video_cards_i965 i965
847 - if ! use video_cards_i915 && \
848 - ! use video_cards_i965; then
849 - driver_enable video_cards_intel i915 i965
850 - fi
851 -
852 - # Nouveau code
853 - driver_enable video_cards_nouveau nouveau
854 -
855 - # ATI code
856 - driver_enable video_cards_r100 radeon
857 - driver_enable video_cards_r200 r200
858 - if ! use video_cards_r100 && \
859 - ! use video_cards_r200; then
860 - driver_enable video_cards_radeon radeon r200
861 - fi
862 - fi
863 -
864 - if use egl; then
865 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
866 - fi
867 -
868 - if use gallium; then
869 - myconf+="
870 - $(use_enable d3d9 nine)
871 - $(use_enable llvm)
872 - $(use_enable openmax omx)
873 - $(use_enable vaapi va)
874 - $(use_enable vdpau)
875 - $(use_enable xa)
876 - $(use_enable xvmc)
877 - "
878 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
879 -
880 - gallium_enable swrast
881 - gallium_enable video_cards_vc4 vc4
882 - gallium_enable video_cards_vivante etnaviv
883 - gallium_enable video_cards_vmware svga
884 - gallium_enable video_cards_nouveau nouveau
885 - gallium_enable video_cards_i915 i915
886 - gallium_enable video_cards_imx imx
887 - if ! use video_cards_i915 && \
888 - ! use video_cards_i965; then
889 - gallium_enable video_cards_intel i915
890 - fi
891 -
892 - gallium_enable video_cards_r300 r300
893 - gallium_enable video_cards_r600 r600
894 - gallium_enable video_cards_radeonsi radeonsi
895 - if ! use video_cards_r300 && \
896 - ! use video_cards_r600; then
897 - gallium_enable video_cards_radeon r300 r600
898 - fi
899 -
900 - gallium_enable video_cards_freedreno freedreno
901 - # opencl stuff
902 - if use opencl; then
903 - myconf+="
904 - $(use_enable opencl)
905 - --with-clang-libdir="${EPREFIX}/usr/lib"
906 - "
907 - fi
908 -
909 - gallium_enable video_cards_virgl virgl
910 - fi
911 -
912 - if use vulkan; then
913 - vulkan_enable video_cards_i965 intel
914 - vulkan_enable video_cards_radeonsi radeon
915 - fi
916 -
917 - # x86 hardened pax_kernel needs glx-rts, bug 240956
918 - if [[ ${ABI} == x86 ]]; then
919 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
920 - fi
921 -
922 - # on abi_x86_32 hardened we need to have asm disable
923 - if [[ ${ABI} == x86* ]] && use pic; then
924 - myconf+=" --disable-asm"
925 - fi
926 -
927 - if use gallium; then
928 - myconf+=" $(use_enable osmesa gallium-osmesa)"
929 - else
930 - myconf+=" $(use_enable osmesa)"
931 - fi
932 -
933 - # build fails with BSD indent, bug #428112
934 - use userland_GNU || export INDENT=cat
935 -
936 - ECONF_SOURCE="${S}" \
937 - econf \
938 - --enable-dri \
939 - --enable-glx \
940 - --enable-shared-glapi \
941 - $(use_enable !bindist texture-float) \
942 - $(use_enable d3d9 nine) \
943 - $(use_enable debug) \
944 - $(use_enable dri3) \
945 - $(use_enable egl) \
946 - $(use_enable gbm) \
947 - $(use_enable gles1) \
948 - $(use_enable gles2) \
949 - $(use_enable nptl glx-tls) \
950 - $(use_enable unwind libunwind) \
951 - --enable-valgrind=$(usex valgrind auto no) \
952 - --enable-llvm-shared-libs \
953 - --with-dri-drivers=${DRI_DRIVERS} \
954 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
955 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
956 - PYTHON2="${PYTHON}" \
957 - ${myconf}
958 -}
959 -
960 -multilib_src_install() {
961 - emake install DESTDIR="${D}"
962 -
963 - if use classic || use gallium; then
964 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
965 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
966 - keepdir /usr/$(get_libdir)/dri
967 - dodir /usr/$(get_libdir)/mesa
968 - for x in ${gallium_drivers[@]}; do
969 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
970 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
971 - || die "Failed to move ${x}"
972 - fi
973 - done
974 - if use classic; then
975 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
976 - fi
977 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
978 - if [ -f ${x} -o -L ${x} ]; then
979 - mv -f "${x}" "${x/dri/mesa}" \
980 - || die "Failed to move ${x}"
981 - fi
982 - done
983 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
984 - ln -s ../mesa/*.so . || die "Creating symlink failed"
985 - # remove symlinks to drivers known to eselect
986 - for x in ${gallium_drivers[@]}; do
987 - if [ -f ${x} -o -L ${x} ]; then
988 - rm "${x}" || die "Failed to remove ${x}"
989 - fi
990 - done
991 - popd
992 - eend $?
993 - fi
994 - if use opencl; then
995 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
996 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
997 - dodir ${cl_dir}/{lib,include}
998 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
999 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
1000 - "${ED}"${cl_dir}
1001 - fi
1002 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
1003 - mv -f "${ED}"/usr/include/CL \
1004 - "${ED}"${cl_dir}/include
1005 - fi
1006 - eend $?
1007 - fi
1008 -
1009 - if use openmax; then
1010 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
1011 - doenvd "${T}"/99mesaxdgomx
1012 - keepdir /usr/share/mesa/xdg
1013 - fi
1014 -}
1015 -
1016 -multilib_src_install_all() {
1017 - find "${ED}" -name '*.la' -delete
1018 - einstalldocs
1019 -
1020 - if use !bindist; then
1021 - dodoc docs/patents.txt
1022 - fi
1023 -
1024 - # Install config file for eselect mesa
1025 - insinto /usr/share/mesa
1026 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
1027 -}
1028 -
1029 -multilib_src_test() {
1030 - if use llvm; then
1031 - 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'
1032 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
1033 - emake ${llvm_tests}
1034 - pax-mark m ${llvm_tests}
1035 - popd >/dev/null || die
1036 - fi
1037 - emake check
1038 -}
1039 -
1040 -pkg_postinst() {
1041 - # Switch to the xorg implementation.
1042 - echo
1043 - eselect opengl set --use-old ${OPENGL_DIR}
1044 -
1045 - # Select classic/gallium drivers
1046 - if use classic || use gallium; then
1047 - eselect mesa set --auto
1048 - fi
1049 -
1050 - # Switch to mesa opencl
1051 - if use opencl; then
1052 - eselect opencl set --use-old ${PN}
1053 - fi
1054 -
1055 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
1056 - if use openmax; then
1057 - ebegin "Registering OpenMAX drivers"
1058 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
1059 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
1060 - omxregister-bellagio
1061 - eend $?
1062 - fi
1063 -
1064 - # warn about patent encumbered texture-float
1065 - if use !bindist; then
1066 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
1067 - elog "enabled. Please see patents.txt for an explanation."
1068 - fi
1069 -
1070 - if ! has_version media-libs/libtxc_dxtn; then
1071 - elog "Note that in order to have full S3TC support, it is necessary to install"
1072 - elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
1073 - elog "textures in some apps, and some others even require this to run."
1074 - fi
1075 -}
1076 -
1077 -pkg_prerm() {
1078 - if use openmax; then
1079 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
1080 - fi
1081 -}
1082 -
1083 -# $1 - VIDEO_CARDS flag
1084 -# other args - names of DRI drivers to enable
1085 -# TODO: avoid code duplication for a more elegant implementation
1086 -driver_enable() {
1087 - case $# in
1088 - # for enabling unconditionally
1089 - 1)
1090 - DRI_DRIVERS+=",$1"
1091 - ;;
1092 - *)
1093 - if use $1; then
1094 - shift
1095 - for i in $@; do
1096 - DRI_DRIVERS+=",${i}"
1097 - done
1098 - fi
1099 - ;;
1100 - esac
1101 -}
1102 -
1103 -gallium_enable() {
1104 - case $# in
1105 - # for enabling unconditionally
1106 - 1)
1107 - GALLIUM_DRIVERS+=",$1"
1108 - ;;
1109 - *)
1110 - if use $1; then
1111 - shift
1112 - for i in $@; do
1113 - GALLIUM_DRIVERS+=",${i}"
1114 - done
1115 - fi
1116 - ;;
1117 - esac
1118 -}
1119 -
1120 -vulkan_enable() {
1121 - case $# in
1122 - # for enabling unconditionally
1123 - 1)
1124 - VULKAN_DRIVERS+=",$1"
1125 - ;;
1126 - *)
1127 - if use $1; then
1128 - shift
1129 - for i in $@; do
1130 - VULKAN_DRIVERS+=",${i}"
1131 - done
1132 - fi
1133 - ;;
1134 - esac
1135 -}
1136
1137 diff --git a/media-libs/mesa/mesa-17.3.8.ebuild b/media-libs/mesa/mesa-17.3.8.ebuild
1138 deleted file mode 100644
1139 index c1821f5ec1b..00000000000
1140 --- a/media-libs/mesa/mesa-17.3.8.ebuild
1141 +++ /dev/null
1142 @@ -1,582 +0,0 @@
1143 -# Copyright 1999-2018 Gentoo Foundation
1144 -# Distributed under the terms of the GNU General Public License v2
1145 -
1146 -EAPI=6
1147 -
1148 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
1149 -
1150 -if [[ ${PV} = 9999 ]]; then
1151 - GIT_ECLASS="git-r3"
1152 - EXPERIMENTAL="true"
1153 -fi
1154 -
1155 -PYTHON_COMPAT=( python2_7 )
1156 -
1157 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
1158 -
1159 -OPENGL_DIR="xorg-x11"
1160 -
1161 -MY_P="${P/_/-}"
1162 -
1163 -DESCRIPTION="OpenGL-like graphic library for Linux"
1164 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1165 -
1166 -if [[ $PV == 9999 ]]; then
1167 - SRC_URI=""
1168 -else
1169 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1170 - 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"
1171 -fi
1172 -
1173 -LICENSE="MIT"
1174 -SLOT="0"
1175 -RESTRICT="!bindist? ( bindist )"
1176 -
1177 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1178 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
1179 -for card in ${VIDEO_CARDS}; do
1180 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1181 -done
1182 -
1183 -IUSE="${IUSE_VIDEO_CARDS}
1184 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
1185 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
1186 - vdpau vulkan wayland xvmc xa"
1187 -
1188 -REQUIRED_USE="
1189 - d3d9? ( dri3 gallium )
1190 - llvm? ( gallium )
1191 - opencl? ( gallium llvm )
1192 - openmax? ( gallium )
1193 - gles1? ( egl )
1194 - gles2? ( egl )
1195 - vaapi? ( gallium )
1196 - vdpau? ( gallium )
1197 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
1198 - video_cards_radeonsi? ( llvm ) )
1199 - wayland? ( egl gbm )
1200 - xa? ( gallium )
1201 - video_cards_freedreno? ( gallium )
1202 - video_cards_intel? ( classic )
1203 - video_cards_i915? ( || ( classic gallium ) )
1204 - video_cards_i965? ( classic )
1205 - video_cards_imx? ( gallium video_cards_vivante )
1206 - video_cards_nouveau? ( || ( classic gallium ) )
1207 - video_cards_radeon? ( || ( classic gallium )
1208 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1209 - video_cards_r100? ( classic )
1210 - video_cards_r200? ( classic )
1211 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1212 - video_cards_r600? ( gallium )
1213 - video_cards_radeonsi? ( gallium llvm )
1214 - video_cards_vc4? ( gallium )
1215 - video_cards_virgl? ( gallium )
1216 - video_cards_vivante? ( gallium gbm )
1217 - video_cards_vmware? ( gallium )
1218 -"
1219 -
1220 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.89"
1221 -# keep correct libdrm and dri2proto dep
1222 -# keep blocks in rdepend for binpkg
1223 -RDEPEND="
1224 - !<x11-base/xorg-server-1.7
1225 - !<=x11-proto/xf86driproto-2.0.3
1226 - classic? ( app-eselect/eselect-mesa )
1227 - gallium? ( app-eselect/eselect-mesa )
1228 - >=app-eselect/eselect-opengl-1.3.0
1229 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1230 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1231 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1232 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1233 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1234 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1235 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1236 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
1237 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1238 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1239 - llvm? (
1240 - video_cards_radeonsi? (
1241 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1242 - )
1243 - video_cards_r600? (
1244 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1245 - )
1246 - video_cards_radeon? (
1247 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1248 - )
1249 - )
1250 - opencl? (
1251 - app-eselect/eselect-opencl
1252 - dev-libs/libclc
1253 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1254 - )
1255 - openmax? (
1256 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
1257 - x11-misc/xdg-utils
1258 - )
1259 - vaapi? (
1260 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1261 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
1262 - )
1263 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1264 - wayland? (
1265 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
1266 - >=dev-libs/wayland-protocols-1.8
1267 - )
1268 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1269 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1270 -
1271 - video_cards_intel? (
1272 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1273 - )
1274 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1275 -"
1276 -for card in ${RADEON_CARDS}; do
1277 - RDEPEND="${RDEPEND}
1278 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1279 - "
1280 -done
1281 -RDEPEND="${RDEPEND}
1282 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1283 -"
1284 -
1285 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1286 -# we need to *really* make sure we're not pulling one than more slot
1287 -# simultaneously.
1288 -#
1289 -# How to use it:
1290 -# 1. List all the working slots (with min versions) in ||, newest first.
1291 -# 2. Update the := to specify *max* version, e.g. < 7.
1292 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
1293 -LLVM_MAX_SLOT="5"
1294 -LLVM_DEPSTR="
1295 - || (
1296 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
1297 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
1298 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
1299 - )
1300 - <sys-devel/llvm-6:=[${MULTILIB_USEDEP}]
1301 -"
1302 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1303 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1304 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1305 -RDEPEND="${RDEPEND}
1306 - llvm? (
1307 - opencl? (
1308 - video_cards_r600? (
1309 - ${CLANG_DEPSTR_AMDGPU}
1310 - )
1311 - !video_cards_r600? (
1312 - video_cards_radeonsi? (
1313 - ${CLANG_DEPSTR_AMDGPU}
1314 - )
1315 - )
1316 - !video_cards_r600? (
1317 - !video_cards_radeonsi? (
1318 - video_cards_radeon? (
1319 - ${CLANG_DEPSTR_AMDGPU}
1320 - )
1321 - )
1322 - )
1323 - !video_cards_r600? (
1324 - !video_cards_radeon? (
1325 - !video_cards_radeonsi? (
1326 - ${CLANG_DEPSTR}
1327 - )
1328 - )
1329 - )
1330 - )
1331 - !opencl? (
1332 - video_cards_r600? (
1333 - ${LLVM_DEPSTR_AMDGPU}
1334 - )
1335 - !video_cards_r600? (
1336 - video_cards_radeonsi? (
1337 - ${LLVM_DEPSTR_AMDGPU}
1338 - )
1339 - )
1340 - !video_cards_r600? (
1341 - !video_cards_radeonsi? (
1342 - video_cards_radeon? (
1343 - ${LLVM_DEPSTR_AMDGPU}
1344 - )
1345 - )
1346 - )
1347 - !video_cards_r600? (
1348 - !video_cards_radeon? (
1349 - !video_cards_radeonsi? (
1350 - ${LLVM_DEPSTR}
1351 - )
1352 - )
1353 - )
1354 - )
1355 - )
1356 -"
1357 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1358 -
1359 -DEPEND="${RDEPEND}
1360 - ${PYTHON_DEPS}
1361 - opencl? (
1362 - >=sys-devel/gcc-4.6
1363 - )
1364 - sys-devel/gettext
1365 - virtual/pkgconfig
1366 - valgrind? ( dev-util/valgrind )
1367 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
1368 - dri3? (
1369 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
1370 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
1371 - )
1372 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
1373 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
1374 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
1375 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
1376 - vulkan? (
1377 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
1378 - )
1379 -"
1380 -[[ ${PV} == 9999 ]] && DEPEND+="
1381 - sys-devel/bison
1382 - sys-devel/flex
1383 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
1384 -"
1385 -
1386 -S="${WORKDIR}/${MY_P}"
1387 -EGIT_CHECKOUT_DIR=${S}
1388 -
1389 -QA_WX_LOAD="
1390 -x86? (
1391 - !pic? (
1392 - usr/lib*/libglapi.so.0.0.0
1393 - usr/lib*/libGLESv1_CM.so.1.1.0
1394 - usr/lib*/libGLESv2.so.2.0.0
1395 - usr/lib*/libGL.so.1.2.0
1396 - usr/lib*/libOSMesa.so.8.0.0
1397 - )
1398 -)"
1399 -
1400 -llvm_check_deps() {
1401 - local flags=${MULTILIB_USEDEP}
1402 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1403 - then
1404 - flags+=",llvm_targets_AMDGPU(-)"
1405 - fi
1406 -
1407 - if use opencl; then
1408 - has_version "sys-devel/clang[${flags}]" || return 1
1409 - fi
1410 - has_version "sys-devel/llvm[${flags}]"
1411 -}
1412 -
1413 -pkg_setup() {
1414 - # warning message for bug 459306
1415 - if use llvm && has_version sys-devel/llvm[!debug=]; then
1416 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
1417 - ewarn "detected! This can cause problems. For details, see bug 459306."
1418 - fi
1419 -
1420 - if use llvm; then
1421 - llvm_pkg_setup
1422 - fi
1423 - python-any-r1_pkg_setup
1424 -}
1425 -
1426 -src_prepare() {
1427 - [[ ${PV} == 9999 ]] && eautoreconf
1428 - eapply_user
1429 -}
1430 -
1431 -multilib_src_configure() {
1432 - local myconf
1433 -
1434 - if use classic; then
1435 - # Configurable DRI drivers
1436 - driver_enable swrast
1437 -
1438 - # Intel code
1439 - driver_enable video_cards_i915 i915
1440 - driver_enable video_cards_i965 i965
1441 - if ! use video_cards_i915 && \
1442 - ! use video_cards_i965; then
1443 - driver_enable video_cards_intel i915 i965
1444 - fi
1445 -
1446 - # Nouveau code
1447 - driver_enable video_cards_nouveau nouveau
1448 -
1449 - # ATI code
1450 - driver_enable video_cards_r100 radeon
1451 - driver_enable video_cards_r200 r200
1452 - if ! use video_cards_r100 && \
1453 - ! use video_cards_r200; then
1454 - driver_enable video_cards_radeon radeon r200
1455 - fi
1456 - fi
1457 -
1458 - if use egl; then
1459 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
1460 - fi
1461 -
1462 - if use gallium; then
1463 - myconf+="
1464 - $(use_enable d3d9 nine)
1465 - $(use_enable llvm)
1466 - $(use_enable openmax omx-bellagio)
1467 - $(use_enable vaapi va)
1468 - $(use_enable vdpau)
1469 - $(use_enable xa)
1470 - $(use_enable xvmc)
1471 - "
1472 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
1473 -
1474 - gallium_enable swrast
1475 - gallium_enable video_cards_vc4 vc4
1476 - gallium_enable video_cards_vivante etnaviv
1477 - gallium_enable video_cards_vmware svga
1478 - gallium_enable video_cards_nouveau nouveau
1479 - gallium_enable video_cards_i915 i915
1480 - gallium_enable video_cards_imx imx
1481 - if ! use video_cards_i915 && \
1482 - ! use video_cards_i965; then
1483 - gallium_enable video_cards_intel i915
1484 - fi
1485 -
1486 - gallium_enable video_cards_r300 r300
1487 - gallium_enable video_cards_r600 r600
1488 - gallium_enable video_cards_radeonsi radeonsi
1489 - if ! use video_cards_r300 && \
1490 - ! use video_cards_r600; then
1491 - gallium_enable video_cards_radeon r300 r600
1492 - fi
1493 -
1494 - gallium_enable video_cards_freedreno freedreno
1495 - # opencl stuff
1496 - if use opencl; then
1497 - myconf+="
1498 - $(use_enable opencl)
1499 - --with-clang-libdir="${EPREFIX}/usr/lib"
1500 - "
1501 - fi
1502 -
1503 - gallium_enable video_cards_virgl virgl
1504 - fi
1505 -
1506 - if use vulkan; then
1507 - vulkan_enable video_cards_i965 intel
1508 - vulkan_enable video_cards_radeonsi radeon
1509 - fi
1510 -
1511 - # x86 hardened pax_kernel needs glx-rts, bug 240956
1512 - if [[ ${ABI} == x86 ]]; then
1513 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
1514 - fi
1515 -
1516 - # on abi_x86_32 hardened we need to have asm disable
1517 - if [[ ${ABI} == x86* ]] && use pic; then
1518 - myconf+=" --disable-asm"
1519 - fi
1520 -
1521 - if use gallium; then
1522 - myconf+=" $(use_enable osmesa gallium-osmesa)"
1523 - else
1524 - myconf+=" $(use_enable osmesa)"
1525 - fi
1526 -
1527 - # build fails with BSD indent, bug #428112
1528 - use userland_GNU || export INDENT=cat
1529 -
1530 - ECONF_SOURCE="${S}" \
1531 - econf \
1532 - --enable-dri \
1533 - --enable-glx \
1534 - --enable-shared-glapi \
1535 - $(use_enable !bindist texture-float) \
1536 - $(use_enable d3d9 nine) \
1537 - $(use_enable debug) \
1538 - $(use_enable dri3) \
1539 - $(use_enable egl) \
1540 - $(use_enable gbm) \
1541 - $(use_enable gles1) \
1542 - $(use_enable gles2) \
1543 - $(use_enable nptl glx-tls) \
1544 - $(use_enable unwind libunwind) \
1545 - --enable-valgrind=$(usex valgrind auto no) \
1546 - --enable-llvm-shared-libs \
1547 - --with-dri-drivers=${DRI_DRIVERS} \
1548 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
1549 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
1550 - PYTHON2="${PYTHON}" \
1551 - ${myconf}
1552 -}
1553 -
1554 -multilib_src_install() {
1555 - emake install DESTDIR="${D}"
1556 -
1557 - if use classic || use gallium; then
1558 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
1559 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
1560 - keepdir /usr/$(get_libdir)/dri
1561 - dodir /usr/$(get_libdir)/mesa
1562 - for x in ${gallium_drivers[@]}; do
1563 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
1564 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
1565 - || die "Failed to move ${x}"
1566 - fi
1567 - done
1568 - if use classic; then
1569 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
1570 - fi
1571 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
1572 - if [ -f ${x} -o -L ${x} ]; then
1573 - mv -f "${x}" "${x/dri/mesa}" \
1574 - || die "Failed to move ${x}"
1575 - fi
1576 - done
1577 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
1578 - ln -s ../mesa/*.so . || die "Creating symlink failed"
1579 - # remove symlinks to drivers known to eselect
1580 - for x in ${gallium_drivers[@]}; do
1581 - if [ -f ${x} -o -L ${x} ]; then
1582 - rm "${x}" || die "Failed to remove ${x}"
1583 - fi
1584 - done
1585 - popd
1586 - eend $?
1587 - fi
1588 - if use opencl; then
1589 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
1590 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
1591 - dodir ${cl_dir}/{lib,include}
1592 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
1593 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
1594 - "${ED}"${cl_dir}
1595 - fi
1596 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
1597 - mv -f "${ED}"/usr/include/CL \
1598 - "${ED}"${cl_dir}/include
1599 - fi
1600 - eend $?
1601 - fi
1602 -
1603 - if use openmax; then
1604 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
1605 - doenvd "${T}"/99mesaxdgomx
1606 - keepdir /usr/share/mesa/xdg
1607 - fi
1608 -}
1609 -
1610 -multilib_src_install_all() {
1611 - find "${ED}" -name '*.la' -delete
1612 - einstalldocs
1613 -
1614 - if use !bindist; then
1615 - dodoc docs/patents.txt
1616 - fi
1617 -
1618 - # Install config file for eselect mesa
1619 - insinto /usr/share/mesa
1620 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
1621 -}
1622 -
1623 -multilib_src_test() {
1624 - if use llvm; then
1625 - 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'
1626 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
1627 - emake ${llvm_tests}
1628 - pax-mark m ${llvm_tests}
1629 - popd >/dev/null || die
1630 - fi
1631 - emake check
1632 -}
1633 -
1634 -pkg_postinst() {
1635 - # Switch to the xorg implementation.
1636 - echo
1637 - eselect opengl set --use-old ${OPENGL_DIR}
1638 -
1639 - # Select classic/gallium drivers
1640 - if use classic || use gallium; then
1641 - eselect mesa set --auto
1642 - fi
1643 -
1644 - # Switch to mesa opencl
1645 - if use opencl; then
1646 - eselect opencl set --use-old ${PN}
1647 - fi
1648 -
1649 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
1650 - if use openmax; then
1651 - ebegin "Registering OpenMAX drivers"
1652 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
1653 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
1654 - omxregister-bellagio
1655 - eend $?
1656 - fi
1657 -
1658 - # warn about patent encumbered texture-float
1659 - if use !bindist; then
1660 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
1661 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
1662 - elog "explanation."
1663 - fi
1664 -}
1665 -
1666 -pkg_prerm() {
1667 - if use openmax; then
1668 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
1669 - fi
1670 -}
1671 -
1672 -# $1 - VIDEO_CARDS flag
1673 -# other args - names of DRI drivers to enable
1674 -# TODO: avoid code duplication for a more elegant implementation
1675 -driver_enable() {
1676 - case $# in
1677 - # for enabling unconditionally
1678 - 1)
1679 - DRI_DRIVERS+=",$1"
1680 - ;;
1681 - *)
1682 - if use $1; then
1683 - shift
1684 - for i in $@; do
1685 - DRI_DRIVERS+=",${i}"
1686 - done
1687 - fi
1688 - ;;
1689 - esac
1690 -}
1691 -
1692 -gallium_enable() {
1693 - case $# in
1694 - # for enabling unconditionally
1695 - 1)
1696 - GALLIUM_DRIVERS+=",$1"
1697 - ;;
1698 - *)
1699 - if use $1; then
1700 - shift
1701 - for i in $@; do
1702 - GALLIUM_DRIVERS+=",${i}"
1703 - done
1704 - fi
1705 - ;;
1706 - esac
1707 -}
1708 -
1709 -vulkan_enable() {
1710 - case $# in
1711 - # for enabling unconditionally
1712 - 1)
1713 - VULKAN_DRIVERS+=",$1"
1714 - ;;
1715 - *)
1716 - if use $1; then
1717 - shift
1718 - for i in $@; do
1719 - VULKAN_DRIVERS+=",${i}"
1720 - done
1721 - fi
1722 - ;;
1723 - esac
1724 -}
1725
1726 diff --git a/media-libs/mesa/mesa-18.0.0.ebuild b/media-libs/mesa/mesa-18.0.0.ebuild
1727 deleted file mode 100644
1728 index 6cdc82a5cc3..00000000000
1729 --- a/media-libs/mesa/mesa-18.0.0.ebuild
1730 +++ /dev/null
1731 @@ -1,583 +0,0 @@
1732 -# Copyright 1999-2018 Gentoo Foundation
1733 -# Distributed under the terms of the GNU General Public License v2
1734 -
1735 -EAPI=6
1736 -
1737 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
1738 -
1739 -if [[ ${PV} = 9999 ]]; then
1740 - GIT_ECLASS="git-r3"
1741 - EXPERIMENTAL="true"
1742 -fi
1743 -
1744 -PYTHON_COMPAT=( python2_7 )
1745 -
1746 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
1747 -
1748 -OPENGL_DIR="xorg-x11"
1749 -
1750 -MY_P="${P/_/-}"
1751 -
1752 -DESCRIPTION="OpenGL-like graphic library for Linux"
1753 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
1754 -
1755 -if [[ $PV == 9999 ]]; then
1756 - SRC_URI=""
1757 -else
1758 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
1759 - 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"
1760 -fi
1761 -
1762 -LICENSE="MIT"
1763 -SLOT="0"
1764 -RESTRICT="!bindist? ( bindist )"
1765 -
1766 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
1767 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
1768 -for card in ${VIDEO_CARDS}; do
1769 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
1770 -done
1771 -
1772 -IUSE="${IUSE_VIDEO_CARDS}
1773 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
1774 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
1775 - vdpau vulkan wayland xvmc xa"
1776 -
1777 -REQUIRED_USE="
1778 - d3d9? ( dri3 gallium )
1779 - llvm? ( gallium )
1780 - opencl? ( gallium llvm )
1781 - openmax? ( gallium )
1782 - gles1? ( egl )
1783 - gles2? ( egl )
1784 - vaapi? ( gallium )
1785 - vdpau? ( gallium )
1786 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
1787 - video_cards_radeonsi? ( llvm ) )
1788 - wayland? ( egl gbm )
1789 - xa? ( gallium )
1790 - video_cards_freedreno? ( gallium )
1791 - video_cards_intel? ( classic )
1792 - video_cards_i915? ( || ( classic gallium ) )
1793 - video_cards_i965? ( classic )
1794 - video_cards_imx? ( gallium video_cards_vivante )
1795 - video_cards_nouveau? ( || ( classic gallium ) )
1796 - video_cards_radeon? ( || ( classic gallium )
1797 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
1798 - video_cards_r100? ( classic )
1799 - video_cards_r200? ( classic )
1800 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
1801 - video_cards_r600? ( gallium )
1802 - video_cards_radeonsi? ( gallium llvm )
1803 - video_cards_vc4? ( gallium )
1804 - video_cards_virgl? ( gallium )
1805 - video_cards_vivante? ( gallium gbm )
1806 - video_cards_vmware? ( gallium )
1807 -"
1808 -
1809 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.89"
1810 -# keep correct libdrm and dri2proto dep
1811 -# keep blocks in rdepend for binpkg
1812 -RDEPEND="
1813 - !<x11-base/xorg-server-1.7
1814 - !<=x11-proto/xf86driproto-2.0.3
1815 - classic? ( app-eselect/eselect-mesa )
1816 - gallium? ( app-eselect/eselect-mesa )
1817 - >=app-eselect/eselect-opengl-1.3.0
1818 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
1819 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
1820 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
1821 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
1822 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
1823 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
1824 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
1825 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
1826 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
1827 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
1828 - llvm? (
1829 - video_cards_radeonsi? (
1830 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1831 - )
1832 - video_cards_r600? (
1833 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1834 - )
1835 - video_cards_radeon? (
1836 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1837 - )
1838 - )
1839 - opencl? (
1840 - app-eselect/eselect-opencl
1841 - dev-libs/libclc
1842 - virtual/libelf:0=[${MULTILIB_USEDEP}]
1843 - )
1844 - openmax? (
1845 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
1846 - x11-misc/xdg-utils
1847 - )
1848 - vaapi? (
1849 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
1850 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
1851 - )
1852 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
1853 - wayland? (
1854 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
1855 - >=dev-libs/wayland-protocols-1.8
1856 - )
1857 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
1858 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
1859 -
1860 - video_cards_intel? (
1861 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1862 - )
1863 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
1864 -"
1865 -for card in ${RADEON_CARDS}; do
1866 - RDEPEND="${RDEPEND}
1867 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
1868 - "
1869 -done
1870 -RDEPEND="${RDEPEND}
1871 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
1872 -"
1873 -
1874 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
1875 -# we need to *really* make sure we're not pulling one than more slot
1876 -# simultaneously.
1877 -#
1878 -# How to use it:
1879 -# 1. List all the working slots (with min versions) in ||, newest first.
1880 -# 2. Update the := to specify *max* version, e.g. < 7.
1881 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
1882 -LLVM_DEPSTR="
1883 - || (
1884 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
1885 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
1886 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
1887 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
1888 - )
1889 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
1890 -"
1891 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1892 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
1893 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
1894 -RDEPEND="${RDEPEND}
1895 - llvm? (
1896 - opencl? (
1897 - video_cards_r600? (
1898 - ${CLANG_DEPSTR_AMDGPU}
1899 - )
1900 - !video_cards_r600? (
1901 - video_cards_radeonsi? (
1902 - ${CLANG_DEPSTR_AMDGPU}
1903 - )
1904 - )
1905 - !video_cards_r600? (
1906 - !video_cards_radeonsi? (
1907 - video_cards_radeon? (
1908 - ${CLANG_DEPSTR_AMDGPU}
1909 - )
1910 - )
1911 - )
1912 - !video_cards_r600? (
1913 - !video_cards_radeon? (
1914 - !video_cards_radeonsi? (
1915 - ${CLANG_DEPSTR}
1916 - )
1917 - )
1918 - )
1919 - )
1920 - !opencl? (
1921 - video_cards_r600? (
1922 - ${LLVM_DEPSTR_AMDGPU}
1923 - )
1924 - !video_cards_r600? (
1925 - video_cards_radeonsi? (
1926 - ${LLVM_DEPSTR_AMDGPU}
1927 - )
1928 - )
1929 - !video_cards_r600? (
1930 - !video_cards_radeonsi? (
1931 - video_cards_radeon? (
1932 - ${LLVM_DEPSTR_AMDGPU}
1933 - )
1934 - )
1935 - )
1936 - !video_cards_r600? (
1937 - !video_cards_radeon? (
1938 - !video_cards_radeonsi? (
1939 - ${LLVM_DEPSTR}
1940 - )
1941 - )
1942 - )
1943 - )
1944 - )
1945 -"
1946 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
1947 -
1948 -DEPEND="${RDEPEND}
1949 - ${PYTHON_DEPS}
1950 - opencl? (
1951 - >=sys-devel/gcc-4.6
1952 - )
1953 - sys-devel/gettext
1954 - virtual/pkgconfig
1955 - valgrind? ( dev-util/valgrind )
1956 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
1957 - dri3? (
1958 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
1959 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
1960 - )
1961 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
1962 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
1963 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
1964 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
1965 - vulkan? (
1966 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
1967 - )
1968 -"
1969 -[[ ${PV} == 9999 ]] && DEPEND+="
1970 - sys-devel/bison
1971 - sys-devel/flex
1972 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
1973 -"
1974 -
1975 -S="${WORKDIR}/${MY_P}"
1976 -EGIT_CHECKOUT_DIR=${S}
1977 -
1978 -QA_WX_LOAD="
1979 -x86? (
1980 - !pic? (
1981 - usr/lib*/libglapi.so.0.0.0
1982 - usr/lib*/libGLESv1_CM.so.1.1.0
1983 - usr/lib*/libGLESv2.so.2.0.0
1984 - usr/lib*/libGL.so.1.2.0
1985 - usr/lib*/libOSMesa.so.8.0.0
1986 - )
1987 -)"
1988 -
1989 -llvm_check_deps() {
1990 - local flags=${MULTILIB_USEDEP}
1991 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
1992 - then
1993 - flags+=",llvm_targets_AMDGPU(-)"
1994 - fi
1995 -
1996 - if use opencl; then
1997 - has_version "sys-devel/clang[${flags}]" || return 1
1998 - fi
1999 - has_version "sys-devel/llvm[${flags}]"
2000 -}
2001 -
2002 -pkg_setup() {
2003 - # warning message for bug 459306
2004 - if use llvm && has_version sys-devel/llvm[!debug=]; then
2005 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
2006 - ewarn "detected! This can cause problems. For details, see bug 459306."
2007 - fi
2008 -
2009 - if use llvm; then
2010 - llvm_pkg_setup
2011 - fi
2012 - python-any-r1_pkg_setup
2013 -}
2014 -
2015 -src_prepare() {
2016 - [[ ${PV} == 9999 ]] && eautoreconf
2017 - eapply_user
2018 -}
2019 -
2020 -multilib_src_configure() {
2021 - local myconf
2022 -
2023 - if use classic; then
2024 - # Configurable DRI drivers
2025 - driver_enable swrast
2026 -
2027 - # Intel code
2028 - driver_enable video_cards_i915 i915
2029 - driver_enable video_cards_i965 i965
2030 - if ! use video_cards_i915 && \
2031 - ! use video_cards_i965; then
2032 - driver_enable video_cards_intel i915 i965
2033 - fi
2034 -
2035 - # Nouveau code
2036 - driver_enable video_cards_nouveau nouveau
2037 -
2038 - # ATI code
2039 - driver_enable video_cards_r100 radeon
2040 - driver_enable video_cards_r200 r200
2041 - if ! use video_cards_r100 && \
2042 - ! use video_cards_r200; then
2043 - driver_enable video_cards_radeon radeon r200
2044 - fi
2045 - fi
2046 -
2047 - if use egl; then
2048 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
2049 - fi
2050 -
2051 - if use gallium; then
2052 - myconf+="
2053 - $(use_enable d3d9 nine)
2054 - $(use_enable llvm)
2055 - $(use_enable openmax omx-bellagio)
2056 - $(use_enable vaapi va)
2057 - $(use_enable vdpau)
2058 - $(use_enable xa)
2059 - $(use_enable xvmc)
2060 - "
2061 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
2062 -
2063 - gallium_enable swrast
2064 - gallium_enable video_cards_vc4 vc4
2065 - gallium_enable video_cards_vivante etnaviv
2066 - gallium_enable video_cards_vmware svga
2067 - gallium_enable video_cards_nouveau nouveau
2068 - gallium_enable video_cards_i915 i915
2069 - gallium_enable video_cards_imx imx
2070 - if ! use video_cards_i915 && \
2071 - ! use video_cards_i965; then
2072 - gallium_enable video_cards_intel i915
2073 - fi
2074 -
2075 - gallium_enable video_cards_r300 r300
2076 - gallium_enable video_cards_r600 r600
2077 - gallium_enable video_cards_radeonsi radeonsi
2078 - if ! use video_cards_r300 && \
2079 - ! use video_cards_r600; then
2080 - gallium_enable video_cards_radeon r300 r600
2081 - fi
2082 -
2083 - gallium_enable video_cards_freedreno freedreno
2084 - # opencl stuff
2085 - if use opencl; then
2086 - myconf+="
2087 - $(use_enable opencl)
2088 - --with-clang-libdir="${EPREFIX}/usr/lib"
2089 - "
2090 - fi
2091 -
2092 - gallium_enable video_cards_virgl virgl
2093 - fi
2094 -
2095 - if use vulkan; then
2096 - vulkan_enable video_cards_i965 intel
2097 - vulkan_enable video_cards_radeonsi radeon
2098 - fi
2099 -
2100 - # x86 hardened pax_kernel needs glx-rts, bug 240956
2101 - if [[ ${ABI} == x86 ]]; then
2102 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
2103 - fi
2104 -
2105 - # on abi_x86_32 hardened we need to have asm disable
2106 - if [[ ${ABI} == x86* ]] && use pic; then
2107 - myconf+=" --disable-asm"
2108 - fi
2109 -
2110 - if use gallium; then
2111 - myconf+=" $(use_enable osmesa gallium-osmesa)"
2112 - else
2113 - myconf+=" $(use_enable osmesa)"
2114 - fi
2115 -
2116 - # build fails with BSD indent, bug #428112
2117 - use userland_GNU || export INDENT=cat
2118 -
2119 - ECONF_SOURCE="${S}" \
2120 - econf \
2121 - --enable-dri \
2122 - --enable-glx \
2123 - --enable-shared-glapi \
2124 - $(use_enable !bindist texture-float) \
2125 - $(use_enable d3d9 nine) \
2126 - $(use_enable debug) \
2127 - $(use_enable dri3) \
2128 - $(use_enable egl) \
2129 - $(use_enable gbm) \
2130 - $(use_enable gles1) \
2131 - $(use_enable gles2) \
2132 - $(use_enable nptl glx-tls) \
2133 - $(use_enable unwind libunwind) \
2134 - --enable-valgrind=$(usex valgrind auto no) \
2135 - --enable-llvm-shared-libs \
2136 - --disable-opencl-icd \
2137 - --with-dri-drivers=${DRI_DRIVERS} \
2138 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
2139 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
2140 - PYTHON2="${PYTHON}" \
2141 - ${myconf}
2142 -}
2143 -
2144 -multilib_src_install() {
2145 - emake install DESTDIR="${D}"
2146 -
2147 - if use classic || use gallium; then
2148 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
2149 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
2150 - keepdir /usr/$(get_libdir)/dri
2151 - dodir /usr/$(get_libdir)/mesa
2152 - for x in ${gallium_drivers[@]}; do
2153 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
2154 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
2155 - || die "Failed to move ${x}"
2156 - fi
2157 - done
2158 - if use classic; then
2159 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
2160 - fi
2161 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
2162 - if [ -f ${x} -o -L ${x} ]; then
2163 - mv -f "${x}" "${x/dri/mesa}" \
2164 - || die "Failed to move ${x}"
2165 - fi
2166 - done
2167 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
2168 - ln -s ../mesa/*.so . || die "Creating symlink failed"
2169 - # remove symlinks to drivers known to eselect
2170 - for x in ${gallium_drivers[@]}; do
2171 - if [ -f ${x} -o -L ${x} ]; then
2172 - rm "${x}" || die "Failed to remove ${x}"
2173 - fi
2174 - done
2175 - popd
2176 - eend $?
2177 - fi
2178 - if use opencl; then
2179 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
2180 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
2181 - dodir ${cl_dir}/{lib,include}
2182 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
2183 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
2184 - "${ED}"${cl_dir}
2185 - fi
2186 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
2187 - mv -f "${ED}"/usr/include/CL \
2188 - "${ED}"${cl_dir}/include
2189 - fi
2190 - eend $?
2191 - fi
2192 -
2193 - if use openmax; then
2194 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
2195 - doenvd "${T}"/99mesaxdgomx
2196 - keepdir /usr/share/mesa/xdg
2197 - fi
2198 -}
2199 -
2200 -multilib_src_install_all() {
2201 - find "${ED}" -name '*.la' -delete
2202 - einstalldocs
2203 -
2204 - if use !bindist; then
2205 - dodoc docs/patents.txt
2206 - fi
2207 -
2208 - # Install config file for eselect mesa
2209 - insinto /usr/share/mesa
2210 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
2211 -}
2212 -
2213 -multilib_src_test() {
2214 - if use llvm; then
2215 - 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'
2216 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
2217 - emake ${llvm_tests}
2218 - pax-mark m ${llvm_tests}
2219 - popd >/dev/null || die
2220 - fi
2221 - emake check
2222 -}
2223 -
2224 -pkg_postinst() {
2225 - # Switch to the xorg implementation.
2226 - echo
2227 - eselect opengl set --use-old ${OPENGL_DIR}
2228 -
2229 - # Select classic/gallium drivers
2230 - if use classic || use gallium; then
2231 - eselect mesa set --auto
2232 - fi
2233 -
2234 - # Switch to mesa opencl
2235 - if use opencl; then
2236 - eselect opencl set --use-old ${PN}
2237 - fi
2238 -
2239 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
2240 - if use openmax; then
2241 - ebegin "Registering OpenMAX drivers"
2242 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
2243 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
2244 - omxregister-bellagio
2245 - eend $?
2246 - fi
2247 -
2248 - # warn about patent encumbered texture-float
2249 - if use !bindist; then
2250 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
2251 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
2252 - elog "explanation."
2253 - fi
2254 -}
2255 -
2256 -pkg_prerm() {
2257 - if use openmax; then
2258 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
2259 - fi
2260 -}
2261 -
2262 -# $1 - VIDEO_CARDS flag
2263 -# other args - names of DRI drivers to enable
2264 -# TODO: avoid code duplication for a more elegant implementation
2265 -driver_enable() {
2266 - case $# in
2267 - # for enabling unconditionally
2268 - 1)
2269 - DRI_DRIVERS+=",$1"
2270 - ;;
2271 - *)
2272 - if use $1; then
2273 - shift
2274 - for i in $@; do
2275 - DRI_DRIVERS+=",${i}"
2276 - done
2277 - fi
2278 - ;;
2279 - esac
2280 -}
2281 -
2282 -gallium_enable() {
2283 - case $# in
2284 - # for enabling unconditionally
2285 - 1)
2286 - GALLIUM_DRIVERS+=",$1"
2287 - ;;
2288 - *)
2289 - if use $1; then
2290 - shift
2291 - for i in $@; do
2292 - GALLIUM_DRIVERS+=",${i}"
2293 - done
2294 - fi
2295 - ;;
2296 - esac
2297 -}
2298 -
2299 -vulkan_enable() {
2300 - case $# in
2301 - # for enabling unconditionally
2302 - 1)
2303 - VULKAN_DRIVERS+=",$1"
2304 - ;;
2305 - *)
2306 - if use $1; then
2307 - shift
2308 - for i in $@; do
2309 - VULKAN_DRIVERS+=",${i}"
2310 - done
2311 - fi
2312 - ;;
2313 - esac
2314 -}
2315
2316 diff --git a/media-libs/mesa/mesa-18.0.1.ebuild b/media-libs/mesa/mesa-18.0.1.ebuild
2317 deleted file mode 100644
2318 index 6cdc82a5cc3..00000000000
2319 --- a/media-libs/mesa/mesa-18.0.1.ebuild
2320 +++ /dev/null
2321 @@ -1,583 +0,0 @@
2322 -# Copyright 1999-2018 Gentoo Foundation
2323 -# Distributed under the terms of the GNU General Public License v2
2324 -
2325 -EAPI=6
2326 -
2327 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
2328 -
2329 -if [[ ${PV} = 9999 ]]; then
2330 - GIT_ECLASS="git-r3"
2331 - EXPERIMENTAL="true"
2332 -fi
2333 -
2334 -PYTHON_COMPAT=( python2_7 )
2335 -
2336 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
2337 -
2338 -OPENGL_DIR="xorg-x11"
2339 -
2340 -MY_P="${P/_/-}"
2341 -
2342 -DESCRIPTION="OpenGL-like graphic library for Linux"
2343 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
2344 -
2345 -if [[ $PV == 9999 ]]; then
2346 - SRC_URI=""
2347 -else
2348 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
2349 - 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"
2350 -fi
2351 -
2352 -LICENSE="MIT"
2353 -SLOT="0"
2354 -RESTRICT="!bindist? ( bindist )"
2355 -
2356 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
2357 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
2358 -for card in ${VIDEO_CARDS}; do
2359 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
2360 -done
2361 -
2362 -IUSE="${IUSE_VIDEO_CARDS}
2363 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
2364 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
2365 - vdpau vulkan wayland xvmc xa"
2366 -
2367 -REQUIRED_USE="
2368 - d3d9? ( dri3 gallium )
2369 - llvm? ( gallium )
2370 - opencl? ( gallium llvm )
2371 - openmax? ( gallium )
2372 - gles1? ( egl )
2373 - gles2? ( egl )
2374 - vaapi? ( gallium )
2375 - vdpau? ( gallium )
2376 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
2377 - video_cards_radeonsi? ( llvm ) )
2378 - wayland? ( egl gbm )
2379 - xa? ( gallium )
2380 - video_cards_freedreno? ( gallium )
2381 - video_cards_intel? ( classic )
2382 - video_cards_i915? ( || ( classic gallium ) )
2383 - video_cards_i965? ( classic )
2384 - video_cards_imx? ( gallium video_cards_vivante )
2385 - video_cards_nouveau? ( || ( classic gallium ) )
2386 - video_cards_radeon? ( || ( classic gallium )
2387 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
2388 - video_cards_r100? ( classic )
2389 - video_cards_r200? ( classic )
2390 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
2391 - video_cards_r600? ( gallium )
2392 - video_cards_radeonsi? ( gallium llvm )
2393 - video_cards_vc4? ( gallium )
2394 - video_cards_virgl? ( gallium )
2395 - video_cards_vivante? ( gallium gbm )
2396 - video_cards_vmware? ( gallium )
2397 -"
2398 -
2399 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.89"
2400 -# keep correct libdrm and dri2proto dep
2401 -# keep blocks in rdepend for binpkg
2402 -RDEPEND="
2403 - !<x11-base/xorg-server-1.7
2404 - !<=x11-proto/xf86driproto-2.0.3
2405 - classic? ( app-eselect/eselect-mesa )
2406 - gallium? ( app-eselect/eselect-mesa )
2407 - >=app-eselect/eselect-opengl-1.3.0
2408 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
2409 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
2410 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
2411 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
2412 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
2413 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
2414 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
2415 - >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
2416 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
2417 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
2418 - llvm? (
2419 - video_cards_radeonsi? (
2420 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2421 - )
2422 - video_cards_r600? (
2423 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2424 - )
2425 - video_cards_radeon? (
2426 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2427 - )
2428 - )
2429 - opencl? (
2430 - app-eselect/eselect-opencl
2431 - dev-libs/libclc
2432 - virtual/libelf:0=[${MULTILIB_USEDEP}]
2433 - )
2434 - openmax? (
2435 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
2436 - x11-misc/xdg-utils
2437 - )
2438 - vaapi? (
2439 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
2440 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
2441 - )
2442 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
2443 - wayland? (
2444 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
2445 - >=dev-libs/wayland-protocols-1.8
2446 - )
2447 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
2448 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
2449 -
2450 - video_cards_intel? (
2451 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2452 - )
2453 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
2454 -"
2455 -for card in ${RADEON_CARDS}; do
2456 - RDEPEND="${RDEPEND}
2457 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
2458 - "
2459 -done
2460 -RDEPEND="${RDEPEND}
2461 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
2462 -"
2463 -
2464 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
2465 -# we need to *really* make sure we're not pulling one than more slot
2466 -# simultaneously.
2467 -#
2468 -# How to use it:
2469 -# 1. List all the working slots (with min versions) in ||, newest first.
2470 -# 2. Update the := to specify *max* version, e.g. < 7.
2471 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
2472 -LLVM_DEPSTR="
2473 - || (
2474 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
2475 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
2476 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
2477 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
2478 - )
2479 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
2480 -"
2481 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2482 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
2483 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
2484 -RDEPEND="${RDEPEND}
2485 - llvm? (
2486 - opencl? (
2487 - video_cards_r600? (
2488 - ${CLANG_DEPSTR_AMDGPU}
2489 - )
2490 - !video_cards_r600? (
2491 - video_cards_radeonsi? (
2492 - ${CLANG_DEPSTR_AMDGPU}
2493 - )
2494 - )
2495 - !video_cards_r600? (
2496 - !video_cards_radeonsi? (
2497 - video_cards_radeon? (
2498 - ${CLANG_DEPSTR_AMDGPU}
2499 - )
2500 - )
2501 - )
2502 - !video_cards_r600? (
2503 - !video_cards_radeon? (
2504 - !video_cards_radeonsi? (
2505 - ${CLANG_DEPSTR}
2506 - )
2507 - )
2508 - )
2509 - )
2510 - !opencl? (
2511 - video_cards_r600? (
2512 - ${LLVM_DEPSTR_AMDGPU}
2513 - )
2514 - !video_cards_r600? (
2515 - video_cards_radeonsi? (
2516 - ${LLVM_DEPSTR_AMDGPU}
2517 - )
2518 - )
2519 - !video_cards_r600? (
2520 - !video_cards_radeonsi? (
2521 - video_cards_radeon? (
2522 - ${LLVM_DEPSTR_AMDGPU}
2523 - )
2524 - )
2525 - )
2526 - !video_cards_r600? (
2527 - !video_cards_radeon? (
2528 - !video_cards_radeonsi? (
2529 - ${LLVM_DEPSTR}
2530 - )
2531 - )
2532 - )
2533 - )
2534 - )
2535 -"
2536 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
2537 -
2538 -DEPEND="${RDEPEND}
2539 - ${PYTHON_DEPS}
2540 - opencl? (
2541 - >=sys-devel/gcc-4.6
2542 - )
2543 - sys-devel/gettext
2544 - virtual/pkgconfig
2545 - valgrind? ( dev-util/valgrind )
2546 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
2547 - dri3? (
2548 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
2549 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
2550 - )
2551 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
2552 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
2553 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
2554 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
2555 - vulkan? (
2556 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
2557 - )
2558 -"
2559 -[[ ${PV} == 9999 ]] && DEPEND+="
2560 - sys-devel/bison
2561 - sys-devel/flex
2562 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
2563 -"
2564 -
2565 -S="${WORKDIR}/${MY_P}"
2566 -EGIT_CHECKOUT_DIR=${S}
2567 -
2568 -QA_WX_LOAD="
2569 -x86? (
2570 - !pic? (
2571 - usr/lib*/libglapi.so.0.0.0
2572 - usr/lib*/libGLESv1_CM.so.1.1.0
2573 - usr/lib*/libGLESv2.so.2.0.0
2574 - usr/lib*/libGL.so.1.2.0
2575 - usr/lib*/libOSMesa.so.8.0.0
2576 - )
2577 -)"
2578 -
2579 -llvm_check_deps() {
2580 - local flags=${MULTILIB_USEDEP}
2581 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
2582 - then
2583 - flags+=",llvm_targets_AMDGPU(-)"
2584 - fi
2585 -
2586 - if use opencl; then
2587 - has_version "sys-devel/clang[${flags}]" || return 1
2588 - fi
2589 - has_version "sys-devel/llvm[${flags}]"
2590 -}
2591 -
2592 -pkg_setup() {
2593 - # warning message for bug 459306
2594 - if use llvm && has_version sys-devel/llvm[!debug=]; then
2595 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
2596 - ewarn "detected! This can cause problems. For details, see bug 459306."
2597 - fi
2598 -
2599 - if use llvm; then
2600 - llvm_pkg_setup
2601 - fi
2602 - python-any-r1_pkg_setup
2603 -}
2604 -
2605 -src_prepare() {
2606 - [[ ${PV} == 9999 ]] && eautoreconf
2607 - eapply_user
2608 -}
2609 -
2610 -multilib_src_configure() {
2611 - local myconf
2612 -
2613 - if use classic; then
2614 - # Configurable DRI drivers
2615 - driver_enable swrast
2616 -
2617 - # Intel code
2618 - driver_enable video_cards_i915 i915
2619 - driver_enable video_cards_i965 i965
2620 - if ! use video_cards_i915 && \
2621 - ! use video_cards_i965; then
2622 - driver_enable video_cards_intel i915 i965
2623 - fi
2624 -
2625 - # Nouveau code
2626 - driver_enable video_cards_nouveau nouveau
2627 -
2628 - # ATI code
2629 - driver_enable video_cards_r100 radeon
2630 - driver_enable video_cards_r200 r200
2631 - if ! use video_cards_r100 && \
2632 - ! use video_cards_r200; then
2633 - driver_enable video_cards_radeon radeon r200
2634 - fi
2635 - fi
2636 -
2637 - if use egl; then
2638 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
2639 - fi
2640 -
2641 - if use gallium; then
2642 - myconf+="
2643 - $(use_enable d3d9 nine)
2644 - $(use_enable llvm)
2645 - $(use_enable openmax omx-bellagio)
2646 - $(use_enable vaapi va)
2647 - $(use_enable vdpau)
2648 - $(use_enable xa)
2649 - $(use_enable xvmc)
2650 - "
2651 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
2652 -
2653 - gallium_enable swrast
2654 - gallium_enable video_cards_vc4 vc4
2655 - gallium_enable video_cards_vivante etnaviv
2656 - gallium_enable video_cards_vmware svga
2657 - gallium_enable video_cards_nouveau nouveau
2658 - gallium_enable video_cards_i915 i915
2659 - gallium_enable video_cards_imx imx
2660 - if ! use video_cards_i915 && \
2661 - ! use video_cards_i965; then
2662 - gallium_enable video_cards_intel i915
2663 - fi
2664 -
2665 - gallium_enable video_cards_r300 r300
2666 - gallium_enable video_cards_r600 r600
2667 - gallium_enable video_cards_radeonsi radeonsi
2668 - if ! use video_cards_r300 && \
2669 - ! use video_cards_r600; then
2670 - gallium_enable video_cards_radeon r300 r600
2671 - fi
2672 -
2673 - gallium_enable video_cards_freedreno freedreno
2674 - # opencl stuff
2675 - if use opencl; then
2676 - myconf+="
2677 - $(use_enable opencl)
2678 - --with-clang-libdir="${EPREFIX}/usr/lib"
2679 - "
2680 - fi
2681 -
2682 - gallium_enable video_cards_virgl virgl
2683 - fi
2684 -
2685 - if use vulkan; then
2686 - vulkan_enable video_cards_i965 intel
2687 - vulkan_enable video_cards_radeonsi radeon
2688 - fi
2689 -
2690 - # x86 hardened pax_kernel needs glx-rts, bug 240956
2691 - if [[ ${ABI} == x86 ]]; then
2692 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
2693 - fi
2694 -
2695 - # on abi_x86_32 hardened we need to have asm disable
2696 - if [[ ${ABI} == x86* ]] && use pic; then
2697 - myconf+=" --disable-asm"
2698 - fi
2699 -
2700 - if use gallium; then
2701 - myconf+=" $(use_enable osmesa gallium-osmesa)"
2702 - else
2703 - myconf+=" $(use_enable osmesa)"
2704 - fi
2705 -
2706 - # build fails with BSD indent, bug #428112
2707 - use userland_GNU || export INDENT=cat
2708 -
2709 - ECONF_SOURCE="${S}" \
2710 - econf \
2711 - --enable-dri \
2712 - --enable-glx \
2713 - --enable-shared-glapi \
2714 - $(use_enable !bindist texture-float) \
2715 - $(use_enable d3d9 nine) \
2716 - $(use_enable debug) \
2717 - $(use_enable dri3) \
2718 - $(use_enable egl) \
2719 - $(use_enable gbm) \
2720 - $(use_enable gles1) \
2721 - $(use_enable gles2) \
2722 - $(use_enable nptl glx-tls) \
2723 - $(use_enable unwind libunwind) \
2724 - --enable-valgrind=$(usex valgrind auto no) \
2725 - --enable-llvm-shared-libs \
2726 - --disable-opencl-icd \
2727 - --with-dri-drivers=${DRI_DRIVERS} \
2728 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
2729 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
2730 - PYTHON2="${PYTHON}" \
2731 - ${myconf}
2732 -}
2733 -
2734 -multilib_src_install() {
2735 - emake install DESTDIR="${D}"
2736 -
2737 - if use classic || use gallium; then
2738 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
2739 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
2740 - keepdir /usr/$(get_libdir)/dri
2741 - dodir /usr/$(get_libdir)/mesa
2742 - for x in ${gallium_drivers[@]}; do
2743 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
2744 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
2745 - || die "Failed to move ${x}"
2746 - fi
2747 - done
2748 - if use classic; then
2749 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
2750 - fi
2751 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
2752 - if [ -f ${x} -o -L ${x} ]; then
2753 - mv -f "${x}" "${x/dri/mesa}" \
2754 - || die "Failed to move ${x}"
2755 - fi
2756 - done
2757 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
2758 - ln -s ../mesa/*.so . || die "Creating symlink failed"
2759 - # remove symlinks to drivers known to eselect
2760 - for x in ${gallium_drivers[@]}; do
2761 - if [ -f ${x} -o -L ${x} ]; then
2762 - rm "${x}" || die "Failed to remove ${x}"
2763 - fi
2764 - done
2765 - popd
2766 - eend $?
2767 - fi
2768 - if use opencl; then
2769 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
2770 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
2771 - dodir ${cl_dir}/{lib,include}
2772 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
2773 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
2774 - "${ED}"${cl_dir}
2775 - fi
2776 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
2777 - mv -f "${ED}"/usr/include/CL \
2778 - "${ED}"${cl_dir}/include
2779 - fi
2780 - eend $?
2781 - fi
2782 -
2783 - if use openmax; then
2784 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
2785 - doenvd "${T}"/99mesaxdgomx
2786 - keepdir /usr/share/mesa/xdg
2787 - fi
2788 -}
2789 -
2790 -multilib_src_install_all() {
2791 - find "${ED}" -name '*.la' -delete
2792 - einstalldocs
2793 -
2794 - if use !bindist; then
2795 - dodoc docs/patents.txt
2796 - fi
2797 -
2798 - # Install config file for eselect mesa
2799 - insinto /usr/share/mesa
2800 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
2801 -}
2802 -
2803 -multilib_src_test() {
2804 - if use llvm; then
2805 - 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'
2806 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
2807 - emake ${llvm_tests}
2808 - pax-mark m ${llvm_tests}
2809 - popd >/dev/null || die
2810 - fi
2811 - emake check
2812 -}
2813 -
2814 -pkg_postinst() {
2815 - # Switch to the xorg implementation.
2816 - echo
2817 - eselect opengl set --use-old ${OPENGL_DIR}
2818 -
2819 - # Select classic/gallium drivers
2820 - if use classic || use gallium; then
2821 - eselect mesa set --auto
2822 - fi
2823 -
2824 - # Switch to mesa opencl
2825 - if use opencl; then
2826 - eselect opencl set --use-old ${PN}
2827 - fi
2828 -
2829 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
2830 - if use openmax; then
2831 - ebegin "Registering OpenMAX drivers"
2832 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
2833 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
2834 - omxregister-bellagio
2835 - eend $?
2836 - fi
2837 -
2838 - # warn about patent encumbered texture-float
2839 - if use !bindist; then
2840 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
2841 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
2842 - elog "explanation."
2843 - fi
2844 -}
2845 -
2846 -pkg_prerm() {
2847 - if use openmax; then
2848 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
2849 - fi
2850 -}
2851 -
2852 -# $1 - VIDEO_CARDS flag
2853 -# other args - names of DRI drivers to enable
2854 -# TODO: avoid code duplication for a more elegant implementation
2855 -driver_enable() {
2856 - case $# in
2857 - # for enabling unconditionally
2858 - 1)
2859 - DRI_DRIVERS+=",$1"
2860 - ;;
2861 - *)
2862 - if use $1; then
2863 - shift
2864 - for i in $@; do
2865 - DRI_DRIVERS+=",${i}"
2866 - done
2867 - fi
2868 - ;;
2869 - esac
2870 -}
2871 -
2872 -gallium_enable() {
2873 - case $# in
2874 - # for enabling unconditionally
2875 - 1)
2876 - GALLIUM_DRIVERS+=",$1"
2877 - ;;
2878 - *)
2879 - if use $1; then
2880 - shift
2881 - for i in $@; do
2882 - GALLIUM_DRIVERS+=",${i}"
2883 - done
2884 - fi
2885 - ;;
2886 - esac
2887 -}
2888 -
2889 -vulkan_enable() {
2890 - case $# in
2891 - # for enabling unconditionally
2892 - 1)
2893 - VULKAN_DRIVERS+=",$1"
2894 - ;;
2895 - *)
2896 - if use $1; then
2897 - shift
2898 - for i in $@; do
2899 - VULKAN_DRIVERS+=",${i}"
2900 - done
2901 - fi
2902 - ;;
2903 - esac
2904 -}
2905
2906 diff --git a/media-libs/mesa/mesa-18.1.0_rc1.ebuild b/media-libs/mesa/mesa-18.1.0_rc1.ebuild
2907 deleted file mode 100644
2908 index 161933dd930..00000000000
2909 --- a/media-libs/mesa/mesa-18.1.0_rc1.ebuild
2910 +++ /dev/null
2911 @@ -1,584 +0,0 @@
2912 -# Copyright 1999-2018 Gentoo Foundation
2913 -# Distributed under the terms of the GNU General Public License v2
2914 -
2915 -EAPI=6
2916 -
2917 -EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git"
2918 -
2919 -if [[ ${PV} = 9999 ]]; then
2920 - GIT_ECLASS="git-r3"
2921 - EXPERIMENTAL="true"
2922 -fi
2923 -
2924 -PYTHON_COMPAT=( python2_7 )
2925 -
2926 -inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS}
2927 -
2928 -OPENGL_DIR="xorg-x11"
2929 -
2930 -MY_P="${P/_/-}"
2931 -
2932 -DESCRIPTION="OpenGL-like graphic library for Linux"
2933 -HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/"
2934 -
2935 -if [[ $PV == 9999 ]]; then
2936 - SRC_URI=""
2937 -else
2938 - SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz"
2939 - 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"
2940 -fi
2941 -
2942 -LICENSE="MIT"
2943 -SLOT="0"
2944 -RESTRICT="!bindist? ( bindist )"
2945 -
2946 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
2947 -VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware"
2948 -for card in ${VIDEO_CARDS}; do
2949 - IUSE_VIDEO_CARDS+=" video_cards_${card}"
2950 -done
2951 -
2952 -IUSE="${IUSE_VIDEO_CARDS}
2953 - bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind
2954 - +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind
2955 - vdpau vulkan wayland xvmc xa"
2956 -
2957 -REQUIRED_USE="
2958 - d3d9? ( dri3 gallium )
2959 - llvm? ( gallium )
2960 - opencl? ( gallium llvm )
2961 - openmax? ( gallium )
2962 - gles1? ( egl )
2963 - gles2? ( egl )
2964 - vaapi? ( gallium )
2965 - vdpau? ( gallium )
2966 - vulkan? ( || ( video_cards_i965 video_cards_radeonsi )
2967 - video_cards_radeonsi? ( llvm ) )
2968 - wayland? ( egl gbm )
2969 - xa? ( gallium )
2970 - video_cards_freedreno? ( gallium )
2971 - video_cards_intel? ( classic )
2972 - video_cards_i915? ( || ( classic gallium ) )
2973 - video_cards_i965? ( classic )
2974 - video_cards_imx? ( gallium video_cards_vivante )
2975 - video_cards_nouveau? ( || ( classic gallium ) )
2976 - video_cards_radeon? ( || ( classic gallium )
2977 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
2978 - video_cards_r100? ( classic )
2979 - video_cards_r200? ( classic )
2980 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
2981 - video_cards_r600? ( gallium )
2982 - video_cards_radeonsi? ( gallium llvm )
2983 - video_cards_vc4? ( gallium )
2984 - video_cards_virgl? ( gallium )
2985 - video_cards_vivante? ( gallium gbm )
2986 - video_cards_vmware? ( gallium )
2987 -"
2988 -
2989 -LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91"
2990 -# keep correct libdrm and dri2proto dep
2991 -# keep blocks in rdepend for binpkg
2992 -RDEPEND="
2993 - !<x11-base/xorg-server-1.7
2994 - !<=x11-proto/xf86driproto-2.0.3
2995 - classic? ( app-eselect/eselect-mesa )
2996 - gallium? ( app-eselect/eselect-mesa )
2997 - >=app-eselect/eselect-opengl-1.3.0
2998 - >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
2999 - >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
3000 - >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
3001 - >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
3002 - >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
3003 - >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
3004 - >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
3005 - >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}]
3006 - x11-libs/libXfixes:=[${MULTILIB_USEDEP}]
3007 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
3008 - llvm? (
3009 - video_cards_radeonsi? (
3010 - virtual/libelf:0=[${MULTILIB_USEDEP}]
3011 - )
3012 - video_cards_r600? (
3013 - virtual/libelf:0=[${MULTILIB_USEDEP}]
3014 - )
3015 - video_cards_radeon? (
3016 - virtual/libelf:0=[${MULTILIB_USEDEP}]
3017 - )
3018 - )
3019 - opencl? (
3020 - app-eselect/eselect-opencl
3021 - dev-libs/libclc
3022 - virtual/libelf:0=[${MULTILIB_USEDEP}]
3023 - )
3024 - openmax? (
3025 - >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}]
3026 - x11-misc/xdg-utils
3027 - )
3028 - vaapi? (
3029 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
3030 - video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 )
3031 - )
3032 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
3033 - wayland? (
3034 - >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}]
3035 - >=dev-libs/wayland-protocols-1.8
3036 - )
3037 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
3038 - ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
3039 -
3040 - video_cards_intel? (
3041 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
3042 - )
3043 - video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
3044 -"
3045 -for card in ${RADEON_CARDS}; do
3046 - RDEPEND="${RDEPEND}
3047 - video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
3048 - "
3049 -done
3050 -RDEPEND="${RDEPEND}
3051 - video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] )
3052 -"
3053 -
3054 -# Please keep the LLVM dependency block separate. Since LLVM is slotted,
3055 -# we need to *really* make sure we're not pulling one than more slot
3056 -# simultaneously.
3057 -#
3058 -# How to use it:
3059 -# 1. List all the working slots (with min versions) in ||, newest first.
3060 -# 2. Update the := to specify *max* version, e.g. < 7.
3061 -# 3. Specify LLVM_MAX_SLOT, e.g. 6.
3062 -LLVM_DEPSTR="
3063 - || (
3064 - sys-devel/llvm:7[${MULTILIB_USEDEP}]
3065 - sys-devel/llvm:6[${MULTILIB_USEDEP}]
3066 - sys-devel/llvm:5[${MULTILIB_USEDEP}]
3067 - sys-devel/llvm:4[${MULTILIB_USEDEP}]
3068 - >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}]
3069 - )
3070 - sys-devel/llvm:=[${MULTILIB_USEDEP}]
3071 -"
3072 -LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
3073 -CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
3074 -CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
3075 -RDEPEND="${RDEPEND}
3076 - llvm? (
3077 - opencl? (
3078 - video_cards_r600? (
3079 - ${CLANG_DEPSTR_AMDGPU}
3080 - )
3081 - !video_cards_r600? (
3082 - video_cards_radeonsi? (
3083 - ${CLANG_DEPSTR_AMDGPU}
3084 - )
3085 - )
3086 - !video_cards_r600? (
3087 - !video_cards_radeonsi? (
3088 - video_cards_radeon? (
3089 - ${CLANG_DEPSTR_AMDGPU}
3090 - )
3091 - )
3092 - )
3093 - !video_cards_r600? (
3094 - !video_cards_radeon? (
3095 - !video_cards_radeonsi? (
3096 - ${CLANG_DEPSTR}
3097 - )
3098 - )
3099 - )
3100 - )
3101 - !opencl? (
3102 - video_cards_r600? (
3103 - ${LLVM_DEPSTR_AMDGPU}
3104 - )
3105 - !video_cards_r600? (
3106 - video_cards_radeonsi? (
3107 - ${LLVM_DEPSTR_AMDGPU}
3108 - )
3109 - )
3110 - !video_cards_r600? (
3111 - !video_cards_radeonsi? (
3112 - video_cards_radeon? (
3113 - ${LLVM_DEPSTR_AMDGPU}
3114 - )
3115 - )
3116 - )
3117 - !video_cards_r600? (
3118 - !video_cards_radeon? (
3119 - !video_cards_radeonsi? (
3120 - ${LLVM_DEPSTR}
3121 - )
3122 - )
3123 - )
3124 - )
3125 - )
3126 -"
3127 -unset {LLVM,CLANG}_DEPSTR{,_AMDGPU}
3128 -
3129 -DEPEND="${RDEPEND}
3130 - ${PYTHON_DEPS}
3131 - opencl? (
3132 - >=sys-devel/gcc-4.6
3133 - )
3134 - sys-devel/gettext
3135 - virtual/pkgconfig
3136 - valgrind? ( dev-util/valgrind )
3137 - >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
3138 - dri3? (
3139 - >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
3140 - >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
3141 - )
3142 - >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
3143 - >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
3144 - >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
3145 - >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
3146 - vulkan? (
3147 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
3148 - )
3149 -"
3150 -[[ ${PV} == 9999 ]] && DEPEND+="
3151 - sys-devel/bison
3152 - sys-devel/flex
3153 - $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]")
3154 -"
3155 -
3156 -S="${WORKDIR}/${MY_P}"
3157 -EGIT_CHECKOUT_DIR=${S}
3158 -
3159 -QA_WX_LOAD="
3160 -x86? (
3161 - !pic? (
3162 - usr/lib*/libglapi.so.0.0.0
3163 - usr/lib*/libGLESv1_CM.so.1.1.0
3164 - usr/lib*/libGLESv2.so.2.0.0
3165 - usr/lib*/libGL.so.1.2.0
3166 - usr/lib*/libOSMesa.so.8.0.0
3167 - )
3168 -)"
3169 -
3170 -llvm_check_deps() {
3171 - local flags=${MULTILIB_USEDEP}
3172 - if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi
3173 - then
3174 - flags+=",llvm_targets_AMDGPU(-)"
3175 - fi
3176 -
3177 - if use opencl; then
3178 - has_version "sys-devel/clang[${flags}]" || return 1
3179 - fi
3180 - has_version "sys-devel/llvm[${flags}]"
3181 -}
3182 -
3183 -pkg_setup() {
3184 - # warning message for bug 459306
3185 - if use llvm && has_version sys-devel/llvm[!debug=]; then
3186 - ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
3187 - ewarn "detected! This can cause problems. For details, see bug 459306."
3188 - fi
3189 -
3190 - if use llvm; then
3191 - llvm_pkg_setup
3192 - fi
3193 - python-any-r1_pkg_setup
3194 -}
3195 -
3196 -src_prepare() {
3197 - eapply_user
3198 - [[ ${PV} == 9999 ]] && eautoreconf
3199 -}
3200 -
3201 -multilib_src_configure() {
3202 - local myconf
3203 -
3204 - if use classic; then
3205 - # Configurable DRI drivers
3206 - driver_enable swrast
3207 -
3208 - # Intel code
3209 - driver_enable video_cards_i915 i915
3210 - driver_enable video_cards_i965 i965
3211 - if ! use video_cards_i915 && \
3212 - ! use video_cards_i965; then
3213 - driver_enable video_cards_intel i915 i965
3214 - fi
3215 -
3216 - # Nouveau code
3217 - driver_enable video_cards_nouveau nouveau
3218 -
3219 - # ATI code
3220 - driver_enable video_cards_r100 radeon
3221 - driver_enable video_cards_r200 r200
3222 - if ! use video_cards_r100 && \
3223 - ! use video_cards_r200; then
3224 - driver_enable video_cards_radeon radeon r200
3225 - fi
3226 - fi
3227 -
3228 - if use egl; then
3229 - myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")"
3230 - fi
3231 -
3232 - if use gallium; then
3233 - myconf+="
3234 - $(use_enable d3d9 nine)
3235 - $(use_enable llvm)
3236 - $(use_enable openmax omx-bellagio)
3237 - $(use_enable vaapi va)
3238 - $(use_enable vdpau)
3239 - $(use_enable xa)
3240 - $(use_enable xvmc)
3241 - "
3242 - use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers"
3243 -
3244 - gallium_enable swrast
3245 - gallium_enable video_cards_vc4 vc4
3246 - gallium_enable video_cards_vivante etnaviv
3247 - gallium_enable video_cards_vmware svga
3248 - gallium_enable video_cards_nouveau nouveau
3249 - gallium_enable video_cards_i915 i915
3250 - gallium_enable video_cards_imx imx
3251 - if ! use video_cards_i915 && \
3252 - ! use video_cards_i965; then
3253 - gallium_enable video_cards_intel i915
3254 - fi
3255 -
3256 - gallium_enable video_cards_r300 r300
3257 - gallium_enable video_cards_r600 r600
3258 - gallium_enable video_cards_radeonsi radeonsi
3259 - if ! use video_cards_r300 && \
3260 - ! use video_cards_r600; then
3261 - gallium_enable video_cards_radeon r300 r600
3262 - fi
3263 -
3264 - gallium_enable video_cards_freedreno freedreno
3265 - # opencl stuff
3266 - if use opencl; then
3267 - myconf+="
3268 - $(use_enable opencl)
3269 - --with-clang-libdir="${EPREFIX}/usr/lib"
3270 - "
3271 - fi
3272 -
3273 - gallium_enable video_cards_virgl virgl
3274 - fi
3275 -
3276 - if use vulkan; then
3277 - vulkan_enable video_cards_i965 intel
3278 - vulkan_enable video_cards_radeonsi radeon
3279 - fi
3280 -
3281 - # x86 hardened pax_kernel needs glx-rts, bug 240956
3282 - if [[ ${ABI} == x86 ]]; then
3283 - myconf+=" $(use_enable pax_kernel glx-read-only-text)"
3284 - fi
3285 -
3286 - # on abi_x86_32 hardened we need to have asm disable
3287 - if [[ ${ABI} == x86* ]] && use pic; then
3288 - myconf+=" --disable-asm"
3289 - fi
3290 -
3291 - if use gallium; then
3292 - myconf+=" $(use_enable osmesa gallium-osmesa)"
3293 - else
3294 - myconf+=" $(use_enable osmesa)"
3295 - fi
3296 -
3297 - # build fails with BSD indent, bug #428112
3298 - use userland_GNU || export INDENT=cat
3299 -
3300 - ECONF_SOURCE="${S}" \
3301 - econf \
3302 - --enable-dri \
3303 - --enable-glx \
3304 - --enable-shared-glapi \
3305 - $(use_enable !bindist texture-float) \
3306 - $(use_enable d3d9 nine) \
3307 - $(use_enable debug) \
3308 - $(use_enable dri3) \
3309 - $(use_enable egl) \
3310 - $(use_enable gbm) \
3311 - $(use_enable gles1) \
3312 - $(use_enable gles2) \
3313 - $(use_enable nptl glx-tls) \
3314 - $(use_enable unwind libunwind) \
3315 - --enable-valgrind=$(usex valgrind auto no) \
3316 - --enable-llvm-shared-libs \
3317 - --disable-opencl-icd \
3318 - --with-dri-drivers=${DRI_DRIVERS} \
3319 - --with-gallium-drivers=${GALLIUM_DRIVERS} \
3320 - --with-vulkan-drivers=${VULKAN_DRIVERS} \
3321 - PYTHON2="${PYTHON}" \
3322 - ${myconf}
3323 -}
3324 -
3325 -multilib_src_install() {
3326 - emake install DESTDIR="${D}"
3327 -
3328 - if use classic || use gallium; then
3329 - ebegin "Moving DRI/Gallium drivers for dynamic switching"
3330 - local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
3331 - keepdir /usr/$(get_libdir)/dri
3332 - dodir /usr/$(get_libdir)/mesa
3333 - for x in ${gallium_drivers[@]}; do
3334 - if [ -f "$(get_libdir)/gallium/${x}" ]; then
3335 - mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
3336 - || die "Failed to move ${x}"
3337 - fi
3338 - done
3339 - if use classic; then
3340 - emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
3341 - fi
3342 - for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
3343 - if [ -f ${x} -o -L ${x} ]; then
3344 - mv -f "${x}" "${x/dri/mesa}" \
3345 - || die "Failed to move ${x}"
3346 - fi
3347 - done
3348 - pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
3349 - ln -s ../mesa/*.so . || die "Creating symlink failed"
3350 - # remove symlinks to drivers known to eselect
3351 - for x in ${gallium_drivers[@]}; do
3352 - if [ -f ${x} -o -L ${x} ]; then
3353 - rm "${x}" || die "Failed to remove ${x}"
3354 - fi
3355 - done
3356 - popd
3357 - eend $?
3358 - fi
3359 - if use opencl; then
3360 - ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
3361 - local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
3362 - dodir ${cl_dir}/{lib,include}
3363 - if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
3364 - mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
3365 - "${ED}"${cl_dir}
3366 - fi
3367 - if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
3368 - mv -f "${ED}"/usr/include/CL \
3369 - "${ED}"${cl_dir}/include
3370 - fi
3371 - eend $?
3372 - fi
3373 -
3374 - if use openmax; then
3375 - echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
3376 - doenvd "${T}"/99mesaxdgomx
3377 - keepdir /usr/share/mesa/xdg
3378 - fi
3379 -}
3380 -
3381 -multilib_src_install_all() {
3382 - find "${ED}" -name '*.la' -delete
3383 - einstalldocs
3384 -
3385 - if use !bindist; then
3386 - dodoc docs/patents.txt
3387 - fi
3388 -
3389 - # Install config file for eselect mesa
3390 - insinto /usr/share/mesa
3391 - newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
3392 -}
3393 -
3394 -multilib_src_test() {
3395 - if use llvm; then
3396 - 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'
3397 - pushd src/gallium/drivers/llvmpipe >/dev/null || die
3398 - emake ${llvm_tests}
3399 - pax-mark m ${llvm_tests}
3400 - popd >/dev/null || die
3401 - fi
3402 - emake check
3403 -}
3404 -
3405 -pkg_postinst() {
3406 - # Switch to the xorg implementation.
3407 - echo
3408 - eselect opengl set --use-old ${OPENGL_DIR}
3409 -
3410 - # Select classic/gallium drivers
3411 - if use classic || use gallium; then
3412 - eselect mesa set --auto
3413 - fi
3414 -
3415 - # Switch to mesa opencl
3416 - if use opencl; then
3417 - eselect opencl set --use-old ${PN}
3418 - fi
3419 -
3420 - # run omxregister-bellagio to make the OpenMAX drivers known system-wide
3421 - if use openmax; then
3422 - ebegin "Registering OpenMAX drivers"
3423 - BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
3424 - OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
3425 - omxregister-bellagio
3426 - eend $?
3427 - fi
3428 -
3429 - # warn about patent encumbered texture-float
3430 - if use !bindist; then
3431 - elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
3432 - elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an"
3433 - elog "explanation."
3434 - fi
3435 -}
3436 -
3437 -pkg_prerm() {
3438 - if use openmax; then
3439 - rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
3440 - fi
3441 -}
3442 -
3443 -# $1 - VIDEO_CARDS flag
3444 -# other args - names of DRI drivers to enable
3445 -# TODO: avoid code duplication for a more elegant implementation
3446 -driver_enable() {
3447 - case $# in
3448 - # for enabling unconditionally
3449 - 1)
3450 - DRI_DRIVERS+=",$1"
3451 - ;;
3452 - *)
3453 - if use $1; then
3454 - shift
3455 - for i in $@; do
3456 - DRI_DRIVERS+=",${i}"
3457 - done
3458 - fi
3459 - ;;
3460 - esac
3461 -}
3462 -
3463 -gallium_enable() {
3464 - case $# in
3465 - # for enabling unconditionally
3466 - 1)
3467 - GALLIUM_DRIVERS+=",$1"
3468 - ;;
3469 - *)
3470 - if use $1; then
3471 - shift
3472 - for i in $@; do
3473 - GALLIUM_DRIVERS+=",${i}"
3474 - done
3475 - fi
3476 - ;;
3477 - esac
3478 -}
3479 -
3480 -vulkan_enable() {
3481 - case $# in
3482 - # for enabling unconditionally
3483 - 1)
3484 - VULKAN_DRIVERS+=",$1"
3485 - ;;
3486 - *)
3487 - if use $1; then
3488 - shift
3489 - for i in $@; do
3490 - VULKAN_DRIVERS+=",${i}"
3491 - done
3492 - fi
3493 - ;;
3494 - esac
3495 -}