diff --git a/srcpkgs/xf86-video-qxl/template b/srcpkgs/xf86-video-qxl/template
index 432a050e6f..c644c9cc99 100644
--- a/srcpkgs/xf86-video-qxl/template
+++ b/srcpkgs/xf86-video-qxl/template
@@ -1,15 +1,26 @@
 # Template build file for 'xf86-video-qxl'.
 pkgname=xf86-video-qxl
-version=0.0.13
-revision=3
-distfiles="${XORG_SITE}/driver/$pkgname-$version.tar.bz2"
+version=0.0.16.99
+_gitrev="4724bb7922e1bb193117f13ffbd69fa4f97a29fb"
+wrksrc="${pkgname}-${_gitrev}"
+distfiles="http://cgit.freedesktop.org/xorg/driver/$pkgname/snapshot/$pkgname-${_gitrev}.tar.gz"
+#distfiles="${XORG_SITE}/driver/$pkgname-$version.tar.bz2"
 build_style=gnu-configure
+configure_args="--enable-xspice=yes"
 short_desc="Modular Xorg QXL virtual video driver"
 maintainer="Juan RP <xtraeme@gmail.com>"
-checksum=59bc60c3faeba75942bf366e566fa2da3eb034850f919b5667dd22589802ad61
+checksum=fbe3ba2858731e9c98f132b22463613e555e2cce8358d383dce602261ec7fc8f
 long_desc="
  This is the QXL virtual video driver for the modular Xorg server."
 
 Add_dependency run xorg-server
+Add_dependency build automake
+Add_dependency build xorg-util-macros
 Add_dependency build xf86dgaproto
+Add_dependency build spice-protocol
+Add_dependency build spice-devel
 Add_dependency build xorg-server-devel
+
+pre_configure() {
+	./autogen.sh
+}
diff --git a/srcpkgs/xf86-video-qxl/xf86-video-qxl.rshlibs b/srcpkgs/xf86-video-qxl/xf86-video-qxl.rshlibs
index 631aa1dda4..a0aadfd90d 100644
--- a/srcpkgs/xf86-video-qxl/xf86-video-qxl.rshlibs
+++ b/srcpkgs/xf86-video-qxl/xf86-video-qxl.rshlibs
@@ -1 +1,2 @@
 libc.so.6
+libspice-server.so.1