1 |
chithanh 11/08/01 22:35:45 |
2 |
|
3 |
Modified: metadata.xml ChangeLog |
4 |
Added: mesa-7.11.ebuild |
5 |
Removed: mesa-7.11_rc2.ebuild mesa-7.11_rc4.ebuild |
6 |
Log: |
7 |
Version bump. Make gbm optional, bug #376679. |
8 |
|
9 |
(Portage version: 2.2.0_alpha49/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.6 media-libs/mesa/metadata.xml |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/metadata.xml?rev=1.6&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/metadata.xml?rev=1.6&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/metadata.xml?r1=1.5&r2=1.6 |
17 |
|
18 |
Index: metadata.xml |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/metadata.xml,v |
21 |
retrieving revision 1.5 |
22 |
retrieving revision 1.6 |
23 |
diff -u -r1.5 -r1.6 |
24 |
--- metadata.xml 9 Jul 2011 21:44:06 -0000 1.5 |
25 |
+++ metadata.xml 1 Aug 2011 22:35:44 -0000 1.6 |
26 |
@@ -6,6 +6,7 @@ |
27 |
<flag name='classic'>Build drivers based on the classic architecture.</flag> |
28 |
<flag name='egl'>Enable EGL support for Gallium3D.</flag> |
29 |
<flag name='gallium'>Build drivers based on Gallium3D, the new architecture for 3D graphics drivers.</flag> |
30 |
+ <flag name='gbm'>Enable the Graphics Buffer Manager for EGL on KMS.</flag> |
31 |
<flag name='gles'>Enable GLES support for Gallium3D.</flag> |
32 |
<flag name='llvm'>Enable LLVM backend for Gallium3D.</flag> |
33 |
<flag name='openvg'>Enable the OpenVG 2D acceleration API</flag> |
34 |
|
35 |
|
36 |
|
37 |
1.356 media-libs/mesa/ChangeLog |
38 |
|
39 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.356&view=markup |
40 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?rev=1.356&content-type=text/plain |
41 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/ChangeLog?r1=1.355&r2=1.356 |
42 |
|
43 |
Index: ChangeLog |
44 |
=================================================================== |
45 |
RCS file: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v |
46 |
retrieving revision 1.355 |
47 |
retrieving revision 1.356 |
48 |
diff -u -r1.355 -r1.356 |
49 |
--- ChangeLog 31 Jul 2011 16:09:15 -0000 1.355 |
50 |
+++ ChangeLog 1 Aug 2011 22:35:44 -0000 1.356 |
51 |
@@ -1,6 +1,13 @@ |
52 |
# ChangeLog for media-libs/mesa |
53 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
54 |
-# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.355 2011/07/31 16:09:15 mattst88 Exp $ |
55 |
+# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/ChangeLog,v 1.356 2011/08/01 22:35:44 chithanh Exp $ |
56 |
+ |
57 |
+*mesa-7.11 (01 Aug 2011) |
58 |
+ |
59 |
+ 01 Aug 2011; Chí-Thanh Christopher Nguyễn <chithanh@g.o> |
60 |
+ -mesa-7.11_rc2.ebuild, -mesa-7.11_rc4.ebuild, +mesa-7.11.ebuild, |
61 |
+ metadata.xml: |
62 |
+ Version bump. Make gbm optional, bug #376679. |
63 |
|
64 |
31 Jul 2011; Matt Turner <mattst88@g.o> mesa-7.11_rc2.ebuild, |
65 |
mesa-7.11_rc4.ebuild: |
66 |
|
67 |
|
68 |
|
69 |
1.1 media-libs/mesa/mesa-7.11.ebuild |
70 |
|
71 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-7.11.ebuild?rev=1.1&view=markup |
72 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/mesa/mesa-7.11.ebuild?rev=1.1&content-type=text/plain |
73 |
|
74 |
Index: mesa-7.11.ebuild |
75 |
=================================================================== |
76 |
# Copyright 1999-2011 Gentoo Foundation |
77 |
# Distributed under the terms of the GNU General Public License v2 |
78 |
# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-7.11.ebuild,v 1.1 2011/08/01 22:35:44 chithanh Exp $ |
79 |
|
80 |
EAPI=3 |
81 |
|
82 |
EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" |
83 |
|
84 |
if [[ ${PV} = 9999* ]]; then |
85 |
GIT_ECLASS="git-2" |
86 |
EXPERIMENTAL="true" |
87 |
fi |
88 |
|
89 |
inherit base autotools multilib flag-o-matic python toolchain-funcs ${GIT_ECLASS} |
90 |
|
91 |
OPENGL_DIR="xorg-x11" |
92 |
|
93 |
MY_PN="${PN/m/M}" |
94 |
MY_P="${MY_PN}-${PV/_/-}" |
95 |
MY_SRC_P="${MY_PN}Lib-${PV/_/-}" |
96 |
|
97 |
FOLDER="${PV/_rc*/}" |
98 |
|
99 |
DESCRIPTION="OpenGL-like graphic library for Linux" |
100 |
HOMEPAGE="http://mesa3d.sourceforge.net/" |
101 |
|
102 |
#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2" |
103 |
if [[ $PV = 9999* ]]; then |
104 |
SRC_URI="${SRC_PATCHES}" |
105 |
else |
106 |
SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2 |
107 |
${SRC_PATCHES}" |
108 |
fi |
109 |
|
110 |
LICENSE="LGPL-2 kilgard" |
111 |
SLOT="0" |
112 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
113 |
|
114 |
INTEL_CARDS="intel" |
115 |
RADEON_CARDS="radeon" |
116 |
VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} mach64 mga nouveau r128 savage sis vmware tdfx via" |
117 |
for card in ${VIDEO_CARDS}; do |
118 |
IUSE_VIDEO_CARDS+=" video_cards_${card}" |
119 |
done |
120 |
|
121 |
IUSE="${IUSE_VIDEO_CARDS} |
122 |
bindist +classic debug +egl +gallium gbm gles +llvm motif +nptl openvg pic selinux shared-dricore +shared-glapi kernel_FreeBSD" |
123 |
|
124 |
LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.24" |
125 |
# not a runtime dependency of this package, but dependency of packages which |
126 |
# depend on this package, bug #342393 |
127 |
EXTERNAL_DEPEND=" |
128 |
>=x11-proto/dri2proto-2.2 |
129 |
>=x11-proto/glproto-1.4.11 |
130 |
" |
131 |
# keep correct libdrm and dri2proto dep |
132 |
# keep blocks in rdepend for binpkg |
133 |
RDEPEND="${EXTERNAL_DEPEND} |
134 |
!<x11-base/xorg-server-1.7 |
135 |
!<=x11-proto/xf86driproto-2.0.3 |
136 |
classic? ( app-admin/eselect-mesa ) |
137 |
gallium? ( app-admin/eselect-mesa ) |
138 |
app-admin/eselect-opengl |
139 |
dev-libs/expat |
140 |
gbm? ( sys-fs/udev ) |
141 |
x11-libs/libICE |
142 |
>=x11-libs/libX11-1.3.99.901 |
143 |
x11-libs/libXdamage |
144 |
x11-libs/libXext |
145 |
x11-libs/libXi |
146 |
x11-libs/libXmu |
147 |
x11-libs/libXxf86vm |
148 |
motif? ( x11-libs/openmotif ) |
149 |
gallium? ( |
150 |
llvm? ( >=sys-devel/llvm-2.9 ) |
151 |
) |
152 |
${LIBDRM_DEPSTRING}[video_cards_nouveau?,video_cards_vmware?] |
153 |
" |
154 |
for card in ${INTEL_CARDS}; do |
155 |
RDEPEND="${RDEPEND} |
156 |
video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
157 |
" |
158 |
done |
159 |
|
160 |
for card in ${RADEON_CARDS}; do |
161 |
RDEPEND="${RDEPEND} |
162 |
video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
163 |
" |
164 |
done |
165 |
|
166 |
DEPEND="${RDEPEND} |
167 |
=dev-lang/python-2* |
168 |
dev-libs/libxml2[python] |
169 |
dev-util/pkgconfig |
170 |
sys-devel/bison |
171 |
sys-devel/flex |
172 |
x11-misc/makedepend |
173 |
x11-proto/inputproto |
174 |
>=x11-proto/xextproto-7.0.99.1 |
175 |
x11-proto/xf86driproto |
176 |
x11-proto/xf86vidmodeproto |
177 |
" |
178 |
|
179 |
S="${WORKDIR}/${MY_P}" |
180 |
|
181 |
# It is slow without texrels, if someone wants slow |
182 |
# mesa without texrels +pic use is worth the shot |
183 |
QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
184 |
QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
185 |
|
186 |
# Think about: ggi, fbcon, no-X configs |
187 |
|
188 |
pkg_setup() { |
189 |
# gcc 4.2 has buggy ivopts |
190 |
if [[ $(gcc-version) = "4.2" ]]; then |
191 |
append-flags -fno-ivopts |
192 |
fi |
193 |
|
194 |
# recommended by upstream |
195 |
append-flags -ffast-math |
196 |
|
197 |
python_set_active_version 2 |
198 |
python_pkg_setup |
199 |
} |
200 |
|
201 |
src_unpack() { |
202 |
default |
203 |
[[ $PV = 9999* ]] && git-2_src_unpack |
204 |
} |
205 |
|
206 |
src_prepare() { |
207 |
# apply patches |
208 |
if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then |
209 |
EPATCH_FORCE="yes" \ |
210 |
EPATCH_SOURCE="${WORKDIR}/patches" \ |
211 |
EPATCH_SUFFIX="patch" \ |
212 |
epatch |
213 |
fi |
214 |
# fix for hardened, bug 240956 |
215 |
[[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch |
216 |
|
217 |
# FreeBSD 6.* doesn't have posix_memalign(). |
218 |
if [[ ${CHOST} == *-freebsd6.* ]]; then |
219 |
sed -i \ |
220 |
-e "s/-DHAVE_POSIX_MEMALIGN//" \ |
221 |
configure.ac || die |
222 |
fi |
223 |
# Solaris needs some recent POSIX stuff in our case |
224 |
if [[ ${CHOST} == *-solaris* ]] ; then |
225 |
sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die |
226 |
sed -i -e 's/uint/unsigned int/g' src/egl/drivers/glx/egl_glx.c || die |
227 |
fi |
228 |
|
229 |
# In order for mesa to complete it's build process we need to use a tool |
230 |
# that it compiles. When we cross compile this clearly does not work |
231 |
# so we require mesa to be built on the host system first. -solar |
232 |
if tc-is-cross-compiler; then |
233 |
sed -i -e "s#^GLSL_CL = .*\$#GLSL_CL = glsl_compiler#g" \ |
234 |
"${S}"/src/mesa/shader/slang/library/Makefile || die |
235 |
fi |
236 |
|
237 |
base_src_prepare |
238 |
|
239 |
eautoreconf |
240 |
} |
241 |
|
242 |
src_configure() { |
243 |
local myconf |
244 |
|
245 |
if use classic; then |
246 |
# Configurable DRI drivers |
247 |
driver_enable swrast |
248 |
driver_enable video_cards_intel i810 i915 i965 |
249 |
driver_enable video_cards_nouveau nouveau |
250 |
driver_enable video_cards_mach64 mach64 |
251 |
driver_enable video_cards_mga mga |
252 |
driver_enable video_cards_r128 r128 |
253 |
driver_enable video_cards_radeon radeon r200 r300 r600 |
254 |
driver_enable video_cards_savage savage |
255 |
driver_enable video_cards_sis sis |
256 |
driver_enable video_cards_tdfx tdfx |
257 |
driver_enable video_cards_via unichrome |
258 |
fi |
259 |
|
260 |
myconf+=" |
261 |
$(use_enable !bindist texture-float) |
262 |
$(use_enable gles gles1) |
263 |
$(use_enable gles gles2) |
264 |
$(use_enable egl) |
265 |
$(use_enable openvg) |
266 |
" |
267 |
if use egl; then |
268 |
use shared-glapi || die "egl needs shared-glapi. Please either enable shared-glapi or disable the egl use flag ." |
269 |
myconf+=" |
270 |
--with-egl-platforms=x11$(use gbm && echo ",drm") |
271 |
$(use_enable gallium gallium-egl) |
272 |
" |
273 |
fi |
274 |
|
275 |
if use !gallium && use !classic; then |
276 |
ewarn "You enabled neither classic nor gallium USE flags. No hardware" |
277 |
ewarn "drivers will be built." |
278 |
fi |
279 |
if use gallium; then |
280 |
myconf+=" |
281 |
--with-state-trackers=glx,dri$(use egl && echo ",egl")$(use openvg && echo ",vega") |
282 |
$(use_enable llvm gallium-llvm) |
283 |
" |
284 |
gallium_enable swrast |
285 |
gallium_enable video_cards_vmware svga |
286 |
gallium_enable video_cards_nouveau nouveau |
287 |
gallium_enable video_cards_intel i915 i965 |
288 |
gallium_enable video_cards_radeon r300 r600 |
289 |
fi |
290 |
|
291 |
# x86 hardened needs glx-rts, bug 240956 |
292 |
if use hardened; then |
293 |
myconf+=" |
294 |
$(use_enable x86 glx-rts) |
295 |
" |
296 |
fi |
297 |
|
298 |
# --with-driver=dri|xlib|osmesa || do we need osmesa? |
299 |
econf \ |
300 |
--disable-option-checking \ |
301 |
--with-driver=dri \ |
302 |
--disable-glut \ |
303 |
--without-demos \ |
304 |
--enable-xcb \ |
305 |
$(use_enable debug) \ |
306 |
$(use_enable gbm) \ |
307 |
$(use_enable motif glw) \ |
308 |
$(use_enable motif) \ |
309 |
$(use_enable nptl glx-tls) \ |
310 |
$(use_enable !pic asm) \ |
311 |
$(use_enable shared-dricore) \ |
312 |
$(use_enable shared-glapi) \ |
313 |
--with-dri-drivers=${DRI_DRIVERS} \ |
314 |
--with-gallium-drivers=${GALLIUM_DRIVERS} \ |
315 |
${myconf} |
316 |
} |
317 |
|
318 |
src_install() { |
319 |
base_src_install |
320 |
|
321 |
# Save the glsl-compiler for later use |
322 |
if ! tc-is-cross-compiler; then |
323 |
dobin "${S}"/src/glsl/glsl_compiler || die |
324 |
fi |
325 |
# Remove redundant headers |
326 |
# GLUT thing |
327 |
rm -f "${ED}"/usr/include/GL/glut*.h || die "Removing glut include failed." |
328 |
# Glew includes |
329 |
rm -f "${ED}"/usr/include/GL/{glew,glxew,wglew}.h \ |
330 |
|| die "Removing glew includes failed." |
331 |
|
332 |
# Install config file for eselect mesa |
333 |
insinto /usr/share/mesa |
334 |
newins "${FILESDIR}/eselect-mesa.conf.7.11" eselect-mesa.conf || die |
335 |
|
336 |
# Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib |
337 |
# because user can eselect desired GL provider. |
338 |
ebegin "Moving libGL and friends for dynamic switching" |
339 |
dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/{lib,extensions,include} |
340 |
local x |
341 |
for x in "${ED}"/usr/$(get_libdir)/libGL.{la,a,so*}; do |
342 |
if [ -f ${x} -o -L ${x} ]; then |
343 |
mv -f "${x}" "${ED}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/lib \ |
344 |
|| die "Failed to move ${x}" |
345 |
fi |
346 |
done |
347 |
for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do |
348 |
if [ -f ${x} -o -L ${x} ]; then |
349 |
mv -f "${x}" "${ED}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include \ |
350 |
|| die "Failed to move ${x}" |
351 |
fi |
352 |
done |
353 |
eend $? |
354 |
|
355 |
if use classic || use gallium; then |
356 |
ebegin "Moving DRI/Gallium drivers for dynamic switching" |
357 |
local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
358 |
keepdir /usr/$(get_libdir)/dri |
359 |
dodir /usr/$(get_libdir)/mesa |
360 |
for x in ${gallium_drivers[@]}; do |
361 |
if [ -f "${S}/$(get_libdir)/gallium/${x}" ]; then |
362 |
mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
363 |
|| die "Failed to move ${x}" |
364 |
insinto "/usr/$(get_libdir)/dri/" |
365 |
if [ -f "${S}/$(get_libdir)/${x}" ]; then |
366 |
insopts -m0755 |
367 |
doins "${S}/$(get_libdir)/${x}" || die "failed to install ${x}" |
368 |
fi |
369 |
fi |
370 |
done |
371 |
for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
372 |
if [ -f ${x} -o -L ${x} ]; then |
373 |
mv -f "${x}" "${x/dri/mesa}" \ |
374 |
|| die "Failed to move ${x}" |
375 |
fi |
376 |
done |
377 |
pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
378 |
ln -s ../mesa/*.so . || die "Creating symlink failed" |
379 |
# remove symlinks to drivers known to eselect |
380 |
for x in ${gallium_drivers[@]}; do |
381 |
if [ -f ${x} -o -L ${x} ]; then |
382 |
rm "${x}" || die "Failed to remove ${x}" |
383 |
fi |
384 |
done |
385 |
popd |
386 |
eend $? |
387 |
fi |
388 |
} |
389 |
|
390 |
pkg_postinst() { |
391 |
# Switch to the xorg implementation. |
392 |
echo |
393 |
eselect opengl set --use-old ${OPENGL_DIR} |
394 |
# Select classic/gallium drivers |
395 |
if use classic || use gallium; then |
396 |
eselect mesa set --auto |
397 |
fi |
398 |
|
399 |
# warn about patent encumbered texture-float |
400 |
if use !bindist; then |
401 |
elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
402 |
elog "enabled." |
403 |
fi |
404 |
} |
405 |
|
406 |
# $1 - VIDEO_CARDS flag |
407 |
# other args - names of DRI drivers to enable |
408 |
# TODO: avoid code duplication for a more elegant implementation |
409 |
driver_enable() { |
410 |
case $# in |
411 |
# for enabling unconditionally |
412 |
1) |
413 |
DRI_DRIVERS+=",$1" |
414 |
;; |
415 |
*) |
416 |
if use $1; then |
417 |
shift |
418 |
for i in $@; do |
419 |
DRI_DRIVERS+=",${i}" |
420 |
done |
421 |
fi |
422 |
;; |
423 |
esac |
424 |
} |
425 |
|
426 |
gallium_enable() { |
427 |
case $# in |
428 |
# for enabling unconditionally |
429 |
1) |
430 |
GALLIUM_DRIVERS+=",$1" |
431 |
;; |
432 |
*) |
433 |
if use $1; then |
434 |
shift |
435 |
for i in $@; do |
436 |
GALLIUM_DRIVERS+=",${i}" |
437 |
done |
438 |
fi |
439 |
;; |
440 |
esac |
441 |
} |