--- /dev/null
+--- ./configure.ac.orig 2015-11-09 22:07:56.000000000 +0100
++++ ./configure.ac 2016-03-08 08:41:00.272778500 +0100
+@@ -116,15 +116,11 @@
+ GDK_PIXBUF_REQUIRED=2.21.3
+ GTK_REQUIRED=3.3.6
+ GLIB_REQUIRED=2.44.0
+-XRANDR_REQUIRED=1.3
+ GSETTINGS_DESKTOP_SCHEMAS_REQUIRED=3.5.91
+-XEXT_REQUIRED=1.1
+
+ AC_SUBST(GTK_REQUIRED)
+ AC_SUBST(GLIB_REQUIRED)
+ AC_SUBST(GDK_PIXBUF_REQUIRED)
+-AC_SUBST(XRANDR_REQUIRED)
+-AC_SUBST(XEXT_REQUIRED)
+
+ AC_CHECK_LIBM
+ AC_SUBST(LIBM)
+@@ -134,22 +130,6 @@
+
+ AC_CHECK_FUNCS([openat])
+
+-dnl we need x11 for GnomeBG
+-
+-PKG_CHECK_MODULES(XLIB, x11,
+- X11_PACKAGE=x11,
+- [X11_PACKAGE=
+- AC_PATH_XTRA
+- if test "x$no_x" = xyes; then
+- AC_MSG_ERROR("no (requires X development libraries)")
+- else
+- XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+- XLIB_CFLAGS=$X_CFLAGS
+- fi])
+-AC_SUBST(X11_PACKAGE)
+-AC_SUBST(XLIB_CFLAGS)
+-AC_SUBST(XLIB_LIBS)
+-
+ dnl pkg-config dependency checks
+
+ PKG_CHECK_MODULES(GNOME_DESKTOP, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED
+@@ -157,14 +137,8 @@
+ glib-2.0 >= $GLIB_REQUIRED
+ gio-2.0 >= $GLIB_REQUIRED
+ gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED
+- xrandr >= $XRANDR_REQUIRED
+- xext >= $XEXT_REQUIRED
+- xkeyboard-config
+ iso-codes)
+
+-XKB_BASE=$($PKG_CONFIG --variable xkb_base xkeyboard-config)
+-AC_SUBST(XKB_BASE)
+-
+ ISO_CODES_PREFIX=$($PKG_CONFIG --variable prefix iso-codes)
+ AC_SUBST(ISO_CODES_PREFIX)
+
+--- ./libgnome-desktop/gnome-bg-crossfade.c.orig 2014-03-06 14:55:01.000000000 +0100
++++ ./libgnome-desktop/gnome-bg-crossfade.c 2016-03-08 08:44:29.146067400 +0100
+@@ -27,13 +27,11 @@
+ #include <gio/gio.h>
+
+ #include <gdk/gdk.h>
+-#include <gdk/gdkx.h>
+ #include <X11/Xlib.h>
+ #include <X11/Xatom.h>
+ #include <gtk/gtk.h>
+
+ #include <cairo.h>
+-#include <cairo-xlib.h>
+
+ #define GNOME_DESKTOP_USE_UNSTABLE_API
+ #include "gnome-bg.h"
+--- ./libgnome-desktop/gnome-bg.c.orig 2014-03-06 19:57:48.000000000 +0100
++++ ./libgnome-desktop/gnome-bg.c 2016-03-08 08:44:13.851502400 +0100
+@@ -35,12 +35,11 @@
+ #include <glib/gstdio.h>
+ #include <gio/gio.h>
+
+-#include <gdk/gdkx.h>
++#include <gdk/gdk.h>
+ #include <X11/Xlib.h>
+ #include <X11/Xatom.h>
+
+ #include <cairo.h>
+-#include <cairo-xlib.h>
+
+ #define GNOME_DESKTOP_USE_UNSTABLE_API
+ #include "gnome-bg.h"
+--- ./libgnome-desktop/gnome-desktop-thumbnail.c.orig 2015-11-09 21:42:24.000000000 +0100
++++ ./libgnome-desktop/gnome-desktop-thumbnail.c 2016-03-08 08:41:00.397780600 +0100
+@@ -1504,7 +1504,7 @@
+ goto out;
+ close (tmp_fd);
+
+- g_snprintf (mtime_str, 21, "%ld", mtime);
++ g_snprintf (mtime_str, 21, "%ld", (long int)mtime);
+ width = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Width");
+ height = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Height");
+
+--- ./libgnome-desktop/gnome-rr-config.c.orig 2016-03-08 08:43:47.477808200 +0100
++++ ./libgnome-desktop/gnome-rr-config.c 2016-03-08 08:43:51.797931600 +0100
+@@ -34,7 +34,7 @@
+ #include <glib/gstdio.h>
+
+ #include <X11/Xlib.h>
+-#include <gdk/gdkx.h>
++#include <gdk/gdk.h>
+
+ #include "gnome-rr-config.h"
+
--- /dev/null
+# Maintainer: Andrea Zagli <andrea.zagli.free@gmail.com>
+
+_realname=gnome-desktop
+pkgbase=mingw-w64-${_realname}
+pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
+pkgver=3.18.2
+pkgrel=1
+arch=('any')
+pkgdesc="Library with common API for various GNOME modules (mingw-w64)"
+depends=("${MINGW_PACKAGE_PREFIX}-glib2"
+ "${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2"
+ "${MINGW_PACKAGE_PREFIX}-gtk3"
+ "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas"
+ "${MINGW_PACKAGE_PREFIX}-iso-codes"
+ "${MINGW_PACKAGE_PREFIX}-gobject-introspection")
+makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
+ "gtk-doc")
+options=('!strip' 'debug' 'staticlibs')
+license=("LGPL 2.1")
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz
+ 001-win.patch)
+sha256sums=('ddd46d022de137543a71f50c7392b32f9b98d5d3f2b53040b35f5802de2e7b56'
+ '129cbf928baa54ed2426e05f6fd13beef93543a79f95ff7929332094c9bd7ef4')
+
+prepare() {
+ cd "${srcdir}"/${_realname}-${pkgver}
+
+ patch -b -V simple -p1 -i ${srcdir}/001-win.patch
+
+ autoreconf -fi
+}
+
+build() {
+ mkdir -p build-${MINGW_CHOST}
+ cd build-${MINGW_CHOST}
+
+ mkdir -p docs/reference/gnome-desktop3/html
+ cp -rf ../${_realname}-${pkgver}/docs/reference/gnome-desktop3/html/* docs/reference/gnome-desktop3/html
+
+../${_realname}-${pkgver}/configure \
+ --host=${MINGW_CHOST} \
+ --target=${MINGW_CHOST} \
+ --build=${MINGW_CHOST} \
+ --prefix=${MINGW_PREFIX} \
+ --libexecdir=${MINGW_PREFIX}/lib
+ make
+}
+
+package() {
+ cd "$srcdir/build-${MINGW_CHOST}"
+ make DESTDIR=$pkgdir install
+
+ install -Dm644 "${srcdir}/${_realname}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
+ install -Dm644 "${srcdir}/${_realname}/COPYING.LIB" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.LIB"
+ install -Dm644 "${srcdir}/${_realname}/COPYING-DOCS" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING-DOCS"
+}