libdrm: updated to version 2.4.29

svn path=/nixpkgs/trunk/; revision=31534
This commit is contained in:
Peter Simons 2012-01-14 12:09:15 +00:00
parent 0819c85d91
commit 736b039b3f
2 changed files with 17 additions and 14 deletions

View File

@ -1,28 +1,31 @@
{stdenv, fetchurl, pkgconfig, libpthreadstubs}:
{stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, cairo, udev}:
stdenv.mkDerivation (rec {
name = "libdrm-2.4.24";
stdenv.mkDerivation rec {
name = "libdrm-2.4.29";
src = fetchurl {
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 = ''
# General case: non intel.
if test -n "$crossConfig"; then
configureFlags="$configureFlags --disable-intel";
fi
'' + stdenv.lib.optionalString stdenv.isDarwin
preConfigure = stdenv.lib.optionalString stdenv.isDarwin
"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 = {
homepage = http://dri.freedesktop.org/libdrm/;
description = "Library for accessing the kernel's Direct Rendering Manager";
license = "bsd";
maintainers = [ stdenv.lib.maintainers.urkud ];
platforms = stdenv.lib.platforms.linux;
};
} // (stdenv.lib.optionalAttrs stdenv.isDarwin { configureFlags = [ "-C" ]; }))
}

View File

@ -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/intel/intel_bufmgr_gem.c 2011-08-29 02:17:20.000000000 -0400
@@ -51,6 +51,7 @@
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <stdbool.h>
+#include <sys/time.h>
#include "errno.h"