2012-01-16 18:48:33 +01:00
|
|
|
{ stdenv, fetchurl, flex, bison, pkgconfig, libdrm, file, expat, makedepend
|
|
|
|
, libXxf86vm, libXfixes, libXdamage, glproto, dri2proto, libX11, libxcb, libXext
|
2013-01-28 17:39:29 +01:00
|
|
|
, libXt, udev, enableTextureFloats ? false, enableR600LlvmCompiler ? false
|
2013-01-26 20:20:56 +01:00
|
|
|
, python, libxml2Python, autoconf, automake, libtool, llvm, writeText }:
|
2004-06-09 19:53:30 +02:00
|
|
|
|
2010-03-01 13:32:40 +01:00
|
|
|
if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
|
2009-04-21 00:06:12 +02:00
|
|
|
throw "unsupported platform for Mesa"
|
|
|
|
else
|
2004-06-09 19:53:30 +02:00
|
|
|
|
2013-01-28 17:38:42 +01:00
|
|
|
let
|
|
|
|
version = "9.0.2";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2011-02-11 15:48:30 +01:00
|
|
|
name = "mesa-${version}";
|
2010-04-29 16:57:02 +02:00
|
|
|
|
2007-02-26 18:05:27 +01:00
|
|
|
src = fetchurl {
|
2011-02-11 15:48:30 +01:00
|
|
|
url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2";
|
2013-01-26 20:20:56 +01:00
|
|
|
sha256="0knnb8srr1xbin25js4y5kmpw7xys5gh1h8hwqamayvfdkr33gvm";
|
2007-02-26 18:05:27 +01:00
|
|
|
};
|
2010-01-13 13:43:17 +01:00
|
|
|
|
2012-01-16 18:48:33 +01:00
|
|
|
prePatch = "patchShebangs .";
|
2011-07-14 14:22:55 +02:00
|
|
|
|
2013-01-26 20:20:56 +01:00
|
|
|
preConfigure = "./autogen.sh";
|
|
|
|
|
2010-07-20 21:24:21 +02:00
|
|
|
configureFlags =
|
2013-01-26 20:20:56 +01:00
|
|
|
""
|
|
|
|
+ " --enable-gles1 --enable-gles2 --enable-gallium-egl"
|
|
|
|
+ " --with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast"
|
2013-01-28 17:39:29 +01:00
|
|
|
+ stdenv.lib.optionalString enableR600LlvmCompiler " --enable-r600-llvm-compiler"
|
2012-01-16 18:48:33 +01:00
|
|
|
# Texture floats are patented, see docs/patents.txt
|
|
|
|
+ stdenv.lib.optionalString enableTextureFloats " --enable-texture-float";
|
|
|
|
|
|
|
|
buildInputs = [ expat libdrm libXxf86vm libXfixes libXdamage glproto dri2proto
|
2013-01-26 20:20:56 +01:00
|
|
|
libxml2Python libX11 libXext libxcb libXt udev llvm ];
|
2012-01-16 18:48:33 +01:00
|
|
|
|
2013-01-26 20:20:56 +01:00
|
|
|
buildNativeInputs = [ pkgconfig python makedepend file flex bison automake autoconf libtool ];
|
2010-04-29 16:57:02 +02:00
|
|
|
|
2011-02-18 10:16:11 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2009-10-29 18:19:25 +01:00
|
|
|
passthru = { inherit libdrm; };
|
2010-04-29 16:57:02 +02:00
|
|
|
|
2007-11-06 00:59:55 +01:00
|
|
|
meta = {
|
2008-03-01 18:44:50 +01:00
|
|
|
description = "An open source implementation of OpenGL";
|
2007-11-06 00:59:55 +01:00
|
|
|
homepage = http://www.mesa3d.org/;
|
2009-10-29 18:19:25 +01:00
|
|
|
license = "bsd";
|
2011-07-14 21:21:33 +02:00
|
|
|
platforms = stdenv.lib.platforms.mesaPlatforms;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.simons ];
|
2007-11-06 00:59:55 +01:00
|
|
|
};
|
2004-06-09 19:53:30 +02:00
|
|
|
}
|