2012-01-14 12:13:51 +00:00
|
|
|
{ stdenv, fetchurl, flex, bison, pkgconfig, x11, xlibs, libdrm, file, expat
|
2011-07-14 20:21:29 +01:00
|
|
|
, python, libxml2Python, lipo ? null }:
|
2004-06-09 18:53:30 +01:00
|
|
|
|
2010-03-01 12:32:40 +00:00
|
|
|
if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
|
2009-04-20 23:06:12 +01:00
|
|
|
throw "unsupported platform for Mesa"
|
|
|
|
else
|
2004-06-09 18:53:30 +01:00
|
|
|
|
2012-01-14 12:13:51 +00:00
|
|
|
let version = "7.10.3"; in
|
2011-02-11 14:48:30 +00:00
|
|
|
|
2004-06-09 18:53:30 +01:00
|
|
|
stdenv.mkDerivation {
|
2011-02-11 14:48:30 +00:00
|
|
|
name = "mesa-${version}";
|
2010-04-29 15:57:02 +01:00
|
|
|
|
2007-02-26 17:05:27 +00:00
|
|
|
src = fetchurl {
|
2011-02-11 14:48:30 +00:00
|
|
|
url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2";
|
2012-01-14 12:13:51 +00:00
|
|
|
sha256 = "1h451vgsfsp0h0wig66spqgxmjalsy28gvd9viynfwmq7741yw0y";
|
2007-02-26 17:05:27 +00:00
|
|
|
};
|
2010-01-13 12:43:17 +00:00
|
|
|
|
2011-03-07 21:16:34 +00:00
|
|
|
patches = [ ./swrast-settexbuffer.patch ];
|
|
|
|
|
2012-01-14 12:13:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
find . -name "*.py" -exec sed -i -e "s|#! */usr/bin/env python|#! ${python}/bin/python|" {} +
|
|
|
|
'';
|
2011-07-14 13:22:55 +01:00
|
|
|
|
2010-07-20 20:24:21 +01:00
|
|
|
configureFlags =
|
2011-07-14 20:21:37 +01:00
|
|
|
" --with-driver=dri --enable-gl-osmesa --enable-gles1"
|
2012-01-14 12:13:51 +00:00
|
|
|
+ " --enable-gallium --enable-gallium-r600 --enable-gles2"
|
|
|
|
+ " --enable-gallium-swrast --enable-gallium-egl --disable-glx-tls"
|
2011-07-14 20:21:37 +01:00
|
|
|
+ " --enable-xcb --enable-egl --disable-glut";
|
2010-04-29 15:57:02 +01:00
|
|
|
|
2012-01-14 12:13:51 +00:00
|
|
|
buildInputs =
|
|
|
|
[ pkgconfig expat x11 libdrm xlibs.makedepend xlibs.glproto
|
|
|
|
xlibs.libXxf86vm xlibs.libXfixes xlibs.libXdamage xlibs.dri2proto
|
|
|
|
lipo file python libxml2Python flex bison
|
|
|
|
];
|
2010-04-29 15:57:02 +01:00
|
|
|
|
2011-02-18 09:16:11 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2009-10-29 17:19:25 +00:00
|
|
|
passthru = { inherit libdrm; };
|
2010-04-29 15:57:02 +01:00
|
|
|
|
2007-11-05 23:59:55 +00:00
|
|
|
meta = {
|
2008-03-01 17:44:50 +00:00
|
|
|
description = "An open source implementation of OpenGL";
|
2007-11-05 23:59:55 +00:00
|
|
|
homepage = http://www.mesa3d.org/;
|
2009-10-29 17:19:25 +00:00
|
|
|
license = "bsd";
|
2011-07-14 20:21:33 +01:00
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.mesaPlatforms;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.simons ];
|
2007-11-05 23:59:55 +00:00
|
|
|
};
|
2004-06-09 18:53:30 +01:00
|
|
|
}
|