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