diff --git a/srcpkgs/mutter/patches/fix-includes.patch b/srcpkgs/mutter/patches/fix-includes.patch
new file mode 100644
index 00000000000..0042dca6b9f
--- /dev/null
+++ b/srcpkgs/mutter/patches/fix-includes.patch
@@ -0,0 +1,10 @@
+--- src/wayland/meta-wayland-private.h.orig 2016-09-23 08:55:17.876037227 +0200
++++ src/wayland/meta-wayland-private.h 2016-09-23 08:57:08.436042296 +0200
+@@ -27,6 +27,7 @@
+
+ #include "window-private.h"
+ #include
++#include
+
+ #include "meta-wayland.h"
+ #include "meta-wayland-versions.h"
diff --git a/srcpkgs/mutter/template b/srcpkgs/mutter/template
index 56c63028f8a..be5451ed85d 100644
--- a/srcpkgs/mutter/template
+++ b/srcpkgs/mutter/template
@@ -1,23 +1,23 @@
# Template file for 'mutter'
pkgname=mutter
-version=3.18.3
+version=3.22.3
revision=1
build_style=gnu-configure
configure_args="--disable-schemas-compile --disable-static --enable-compile-warnings=no"
-hostmakedepends="pkg-config intltool gnome-doc-utils gobject-introspection
- glib-devel wayland-devel zenity"
-makedepends="
- gtk+3-devel startup-notification-devel libcanberra-devel
- clutter-devel gsettings-desktop-schemas-devel
- upower-devel gnome-desktop-devel libSM-devel
- zenity"
+# wayland is currently broken
+configure_args+=" --disable-wayland"
+hostmakedepends="pkg-config zenity glib-devel gobject-introspection"
+makedepends="json-glib-devel upower-devel gnome-desktop-devel libinput-devel
+glib-devel libcanberra-devel startup-notification-devel libSM-devel"
depends="zenity desktop-file-utils"
short_desc="Lightweight GTK+3 window manager"
maintainer="Juan RP "
homepage="http://www.gnome.org"
license="GPL-2"
distfiles="${GNOME_SITE}/$pkgname/${version%.*}/$pkgname-$version.tar.xz"
-checksum=58dd88d5596bb0377ae3aed692b306995de45aefae9e215cfaf4b13287526846
+checksum=537eda8e5fdd4a70602da913b885ad745a7510678c24006b91ceba83ccab209a
+shlib_provides="libmutter-clutter-1.0.so libmutter-cogl-path.so libmutter-cogl.so libmutter-cogl-pango.so"
+
# Package build options
build_options="gir"
@@ -26,6 +26,16 @@ if [ -z "$CROSS_BUILD" ]; then
build_options_default="gir"
fi
+pre_configure() {
+ local _arch=x86
+ for i in /usr/src/kernel-headers-*/include; do
+ CFLAGS+=" -I$i -I$i/uapi -I$i/../arch/$_arch/include"
+ done
+ #sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+ #sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' cogl/libtool
+ #sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' clutter/libtool
+}
+
mutter-devel_package() {
depends="gsettings-desktop-schemas>=3.16 gtk+3-devel>=3.16
clutter-devel>=1.22 libX11-devel mutter>=${version}_${revision}"