Squashed 'yocto-poky/' content from commit ea562de

git-subtree-dir: yocto-poky
git-subtree-split: ea562de57590c966cd5a75fda8defecd397e6436
diff --git a/meta/recipes-graphics/wayland/libinput/libinput-configure.ac-add-arg-with-libunwind.patch b/meta/recipes-graphics/wayland/libinput/libinput-configure.ac-add-arg-with-libunwind.patch
new file mode 100644
index 0000000..df5ebcc
--- /dev/null
+++ b/meta/recipes-graphics/wayland/libinput/libinput-configure.ac-add-arg-with-libunwind.patch
@@ -0,0 +1,50 @@
+From cc6fce587f2628c8b342764e06fb0fc27c1e8274 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 3 Aug 2015 20:33:44 -0700
+Subject: [PATCH] configure.ac: add arg --with-libunwind
+
+Add arg --with-libunwind for configure so it's optional to check
+libunwind, which is helpfull to make deterministic builds.
+
+Upstream-Status: Submitted [wayland-devel]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ configure.ac | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 314b0d4..242d251 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -60,13 +60,22 @@ PKG_PROG_PKG_CONFIG()
+ PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0])
+ PKG_CHECK_MODULES(LIBUDEV, [libudev])
+ PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
+-PKG_CHECK_MODULES(LIBUNWIND,
++
++AC_ARG_WITH(libunwind,
++            AS_HELP_STRING([--without-libunwind],[Do not use libunwind]))
++
++AS_IF([test "x$with_libunwind" != "xno"],
++	[PKG_CHECK_MODULES(LIBUNWIND,
+ 		  [libunwind],
+ 		  [HAVE_LIBUNWIND=yes],
+-		  [HAVE_LIBUNWIND=no])
+-if test "x$HAVE_LIBUNWIND" = "xyes"; then
+-	AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
+-fi
++		  [HAVE_LIBUNWIND=no])],
++	[HAVE_LIBUNWIND=no])
++
++AS_IF([test "x$HAVE_LIBUNWIND" = "xyes"],
++	[AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])],
++	[AS_IF([test "x$with_libunwind" = "xyes"],
++		[AC_MSG_ERROR([libunwind requested but not found])])])
++
+ AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$HAVE_LIBUNWIND" = xyes])
+ AC_PATH_PROG(ADDR2LINE, [addr2line])
+ if test "x$ADDR2LINE" != "x"; then
+-- 
+2.3.5
+
diff --git a/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch b/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch
new file mode 100644
index 0000000..97c63bd
--- /dev/null
+++ b/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch
@@ -0,0 +1,72 @@
+This is a workaround upstream suggests for use with kernel 4.1.
+
+Upstream-Status: Inappropriate [temporary work-around]
+Signed-Off-By: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+
+
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon Aug 3 18:23:12 PDT 2015
+Subject: [PATCH v3 libinput] touchpad: serial synaptics need to fake new touches on TRIPLETAP
+
+On the 4.1 kernels synaptics pretends to have 3 slots (the serial fw only does
+2). This was added to avoid cursor jumps but has since been reverted for 4.2
+(kernel commit dbf3c37086, 4.1.3 is still buggy). In some cases a TRIPLETAP
+may be triggered without slot 2 ever activating.
+
+While there are still those kernels out there, work around this bug by opening
+a new touch point where none exists if the fake finger count exceeds the slot
+count.
+
+Reported-by: Jan Alexander Steffens <jan.steffens at gmail.com>
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+Tested-by: Jan Alexander Steffens <jan.steffens at gmail.com>
+Reviewed-by: Hans de Goede <hdegoede at redhat.com>
+---
+Changes to v2:
+- split out the handling instead of having a tmp state variable, see Hans'
+  comments from v2
+
+Mainly sending this to the list again so I have a link to point people to.
+If you're on 4.1.x add this patch to your distribution package.
+
+ src/evdev-mt-touchpad.c | 22 ++++++++++++++++------
+ 1 file changed, 16 insertions(+), 6 deletions(-)
+
+diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
+index a683d9a..5ef03d5 100644
+--- a/src/evdev-mt-touchpad.c
++++ b/src/evdev-mt-touchpad.c
+@@ -369,13 +369,23 @@ tp_restore_synaptics_touches(struct tp_dispatch *tp,
+ 	for (i = 0; i < tp->num_slots; i++) {
+ 		struct tp_touch *t = tp_get_touch(tp, i);
+ 
+-		if (t->state != TOUCH_END)
++		switch(t->state) {
++		case TOUCH_HOVERING:
++		case TOUCH_BEGIN:
++		case TOUCH_UPDATE:
+ 			continue;
+-
+-		/* new touch, move it through begin to update immediately */
+-		tp_new_touch(tp, t, time);
+-		tp_begin_touch(tp, t, time);
+-		t->state = TOUCH_UPDATE;
++		case TOUCH_NONE:
++			/* new touch, move it through to begin immediately */
++			tp_new_touch(tp, t, time);
++			tp_begin_touch(tp, t, time);
++			break;
++		case TOUCH_END:
++			/* touch just ended ,we need need to restore it to update */
++			tp_new_touch(tp, t, time);
++			tp_begin_touch(tp, t, time);
++			t->state = TOUCH_UPDATE;
++			break;
++		}
+ 	}
+ }
+ 
+-- 
+2.4.3
+
diff --git a/meta/recipes-graphics/wayland/libinput_0.21.0.bb b/meta/recipes-graphics/wayland/libinput_0.21.0.bb
new file mode 100644
index 0000000..ac5a249
--- /dev/null
+++ b/meta/recipes-graphics/wayland/libinput_0.21.0.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Library to handle input devices in Wayland compositors"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
+
+DEPENDS = "libevdev udev mtdev"
+
+SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
+           file://libinput-configure.ac-add-arg-with-libunwind.patch \
+           file://touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch \
+"
+SRC_URI[md5sum] = "f91d8f4ced986f1ae16d52ea02bc7837"
+SRC_URI[sha256sum] = "7cce7a9e510dfe5c4a19ad00e9350808d4f59f8611fd2b5e87213c507283f550"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
+PACKAGECONFIG[gui] = "--enable-event-gui,--disable-event-gui,cairo gtk+3"
+
+FILES_${PN} += "${libdir}/udev/"
+FILES_${PN}-dbg += "${libdir}/udev/.debug"
diff --git a/meta/recipes-graphics/wayland/mtdev_1.1.5.bb b/meta/recipes-graphics/wayland/mtdev_1.1.5.bb
new file mode 100644
index 0000000..ccd0ebb
--- /dev/null
+++ b/meta/recipes-graphics/wayland/mtdev_1.1.5.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Multitouch Protocol Translation Library"
+
+DESCRIPTION = "mtdev is a library which transforms all variants of kernel \
+multitouch events to the slotted type B protocol. The events put into mtdev may \
+be from any MT device, specifically type A without contact tracking, type A with \
+contact tracking, or type B with contact tracking"
+
+HOMEPAGE = "http://bitmath.org/code/mtdev/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ea6bd0268bb0fcd6b27698616ceee5d6"
+
+SRC_URI = "http://bitmath.org/code/${BPN}/${BP}.tar.bz2"
+SRC_URI[md5sum] = "52c9610b6002f71d1642dc1a1cca5ec1"
+SRC_URI[sha256sum] = "6677d5708a7948840de734d8b4675d5980d4561171c5a8e89e54adf7a13eba7f"
+
+inherit autotools pkgconfig
diff --git a/meta/recipes-graphics/wayland/wayland/always-build-scanner.patch b/meta/recipes-graphics/wayland/wayland/always-build-scanner.patch
new file mode 100644
index 0000000..5e0e6bf
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland/always-build-scanner.patch
@@ -0,0 +1,105 @@
+build: always build wayland-scanner
+
+The previous idiom for building a cross-compiled Wayland is to build once for
+the build host (with --enable-scanner --disable-libraries) to get a
+wayland-scanner binary that can then be used in a cross-compile (with
+--disable-scanner).  The problem with this is that the cross wayland is missing
+a wayland-scanner binary, which means you then can't do any Wayland development
+on the target.
+
+Instead, always build wayland-scanner for the target and change
+--enable/disable-scanner to --with/without-host-scanner.  Normal builds use the
+default of --without-host-scanner and run the wayland-scanner it just built, and
+cross-compiled builds pass --with-host-scanner to use a previously built host
+scanner but still get a wayland-scanner to install.
+
+(a theoretically neater solution would be to build two scanners if required (one
+to run and one to install), but automake makes this overly complicated)
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Upstream-Status: Submitted
+
+diff --git a/Makefile.am b/Makefile.am
+index c19494f..c2d929b 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -64,16 +64,17 @@ nodist_libwayland_client_la_SOURCES =		\
+ 
+ pkgconfig_DATA += src/wayland-client.pc src/wayland-server.pc
+ 
+-if ENABLE_SCANNER
+-wayland_scanner = $(top_builddir)/wayland-scanner
+ bin_PROGRAMS = wayland-scanner
+ wayland_scanner_SOURCES = src/scanner.c
+ wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(AM_CFLAGS)
+ wayland_scanner_LDADD = $(EXPAT_LIBS) libwayland-util.la
+-$(BUILT_SOURCES) : wayland-scanner
+ pkgconfig_DATA += src/wayland-scanner.pc
+-else
++
++if HOST_SCANNER
+ wayland_scanner = wayland-scanner
++else
++$(BUILT_SOURCES) : wayland-scanner
++wayland_scanner = $(top_builddir)/wayland-scanner
+ endif
+ 
+ protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
+diff --git a/configure.ac b/configure.ac
+index c2a804e..de0b02f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -65,11 +65,11 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+ 	      [[#include <time.h>]])
+ AC_CHECK_HEADERS([execinfo.h])
+ 
+-AC_ARG_ENABLE([scanner],
+-              [AC_HELP_STRING([--disable-scanner],
+-                              [Disable compilation of wayland-scanner])],
+-              [],
+-              [enable_scanner=yes])
++AC_ARG_WITH([host-scanner],
++            [AC_HELP_STRING([--with-host-scanner],
++                            [Use a host wayland-scanner])],
++            [],
++            [with_host_scanner=no])
+ 
+ AC_ARG_ENABLE([documentation],
+ 	      [AC_HELP_STRING([--disable-documentation],
+@@ -77,25 +77,23 @@ AC_ARG_ENABLE([documentation],
+ 	      [],
+ 	      [enable_documentation=yes])
+ 
+-AM_CONDITIONAL(ENABLE_SCANNER, test "x$enable_scanner" = xyes)
++AM_CONDITIONAL(HOST_SCANNER, test "x$with_host_scanner" = xyes)
+ 
+ AC_ARG_WITH(icondir, [  --with-icondir=<dir>    Look for cursor icons here],
+ 		     [  ICONDIR=$withval],
+ 		     [  ICONDIR=${datadir}/icons])
+ AC_SUBST([ICONDIR])
+ 
+-if test "x$enable_scanner" = "xyes"; then
+-	PKG_CHECK_MODULES(EXPAT, [expat], [],
+-		[AC_CHECK_HEADERS(expat.h, [],
+-			[AC_MSG_ERROR([Can't find expat.h. Please install expat.])])
+-		 SAVE_LIBS="$LIBS"
+-		 AC_SEARCH_LIBS(XML_ParserCreate, expat, [],
+-			[AC_MSG_ERROR([Can't find expat library. Please install expat.])])
+-		 EXPAT_LIBS="$LIBS"
+-		 LIBS="$SAVE_LIBS"
+-		 AC_SUBST(EXPAT_LIBS)
+-		])
+-fi
++PKG_CHECK_MODULES(EXPAT, [expat], [],
++	[AC_CHECK_HEADERS(expat.h, [],
++		[AC_MSG_ERROR([Can't find expat.h. Please install expat.])])
++	 SAVE_LIBS="$LIBS"
++	 AC_SEARCH_LIBS(XML_ParserCreate, expat, [],
++		[AC_MSG_ERROR([Can't find expat library. Please install expat.])])
++	 EXPAT_LIBS="$LIBS"
++	 LIBS="$SAVE_LIBS"
++	 AC_SUBST(EXPAT_LIBS)
++	])
+ 
+ AC_PATH_PROG(XSLTPROC, xsltproc)
+ AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
diff --git a/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch b/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch
new file mode 100644
index 0000000..cd8bc55
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch
@@ -0,0 +1,50 @@
+disable macro checks not used for scanner
+
+We only build wayland-native for the scanner, so disable the bits we don't
+actually need. This avoid build issue on older distro such as Centos 5.x:
+| error: 'O_CLOEXEC' undeclared (first use in this function)
+| error: sys/timerfd.h: No such file or directory
+| error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
+| error: 'TFD_CLOEXEC' undeclared (first use in this function)
+| error: 'SFD_CLOEXEC' undeclared (first use in this function)
+
+Upstream-Status: Pending
+
+Signed-off-by: Ting Liu <b28495@freescale.com>
+---
+ configure.ac | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -41,16 +41,16 @@ AC_SUBST(GCC_CFLAGS)
+ 
+ AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate])
+ 
+-AC_CHECK_DECL(SFD_CLOEXEC,[],
+-	      [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland")],
+-	      [[#include <sys/signalfd.h>]])
+-AC_CHECK_DECL(TFD_CLOEXEC,[],
+-	      [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland")],
+-	      [[#include <sys/timerfd.h>]])
+-AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+-	      [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland")],
+-	      [[#include <time.h>]])
+-AC_CHECK_HEADERS([execinfo.h])
++##AC_CHECK_DECL(SFD_CLOEXEC,[],
++#	      [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland")],
++#	      [[#include <sys/signalfd.h>]])
++#AC_CHECK_DECL(TFD_CLOEXEC,[],
++#	      [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland")],
++#	      [[#include <sys/timerfd.h>]])
++#AC_CHECK_DECL(CLOCK_MONOTONIC,[],
++#	      [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland")],
++#	      [[#include <time.h>]])
++#AC_CHECK_HEADERS([execinfo.h])
+ 
+ AC_ARG_ENABLE([scanner],
+               [AC_HELP_STRING([--disable-scanner],
+-- 
+1.8.3.2
+
diff --git a/meta/recipes-graphics/wayland/wayland_1.8.1.bb b/meta/recipes-graphics/wayland/wayland_1.8.1.bb
new file mode 100644
index 0000000..0f9a0aa
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland_1.8.1.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Wayland, a protocol between a compositor and clients"
+DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
+as well as a C library implementation of that protocol. The compositor can be \
+a standalone display server running on Linux kernel modesetting and evdev \
+input devices, an X application, or a wayland client itself. The clients can \
+be traditional applications, X servers (rootless or fullscreen) or other \
+display servers."
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1d4476a7d98dd5691c53d4d43a510c72 \
+                    file://src/wayland-server.c;endline=21;md5=079ae21dbf98ada52ec23744851b0a5c"
+
+SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+           file://always-build-scanner.patch"
+SRC_URI[md5sum] = "6e877877c3e04cfb865cfcd0733c9ab1"
+SRC_URI[sha256sum] = "f17c938d1c24fd0a10f650a623a2775d329db3168b5732e498b08388ec776fc8"
+
+SRC_URI_append_class-native = " \
+    file://disable-macro-checks-not-used-for-scanner.patch \
+    "
+EXTRA_OECONF_class-native = "--disable-documentation"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
+
+DEPENDS = "expat libffi wayland-native"
+
+EXTRA_OECONF = "--disable-documentation --with-host-scanner"
+
+# Wayland installs a M4 macro for other projects to use, which uses the target
+# pkg-config to find files.  Replace pkg-config with pkg-config-native.
+do_install_append_class-native() {
+  sed -e 's,PKG_CHECK_MODULES(.*),,g' \
+      -e 's,$PKG_CONFIG,pkg-config-native,g' \
+      -i ${D}/${datadir}/aclocal/wayland-scanner.m4
+}
+
+sysroot_stage_all_append_class-target () {
+	rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
+	cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
+}
+
+FILES_${PN} = "${libdir}/*${SOLIBS}"
+FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
new file mode 100644
index 0000000..38b78bc
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Startup script for the Weston Wayland compositor"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+
+SRC_URI = "file://init"
+
+S = "${WORKDIR}"
+
+do_install() {
+	install -d ${D}/${sysconfdir}/init.d
+	install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
+}
+
+inherit allarch update-rc.d
+
+RDEPENDS_${PN} = "weston kbd"
+
+INITSCRIPT_NAME = "weston"
+INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
diff --git a/meta/recipes-graphics/wayland/weston-init/init b/meta/recipes-graphics/wayland/weston-init/init
new file mode 100644
index 0000000..2e938f4
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/init
@@ -0,0 +1,60 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides: weston
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+### END INIT INFO
+
+if test -e /etc/default/weston ; then
+        . /etc/default/weston
+fi
+
+killproc() {
+        pid=`/bin/pidof $1`
+        [ "$pid" != "" ] && kill $pid
+}
+
+read CMDLINE < /proc/cmdline
+for x in $CMDLINE; do
+        case $x in
+        weston=false)
+		echo "Weston disabled"
+		exit 0;
+                ;;
+        esac
+done
+
+case "$1" in
+  start)
+        . /etc/profile
+
+        # This is all a nasty hack
+        if test -z "$XDG_RUNTIME_DIR"; then
+                export XDG_RUNTIME_DIR=/run/user/root
+                mkdir --parents $XDG_RUNTIME_DIR
+                chmod 0700 $XDG_RUNTIME_DIR
+        fi
+
+        openvt -s weston -- $OPTARGS
+  ;;
+
+  stop)
+        echo "Stopping Weston"
+        killproc weston
+  ;;
+
+  restart)
+	$0 stop
+        sleep 1
+        $0 start
+  ;;
+
+  *)
+        echo "usage: $0 { start | stop | restart }"
+  ;;
+esac
+
+exit 0
diff --git a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
new file mode 100644
index 0000000..148848d
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
@@ -0,0 +1,80 @@
+From c22e90365d89346258394833cbcad03ff32b2e27 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 May 2015 20:56:00 -0700
+Subject: [PATCH weston] make error() portable
+
+error() is not posix but gnu extension so may not be available on all
+kind of systemsi e.g. musl.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ configure.ac        |  2 ++
+ src/weston-error.h  | 20 ++++++++++++++++++++
+ src/weston-launch.c |  2 +-
+ 3 files changed, 23 insertions(+), 1 deletion(-)
+ create mode 100644 src/weston-error.h
+
+diff --git a/configure.ac b/configure.ac
+index 263fc22..f52cd62 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -57,6 +57,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+ 	      [[#include <time.h>]])
+ AC_CHECK_HEADERS([execinfo.h])
+ 
++AC_CHECK_HEADERS([error.h])
++
+ AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
+ 
+ COMPOSITOR_MODULES="wayland-server >= 1.7.93 pixman-1 >= 0.25.2"
+diff --git a/src/weston-error.h b/src/weston-error.h
+new file mode 100644
+index 0000000..2089d02
+--- /dev/null
++++ b/src/weston-error.h
+@@ -0,0 +1,20 @@
++#ifndef _WESTON_ERROR_H
++#define _WESTON_ERROR_H
++
++#if defined(HAVE_ERROR_H)
++#include <error.h>
++#else
++#include <err.h>
++#include <string.h>
++#define _weston_error(S, E, F, ...) do { \
++	if (E) \
++		err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \
++	else \
++		err(S, F, ##__VA_ARGS__); \
++} while(0)
++
++#define error _weston_error
++#endif
++
++#endif
++
+diff --git a/src/weston-launch.c b/src/weston-launch.c
+index 10c66de..3e6d30a 100644
+--- a/src/weston-launch.c
++++ b/src/weston-launch.c
+@@ -30,7 +30,6 @@
+ #include <poll.h>
+ #include <errno.h>
+ 
+-#include <error.h>
+ #include <getopt.h>
+ 
+ #include <sys/types.h>
+@@ -56,6 +55,7 @@
+ #endif
+ 
+ #include "weston-launch.h"
++#include "weston-error.h"
+ 
+ #define DRM_MAJOR 226
+ 
+-- 
+2.1.4
+
diff --git a/meta/recipes-graphics/wayland/weston/disable-wayland-scanner-pkg-check.patch b/meta/recipes-graphics/wayland/weston/disable-wayland-scanner-pkg-check.patch
new file mode 100644
index 0000000..68ba38b
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/disable-wayland-scanner-pkg-check.patch
@@ -0,0 +1,17 @@
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac
++++ git/configure.ac
+@@ -501,12 +501,6 @@ if test "x$have_lcms" = xyes; then
+ fi
+ AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
+ 
+-AC_PATH_PROG([wayland_scanner], [wayland-scanner])
+-if test x$wayland_scanner = x; then
+-	PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
+-	wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
+-fi
+-
+ AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
+ 
+ AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
diff --git a/meta/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch b/meta/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch
new file mode 100644
index 0000000..35e6d6f
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch
@@ -0,0 +1,43 @@
+weston-1.5.0/configure.ac: make lcms explicitly configurable
+
+The lcms package is outside of openembedded-core, so make it
+explicitly configurable. Make it deterministic, so that if lcms
+dependencies are missing, autoconf throws a fatal error. Follow
+upstream style to make it more likely to be merged.
+
+Upstream-Status: Pending
+
+Index: weston-1.5.0/configure.ac
+===================================================================
+--- weston-1.5.0.orig/configure.ac
++++ weston-1.5.0/configure.ac
+@@ -491,12 +491,24 @@ AC_ARG_ENABLE(demo-clients-install,
+ 			     enable_demo_clients_install=no)
+ AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"])
+ 
+-PKG_CHECK_MODULES(LCMS, lcms2,
+-                  [have_lcms=yes], [have_lcms=no])
+-if test "x$have_lcms" = xyes; then
+-       AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
++AC_ARG_ENABLE(lcms,
++              AS_HELP_STRING([--disable-lcms],
++                             [Disable lcms support]),,
++              enable_lcms=auto)
++AM_CONDITIONAL(HAVE_LCMS, [test "x$enable_lcms" = xyes])
++if test "x$enable_lcms" != "xno"; then
++        PKG_CHECK_MODULES(LCMS, 
++                         lcms2,
++                         [have_lcms=yes],
++                         [have_lcms=no])
++        if test "x$have_lcms" = "xno" -a "x$enable_lcms" = "xyes"; then
++          AC_MSG_ERROR([lcms support explicitly requested, but lcms couldn't be found])
++        fi
++        if test "x$have_lcms" = "xyes"; then
++                enable_lcms=yes
++                AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
++        fi
+ fi
+-AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
+ 
+ AC_PATH_PROG([wayland_scanner], [wayland-scanner])
+ if test x$wayland_scanner = x; then
diff --git a/meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch b/meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch
new file mode 100644
index 0000000..ad07d4f
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch
@@ -0,0 +1,37 @@
+
+The libwebp package is outside of openembedded-core, so make it
+explicitly configurable. Make it deterministic, so that if libwebp 
+dependencies are missing, autoconf throws a fatal error.
+
+Upstream-Status: Pending
+
+Index: weston-1.5.0/configure.ac
+===================================================================
+--- weston-1.5.0.orig/configure.ac
++++ weston-1.5.0/configure.ac
+@@ -268,9 +268,22 @@ fi
+ 
+ PKG_CHECK_MODULES(PIXMAN, [pixman-1])
+ PKG_CHECK_MODULES(PNG, [libpng])
+-PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])
+-AS_IF([test "x$have_webp" = "xyes"],
+-      [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
++AC_ARG_ENABLE(webp,
++              AS_HELP_STRING([--disable-webp],
++                             [Disable libwebp support]),,
++              enable_webp=auto)
++AM_CONDITIONAL(HAVE_WEBP, [test "x$enable_webp" = xyes])
++AS_IF([test "x$enable_webp" != "xno"],
++    PKG_CHECK_MODULES(WEBP,
++                     [libwebp],
++                     [have_webp=yes],
++                     [have_webp=no])
++    AS_IF([test "x$have_webp" = "xno" -a "x$enable_webp" = "xyes"],
++        AC_MSG_ERROR([libwebp support explicitly request, but lipwebp could not be found]))
++    AS_IF([test "x$have_webp" = "xyes"],
++        [enable_webp=yes]
++        [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
++)
+ 
+ AC_ARG_ENABLE(vaapi-recorder, [  --enable-vaapi-recorder],,
+ 	      enable_vaapi_recorder=auto)
diff --git a/meta/recipes-graphics/wayland/weston/parallelmake.patch b/meta/recipes-graphics/wayland/weston/parallelmake.patch
new file mode 100644
index 0000000..42b5efb
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/parallelmake.patch
@@ -0,0 +1,40 @@
+Backport two patches from upstream to fix parallel builds
+
+- mkdir races (2eff22b8e6f6e5255a1915c33dfd91cecf02cbbc)
+- weston.desktop race (315476fa7b1f1c44c1b35116036df54ac5cb9a03)
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile.am b/Makefile.am
+index 5819b19..ff13b19 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -20,7 +20,7 @@ weston.ini : $(srcdir)/weston.ini.in
+ 		$< > $@
+ 
+ ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
+-	$(AM_V_GEN)$(SED) \
++	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
+ 		-e 's|@bindir[@]|$(bindir)|g' \
+ 		-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
+ 		-e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
+@@ -29,7 +29,7 @@ ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
+ 		$< > $@
+ 
+ tests/weston-ivi.ini : $(srcdir)/ivi-shell/weston.ini.in
+-	$(AM_V_GEN)$(SED) \
++	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
+ 		-e 's|@bindir[@]|$(bindir)|g' \
+ 		-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
+ 		-e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
+@@ -179,8 +179,7 @@ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = src/weston.pc
+ 
+ wayland_sessiondir = $(datadir)/wayland-sessions
+-wayland_session_DATA = src/weston.desktop
+-dist_wayland_session_DATA = $(wayland_session_DATA)
++dist_wayland_session_DATA = src/weston.desktop
+ 
+ westonincludedir = $(includedir)/weston
+ westoninclude_HEADERS =				\
diff --git a/meta/recipes-graphics/wayland/weston/weston.desktop b/meta/recipes-graphics/wayland/weston/weston.desktop
new file mode 100644
index 0000000..1086ae8
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/weston.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=Weston
+Comment=Wayland Compostitor
+Exec=weston
+Icon=weston
+Terminal=false
+Categories=Utility;
diff --git a/meta/recipes-graphics/wayland/weston/weston.png b/meta/recipes-graphics/wayland/weston/weston.png
new file mode 100644
index 0000000..ea8b7e0
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/weston.png
Binary files differ
diff --git a/meta/recipes-graphics/wayland/weston_1.8.0.bb b/meta/recipes-graphics/wayland/weston_1.8.0.bb
new file mode 100644
index 0000000..342c604
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston_1.8.0.bb
@@ -0,0 +1,94 @@
+SUMMARY = "Weston, a Wayland compositor"
+DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=275efac2559a224527bd4fd593d38466 \
+                    file://src/compositor.c;endline=23;md5=a9793f1edc8d1a4c344ca8ae252352fb"
+
+SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+           file://weston.png \
+           file://weston.desktop \
+           file://make-lcms-explicitly-configurable.patch \
+           file://make-libwebp-explicitly-configurable.patch \
+           file://0001-make-error-portable.patch \
+           file://parallelmake.patch \
+"
+SRC_URI[md5sum] = "24cb8a7ed0535b4fc3642643988dab36"
+SRC_URI[sha256sum] = "8963e69f328e815cec42c58046c4af721476c7541bb7d9edc71740fada5ad312"
+
+inherit autotools pkgconfig useradd
+
+DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
+DEPENDS += "wayland libinput virtual/egl pango"
+
+EXTRA_OECONF = "--enable-setuid-install \
+                --disable-xwayland \
+                --enable-simple-clients \
+                --enable-clients \
+                --enable-demo-clients-install \
+                --disable-rpi-compositor \
+                --disable-rdp-compositor \
+                "
+
+EXTRA_OECONF_append_qemux86 = "\
+		WESTON_NATIVE_BACKEND=fbdev-backend.so \
+		"
+EXTRA_OECONF_append_qemux86-64 = "\
+		WESTON_NATIVE_BACKEND=fbdev-backend.so \
+		"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \
+                  "
+#
+# Compositor choices
+#
+# Weston on KMS
+PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
+# Weston on Wayland (nested Weston)
+PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
+# Weston on X11
+PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
+# Headless Weston
+PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
+# Weston on framebuffer
+PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
+# weston-launch
+PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,libpam drm"
+# VA-API desktop recorder
+PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
+# Weston with EGL support
+PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
+# Weston with cairo glesv2 support
+PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
+# Weston with lcms support
+PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
+# Weston with webp support
+PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
+# Weston with unwinding support
+PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
+
+do_install_append() {
+	# Weston doesn't need the .la files to load modules, so wipe them
+	rm -f ${D}/${libdir}/weston/*.la
+
+	# If X11, ship a desktop file to launch it
+	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
+		install -d ${D}${datadir}/applications
+		install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
+
+		install -d ${D}${datadir}/icons/hicolor/48x48/apps
+		install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
+        fi
+}
+
+PACKAGES += "${PN}-examples"
+
+FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
+FILES_${PN}-examples = "${bindir}/*"
+
+RDEPENDS_${PN} += "xkeyboard-config"
+RRECOMMENDS_${PN} = "liberation-fonts"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system weston-launch"