Initial Wayland integration
cover Initial Wayland integration
Hi,
This is the first round of Wayland integration. The Wayland protocol libraries, optional (based on DISTRO_FEATURE) support for the Wayland EGL backend is added to Mesa, and then Weston is added.
Weston's packaging is rather complicated because it can build multiple backends, but it's flexible enough to cope.
Future plans include an image that boots directly into wayland-on-KMS, and enabling the Wayland support in GTK+ and Qt.
One quirk is that you can build weston without the wayland distro feature, which results in just wayland-on-x11. The distro feature name may have to be split up to reflect the different aspects more accurately.
Ross
The following changes since commit 53cc748b93e8af584557d6db5309c3e955182c5c:
linux-libc-headers: fix headers install in long path name environments (2013-01-10 23:53:51 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ross/wayland
for you to fetch changes up to b9bddcdeee3b8b0091e54b2e414757458101779b:
weston: add reference Wayland compositor (2013-01-16 15:43:12 +0000)
----------------------------------------------------------------
Alexandru DAMIAN (2):
wayland: add Wayland protocol library
mesa-dri: enable the wayland-egl platform
Ross Burton (2):
x11-common: set XDG_RUNTIME_DIR if it isn't already set
weston: add reference Wayland compositor
meta/recipes-graphics/mesa/mesa-common.inc | 10 +++- meta/recipes-graphics/mesa/mesa-dri.inc | 1 + meta/recipes-graphics/wayland/wayland_1.0.3.bb | 37 ++++++++++++++ .../recipes-graphics/wayland/weston/weston.desktop | 9 ++++ meta/recipes-graphics/wayland/weston/weston.png | Bin 0 -> 2383 bytes meta/recipes-graphics/wayland/weston_1.0.3.bb | 52 ++++++++++++++++++++ .../x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh | 13 +++++ 7 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-graphics/wayland/wayland_1.0.3.bb create mode 100644 meta/recipes-graphics/wayland/weston/weston.desktop create mode 100644 meta/recipes-graphics/wayland/weston/weston.png create mode 100644 meta/recipes-graphics/wayland/weston_1.0.3.bb create mode 100644 meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh
Alexandru DAMIAN (2):
wayland: add Wayland protocol library
mesa-dri: enable the wayland-egl platform
Ross Burton (2):
x11-common: set XDG_RUNTIME_DIR if it isn't already set
weston: add reference Wayland compositor
meta/recipes-graphics/mesa/mesa-common.inc | 10 +++- meta/recipes-graphics/mesa/mesa-dri.inc | 1 + meta/recipes-graphics/wayland/wayland_1.0.3.bb | 37 ++++++++++++++ .../recipes-graphics/wayland/weston/weston.desktop | 9 ++++ meta/recipes-graphics/wayland/weston/weston.png | Bin 0 -> 2383 bytes meta/recipes-graphics/wayland/weston_1.0.3.bb | 52 ++++++++++++++++++++ .../x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh | 13 +++++ 7 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-graphics/wayland/wayland_1.0.3.bb create mode 100644 meta/recipes-graphics/wayland/weston/weston.desktop create mode 100644 meta/recipes-graphics/wayland/weston/weston.png create mode 100644 meta/recipes-graphics/wayland/weston_1.0.3.bb create mode 100644 meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh
Signature · 1 line
1.7.10.4
PATCH 1/4 x11-common: set XDG_RUNTIME_DIR if it isn't already set
Wayland needs this set for the communication pipes, so set a fallback in case it hasn't already been set.
--- .../x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh
meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh new file +13 -0
@@ -0,0 +1,13 @@ +# Minimal/stub implementation of the XDG Base Directory specification. +# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html +# +# Wayland needs XDG_RUNTIME_DIR, so set it to /tmp. This isn't compliant with +# the specification (wrong mode, wrong owner) but it's mostly sufficient. +# +# In the ideal case where SystemD is booting and userspace is initiated by a +# SystemD user session this will have been set already, so don't overwrite it. + +if [ -z "$XGD_RUNTIME_DIR" ]; then + XDG_RUNTIME_DIR="/tmp" + export XDG_RUNTIME_DIR +fi
Signature · 1 line
1.7.10.4
PATCH 2/4 wayland: add Wayland protocol library
In reply to Ross BurtonFrom: Alexandru DAMIAN <[email protected]>
Wayland is a protocol for a client application to display user interface windows through the use of a compositing window manager. This package include the specific set of server-side and client-side C libraries that implement the protocol.
--- meta/recipes-graphics/wayland/wayland_1.0.3.bb | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 meta/recipes-graphics/wayland/wayland_1.0.3.bb
meta/recipes-graphics/wayland/wayland_1.0.3.bb new file +37 -0
@@ -0,0 +1,37 @@ +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" +SRC_URI[md5sum] = "eebe23571fd4f9ceacc583238e5a8ae9" +SRC_URI[sha256sum] = "f6be5ee11ba534baaa116350b5efb874bf9963bf3fb18bcf40130317e83a5913" + +inherit autotools pkgconfig + +# We need wayland-native for the wayland-scanner utility +BBCLASSEXTEND = "native" + +DEPENDS_virtclass-native = "expat-native" +DEPENDS = "expat wayland-native" + +EXTRA_OECONF_virtclass-native = "--disable-documentation" +EXTRA_OECONF = "--disable-documentation --disable-scanner" + +# Wayland installs a M4 macro for other projects to use. This M4 macro includes +# a path to a Makefile fragment to get the rules to generate stubs from protocol +# description files. The paths to the sysroot end up incorrect, so fix them. +do_configure_append_class-native() { + sed -e 's,@prefix@,${STAGING_DIR_NATIVE},g' \ + -e 's,@exec_prefix@,${STAGING_DIR_NATIVE},g' \ + -e 's,@bindir@,${STAGING_BINDIR_NATIVE},g' \ + -e 's,@datarootdir@,${STAGING_DATADIR_NATIVE},g' \ + ${S}/wayland-scanner.m4.in > ${B}/wayland-scanner.m4 +}
Signature · 1 line
1.7.10.4
PATCH 4/4 weston: add reference Wayland compositor
In reply to Ross BurtonThis is the reference Wayland compositor.
If the "wayland" DISTRO_FEATURE is present the KMS and Wayland (nested) compositors are enabled.
If the "x11" DISTRO_FEATURE is present the X11 compositor is enabled, and a launcher installed.
This also ships a basic Wayland terminal.
Based on work by Alexandru Damian <[email protected]>, Daniel Stone <[email protected]>, and Damien Lespiau <[email protected]>.
--- .../recipes-graphics/wayland/weston/weston.desktop | 9 ++++ meta/recipes-graphics/wayland/weston/weston.png | Bin 0 -> 2383 bytes meta/recipes-graphics/wayland/weston_1.0.3.bb | 52 ++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 meta/recipes-graphics/wayland/weston/weston.desktop create mode 100644 meta/recipes-graphics/wayland/weston/weston.png create mode 100644 meta/recipes-graphics/wayland/weston_1.0.3.bb
meta/recipes-graphics/wayland/weston/weston.desktop new file +9 -0
@@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Name=Weston +Comment=Wayland Compostitor +Exec=weston +Icon=weston +Terminal=false +Categories=Utility;
meta/recipes-graphics/wayland/weston/weston.png new file binary +0 -0
meta/recipes-graphics/wayland/weston_1.0.3.bb new file +52 -0
52 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 3/4 mesa-dri: enable the wayland-egl platform
In reply to Ross BurtonFrom: Alexandru DAMIAN <[email protected]>
If the "wayland" DISTRO_FEATURE is present, enable the Wayland EGL platform. This is required by the reference Wayland compositor, Weston.
--- meta/recipes-graphics/mesa/mesa-common.inc | 10 +++++++++- meta/recipes-graphics/mesa/mesa-dri.inc | 1 + 2 files changed, 10 insertions(+), 1 deletion(-)
meta/recipes-graphics/mesa/mesa-common.inc +9 -1
@@ -28,10 +28,15 @@ EXTRA_OECONF = "--disable-glu \ --disable-glut \ --enable-shared-glapi" -PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} egl gles" +PACKAGECONFIG ??= "egl gles \ + ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}\ + ${@base_contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}\ + " X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes" PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}" +PACKAGECONFIG[wayland] = ",,wayland" + # Multiple virtual/gl providers being built breaks staging EXCLUDE_FROM_WORLD = "1"
@@ -48,6 +53,7 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \ libgles1-mesa libgles1-mesa-dev \ libgles2-mesa libgles2-mesa-dev \ libgles3-mesa libgles3-mesa-dev \ + libwayland-egl libwayland-egl-dev \ " do_install_append () {
@@ -89,6 +95,7 @@ FILES_libgles2-mesa = "${libdir}/libGLESv2.so.*" FILES_libgl-mesa = "${libdir}/libGL.so.*" FILES_libglapi = "${libdir}/libglapi.so.*" FILES_libosmesa = "${libdir}/libOSMesa.so.*" +FILES_libwayland-egl = "${libdir}/libwayland-egl.so.*" FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc" FILES_libdricore-dev = "${libdir}/libdricore*.*"
@@ -100,5 +107,6 @@ FILES_libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/p FILES_libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" FILES_libgles3-mesa-dev = "${includedir}/GLES3" FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h ${libdir}/pkgconfig/osmesa.pc" +FILES_libwayland-egl-dev = "${libdir}/pkgconfig/wayland-egl.pc ${libdir}/libwayland-egl.*" FILES_${PN}-dbg += "${libdir}/dri/.debug/* ${libdir}/egl/.debug/*"
meta/recipes-graphics/mesa/mesa-dri.inc +1 -0
@@ -13,6 +13,7 @@ PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable- EGL_PLATFORMS = "drm" EGL_PLATFORMS .="${@base_contains('DISTRO_FEATURES', 'x11', ',x11', '', d)}" +EGL_PLATFORMS .="${@base_contains('DISTRO_FEATURES', 'wayland', ',wayland', '', d)}" PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disable-egl" python populate_packages_prepend() {
Signature · 1 line
1.7.10.4