2012-01-16 17:48:33 +00:00
|
|
|
{ stdenv, fetchurl, flex, bison, pkgconfig, libdrm, file, expat, makedepend
|
|
|
|
, libXxf86vm, libXfixes, libXdamage, glproto, dri2proto, libX11, libxcb, libXext
|
2012-01-16 17:50:54 +00:00
|
|
|
, libXt, udev, enableTextureFloats ? false
|
2012-04-23 16:47:31 +01:00
|
|
|
, python, libxml2Python }:
|
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-05-16 22:55:18 +01:00
|
|
|
let version = "8.0.2"; 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-05-16 22:55:18 +01:00
|
|
|
md5 = "a368104e5700707048dc3e8691a9a7a1";
|
2007-02-26 17:05:27 +00:00
|
|
|
};
|
2010-01-13 12:43:17 +00:00
|
|
|
|
2012-05-16 22:55:18 +01:00
|
|
|
patches =
|
|
|
|
stdenv.lib.optional (stdenv.system == "mips64el-linux") ./mips_wmb.patch;
|
2011-03-07 21:16:34 +00:00
|
|
|
|
2012-01-16 17:48:33 +00:00
|
|
|
prePatch = "patchShebangs .";
|
2011-07-14 13:22:55 +01:00
|
|
|
|
2010-07-20 20:24:21 +01:00
|
|
|
configureFlags =
|
2012-05-16 22:55:18 +01:00
|
|
|
" --enable-gles1 --enable-gles2 --enable-gallium-egl"
|
2012-01-21 18:47:37 +00:00
|
|
|
+ " --with-gallium-drivers=i915,nouveau,r600,svga,swrast"
|
2012-01-16 17:48:33 +00:00
|
|
|
# Texture floats are patented, see docs/patents.txt
|
|
|
|
+ stdenv.lib.optionalString enableTextureFloats " --enable-texture-float";
|
|
|
|
|
|
|
|
buildInputs = [ expat libdrm libXxf86vm libXfixes libXdamage glproto dri2proto
|
2012-04-23 16:47:31 +01:00
|
|
|
libxml2Python libX11 libXext libxcb libXt udev ];
|
2012-01-16 17:48:33 +00:00
|
|
|
|
|
|
|
buildNativeInputs = [ pkgconfig python makedepend file 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
|
|
|
}
|