diff --git a/srcpkgs/libdrm/libdrm-devel.template b/srcpkgs/libdrm/libdrm-devel.template
index 94d7d55f72..45fe739892 100644
--- a/srcpkgs/libdrm/libdrm-devel.template
+++ b/srcpkgs/libdrm/libdrm-devel.template
@@ -5,8 +5,6 @@ long_desc="${long_desc}
 
  This package contains files for development, headers, static libs, etc."
 
-revision=1
-
 Add_dependency run glibc-devel
 Add_dependency run libudev-devel
 Add_dependency run libdrm
diff --git a/srcpkgs/libdrm/patches/configure_no_pthread_stubs.diff b/srcpkgs/libdrm/patches/configure_no_pthread_stubs.diff
index 7d2375ec7f..1fec969698 100644
--- a/srcpkgs/libdrm/patches/configure_no_pthread_stubs.diff
+++ b/srcpkgs/libdrm/patches/configure_no_pthread_stubs.diff
@@ -1,21 +1,22 @@
---- configure.orig	2010-04-08 13:47:02.711215824 +0200
-+++ configure	2010-04-08 13:47:31.648210505 +0200
-@@ -13073,116 +13073,6 @@ $as_echo "no" >&6; }
+--- configure.orig	2010-06-22 23:33:27.209859071 +0200
++++ configure	2010-06-22 23:34:07.417853306 +0200
+@@ -11727,96 +11727,6 @@ $as_echo "no" >&6; }
+ 	fi
  fi
  
- pkg_failed=no
--{ $as_echo "$as_me:$LINENO: checking for PTHREADSTUBS" >&5
+-pkg_failed=no
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREADSTUBS" >&5
 -$as_echo_n "checking for PTHREADSTUBS... " >&6; }
 -
 -if test -n "$PTHREADSTUBS_CFLAGS"; then
 -    pkg_cv_PTHREADSTUBS_CFLAGS="$PTHREADSTUBS_CFLAGS"
 - elif test -n "$PKG_CONFIG"; then
 -    if test -n "$PKG_CONFIG" && \
--    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pthread-stubs\"") >&5
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pthread-stubs\""; } >&5
 -  ($PKG_CONFIG --exists --print-errors "pthread-stubs") 2>&5
 -  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; then
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+-  test $ac_status = 0; }; then
 -  pkg_cv_PTHREADSTUBS_CFLAGS=`$PKG_CONFIG --cflags "pthread-stubs" 2>/dev/null`
 -else
 -  pkg_failed=yes
@@ -27,11 +28,11 @@
 -    pkg_cv_PTHREADSTUBS_LIBS="$PTHREADSTUBS_LIBS"
 - elif test -n "$PKG_CONFIG"; then
 -    if test -n "$PKG_CONFIG" && \
--    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pthread-stubs\"") >&5
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pthread-stubs\""; } >&5
 -  ($PKG_CONFIG --exists --print-errors "pthread-stubs") 2>&5
 -  ac_status=$?
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); }; then
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+-  test $ac_status = 0; }; then
 -  pkg_cv_PTHREADSTUBS_LIBS=`$PKG_CONFIG --libs "pthread-stubs" 2>/dev/null`
 -else
 -  pkg_failed=yes
@@ -43,6 +44,8 @@
 -
 -
 -if test $pkg_failed = yes; then
+-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
 -
 -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 -        _pkg_short_errors_supported=yes
@@ -57,7 +60,7 @@
 -	# Put the nasty error message in config.log where it belongs
 -	echo "$PTHREADSTUBS_PKG_ERRORS" >&5
 -
--	{ { $as_echo "$as_me:$LINENO: error: Package requirements (pthread-stubs) were not met:
+-	as_fn_error "Package requirements (pthread-stubs) were not met:
 -
 -$PTHREADSTUBS_PKG_ERRORS
 -
@@ -66,24 +69,13 @@
 -
 -Alternatively, you may set the environment variables PTHREADSTUBS_CFLAGS
 -and PTHREADSTUBS_LIBS to avoid the need to call pkg-config.
--See the pkg-config man page for more details.
--" >&5
--$as_echo "$as_me: error: Package requirements (pthread-stubs) were not met:
--
--$PTHREADSTUBS_PKG_ERRORS
--
--Consider adjusting the PKG_CONFIG_PATH environment variable if you
--installed software in a non-standard prefix.
--
--Alternatively, you may set the environment variables PTHREADSTUBS_CFLAGS
--and PTHREADSTUBS_LIBS to avoid the need to call pkg-config.
--See the pkg-config man page for more details.
--" >&2;}
--   { (exit 1); exit 1; }; }
+-See the pkg-config man page for more details." "$LINENO" 5
 -elif test $pkg_failed = untried; then
--	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
 -is in your PATH or set the PKG_CONFIG environment variable to the full
 -path to pkg-config.
 -
@@ -92,28 +84,16 @@
 -See the pkg-config man page for more details.
 -
 -To get pkg-config, see <http://pkg-config.freedesktop.org/>.
--See \`config.log' for more details." >&5
--$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
--is in your PATH or set the PKG_CONFIG environment variable to the full
--path to pkg-config.
--
--Alternatively, you may set the environment variables PTHREADSTUBS_CFLAGS
--and PTHREADSTUBS_LIBS to avoid the need to call pkg-config.
--See the pkg-config man page for more details.
--
--To get pkg-config, see <http://pkg-config.freedesktop.org/>.
--See \`config.log' for more details." >&2;}
--   { (exit 1); exit 1; }; }; }
+-See \`config.log' for more details." "$LINENO" 5; }
 -else
 -	PTHREADSTUBS_CFLAGS=$pkg_cv_PTHREADSTUBS_CFLAGS
 -	PTHREADSTUBS_LIBS=$pkg_cv_PTHREADSTUBS_LIBS
--        { $as_echo "$as_me:$LINENO: result: yes" >&5
+-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 -$as_echo "yes" >&6; }
--	:
+-
 -fi
 -
 -
--
+ 
  pkgconfigdir=${libdir}/pkgconfig
  
- # Check whether --enable-udev was given.
diff --git a/srcpkgs/libdrm/template b/srcpkgs/libdrm/template
index a053a14794..8d8fd08c35 100644
--- a/srcpkgs/libdrm/template
+++ b/srcpkgs/libdrm/template
@@ -1,14 +1,13 @@
 # Template build file for 'libdrm'.
 pkgname=libdrm
-version=2.4.20
-revision=1
+version=2.4.21
 distfiles="http://dri.freedesktop.org/libdrm/$pkgname-$version.tar.bz2"
 build_style=gnu_configure
 configure_args="--enable-udev --enable-vmwgfx-experimental-api
 --enable-nouveau-experimental-api"
 short_desc="Userspace interface to kernel DRM services"
 maintainer="Juan RP <xtraeme@gmail.com>"
-checksum=24b5316839c1d459066eaee160132d45931462e301740a660932907350415cb9
+checksum=4e1b612ba3b6b1deae4a8c14946099283e7a00e48a5ab002eaf4312f5a8ba14b
 long_desc="
  This package provides a library which offers a userspace interface
  to kernel DRM (Direct Rendering Manager) services for access to