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