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