2013-02-23 11:07:42 +00:00
|
|
|
{ stdenv, fetchurl, flex, bison, pkgconfig, intltool, libdrm, file, expat, makedepend
|
2012-01-16 17:48:33 +00:00
|
|
|
, libXxf86vm, libXfixes, libXdamage, glproto, dri2proto, libX11, libxcb, libXext
|
2013-01-28 16:39:29 +00:00
|
|
|
, libXt, udev, enableTextureFloats ? false, enableR600LlvmCompiler ? false
|
2013-02-18 19:32:47 +00:00
|
|
|
, python, libxml2Python, autoconf, automake, libtool, llvm, writeText
|
|
|
|
, wayland }:
|
2004-06-09 17:53:30 +00:00
|
|
|
|
2010-03-01 12:32:40 +00:00
|
|
|
if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
|
2009-04-20 22:06:12 +00:00
|
|
|
throw "unsupported platform for Mesa"
|
|
|
|
else
|
2004-06-09 17:53:30 +00:00
|
|
|
|
2013-01-28 16:38:42 +00:00
|
|
|
let
|
2013-03-20 08:46:00 +00:00
|
|
|
version = "9.1.1";
|
2013-01-28 16:38:42 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2013-03-24 11:36:33 +00:00
|
|
|
name = "mesa-noglu-${version}";
|
2010-04-29 14:57:02 +00: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";
|
2013-03-20 08:46:00 +00:00
|
|
|
sha256="1sxdx599lxjmkq0bj40vmqy1mlqfkqxnc9s4gd2ycv5230cp9r9s";
|
2007-02-26 17:05:27 +00:00
|
|
|
};
|
2010-01-13 12:43:17 +00:00
|
|
|
|
2012-01-16 17:48:33 +00:00
|
|
|
prePatch = "patchShebangs .";
|
2011-07-14 12:22:55 +00:00
|
|
|
|
2013-01-26 19:20:56 +00:00
|
|
|
preConfigure = "./autogen.sh";
|
|
|
|
|
2010-07-20 19:24:21 +00:00
|
|
|
configureFlags =
|
2013-01-26 19:20:56 +00:00
|
|
|
""
|
2013-03-10 22:04:24 +00:00
|
|
|
+ " --enable-gles1 --enable-gles2 --enable-gallium-egl"
|
|
|
|
+ " --with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast"
|
2013-02-18 19:32:47 +00:00
|
|
|
+ " --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi"
|
2013-01-28 16:39:29 +00:00
|
|
|
+ stdenv.lib.optionalString enableR600LlvmCompiler " --enable-r600-llvm-compiler"
|
2012-01-16 17:48:33 +00:00
|
|
|
# Texture floats are patented, see docs/patents.txt
|
|
|
|
+ stdenv.lib.optionalString enableTextureFloats " --enable-texture-float";
|
|
|
|
|
2013-02-21 14:38:27 +00:00
|
|
|
buildInputs = [
|
2013-02-23 11:07:42 +00:00
|
|
|
autoconf automake libtool intltool expat libxml2Python udev llvm
|
2013-02-21 14:38:27 +00:00
|
|
|
libdrm libXxf86vm libXfixes libXdamage glproto dri2proto libX11 libXext libxcb libXt
|
2013-03-10 17:19:49 +00:00
|
|
|
wayland
|
2013-02-21 14:38:27 +00:00
|
|
|
];
|
2012-01-16 17:48:33 +00:00
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig python makedepend file flex bison ];
|
2010-04-29 14:57:02 +00:00
|
|
|
|
2011-02-18 09:16:11 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2013-03-26 12:01:18 +00:00
|
|
|
passthru = { inherit libdrm; inherit version; };
|
2010-04-29 14:57:02 +00: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 19:21:33 +00:00
|
|
|
platforms = stdenv.lib.platforms.mesaPlatforms;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.simons ];
|
2007-11-05 23:59:55 +00:00
|
|
|
};
|
2004-06-09 17:53:30 +00:00
|
|
|
}
|