forked from mirrors/nixpkgs
Upgrade libdrm and mesa to the latest versions
svn path=/nixpkgs/trunk/; revision=31598
This commit is contained in:
parent
81b4eef864
commit
ee0822153a
pkgs/development/libraries
|
@ -1,28 +1,31 @@
|
||||||
{stdenv, fetchurl, pkgconfig, libpthreadstubs}:
|
{stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, cairo, udev}:
|
||||||
|
|
||||||
stdenv.mkDerivation (rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libdrm-2.4.24";
|
name = "libdrm-2.4.29";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
|
url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
|
||||||
sha256 = "19dnzy7g6jqfjz38dp187b97vb4a8h4k748x56gsyn24ys0j60f7";
|
sha256 = "0bj5ihmnzpbbgdrvp5f8bgsk0k19haixr893449pjd4k7v4jshz2";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgconfig libpthreadstubs ];
|
buildNativeInputs = [ pkgconfig ];
|
||||||
|
buildInputs = [ libpthreadstubs libpciaccess cairo udev ];
|
||||||
|
|
||||||
patches = [ ./libdrm-apple.patch ];
|
patches = stdenv.lib.optional stdenv.isDarwin ./libdrm-apple.patch;
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = stdenv.lib.optionalString stdenv.isDarwin
|
||||||
# General case: non intel.
|
|
||||||
if test -n "$crossConfig"; then
|
|
||||||
configureFlags="$configureFlags --disable-intel";
|
|
||||||
fi
|
|
||||||
'' + stdenv.lib.optionalString stdenv.isDarwin
|
|
||||||
"echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache";
|
"echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache";
|
||||||
|
|
||||||
|
configureFlags = [ "--enable-nouveau-experimental-api" "--enable-udev" ]
|
||||||
|
++ stdenv.lib.optional stdenv.isDarwin "-C";
|
||||||
|
|
||||||
|
crossAttrs.configureFlags = configureFlags ++ [ "--disable-intel" ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://dri.freedesktop.org/libdrm/;
|
homepage = http://dri.freedesktop.org/libdrm/;
|
||||||
description = "Library for accessing the kernel's Direct Rendering Manager";
|
description = "Library for accessing the kernel's Direct Rendering Manager";
|
||||||
license = "bsd";
|
license = "bsd";
|
||||||
|
maintainers = [ stdenv.lib.maintainers.urkud ];
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
};
|
};
|
||||||
} // (stdenv.lib.optionalAttrs stdenv.isDarwin { configureFlags = [ "-C" ]; }))
|
}
|
||||||
|
|
|
@ -2,9 +2,9 @@ diff -Naur libdrm-2.4.26-orig/intel/intel_bufmgr_gem.c libdrm-2.4.26/intel/intel
|
||||||
--- libdrm-2.4.26-orig/intel/intel_bufmgr_gem.c 2011-04-01 10:30:51.000000000 -0400
|
--- libdrm-2.4.26-orig/intel/intel_bufmgr_gem.c 2011-04-01 10:30:51.000000000 -0400
|
||||||
+++ libdrm-2.4.26/intel/intel_bufmgr_gem.c 2011-08-29 02:17:20.000000000 -0400
|
+++ libdrm-2.4.26/intel/intel_bufmgr_gem.c 2011-08-29 02:17:20.000000000 -0400
|
||||||
@@ -51,6 +51,7 @@
|
@@ -51,6 +51,7 @@
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <stdbool.h>
|
||||||
+#include <sys/time.h>
|
+#include <sys/time.h>
|
||||||
|
|
||||||
#include "errno.h"
|
#include "errno.h"
|
||||||
|
|
|
@ -1,37 +1,39 @@
|
||||||
{ stdenv, fetchurl, flex, bison, pkgconfig, x11, xlibs, libdrm, file, expat
|
{ stdenv, fetchurl, flex, bison, pkgconfig, libdrm, file, expat, makedepend
|
||||||
|
, libXxf86vm, libXfixes, libXdamage, glproto, dri2proto, libX11, libxcb, libXext
|
||||||
|
, libXt, udev, enableTextureFloats ? false,
|
||||||
, python, libxml2Python, lipo ? null }:
|
, python, libxml2Python, lipo ? null }:
|
||||||
|
|
||||||
if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
|
if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
|
||||||
throw "unsupported platform for Mesa"
|
throw "unsupported platform for Mesa"
|
||||||
else
|
else
|
||||||
|
|
||||||
let version = "7.10.3"; in
|
let version = "7.11.2"; in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "mesa-${version}";
|
name = "mesa-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2";
|
url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2";
|
||||||
sha256 = "1h451vgsfsp0h0wig66spqgxmjalsy28gvd9viynfwmq7741yw0y";
|
sha256 = "0msk1fh4yw4yi7z37v75vhpa23z49lkwgin6drczbihbqsl6lx2p";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./swrast-settexbuffer.patch ];
|
patches = [ ./swrast-settexbuffer.patch ];
|
||||||
|
|
||||||
postPatch = ''
|
prePatch = "patchShebangs .";
|
||||||
find . -name "*.py" -exec sed -i -e "s|#! */usr/bin/env python|#! ${python}/bin/python|" {} +
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
# r300
|
||||||
configureFlags =
|
configureFlags =
|
||||||
" --with-driver=dri --enable-gl-osmesa --enable-gles1"
|
" --with-driver=dri --enable-gl-osmesa --enable-gles1"
|
||||||
+ " --enable-gallium --enable-gallium-r600 --enable-gles2"
|
+ " --with-gallium-drivers=i915,i965,nouveau,r600,svga,swrast"
|
||||||
+ " --enable-gallium-swrast --enable-gallium-egl --disable-glx-tls"
|
+ " --enable-gles2 --enable-gallium-egl --disable-glx-tls"
|
||||||
+ " --enable-xcb --enable-egl --disable-glut";
|
+ " --enable-xcb --enable-egl --disable-glut"
|
||||||
|
# Texture floats are patented, see docs/patents.txt
|
||||||
|
+ stdenv.lib.optionalString enableTextureFloats " --enable-texture-float";
|
||||||
|
|
||||||
buildInputs =
|
buildInputs = [ expat libdrm libXxf86vm libXfixes libXdamage glproto dri2proto
|
||||||
[ pkgconfig expat x11 libdrm xlibs.makedepend xlibs.glproto
|
libxml2Python libX11 libXext libxcb lipo libXt udev ];
|
||||||
xlibs.libXxf86vm xlibs.libXfixes xlibs.libXdamage xlibs.dri2proto
|
|
||||||
lipo file python libxml2Python flex bison
|
buildNativeInputs = [ pkgconfig python makedepend file flex bison ];
|
||||||
];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue