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