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