Gentoo Archives: gentoo-commits

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