Gentoo Archives: gentoo-commits

From: "Matt Turner (mattst88)" <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/mesa: ChangeLog mesa-9.2.0.ebuild mesa-9.2.0_rc2.ebuild
Date: Tue, 27 Aug 2013 23:49:17
Message-Id: 20130827234910.AD9C02004C@flycatcher.gentoo.org
1 mattst88 13/08/27 23:49:10
2
3 Modified: ChangeLog
4 Added: mesa-9.2.0.ebuild
5 Removed: mesa-9.2.0_rc2.ebuild
6 Log:
7 Version bump to 9.2.
8
9 (Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 974CA72A)
10
11 Revision Changes Path
12 1.497 media-libs/mesa/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.497&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.497&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.496&r2=1.497
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v
21 retrieving revision 1.496
22 retrieving revision 1.497
23 diff -u -r1.496 -r1.497
24 --- ChangeLog 24 Aug 2013 12:32:35 -0000 1.496
25 +++ ChangeLog 27 Aug 2013 23:49:10 -0000 1.497
26 @@ -1,6 +1,12 @@
27 # ChangeLog for media-libs/mesa
28 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.496 2013/08/24 12:32:35 chithanh Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.497 2013/08/27 23:49:10 mattst88 Exp $
31 +
32 +*mesa-9.2.0 (27 Aug 2013)
33 +
34 + 27 Aug 2013; Matt Turner <mattst88@g.o> -mesa-9.2.0_rc2.ebuild,
35 + +mesa-9.2.0.ebuild:
36 + Version bump to 9.2.
37
38 *mesa-9.2.0_rc2 (24 Aug 2013)
39
40
41
42
43 1.1 media-libs/mesa/mesa-9.2.0.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-9.2.0.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-9.2.0.ebuild?rev=1.1&content-type=text/plain
47
48 Index: mesa-9.2.0.ebuild
49 ===================================================================
50 # Copyright 1999-2013 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-9.2.0.ebuild,v 1.1 2013/08/27 23:49:10 mattst88 Exp $
53
54 EAPI=5
55
56 EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
57
58 if [[ ${PV} = 9999* ]]; then
59 GIT_ECLASS="git-2"
60 EXPERIMENTAL="true"
61 fi
62
63 PYTHON_COMPAT=( python{2_6,2_7} )
64
65 inherit base autotools multilib flag-o-matic python-single-r1 toolchain-funcs ${GIT_ECLASS}
66
67 OPENGL_DIR="xorg-x11"
68
69 MY_PN="${PN/m/M}"
70 MY_P="${MY_PN}-${PV/_/-}"
71 MY_SRC_P="${MY_PN}Lib-${PV/_/-}"
72
73 FOLDER="${PV/.0/}"
74
75 DESCRIPTION="OpenGL-like graphic library for Linux"
76 HOMEPAGE="http://mesa3d.sourceforge.net/"
77
78 #SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2"
79 if [[ $PV = 9999* ]]; then
80 SRC_URI="${SRC_PATCHES}"
81 else
82 SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2
83 ${SRC_PATCHES}"
84 fi
85
86 # The code is MIT/X11.
87 # GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0
88 LICENSE="MIT SGI-B-2.0"
89 SLOT="0"
90 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"
91
92 INTEL_CARDS="i915 i965 ilo intel"
93 RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
94 VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno nouveau vmware"
95 for card in ${VIDEO_CARDS}; do
96 IUSE_VIDEO_CARDS+=" video_cards_${card}"
97 done
98
99 IUSE="${IUSE_VIDEO_CARDS}
100 bindist +classic debug +egl +gallium gbm gles1 gles2 +llvm +nptl opencl
101 openvg osmesa pax_kernel pic r600-llvm-compiler selinux vdpau
102 wayland xvmc xa xorg kernel_FreeBSD"
103
104 REQUIRED_USE="
105 llvm? ( gallium )
106 openvg? ( egl gallium )
107 opencl? (
108 gallium
109 video_cards_r600? ( r600-llvm-compiler )
110 video_cards_radeon? ( r600-llvm-compiler )
111 video_cards_radeonsi? ( r600-llvm-compiler )
112 )
113 gles1? ( egl )
114 gles2? ( egl )
115 r600-llvm-compiler? ( gallium llvm || ( video_cards_r600 video_cards_radeon ) )
116 wayland? ( egl )
117 xa? ( gallium )
118 xorg? ( gallium )
119 video_cards_freedreno? ( gallium )
120 video_cards_intel? ( || ( classic gallium ) )
121 video_cards_i915? ( || ( classic gallium ) )
122 video_cards_i965? ( classic )
123 video_cards_ilo? ( gallium )
124 video_cards_nouveau? ( || ( classic gallium ) )
125 video_cards_radeon? ( || ( classic gallium ) )
126 video_cards_r100? ( classic )
127 video_cards_r200? ( classic )
128 video_cards_r300? ( gallium )
129 video_cards_r600? ( gallium )
130 video_cards_radeonsi? ( gallium llvm )
131 video_cards_vmware? ( gallium )
132 "
133
134 LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.46"
135 # keep correct libdrm and dri2proto dep
136 # keep blocks in rdepend for binpkg
137 RDEPEND="
138 !<x11-base/xorg-server-1.7
139 !<=x11-proto/xf86driproto-2.0.3
140 classic? ( app-admin/eselect-mesa )
141 gallium? ( app-admin/eselect-mesa )
142 >=app-admin/eselect-opengl-1.2.7
143 dev-libs/expat
144 gbm? ( virtual/udev )
145 >=x11-libs/libX11-1.3.99.901
146 x11-libs/libXdamage
147 x11-libs/libXext
148 x11-libs/libXxf86vm
149 >=x11-libs/libxcb-1.8.1
150 opencl? (
151 app-admin/eselect-opencl
152 dev-libs/libclc
153 )
154 vdpau? ( >=x11-libs/libvdpau-0.4.1 )
155 wayland? ( >=dev-libs/wayland-1.0.3 )
156 xorg? (
157 x11-base/xorg-server:=
158 x11-libs/libdrm[libkms]
159 )
160 xvmc? ( >=x11-libs/libXvMC-1.0.6 )
161 ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?]
162 "
163 for card in ${INTEL_CARDS}; do
164 RDEPEND="${RDEPEND}
165 video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
166 "
167 done
168
169 for card in ${RADEON_CARDS}; do
170 RDEPEND="${RDEPEND}
171 video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
172 "
173 done
174
175 DEPEND="${RDEPEND}
176 llvm? (
177 >=sys-devel/llvm-2.9
178 r600-llvm-compiler? ( sys-devel/llvm[video_cards_radeon] )
179 video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
180 )
181 opencl? (
182 >=sys-devel/llvm-3.3-r1[video_cards_radeon]
183 >=sys-devel/clang-3.3
184 >=sys-devel/gcc-4.6
185 )
186 ${PYTHON_DEPS}
187 dev-libs/libxml2[python,${PYTHON_USEDEP}]
188 sys-devel/bison
189 sys-devel/flex
190 virtual/pkgconfig
191 >=x11-proto/dri2proto-2.6
192 >=x11-proto/glproto-1.4.15-r1
193 >=x11-proto/xextproto-7.0.99.1
194 x11-proto/xf86driproto
195 x11-proto/xf86vidmodeproto
196 "
197
198 S="${WORKDIR}/${MY_P}"
199
200 # It is slow without texrels, if someone wants slow
201 # mesa without texrels +pic use is worth the shot
202 QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
203 QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
204
205 # Think about: ggi, fbcon, no-X configs
206
207 pkg_setup() {
208 # workaround toc-issue wrt #386545
209 use ppc64 && append-flags -mminimal-toc
210
211 python-single-r1_pkg_setup
212 }
213
214 src_unpack() {
215 default
216 [[ $PV = 9999* ]] && git-2_src_unpack
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 }