Gentoo Archives: gentoo-commits

From: "Chi-Thanh Christopher Nguyen (chithanh)" <chithanh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/mesa: mesa-9.2_pre20130725.ebuild ChangeLog mesa-9.2_pre20130619.ebuild mesa-9.2_pre20130515.ebuild mesa-9.2_pre20130528.ebuild
Date: Fri, 02 Aug 2013 13:16:08
Message-Id: 20130802131603.504BC2171D@flycatcher.gentoo.org
1 chithanh 13/08/02 13:16:03
2
3 Modified: ChangeLog
4 Added: mesa-9.2_pre20130725.ebuild
5 Removed: mesa-9.2_pre20130619.ebuild
6 mesa-9.2_pre20130515.ebuild
7 mesa-9.2_pre20130528.ebuild
8 Log:
9 New snapshot. Drop some old ones.
10
11 (Portage version: 2.1.12.2/cvs/Linux x86_64, unsigned Manifest commit)
12
13 Revision Changes Path
14 1.493 media-libs/mesa/ChangeLog
15
16 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.493&view=markup
17 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.493&content-type=text/plain
18 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.492&r2=1.493
19
20 Index: ChangeLog
21 ===================================================================
22 RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v
23 retrieving revision 1.492
24 retrieving revision 1.493
25 diff -u -r1.492 -r1.493
26 --- ChangeLog 2 Aug 2013 12:52:38 -0000 1.492
27 +++ ChangeLog 2 Aug 2013 13:16:03 -0000 1.493
28 @@ -1,6 +1,14 @@
29 # ChangeLog for media-libs/mesa
30 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
31 -# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.492 2013/08/02 12:52:38 chithanh Exp $
32 +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.493 2013/08/02 13:16:03 chithanh Exp $
33 +
34 +*mesa-9.2_pre20130725 (02 Aug 2013)
35 +
36 + 02 Aug 2013; Chí-Thanh Christopher Nguyễn <chithanh@g.o>
37 + +files/mesa-9.2-dont-require-llvm-for-r300.patch,
38 + +mesa-9.2_pre20130725.ebuild, -mesa-9.2_pre20130515.ebuild,
39 + -mesa-9.2_pre20130528.ebuild, -mesa-9.2_pre20130619.ebuild:
40 + New snapshot. Drop some old ones.
41
42 *mesa-9.1.6 (02 Aug 2013)
43
44
45
46
47 1.1 media-libs/mesa/mesa-9.2_pre20130725.ebuild
48
49 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-9.2_pre20130725.ebuild?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-9.2_pre20130725.ebuild?rev=1.1&content-type=text/plain
51
52 Index: mesa-9.2_pre20130725.ebuild
53 ===================================================================
54 # Copyright 1999-2013 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-9.2_pre20130725.ebuild,v 1.1 2013/08/02 13:16:03 chithanh Exp $
57
58 EAPI=5
59
60 EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
61
62 if [[ ${PV} = 9999* ]]; then
63 GIT_ECLASS="git-2"
64 EXPERIMENTAL="true"
65 fi
66
67 PYTHON_COMPAT=( python{2_6,2_7} )
68
69 inherit base autotools multilib flag-o-matic python-single-r1 toolchain-funcs ${GIT_ECLASS}
70
71 OPENGL_DIR="xorg-x11"
72
73 MY_PN="${PN/m/M}"
74 MY_P="${MY_PN}-${PV/_/-}"
75 MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
76
77 FOLDER="${PV/_rc*/}"
78
79 DESCRIPTION="OpenGL-like graphic library for Linux"
80 HOMEPAGE="http://mesa3d.sourceforge.net/"
81
82 #SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2"
83 if [[ $PV = 9999* ]]; then
84 SRC_URI="${SRC_PATCHES}"
85 else
86 SRC_URI="mirror://gentoo/${P}.tar.xz
87 ${SRC_PATCHES}"
88 fi
89
90 # The code is MIT/X11.
91 # GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0
92 LICENSE="MIT SGI-B-2.0"
93 SLOT="0"
94 KEYWORDS="~alpha ~amd64 ~arm ~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"
95
96 INTEL_CARDS="i915 i965 ilo intel"
97 RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
98 VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
99 for card in ${VIDEO_CARDS}; do
100 IUSE_VIDEO_CARDS+=" video_cards_${card}"
101 done
102
103 IUSE="${IUSE_VIDEO_CARDS}
104 bindist +classic debug +egl +gallium gbm gles1 gles2 +llvm +nptl opencl
105 openvg osmesa pax_kernel pic r600-llvm-compiler selinux vdpau
106 wayland xvmc xa xorg kernel_FreeBSD"
107
108 REQUIRED_USE="
109 llvm? ( gallium )
110 openvg? ( egl gallium )
111 opencl? ( gallium r600-llvm-compiler )
112 gles1? ( egl )
113 gles2? ( egl )
114 r600-llvm-compiler? ( gallium llvm || ( video_cards_r600 video_cards_radeon ) )
115 wayland? ( egl )
116 xa? ( gallium )
117 xorg? ( gallium )
118 video_cards_freedreno? ( gallium )
119 video_cards_intel? ( || ( classic gallium ) )
120 video_cards_i915? ( || ( classic gallium ) )
121 video_cards_i965? ( classic )
122 video_cards_ilo? ( gallium )
123 video_cards_nouveau? ( || ( classic gallium ) )
124 video_cards_radeon? ( || ( classic gallium ) )
125 video_cards_r100? ( classic )
126 video_cards_r200? ( classic )
127 video_cards_r300? ( gallium )
128 video_cards_r600? ( gallium )
129 video_cards_radeonsi? ( gallium llvm )
130 video_cards_vmware? ( gallium )
131 "
132
133 LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.46"
134 # keep correct libdrm and dri2proto dep
135 # keep blocks in rdepend for binpkg
136 RDEPEND="
137 !<x11-base/xorg-server-1.7
138 !<=x11-proto/xf86driproto-2.0.3
139 classic? ( app-admin/eselect-mesa )
140 gallium? ( app-admin/eselect-mesa )
141 >=app-admin/eselect-opengl-1.2.7
142 dev-libs/expat
143 gbm? ( virtual/udev )
144 >=x11-libs/libX11-1.3.99.901
145 x11-libs/libXdamage
146 x11-libs/libXext
147 x11-libs/libXxf86vm
148 >=x11-libs/libxcb-1.8.1
149 opencl? (
150 app-admin/eselect-opencl
151 dev-libs/libclc
152 )
153 vdpau? ( >=x11-libs/libvdpau-0.4.1 )
154 wayland? ( >=dev-libs/wayland-1.0.3 )
155 xorg? (
156 x11-base/xorg-server:=
157 x11-libs/libdrm[libkms]
158 )
159 xvmc? ( >=x11-libs/libXvMC-1.0.6 )
160 ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?]
161 "
162 for card in ${INTEL_CARDS}; do
163 RDEPEND="${RDEPEND}
164 video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
165 "
166 done
167
168 for card in ${RADEON_CARDS}; do
169 RDEPEND="${RDEPEND}
170 video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
171 "
172 done
173
174 DEPEND="${RDEPEND}
175 llvm? (
176 >=sys-devel/llvm-2.9
177 r600-llvm-compiler? ( sys-devel/llvm[video_cards_radeon] )
178 video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
179 )
180 opencl? (
181 >=sys-devel/llvm-3.3-r1[video_cards_radeon]
182 >=sys-devel/clang-3.3
183 >=sys-devel/gcc-4.6
184 )
185 ${PYTHON_DEPS}
186 dev-libs/libxml2[python,${PYTHON_USEDEP}]
187 sys-devel/bison
188 sys-devel/flex
189 virtual/pkgconfig
190 >=x11-proto/dri2proto-2.6
191 >=x11-proto/glproto-1.4.15-r1
192 >=x11-proto/xextproto-7.0.99.1
193 x11-proto/xf86driproto
194 x11-proto/xf86vidmodeproto
195 "
196
197 S="${WORKDIR}/${MY_P}"
198
199 # It is slow without texrels, if someone wants slow
200 # mesa without texrels +pic use is worth the shot
201 QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
202 QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
203
204 # Think about: ggi, fbcon, no-X configs
205
206 pkg_setup() {
207 # workaround toc-issue wrt #386545
208 use ppc64 && append-flags -mminimal-toc
209
210 python-single-r1_pkg_setup
211 }
212
213 src_unpack() {
214 default
215 [[ $PV = 9999* ]] && git-2_src_unpack
216 mv "${WORKDIR}"/${PN}-* "${WORKDIR}/${MY_P}" || die
217 }
218
219 src_prepare() {
220 # apply patches
221 if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
222 EPATCH_FORCE="yes" \
223 EPATCH_SOURCE="${WORKDIR}/patches" \
224 EPATCH_SUFFIX="patch" \
225 epatch
226 fi
227
228 # relax the requirement that r300 must have llvm, bug 380303
229 epatch "${FILESDIR}"/${PN}-9.2-dont-require-llvm-for-r300.patch
230
231 # fix for hardened pax_kernel, bug 240956
232 [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
233
234 # Solaris needs some recent POSIX stuff in our case
235 if [[ ${CHOST} == *-solaris* ]] ; then
236 sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die
237 fi
238
239 # Tests fail against python-3, bug #407887
240 sed -i 's|/usr/bin/env python|/usr/bin/env python2|' src/glsl/tests/compare_ir || die
241
242 base_src_prepare
243
244 eautoreconf
245 }
246
247 src_configure() {
248 local myconf
249
250 if use classic; then
251 # Configurable DRI drivers
252 driver_enable swrast
253
254 # Intel code
255 driver_enable video_cards_i915 i915
256 driver_enable video_cards_i965 i965
257 if ! use video_cards_i915 && \
258 ! use video_cards_i965; then
259 driver_enable video_cards_intel i915 i965
260 fi
261
262 # Nouveau code
263 driver_enable video_cards_nouveau nouveau
264
265 # ATI code
266 driver_enable video_cards_r100 radeon
267 driver_enable video_cards_r200 r200
268 if ! use video_cards_r100 && \
269 ! use video_cards_r200; then
270 driver_enable video_cards_radeon radeon r200
271 fi
272 fi
273
274 if use egl; then
275 myconf+="
276 --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")
277 $(use_enable gallium gallium-egl)
278 "
279 fi
280
281 if use gallium; then
282 myconf+="
283 $(use_enable llvm gallium-llvm)
284 $(use_enable openvg)
285 $(use_enable r600-llvm-compiler)
286 $(use_enable vdpau)
287 $(use_enable xvmc)
288 "
289 gallium_enable swrast
290 gallium_enable video_cards_vmware svga
291 gallium_enable video_cards_nouveau nouveau
292 gallium_enable video_cards_i915 i915
293 gallium_enable video_cards_ilo ilo
294 if ! use video_cards_i915 && \
295 ! use video_cards_i965; then
296 gallium_enable video_cards_intel i915
297 fi
298
299 gallium_enable video_cards_r300 r300
300 gallium_enable video_cards_r600 r600
301 gallium_enable video_cards_radeonsi radeonsi
302 if ! use video_cards_r300 && \
303 ! use video_cards_r600; then
304 gallium_enable video_cards_radeon r300 r600
305 fi
306
307 gallium_enable video_cards_freedreno freedreno
308 # opencl stuff
309 if use opencl; then
310 myconf+="
311 $(use_enable opencl)
312 --with-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"
313 --with-clang-libdir="${EPREFIX}/usr/$(get_libdir)"
314 "
315 fi
316 fi
317
318 # x86 hardened pax_kernel needs glx-rts, bug 240956
319 if use pax_kernel; then
320 myconf+="
321 $(use_enable x86 glx-rts)
322 "
323 fi
324
325 # build fails with BSD indent, bug #428112
326 use userland_GNU || export INDENT=cat
327
328 econf \
329 --enable-dri \
330 --enable-glx \
331 --enable-shared-glapi \
332 $(use_enable !bindist texture-float) \
333 $(use_enable debug) \
334 $(use_enable egl) \
335 $(use_enable gbm) \
336 $(use_enable gles1) \
337 $(use_enable gles2) \
338 $(use_enable nptl glx-tls) \
339 $(use_enable osmesa) \
340 $(use_enable !pic asm) \
341 $(use_enable xa) \
342 $(use_enable xorg) \
343 --with-dri-drivers=${DRI_DRIVERS} \
344 --with-gallium-drivers=${GALLIUM_DRIVERS} \
345 PYTHON2="${PYTHON}" \
346 ${myconf}
347 }
348
349 src_install() {
350 base_src_install
351
352 find "${ED}" -name '*.la' -exec rm -f {} + || die
353
354 if use !bindist; then
355 dodoc docs/patents.txt
356 fi
357
358 # Install config file for eselect mesa
359 insinto /usr/share/mesa
360 newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
361
362 # Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib
363 # because user can eselect desired GL provider.
364 ebegin "Moving libGL and friends for dynamic switching"
365 local x
366 local gl_dir="/usr/$(get_libdir)/opengl/${OPENGL_DIR}/"
367 dodir ${gl_dir}/{lib,extensions,include/GL}
368 for x in "${ED}"/usr/$(get_libdir)/lib{EGL,GL*,OpenVG}.{la,a,so*}; do
369 if [ -f ${x} -o -L ${x} ]; then
370 mv -f "${x}" "${ED}${gl_dir}"/lib \
371 || die "Failed to move ${x}"
372 fi
373 done
374 for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
375 if [ -f ${x} -o -L ${x} ]; then
376 mv -f "${x}" "${ED}${gl_dir}"/include/GL \
377 || die "Failed to move ${x}"
378 fi
379 done
380 for x in "${ED}"/usr/include/{EGL,GLES*,VG,KHR}; do
381 if [ -d ${x} ]; then
382 mv -f "${x}" "${ED}${gl_dir}"/include \
383 || die "Failed to move ${x}"
384 fi
385 done
386 eend $?
387
388 if use classic || use gallium; then
389 ebegin "Moving DRI/Gallium drivers for dynamic switching"
390 local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
391 keepdir /usr/$(get_libdir)/dri
392 dodir /usr/$(get_libdir)/mesa
393 for x in ${gallium_drivers[@]}; do
394 if [ -f "${S}/$(get_libdir)/gallium/${x}" ]; then
395 mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
396 || die "Failed to move ${x}"
397 insinto "/usr/$(get_libdir)/dri/"
398 if [ -f "${S}/$(get_libdir)/${x}" ]; then
399 insopts -m0755
400 doins "${S}/$(get_libdir)/${x}"
401 fi
402 fi
403 done
404 for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
405 if [ -f ${x} -o -L ${x} ]; then
406 mv -f "${x}" "${x/dri/mesa}" \
407 || die "Failed to move ${x}"
408 fi
409 done
410 pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
411 ln -s ../mesa/*.so . || die "Creating symlink failed"
412 # remove symlinks to drivers known to eselect
413 for x in ${gallium_drivers[@]}; do
414 if [ -f ${x} -o -L ${x} ]; then
415 rm "${x}" || die "Failed to remove ${x}"
416 fi
417 done
418 popd
419 eend $?
420 fi
421 if use opencl; then
422 ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
423 local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
424 dodir ${cl_dir}/{lib,include}
425 if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
426 mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
427 "${ED}"${cl_dir}
428 fi
429 if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
430 mv -f "${ED}"/usr/include/CL \
431 "${ED}"${cl_dir}/include
432 fi
433 eend $?
434 fi
435 }
436
437 pkg_postinst() {
438 # Switch to the xorg implementation.
439 echo
440 eselect opengl set --use-old ${OPENGL_DIR}
441
442 # switch to xorg-x11 and back if necessary, bug #374647 comment 11
443 OLD_IMPLEM="$(eselect opengl show)"
444 if [[ ${OPENGL_DIR}x != ${OLD_IMPLEM}x ]]; then
445 eselect opengl set ${OPENGL_DIR}
446 eselect opengl set ${OLD_IMPLEM}
447 fi
448
449 # Select classic/gallium drivers
450 if use classic || use gallium; then
451 eselect mesa set --auto
452 fi
453
454 # Switch to mesa opencl
455 if use opencl; then
456 eselect opencl set --use-old ${PN}
457 fi
458
459 # warn about patent encumbered texture-float
460 if use !bindist; then
461 elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
462 elog "enabled. Please see patents.txt for an explanation."
463 fi
464
465 local using_radeon r_flag
466 for r_flag in ${RADEON_CARDS}; do
467 if use video_cards_${r_flag}; then
468 using_radeon=1
469 break
470 fi
471 done
472
473 if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then
474 elog "Note that in order to have full S3TC support, it is necessary to install"
475 elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
476 elog "textures in some apps, and some others even require this to run."
477 fi
478 }
479
480 # $1 - VIDEO_CARDS flag
481 # other args - names of DRI drivers to enable
482 # TODO: avoid code duplication for a more elegant implementation
483 driver_enable() {
484 case $# in
485 # for enabling unconditionally
486 1)
487 DRI_DRIVERS+=",$1"
488 ;;
489 *)
490 if use $1; then
491 shift
492 for i in $@; do
493 DRI_DRIVERS+=",${i}"
494 done
495 fi
496 ;;
497 esac
498 }
499
500 gallium_enable() {
501 case $# in
502 # for enabling unconditionally
503 1)
504 GALLIUM_DRIVERS+=",$1"
505 ;;
506 *)
507 if use $1; then
508 shift
509 for i in $@; do
510 GALLIUM_DRIVERS+=",${i}"
511 done
512 fi
513 ;;
514 esac
515 }