Add mesa 9.0.x and corresponding libdrm.

I took most of the changes from falsifian's repo, but I want to keep mesa 9.0
as a separate expression. For now I added wayland as a mandatory dependency,
will have to fix that.
This commit is contained in:
Carles Pagès
2012-12-02 12:07:35 +01:00
parent 4b87cc9583
commit 5e5b676b4d
3 changed files with 90 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
{ stdenv, fetchurl, autoconf, automake, autoreconfHook, libtool
, flex, bison, pkgconfig, libdrm2_4_39, file, expat, makedepend, llvm
, libXxf86vm, libXfixes, libXdamage, glproto, dri2proto, libX11, libxcb, libXext
, libXt, udev, enableTextureFloats ? false
, python, libxml2Python, wayland }:
if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
throw "unsupported platform for Mesa"
else
let version = "9.0.1"; in
stdenv.mkDerivation {
name = "mesa-${version}";
src = fetchurl {
url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2";
md5 = "97d6554c05ea7449398afe3a0ede7018";
};
patches =
stdenv.lib.optional (stdenv.system == "mips64el-linux") ./mips_wmb.patch;
prePatch = "patchShebangs .";
configureFlags =
" --enable-gles1 --enable-gles2 --disable-gallium-egl"
+ " --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi"
+ " --with-gallium-drivers=i915,nouveau,r600,svga,swrast"
# Texture floats are patented, see docs/patents.txt
+ stdenv.lib.optionalString enableTextureFloats " --enable-texture-float";
buildInputs = [ autoconf automake autoreconfHook libtool
expat libdrm2_4_39 libXxf86vm libXfixes libXdamage glproto dri2proto llvm
libxml2Python libX11 libXext libxcb libXt udev wayland ];
buildNativeInputs = [ pkgconfig python makedepend file flex bison ];
enableParallelBuilding = true;
passthru = { inherit libdrm2_4_39; };
meta = {
description = "An open source implementation of OpenGL";
homepage = http://www.mesa3d.org/;
license = "bsd";
platforms = stdenv.lib.platforms.mesaPlatforms;
maintainers = [ stdenv.lib.maintainers.simons ];
};
}