1 |
mattst88 13/02/23 02:24:28 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: mesa-9.1.ebuild |
5 |
Log: |
6 |
Version bump to 9.1. |
7 |
|
8 |
(Portage version: 2.1.11.31/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 974CA72A) |
9 |
|
10 |
Revision Changes Path |
11 |
1.458 media-libs/mesa/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.458&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.458&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.457&r2=1.458 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v |
20 |
retrieving revision 1.457 |
21 |
retrieving revision 1.458 |
22 |
diff -u -r1.457 -r1.458 |
23 |
--- ChangeLog 18 Feb 2013 21:59:57 -0000 1.457 |
24 |
+++ ChangeLog 23 Feb 2013 02:24:28 -0000 1.458 |
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.457 2013/02/18 21:59:57 chithanh Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.458 2013/02/23 02:24:28 mattst88 Exp $ |
30 |
+ |
31 |
+*mesa-9.1 (23 Feb 2013) |
32 |
+ |
33 |
+ 23 Feb 2013; Matt Turner <mattst88@g.o> +mesa-9.1.ebuild: |
34 |
+ Version bump to 9.1. |
35 |
|
36 |
*mesa-9.0.2 (18 Feb 2013) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 media-libs/mesa/mesa-9.1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-9.1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-9.1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: mesa-9.1.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.1.ebuild,v 1.1 2013/02/23 02:24:28 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 |
inherit base autotools multilib flag-o-matic toolchain-funcs ${GIT_ECLASS} |
62 |
|
63 |
OPENGL_DIR="xorg-x11" |
64 |
|
65 |
MY_PN="${PN/m/M}" |
66 |
MY_P="${MY_PN}-${PV/_rc/-rc}" |
67 |
MY_SRC_P="${MY_PN}Lib-${PV/_rc/-rc}" |
68 |
|
69 |
FOLDER="${PV/_rc*/}" |
70 |
|
71 |
DESCRIPTION="OpenGL-like graphic library for Linux" |
72 |
HOMEPAGE="http://mesa3d.sourceforge.net/" |
73 |
|
74 |
#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2" |
75 |
if [[ $PV = 9999* ]]; then |
76 |
SRC_URI="${SRC_PATCHES}" |
77 |
else |
78 |
SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2 |
79 |
${SRC_PATCHES}" |
80 |
fi |
81 |
|
82 |
# The code is MIT/X11. |
83 |
# GLES[2]/gl[2]{,ext,platform}.h are SGI-B-2.0 |
84 |
LICENSE="MIT SGI-B-2.0" |
85 |
SLOT="0" |
86 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
87 |
|
88 |
INTEL_CARDS="i915 i965 intel" |
89 |
RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
90 |
VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} nouveau vmware" |
91 |
for card in ${VIDEO_CARDS}; do |
92 |
IUSE_VIDEO_CARDS+=" video_cards_${card}" |
93 |
done |
94 |
|
95 |
IUSE="${IUSE_VIDEO_CARDS} |
96 |
bindist +classic debug +egl +gallium gbm gles1 gles2 +llvm +nptl |
97 |
openvg osmesa pax_kernel pic r600-llvm-compiler selinux +shared-glapi vdpau |
98 |
wayland xvmc xa xorg kernel_FreeBSD" |
99 |
|
100 |
REQUIRED_USE=" |
101 |
llvm? ( gallium ) |
102 |
openvg? ( egl gallium ) |
103 |
gbm? ( shared-glapi ) |
104 |
gles1? ( egl ) |
105 |
gles2? ( egl ) |
106 |
r600-llvm-compiler? ( gallium llvm || ( video_cards_r600 video_cards_radeon ) ) |
107 |
xa? ( gallium ) |
108 |
xorg? ( gallium ) |
109 |
video_cards_intel? ( || ( classic gallium ) ) |
110 |
video_cards_i915? ( || ( classic gallium ) ) |
111 |
video_cards_i965? ( classic ) |
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 ) |
117 |
video_cards_r600? ( gallium ) |
118 |
video_cards_radeonsi? ( gallium llvm ) |
119 |
video_cards_vmware? ( gallium ) |
120 |
" |
121 |
|
122 |
LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.42" |
123 |
# keep correct libdrm and dri2proto dep |
124 |
# keep blocks in rdepend for binpkg |
125 |
RDEPEND=" |
126 |
!<x11-base/xorg-server-1.7 |
127 |
!<=x11-proto/xf86driproto-2.0.3 |
128 |
classic? ( app-admin/eselect-mesa ) |
129 |
gallium? ( app-admin/eselect-mesa ) |
130 |
>=app-admin/eselect-opengl-1.2.7 |
131 |
dev-libs/expat |
132 |
gbm? ( virtual/udev ) |
133 |
>=x11-libs/libX11-1.3.99.901 |
134 |
x11-libs/libXdamage |
135 |
x11-libs/libXext |
136 |
x11-libs/libXxf86vm |
137 |
>=x11-libs/libxcb-1.8.1 |
138 |
vdpau? ( >=x11-libs/libvdpau-0.4.1 ) |
139 |
wayland? ( >=dev-libs/wayland-1.0.3 ) |
140 |
xorg? ( |
141 |
x11-base/xorg-server |
142 |
x11-libs/libdrm[libkms] |
143 |
) |
144 |
xvmc? ( >=x11-libs/libXvMC-1.0.6 ) |
145 |
${LIBDRM_DEPSTRING}[video_cards_nouveau?,video_cards_vmware?] |
146 |
" |
147 |
for card in ${INTEL_CARDS}; do |
148 |
RDEPEND="${RDEPEND} |
149 |
video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
150 |
" |
151 |
done |
152 |
|
153 |
for card in ${RADEON_CARDS}; do |
154 |
RDEPEND="${RDEPEND} |
155 |
video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
156 |
" |
157 |
done |
158 |
|
159 |
DEPEND="${RDEPEND} |
160 |
llvm? ( |
161 |
>=sys-devel/llvm-2.9 |
162 |
r600-llvm-compiler? ( >=sys-devel/llvm-3.1 ) |
163 |
video_cards_radeonsi? ( >=sys-devel/llvm-3.1 ) |
164 |
) |
165 |
=dev-lang/python-2* |
166 |
dev-libs/libxml2[python] |
167 |
sys-devel/bison |
168 |
sys-devel/flex |
169 |
virtual/pkgconfig |
170 |
>=x11-proto/dri2proto-2.6 |
171 |
>=x11-proto/glproto-1.4.15-r1 |
172 |
>=x11-proto/xextproto-7.0.99.1 |
173 |
x11-proto/xf86driproto |
174 |
x11-proto/xf86vidmodeproto |
175 |
" |
176 |
|
177 |
S="${WORKDIR}/${MY_P}" |
178 |
|
179 |
# It is slow without texrels, if someone wants slow |
180 |
# mesa without texrels +pic use is worth the shot |
181 |
QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
182 |
QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
183 |
|
184 |
# Think about: ggi, fbcon, no-X configs |
185 |
|
186 |
pkg_setup() { |
187 |
# workaround toc-issue wrt #386545 |
188 |
use ppc64 && append-flags -mminimal-toc |
189 |
} |
190 |
|
191 |
src_unpack() { |
192 |
default |
193 |
[[ $PV = 9999* ]] && git-2_src_unpack |
194 |
} |
195 |
|
196 |
src_prepare() { |
197 |
# apply patches |
198 |
if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then |
199 |
EPATCH_FORCE="yes" \ |
200 |
EPATCH_SOURCE="${WORKDIR}/patches" \ |
201 |
EPATCH_SUFFIX="patch" \ |
202 |
epatch |
203 |
fi |
204 |
|
205 |
# relax the requirement that r300 must have llvm, bug 380303 |
206 |
epatch "${FILESDIR}"/${PN}-8.1-dont-require-llvm-for-r300.patch |
207 |
|
208 |
# fix for hardened pax_kernel, bug 240956 |
209 |
[[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch |
210 |
|
211 |
# Solaris needs some recent POSIX stuff in our case |
212 |
if [[ ${CHOST} == *-solaris* ]] ; then |
213 |
sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die |
214 |
fi |
215 |
|
216 |
# Tests fail against python-3, bug #407887 |
217 |
sed -i 's|/usr/bin/env python|/usr/bin/env python2|' src/glsl/tests/compare_ir || die |
218 |
|
219 |
base_src_prepare |
220 |
|
221 |
eautoreconf |
222 |
} |
223 |
|
224 |
src_configure() { |
225 |
local myconf |
226 |
|
227 |
if use classic; then |
228 |
# Configurable DRI drivers |
229 |
driver_enable swrast |
230 |
|
231 |
# Intel code |
232 |
driver_enable video_cards_i915 i915 |
233 |
driver_enable video_cards_i965 i965 |
234 |
if ! use video_cards_i915 && \ |
235 |
! use video_cards_i965; then |
236 |
driver_enable video_cards_intel i915 i965 |
237 |
fi |
238 |
|
239 |
# Nouveau code |
240 |
driver_enable video_cards_nouveau nouveau |
241 |
|
242 |
# ATI code |
243 |
driver_enable video_cards_r100 radeon |
244 |
driver_enable video_cards_r200 r200 |
245 |
if ! use video_cards_r100 && \ |
246 |
! use video_cards_r200; then |
247 |
driver_enable video_cards_radeon radeon r200 |
248 |
fi |
249 |
fi |
250 |
|
251 |
if use egl; then |
252 |
myconf+=" |
253 |
--with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm") |
254 |
$(use_enable gallium gallium-egl) |
255 |
" |
256 |
fi |
257 |
|
258 |
if use gallium; then |
259 |
myconf+=" |
260 |
$(use_enable llvm gallium-llvm) |
261 |
$(use_enable openvg) |
262 |
$(use_enable r600-llvm-compiler) |
263 |
$(use_enable vdpau) |
264 |
$(use_enable xvmc) |
265 |
" |
266 |
gallium_enable swrast |
267 |
gallium_enable video_cards_vmware svga |
268 |
gallium_enable video_cards_nouveau nouveau |
269 |
gallium_enable video_cards_i915 i915 |
270 |
if ! use video_cards_i915; then |
271 |
gallium_enable video_cards_intel i915 |
272 |
fi |
273 |
|
274 |
gallium_enable video_cards_r300 r300 |
275 |
gallium_enable video_cards_r600 r600 |
276 |
gallium_enable video_cards_radeonsi radeonsi |
277 |
if ! use video_cards_r300 && \ |
278 |
! use video_cards_r600; then |
279 |
gallium_enable video_cards_radeon r300 r600 |
280 |
fi |
281 |
fi |
282 |
|
283 |
# x86 hardened pax_kernel needs glx-rts, bug 240956 |
284 |
if use pax_kernel; then |
285 |
myconf+=" |
286 |
$(use_enable x86 glx-rts) |
287 |
" |
288 |
fi |
289 |
|
290 |
# build fails with BSD indent, bug #428112 |
291 |
use userland_GNU || export INDENT=cat |
292 |
|
293 |
econf \ |
294 |
--enable-dri \ |
295 |
--enable-glx \ |
296 |
$(use_enable !bindist texture-float) \ |
297 |
$(use_enable debug) \ |
298 |
$(use_enable egl) \ |
299 |
$(use_enable gbm) \ |
300 |
$(use_enable gles1) \ |
301 |
$(use_enable gles2) \ |
302 |
$(use_enable nptl glx-tls) \ |
303 |
$(use_enable osmesa) \ |
304 |
$(use_enable !pic asm) \ |
305 |
$(use_enable shared-glapi) \ |
306 |
$(use_enable xa) \ |
307 |
$(use_enable xorg) \ |
308 |
--with-dri-drivers=${DRI_DRIVERS} \ |
309 |
--with-gallium-drivers=${GALLIUM_DRIVERS} \ |
310 |
${myconf} |
311 |
} |
312 |
|
313 |
src_install() { |
314 |
base_src_install |
315 |
|
316 |
find "${ED}" -name '*.la' -exec rm -f {} + || die |
317 |
|
318 |
if use !bindist; then |
319 |
dodoc docs/patents.txt |
320 |
fi |
321 |
|
322 |
# Install config file for eselect mesa |
323 |
insinto /usr/share/mesa |
324 |
newins "${FILESDIR}/eselect-mesa.conf.8.1" eselect-mesa.conf |
325 |
|
326 |
# Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib |
327 |
# because user can eselect desired GL provider. |
328 |
ebegin "Moving libGL and friends for dynamic switching" |
329 |
local x |
330 |
local gl_dir="/usr/$(get_libdir)/opengl/${OPENGL_DIR}/" |
331 |
dodir ${gl_dir}/{lib,extensions,include/GL} |
332 |
for x in "${ED}"/usr/$(get_libdir)/lib{EGL,GL*,OpenVG}.{la,a,so*}; do |
333 |
if [ -f ${x} -o -L ${x} ]; then |
334 |
mv -f "${x}" "${ED}${gl_dir}"/lib \ |
335 |
|| die "Failed to move ${x}" |
336 |
fi |
337 |
done |
338 |
for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do |
339 |
if [ -f ${x} -o -L ${x} ]; then |
340 |
mv -f "${x}" "${ED}${gl_dir}"/include/GL \ |
341 |
|| die "Failed to move ${x}" |
342 |
fi |
343 |
done |
344 |
for x in "${ED}"/usr/include/{EGL,GLES*,VG,KHR}; do |
345 |
if [ -d ${x} ]; then |
346 |
mv -f "${x}" "${ED}${gl_dir}"/include \ |
347 |
|| die "Failed to move ${x}" |
348 |
fi |
349 |
done |
350 |
eend $? |
351 |
|
352 |
if use classic || use gallium; then |
353 |
ebegin "Moving DRI/Gallium drivers for dynamic switching" |
354 |
local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
355 |
keepdir /usr/$(get_libdir)/dri |
356 |
dodir /usr/$(get_libdir)/mesa |
357 |
for x in ${gallium_drivers[@]}; do |
358 |
if [ -f "${S}/$(get_libdir)/gallium/${x}" ]; then |
359 |
mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
360 |
|| die "Failed to move ${x}" |
361 |
insinto "/usr/$(get_libdir)/dri/" |
362 |
if [ -f "${S}/$(get_libdir)/${x}" ]; then |
363 |
insopts -m0755 |
364 |
doins "${S}/$(get_libdir)/${x}" |
365 |
fi |
366 |
fi |
367 |
done |
368 |
for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
369 |
if [ -f ${x} -o -L ${x} ]; then |
370 |
mv -f "${x}" "${x/dri/mesa}" \ |
371 |
|| die "Failed to move ${x}" |
372 |
fi |
373 |
done |
374 |
pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
375 |
ln -s ../mesa/*.so . || die "Creating symlink failed" |
376 |
# remove symlinks to drivers known to eselect |
377 |
for x in ${gallium_drivers[@]}; do |
378 |
if [ -f ${x} -o -L ${x} ]; then |
379 |
rm "${x}" || die "Failed to remove ${x}" |
380 |
fi |
381 |
done |
382 |
popd |
383 |
eend $? |
384 |
fi |
385 |
} |
386 |
|
387 |
pkg_postinst() { |
388 |
# Switch to the xorg implementation. |
389 |
echo |
390 |
eselect opengl set --use-old ${OPENGL_DIR} |
391 |
|
392 |
# switch to xorg-x11 and back if necessary, bug #374647 comment 11 |
393 |
OLD_IMPLEM="$(eselect opengl show)" |
394 |
if [[ ${OPENGL_DIR}x != ${OLD_IMPLEM}x ]]; then |
395 |
eselect opengl set ${OPENGL_DIR} |
396 |
eselect opengl set ${OLD_IMPLEM} |
397 |
fi |
398 |
|
399 |
# Select classic/gallium drivers |
400 |
if use classic || use gallium; then |
401 |
eselect mesa set --auto |
402 |
fi |
403 |
|
404 |
# warn about patent encumbered texture-float |
405 |
if use !bindist; then |
406 |
elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
407 |
elog "enabled. Please see patents.txt for an explanation." |
408 |
fi |
409 |
|
410 |
local using_radeon r_flag |
411 |
for r_flag in ${RADEON_CARDS}; do |
412 |
if use video_cards_${r_flag}; then |
413 |
using_radeon=1 |
414 |
break |
415 |
fi |
416 |
done |
417 |
|
418 |
if [[ ${using_radeon} = 1 ]] && ! has_version media-libs/libtxc_dxtn; then |
419 |
elog "Note that in order to have full S3TC support, it is necessary to install" |
420 |
elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
421 |
elog "textures in some apps, and some others even require this to run." |
422 |
fi |
423 |
} |
424 |
|
425 |
# $1 - VIDEO_CARDS flag |
426 |
# other args - names of DRI drivers to enable |
427 |
# TODO: avoid code duplication for a more elegant implementation |
428 |
driver_enable() { |
429 |
case $# in |
430 |
# for enabling unconditionally |
431 |
1) |
432 |
DRI_DRIVERS+=",$1" |
433 |
;; |
434 |
*) |
435 |
if use $1; then |
436 |
shift |
437 |
for i in $@; do |
438 |
DRI_DRIVERS+=",${i}" |
439 |
done |
440 |
fi |
441 |
;; |
442 |
esac |
443 |
} |
444 |
|
445 |
gallium_enable() { |
446 |
case $# in |
447 |
# for enabling unconditionally |
448 |
1) |
449 |
GALLIUM_DRIVERS+=",$1" |
450 |
;; |
451 |
*) |
452 |
if use $1; then |
453 |
shift |
454 |
for i in $@; do |
455 |
GALLIUM_DRIVERS+=",${i}" |
456 |
done |
457 |
fi |
458 |
;; |
459 |
esac |
460 |
} |