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