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.4.6.ebuild ChangeLog
Date: Tue, 28 Apr 2015 14:43:12
Message-Id: 20150428004540.6817B993@oystercatcher.gentoo.org
1 mattst88 15/04/28 00:45:39
2
3 Modified: ChangeLog
4 Added: mesa-10.4.6.ebuild
5 Log:
6 Version bump to 10.4.6.
7
8 (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key 974CA72A)
9
10 Revision Changes Path
11 1.638 media-libs/mesa/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.638&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.638&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.637&r2=1.638
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v
20 retrieving revision 1.637
21 retrieving revision 1.638
22 diff -u -r1.637 -r1.638
23 --- ChangeLog 27 Apr 2015 23:06:16 -0000 1.637
24 +++ ChangeLog 28 Apr 2015 00:45:39 -0000 1.638
25 @@ -1,6 +1,11 @@
26 # ChangeLog for media-libs/mesa
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.637 2015/04/27 23:06:16 mattst88 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.638 2015/04/28 00:45:39 mattst88 Exp $
30 +
31 +*mesa-10.4.6 (28 Apr 2015)
32 +
33 + 28 Apr 2015; Matt Turner <mattst88@g.o> +mesa-10.4.6.ebuild:
34 + Version bump to 10.4.6.
35
36 *mesa-10.5.4 (27 Apr 2015)
37
38
39
40
41 1.1 media-libs/mesa/mesa-10.4.6.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-10.4.6.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-10.4.6.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mesa-10.4.6.ebuild
47 ===================================================================
48 # Copyright 1999-2015 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.4.6.ebuild,v 1.1 2015/04/28 00:45:39 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-r3"
58 EXPERIMENTAL="true"
59 fi
60
61 PYTHON_COMPAT=( python2_7 )
62
63 inherit base autotools multilib multilib-minimal flag-o-matic \
64 python-any-r1 toolchain-funcs pax-utils ${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 ~arm64 ~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 RESTRICT="!bindist? ( bindist )"
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 d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm
101 +nptl opencl osmesa pax_kernel openmax pic r600-llvm-compiler selinux
102 +udev vaapi vdpau wayland xvmc xa kernel_FreeBSD"
103
104 REQUIRED_USE="
105 d3d9? ( dri3 gallium )
106 llvm? ( gallium )
107 opencl? (
108 gallium
109 llvm
110 video_cards_r600? ( r600-llvm-compiler )
111 video_cards_radeon? ( r600-llvm-compiler )
112 video_cards_radeonsi? ( r600-llvm-compiler )
113 )
114 openmax? ( gallium )
115 gles1? ( egl )
116 gles2? ( egl )
117 r600-llvm-compiler? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi video_cards_radeon ) )
118 vaapi? ( gallium )
119 vdpau? ( gallium )
120 wayland? ( egl gbm )
121 xa? ( gallium )
122 video_cards_freedreno? ( gallium )
123 video_cards_intel? ( || ( classic gallium ) )
124 video_cards_i915? ( || ( classic gallium ) )
125 video_cards_i965? ( classic )
126 video_cards_ilo? ( gallium )
127 video_cards_nouveau? ( || ( classic gallium ) )
128 video_cards_radeon? ( || ( classic gallium ) )
129 video_cards_r100? ( classic )
130 video_cards_r200? ( classic )
131 video_cards_r300? ( gallium llvm )
132 video_cards_r600? ( gallium )
133 video_cards_radeonsi? ( gallium llvm )
134 video_cards_vmware? ( gallium )
135 ${PYTHON_REQUIRED_USE}
136 "
137
138 LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.56"
139 # keep correct libdrm and dri2proto dep
140 # keep blocks in rdepend for binpkg
141 RDEPEND="
142 !<x11-base/xorg-server-1.7
143 !<=x11-proto/xf86driproto-2.0.3
144 abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] )
145 classic? ( app-eselect/eselect-mesa )
146 gallium? ( app-eselect/eselect-mesa )
147 >=app-eselect/eselect-opengl-1.3.0
148 udev? ( kernel_linux? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) )
149 >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
150 gbm? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
151 dri3? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] )
152 >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}]
153 >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}]
154 >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}]
155 >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}]
156 >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}]
157 >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}]
158 llvm? (
159 video_cards_radeonsi? ( || (
160 >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
161 >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
162 ) )
163 video_cards_r600? ( || (
164 >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
165 >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
166 ) )
167 !video_cards_r600? (
168 video_cards_radeon? ( || (
169 >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
170 >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
171 ) )
172 )
173 >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
174 <sys-devel/llvm-3.6
175 )
176 opencl? (
177 app-eselect/eselect-opencl
178 dev-libs/libclc
179 || (
180 >=dev-libs/elfutils-0.155-r1:=[${MULTILIB_USEDEP}]
181 >=dev-libs/libelf-0.8.13-r2:=[${MULTILIB_USEDEP}]
182 )
183 )
184 openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] )
185 vaapi? ( >=x11-libs/libva-0.35.0:=[${MULTILIB_USEDEP}] )
186 vdpau? ( >=x11-libs/libvdpau-0.7:=[${MULTILIB_USEDEP}] )
187 wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] )
188 xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
189 ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vmware?,${MULTILIB_USEDEP}]
190 "
191 for card in ${INTEL_CARDS}; do
192 RDEPEND="${RDEPEND}
193 video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
194 "
195 done
196
197 for card in ${RADEON_CARDS}; do
198 RDEPEND="${RDEPEND}
199 video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
200 "
201 done
202
203 DEPEND="${RDEPEND}
204 ${PYTHON_DEPS}
205 llvm? (
206 r600-llvm-compiler? ( sys-devel/llvm[video_cards_radeon] )
207 video_cards_radeonsi? ( sys-devel/llvm[video_cards_radeon] )
208 )
209 opencl? (
210 >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}]
211 >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}]
212 >=sys-devel/gcc-4.6
213 )
214 sys-devel/bison
215 sys-devel/flex
216 sys-devel/gettext
217 virtual/pkgconfig
218 >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}]
219 dri3? (
220 >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}]
221 >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}]
222 )
223 >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}]
224 >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}]
225 >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}]
226 >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}]
227 "
228
229 S="${WORKDIR}/${MY_P}"
230 EGIT_CHECKOUT_DIR=${S}
231
232 # It is slow without texrels, if someone wants slow
233 # mesa without texrels +pic use is worth the shot
234 QA_EXECSTACK="usr/lib*/libGL.so*"
235 QA_WX_LOAD="usr/lib*/libGL.so*"
236
237 # Think about: ggi, fbcon, no-X configs
238
239 pkg_setup() {
240 # workaround toc-issue wrt #386545
241 use ppc64 && append-flags -mminimal-toc
242
243 # warning message for bug 459306
244 if use llvm && has_version sys-devel/llvm[!debug=]; then
245 ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm"
246 ewarn "detected! This can cause problems. For details, see bug 459306."
247 fi
248
249 python-any-r1_pkg_setup
250 }
251
252 src_unpack() {
253 default
254 [[ $PV = 9999* ]] && git-r3_src_unpack
255 }
256
257 src_prepare() {
258 # apply patches
259 if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then
260 EPATCH_FORCE="yes" \
261 EPATCH_SOURCE="${WORKDIR}/patches" \
262 EPATCH_SUFFIX="patch" \
263 epatch
264 fi
265
266 # fix for hardened pax_kernel, bug 240956
267 [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch
268
269 # Solaris needs some recent POSIX stuff in our case
270 if [[ ${CHOST} == *-solaris* ]] ; then
271 sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die
272 fi
273
274 base_src_prepare
275
276 eautoreconf
277 multilib_copy_sources
278 }
279
280 multilib_src_configure() {
281 local myconf
282
283 if use classic; then
284 # Configurable DRI drivers
285 driver_enable swrast
286
287 # Intel code
288 driver_enable video_cards_i915 i915
289 driver_enable video_cards_i965 i965
290 if ! use video_cards_i915 && \
291 ! use video_cards_i965; then
292 driver_enable video_cards_intel i915 i965
293 fi
294
295 # Nouveau code
296 driver_enable video_cards_nouveau nouveau
297
298 # ATI code
299 driver_enable video_cards_r100 radeon
300 driver_enable video_cards_r200 r200
301 if ! use video_cards_r100 && \
302 ! use video_cards_r200; then
303 driver_enable video_cards_radeon radeon r200
304 fi
305 fi
306
307 if use egl; then
308 myconf+="--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") "
309 fi
310
311 if use gallium; then
312 myconf+="
313 $(use_enable d3d9 nine)
314 $(use_enable llvm gallium-llvm)
315 $(use_enable openmax omx)
316 $(use_enable r600-llvm-compiler)
317 $(use_enable vaapi va)
318 $(use_enable vdpau)
319 $(use_enable xa)
320 $(use_enable xvmc)
321 "
322 gallium_enable swrast
323 gallium_enable video_cards_vmware svga
324 gallium_enable video_cards_nouveau nouveau
325 gallium_enable video_cards_i915 i915
326 gallium_enable video_cards_ilo ilo
327 if ! use video_cards_i915 && \
328 ! use video_cards_i965; then
329 gallium_enable video_cards_intel i915
330 fi
331
332 gallium_enable video_cards_r300 r300
333 gallium_enable video_cards_r600 r600
334 gallium_enable video_cards_radeonsi radeonsi
335 if ! use video_cards_r300 && \
336 ! use video_cards_r600; then
337 gallium_enable video_cards_radeon r300 r600
338 fi
339
340 gallium_enable video_cards_freedreno freedreno
341 # opencl stuff
342 if use opencl; then
343 myconf+="
344 $(use_enable opencl)
345 --with-clang-libdir="${EPREFIX}/usr/lib"
346 "
347 fi
348 fi
349
350 # x86 hardened pax_kernel needs glx-rts, bug 240956
351 if use pax_kernel; then
352 myconf+="
353 $(use_enable x86 glx-rts)
354 "
355 fi
356
357 # on abi_x86_32 hardened we need to have asm disable
358 if [[ ${ABI} == x86* ]] && use pic; then
359 myconf+=" --disable-asm"
360 fi
361
362 # build fails with BSD indent, bug #428112
363 use userland_GNU || export INDENT=cat
364
365 econf \
366 --enable-dri \
367 --enable-glx \
368 --enable-shared-glapi \
369 $(use_enable !bindist texture-float) \
370 $(use_enable debug) \
371 $(use_enable dri3) \
372 $(use_enable egl) \
373 $(use_enable gbm) \
374 $(use_enable gles1) \
375 $(use_enable gles2) \
376 $(use_enable nptl glx-tls) \
377 $(use_enable osmesa) \
378 $(use_enable !udev sysfs) \
379 --enable-llvm-shared-libs \
380 --with-dri-drivers=${DRI_DRIVERS} \
381 --with-gallium-drivers=${GALLIUM_DRIVERS} \
382 PYTHON2="${PYTHON}" \
383 ${myconf}
384 }
385
386 multilib_src_install() {
387 emake install DESTDIR="${D}"
388
389 if use classic || use gallium; then
390 ebegin "Moving DRI/Gallium drivers for dynamic switching"
391 local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so )
392 keepdir /usr/$(get_libdir)/dri
393 dodir /usr/$(get_libdir)/mesa
394 for x in ${gallium_drivers[@]}; do
395 if [ -f "$(get_libdir)/gallium/${x}" ]; then
396 mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \
397 || die "Failed to move ${x}"
398 fi
399 done
400 if use classic; then
401 emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install
402 fi
403 for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do
404 if [ -f ${x} -o -L ${x} ]; then
405 mv -f "${x}" "${x/dri/mesa}" \
406 || die "Failed to move ${x}"
407 fi
408 done
409 pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed"
410 ln -s ../mesa/*.so . || die "Creating symlink failed"
411 # remove symlinks to drivers known to eselect
412 for x in ${gallium_drivers[@]}; do
413 if [ -f ${x} -o -L ${x} ]; then
414 rm "${x}" || die "Failed to remove ${x}"
415 fi
416 done
417 popd
418 eend $?
419 fi
420 if use opencl; then
421 ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching"
422 local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa"
423 dodir ${cl_dir}/{lib,include}
424 if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then
425 mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \
426 "${ED}"${cl_dir}
427 fi
428 if [ -f "${ED}/usr/include/CL/opencl.h" ]; then
429 mv -f "${ED}"/usr/include/CL \
430 "${ED}"${cl_dir}/include
431 fi
432 eend $?
433 fi
434
435 if use openmax; then
436 echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx"
437 doenvd "${T}"/99mesaxdgomx
438 keepdir /usr/share/mesa/xdg
439 fi
440 }
441
442 multilib_src_install_all() {
443 prune_libtool_files --all
444 einstalldocs
445
446 if use !bindist; then
447 dodoc docs/patents.txt
448 fi
449
450 # Install config file for eselect mesa
451 insinto /usr/share/mesa
452 newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf
453 }
454
455 multilib_src_test() {
456 if use llvm; then
457 local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf'
458 pushd src/gallium/drivers/llvmpipe >/dev/null || die
459 emake ${llvm_tests}
460 pax-mark m ${llvm_tests}
461 popd >/dev/null || die
462 fi
463 emake check
464 }
465
466 pkg_postinst() {
467 # Switch to the xorg implementation.
468 echo
469 eselect opengl set --use-old ${OPENGL_DIR}
470
471 # Select classic/gallium drivers
472 if use classic || use gallium; then
473 eselect mesa set --auto
474 fi
475
476 # Switch to mesa opencl
477 if use opencl; then
478 eselect opencl set --use-old ${PN}
479 fi
480
481 # run omxregister-bellagio to make the OpenMAX drivers known system-wide
482 if use openmax; then
483 ebegin "Registering OpenMAX drivers"
484 BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \
485 OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \
486 omxregister-bellagio
487 eend $?
488 fi
489
490 # warn about patent encumbered texture-float
491 if use !bindist; then
492 elog "USE=\"bindist\" was not set. Potentially patent encumbered code was"
493 elog "enabled. Please see patents.txt for an explanation."
494 fi
495
496 local using_radeon r_flag
497 for r_flag in ${RADEON_CARDS}; do
498 if use video_cards_${r_flag}; then
499 using_radeon=1
500 break
501 fi
502 done
503
504 if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then
505 elog "Note that in order to have full S3TC support, it is necessary to install"
506 elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice"
507 elog "textures in some apps, and some others even require this to run."
508 fi
509 }
510
511 pkg_prerm() {
512 if use openmax; then
513 rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister
514 fi
515 }
516
517 # $1 - VIDEO_CARDS flag
518 # other args - names of DRI drivers to enable
519 # TODO: avoid code duplication for a more elegant implementation
520 driver_enable() {
521 case $# in
522 # for enabling unconditionally
523 1)
524 DRI_DRIVERS+=",$1"
525 ;;
526 *)
527 if use $1; then
528 shift
529 for i in $@; do
530 DRI_DRIVERS+=",${i}"
531 done
532 fi
533 ;;
534 esac
535 }
536
537 gallium_enable() {
538 case $# in
539 # for enabling unconditionally
540 1)
541 GALLIUM_DRIVERS+=",$1"
542 ;;
543 *)
544 if use $1; then
545 shift
546 for i in $@; do
547 GALLIUM_DRIVERS+=",${i}"
548 done
549 fi
550 ;;
551 esac
552 }