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