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: mesa-9.2.2.ebuild ChangeLog
Date: Sun, 03 Nov 2013 07:02:06
Message-Id: 20131103070159.652362004B@flycatcher.gentoo.org
1 mattst88 13/11/03 07:01:59
2
3 Modified: ChangeLog
4 Added: mesa-9.2.2.ebuild
5 Log:
6 Version bump to mesa-9.2.2.
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 974CA72A)
9
10 Revision Changes Path
11 1.515 media-libs/mesa/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.515&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.515&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.514&r2=1.515
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v
20 retrieving revision 1.514
21 retrieving revision 1.515
22 diff -u -r1.514 -r1.515
23 --- ChangeLog 14 Oct 2013 12:27:21 -0000 1.514
24 +++ ChangeLog 3 Nov 2013 07:01:59 -0000 1.515
25 @@ -1,6 +1,11 @@
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.514 2013/10/14 12:27:21 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.515 2013/11/03 07:01:59 mattst88 Exp $
30 +
31 +*mesa-9.2.2 (03 Nov 2013)
32 +
33 + 03 Nov 2013; Matt Turner <mattst88@g.o> +mesa-9.2.2.ebuild:
34 + Version bump to mesa-9.2.2.
35
36 14 Oct 2013; Jeroen Roovers <jer@g.o> mesa-7.10.3.ebuild,
37 mesa-7.11.2.ebuild, mesa-8.0.4-r1.ebuild, mesa-9.0.3.ebuild:
38
39
40
41 1.1 media-libs/mesa/mesa-9.2.2.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-9.2.2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-9.2.2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mesa-9.2.2.ebuild
47 ===================================================================
48 # Copyright 1999-2013 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-9.2.2.ebuild,v 1.1 2013/11/03 07:01:59 mattst88 Exp $
51
52 EAPI=5
53
54 EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa"
55
56 if [[ ${PV} = 9999* ]]; then
57 GIT_ECLASS="git-2"
58 EXPERIMENTAL="true"
59 fi
60
61 PYTHON_COMPAT=( python{2_6,2_7} )
62
63 inherit base autotools multilib multilib-minimal flag-o-matic \
64 python-any-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="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 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 opencl
100 openvg osmesa pax_kernel pic r600-llvm-compiler selinux vdpau
101 wayland xvmc xa xorg kernel_FreeBSD"
102
103 REQUIRED_USE="
104 llvm? ( gallium )
105 openvg? ( egl gallium )
106 opencl? (
107 gallium
108 video_cards_r600? ( r600-llvm-compiler )
109 video_cards_radeon? ( r600-llvm-compiler )
110 video_cards_radeonsi? ( r600-llvm-compiler )
111 )
112 gles1? ( egl )
113 gles2? ( egl )
114 r600-llvm-compiler? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi 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 abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
140 classic? ( app-admin/eselect-mesa )
141 gallium? ( app-admin/eselect-mesa )
142 >=app-admin/eselect-opengl-1.2.7
143 dev-libs/expat[${MULTILIB_USEDEP}]
144 gbm? ( virtual/udev[${MULTILIB_USEDEP}] )
145 >=x11-libs/libX11-1.3.99.901[${MULTILIB_USEDEP}]
146 x11-libs/libXdamage[${MULTILIB_USEDEP}]
147 x11-libs/libXext[${MULTILIB_USEDEP}]
148 x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
149 >=x11-libs/libxcb-1.8.1[${MULTILIB_USEDEP}]
150 opencl? (
151 app-admin/eselect-opencl
152 dev-libs/libclc
153 )
154 vdpau? ( >=x11-libs/libvdpau-0.4.1[${MULTILIB_USEDEP}] )
155 wayland? ( >=dev-libs/wayland-1.0.3[${MULTILIB_USEDEP}] )
156 xorg? (
157 x11-base/xorg-server:=
158 x11-libs/libdrm[libkms]
159 )
160 xvmc? ( >=x11-libs/libXvMC-1.0.6[${MULTILIB_USEDEP}] )
161 ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
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[${MULTILIB_USEDEP}]
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,${MULTILIB_USEDEP}]
183 >=sys-devel/clang-3.3[${MULTILIB_USEDEP}]
184 >=sys-devel/gcc-4.6
185 )
186 sys-devel/bison
187 sys-devel/flex
188 virtual/pkgconfig
189 >=x11-proto/dri2proto-2.6[${MULTILIB_USEDEP}]
190 >=x11-proto/glproto-1.4.15-r1[${MULTILIB_USEDEP}]
191 >=x11-proto/xextproto-7.0.99.1[${MULTILIB_USEDEP}]
192 x11-proto/xf86driproto[${MULTILIB_USEDEP}]
193 x11-proto/xf86vidmodeproto[${MULTILIB_USEDEP}]
194 $(python_gen_any_dep 'dev-libs/libxml2[python,${PYTHON_USEDEP}]')
195 "
196
197 python_check_deps() {
198 has_version "dev-libs/libxml2[python,${PYTHON_USEDEP}]"
199 }
200
201 S="${WORKDIR}/${MY_P}"
202
203 # It is slow without texrels, if someone wants slow
204 # mesa without texrels +pic use is worth the shot
205 QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
206 QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*"
207
208 # Think about: ggi, fbcon, no-X configs
209
210 pkg_setup() {
211 # workaround toc-issue wrt #386545
212 use ppc64 && append-flags -mminimal-toc
213
214 python-any-r1_pkg_setup
215 }
216
217 src_unpack() {
218 default
219 [[ $PV = 9999* ]] && git-2_src_unpack
220 }
221
222 src_prepare() {
223 # apply patches
224 if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
225 EPATCH_FORCE="yes" \
226 EPATCH_SOURCE="${WORKDIR}/patches" \
227 EPATCH_SUFFIX="patch" \
228 epatch
229 fi
230
231 # relax the requirement that r300 must have llvm, bug 380303
232 epatch "${FILESDIR}"/${PN}-9.2-dont-require-llvm-for-r300.patch
233
234 # fix for hardened pax_kernel, bug 240956
235 [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
236
237 # Solaris needs some recent POSIX stuff in our case
238 if [[ ${CHOST} == *-solaris* ]] ; then
239 sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die
240 fi
241
242 base_src_prepare
243
244 eautoreconf
245 multilib_copy_sources
246 }
247
248 multilib_src_configure() {
249 local myconf
250
251 if use classic; then
252 # Configurable DRI drivers
253 driver_enable swrast
254
255 # Intel code
256 driver_enable video_cards_i915 i915
257 driver_enable video_cards_i965 i965
258 if ! use video_cards_i915 && \
259 ! use video_cards_i965; then
260 driver_enable video_cards_intel i915 i965
261 fi
262
263 # Nouveau code
264 driver_enable video_cards_nouveau nouveau
265
266 # ATI code
267 driver_enable video_cards_r100 radeon
268 driver_enable video_cards_r200 r200
269 if ! use video_cards_r100 && \
270 ! use video_cards_r200; then
271 driver_enable video_cards_radeon radeon r200
272 fi
273 fi
274
275 if use egl; then
276 myconf+="
277 --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")
278 $(use_enable gallium gallium-egl)
279 "
280 fi
281
282 if use gallium; then
283 myconf+="
284 $(use_enable llvm gallium-llvm)
285 $(use_enable openvg)
286 $(use_enable r600-llvm-compiler)
287 $(use_enable vdpau)
288 $(use_enable xvmc)
289 "
290 gallium_enable swrast
291 gallium_enable video_cards_vmware svga
292 gallium_enable video_cards_nouveau nouveau
293 gallium_enable video_cards_i915 i915
294 gallium_enable video_cards_ilo ilo
295 if ! use video_cards_i915 && \
296 ! use video_cards_i965; then
297 gallium_enable video_cards_intel i915
298 fi
299
300 gallium_enable video_cards_r300 r300
301 gallium_enable video_cards_r600 r600
302 gallium_enable video_cards_radeonsi radeonsi
303 if ! use video_cards_r300 && \
304 ! use video_cards_r600; then
305 gallium_enable video_cards_radeon r300 r600
306 fi
307
308 gallium_enable video_cards_freedreno freedreno
309 # opencl stuff
310 if use opencl; then
311 myconf+="
312 $(use_enable opencl)
313 --with-opencl-libdir="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/mesa"
314 --with-clang-libdir="${EPREFIX}/usr/lib"
315 "
316 fi
317 fi
318
319 # x86 hardened pax_kernel needs glx-rts, bug 240956
320 if use pax_kernel; then
321 myconf+="
322 $(use_enable x86 glx-rts)
323 "
324 fi
325
326 # build fails with BSD indent, bug #428112
327 use userland_GNU || export INDENT=cat
328
329 if ! multilib_is_native_abi; then
330 myconf+="--disable-xorg
331 LLVM_CONFIG=${EPREFIX}/usr/bin/llvm-config.${ABI}"
332 fi
333
334 econf \
335 --enable-dri \
336 --enable-glx \
337 --enable-shared-glapi \
338 $(use_enable !bindist texture-float) \
339 $(use_enable debug) \
340 $(use_enable egl) \
341 $(use_enable gbm) \
342 $(use_enable gles1) \
343 $(use_enable gles2) \
344 $(use_enable nptl glx-tls) \
345 $(use_enable osmesa) \
346 $(use_enable !pic asm) \
347 $(use_enable xa) \
348 $(use_enable xorg) \
349 --with-dri-drivers=${DRI_DRIVERS} \
350 --with-gallium-drivers=${GALLIUM_DRIVERS} \
351 --with-llvm-shared-libs \
352 PYTHON2="${PYTHON}" \
353 ${myconf}
354 }
355
356 multilib_src_install() {
357 emake install DESTDIR="${D}"
358
359 # Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib
360 # because user can eselect desired GL provider.
361 ebegin "Moving libGL and friends for dynamic switching"
362 local x
363 local gl_dir="/usr/$(get_libdir)/opengl/${OPENGL_DIR}/"
364 dodir ${gl_dir}/{lib,extensions,include/GL}
365 for x in "${ED}"/usr/$(get_libdir)/lib{EGL,GL*,OpenVG}.{la,a,so*}; do
366 if [ -f ${x} -o -L ${x} ]; then
367 mv -f "${x}" "${ED}${gl_dir}"/lib \
368 || die "Failed to move ${x}"
369 fi
370 done
371 for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do
372 if [ -f ${x} -o -L ${x} ]; then
373 mv -f "${x}" "${ED}${gl_dir}"/include/GL \
374 || die "Failed to move ${x}"
375 fi
376 done
377 for x in "${ED}"/usr/include/{EGL,GLES*,VG,KHR}; do
378 if [ -d ${x} ]; then
379 mv -f "${x}" "${ED}${gl_dir}"/include \
380 || die "Failed to move ${x}"
381 fi
382 done
383 eend $?
384
385 if use classic || use gallium; then
386 ebegin "Moving DRI/Gallium drivers for dynamic switching"
387 local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
388 keepdir /usr/$(get_libdir)/dri
389 dodir /usr/$(get_libdir)/mesa
390 for x in ${gallium_drivers[@]}; do
391 if [ -f "$(get_libdir)/gallium/${x}" ]; then
392 mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
393 || die "Failed to move ${x}"
394 insinto "/usr/$(get_libdir)/dri/"
395 if [ -f "$(get_libdir)/${x}" ]; then
396 insopts -m0755
397 doins "$(get_libdir)/${x}"
398 fi
399 fi
400 done
401 for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
402 if [ -f ${x} -o -L ${x} ]; then
403 mv -f "${x}" "${x/dri/mesa}" \
404 || die "Failed to move ${x}"
405 fi
406 done
407 pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
408 ln -s ../mesa/*.so . || die "Creating symlink failed"
409 # remove symlinks to drivers known to eselect
410 for x in ${gallium_drivers[@]}; do
411 if [ -f ${x} -o -L ${x} ]; then
412 rm "${x}" || die "Failed to remove ${x}"
413 fi
414 done
415 popd
416 eend $?
417 fi
418 if use opencl; then
419 ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
420 local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
421 dodir ${cl_dir}/{lib,include}
422 if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
423 mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
424 "${ED}"${cl_dir}
425 fi
426 if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
427 mv -f "${ED}"/usr/include/CL \
428 "${ED}"${cl_dir}/include
429 fi
430 eend $?
431 fi
432 }
433
434 multilib_src_install_all() {
435 prune_libtool_files --all
436 einstalldocs
437
438 if use !bindist; then
439 dodoc docs/patents.txt
440 fi
441
442 # Install config file for eselect mesa
443 insinto /usr/share/mesa
444 newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
445 }
446
447 pkg_postinst() {
448 # Switch to the xorg implementation.
449 echo
450 eselect opengl set --use-old ${OPENGL_DIR}
451
452 # switch to xorg-x11 and back if necessary, bug #374647 comment 11
453 OLD_IMPLEM="$(eselect opengl show)"
454 if [[ ${OPENGL_DIR}x != ${OLD_IMPLEM}x ]]; then
455 eselect opengl set ${OPENGL_DIR}
456 eselect opengl set ${OLD_IMPLEM}
457 fi
458
459 # Select classic/gallium drivers
460 if use classic || use gallium; then
461 eselect mesa set --auto
462 fi
463
464 # Switch to mesa opencl
465 if use opencl; then
466 eselect opencl set --use-old ${PN}
467 fi
468
469 # warn about patent encumbered texture-float
470 if use !bindist; then
471 elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
472 elog "enabled. Please see patents.txt for an explanation."
473 fi
474
475 local using_radeon r_flag
476 for r_flag in ${RADEON_CARDS}; do
477 if use video_cards_${r_flag}; then
478 using_radeon=1
479 break
480 fi
481 done
482
483 if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then
484 elog "Note that in order to have full S3TC support, it is necessary to install"
485 elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
486 elog "textures in some apps, and some others even require this to run."
487 fi
488 }
489
490 # $1 - VIDEO_CARDS flag
491 # other args - names of DRI drivers to enable
492 # TODO: avoid code duplication for a more elegant implementation
493 driver_enable() {
494 case $# in
495 # for enabling unconditionally
496 1)
497 DRI_DRIVERS+=",$1"
498 ;;
499 *)
500 if use $1; then
501 shift
502 for i in $@; do
503 DRI_DRIVERS+=",${i}"
504 done
505 fi
506 ;;
507 esac
508 }
509
510 gallium_enable() {
511 case $# in
512 # for enabling unconditionally
513 1)
514 GALLIUM_DRIVERS+=",$1"
515 ;;
516 *)
517 if use $1; then
518 shift
519 for i in $@; do
520 GALLIUM_DRIVERS+=",${i}"
521 done
522 fi
523 ;;
524 esac
525 }