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