2011-02-11 17:48:30 +03:00
|
|
|
{ stdenv, fetchurl, pkgconfig, x11, xlibs, libdrm, expat, lipo ? null, talloc }:
|
2004-06-09 21:53:30 +04:00
|
|
|
|
2010-03-01 15:32:40 +03:00
|
|
|
if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
|
2009-04-21 02:06:12 +04:00
|
|
|
throw "unsupported platform for Mesa"
|
|
|
|
else
|
2004-06-09 21:53:30 +04:00
|
|
|
|
2011-03-07 14:51:08 +03:00
|
|
|
let version = "7.10.1"; in
|
2011-02-11 17:48:30 +03:00
|
|
|
|
2004-06-09 21:53:30 +04:00
|
|
|
stdenv.mkDerivation {
|
2011-02-11 17:48:30 +03:00
|
|
|
name = "mesa-${version}";
|
2010-04-29 18:57:02 +04:00
|
|
|
|
2007-02-26 20:05:27 +03:00
|
|
|
src = fetchurl {
|
2011-02-11 17:48:30 +03:00
|
|
|
url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2";
|
2011-03-07 14:51:08 +03:00
|
|
|
md5 = "efe8da4d80c2a5d32a800770b8ce5dfa";
|
2007-02-26 20:05:27 +03:00
|
|
|
};
|
2010-01-13 15:43:17 +03:00
|
|
|
|
2011-03-08 00:16:34 +03:00
|
|
|
patches = [ ./swrast-settexbuffer.patch ];
|
|
|
|
|
2010-07-20 23:24:21 +04:00
|
|
|
configureFlags =
|
|
|
|
"--disable-gallium"
|
2011-02-11 17:48:30 +03:00
|
|
|
+ stdenv.lib.optionalString (stdenv.system == "mips64-linux")
|
|
|
|
" --with-dri-drivers=swrast --with-driver=dri"
|
|
|
|
+ stdenv.lib.optionalString stdenv.isDarwin " --disable-egl";
|
2010-04-29 18:57:02 +04:00
|
|
|
|
2009-10-29 20:19:25 +03:00
|
|
|
buildInputs =
|
2011-03-07 14:51:08 +03:00
|
|
|
[ pkgconfig expat x11 libdrm xlibs.makedepend xlibs.glproto
|
2009-10-29 20:19:25 +03:00
|
|
|
xlibs.libXxf86vm xlibs.libXfixes xlibs.libXdamage xlibs.dri2proto
|
2011-03-07 14:51:08 +03:00
|
|
|
lipo talloc
|
2009-10-29 20:19:25 +03:00
|
|
|
];
|
2010-04-29 18:57:02 +04:00
|
|
|
|
2011-02-18 12:16:11 +03:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2009-10-29 20:19:25 +03:00
|
|
|
passthru = { inherit libdrm; };
|
2010-04-29 18:57:02 +04:00
|
|
|
|
2007-11-06 02:59:55 +03:00
|
|
|
meta = {
|
2008-03-01 20:44:50 +03:00
|
|
|
description = "An open source implementation of OpenGL";
|
2007-11-06 02:59:55 +03:00
|
|
|
homepage = http://www.mesa3d.org/;
|
2009-10-29 20:19:25 +03:00
|
|
|
license = "bsd";
|
2007-11-06 02:59:55 +03:00
|
|
|
};
|
2004-06-09 21:53:30 +04:00
|
|
|
}
|