Wayland/Mesa/Clutter improvements
cover Wayland/Mesa/Clutter improvements
Hi,
Here are the bits of my Wayland working branch that are good to merge. Some fixes to Weston, a Mesa tweak, and Wayland-enabling for Cogl and Clutter.
Ross
The following changes since commit 590010a6525b0e1bc1de73e794764e23404591df:
core-image-weston: add weston-examples to the image (2013-06-18 17:33:17 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ross/wayland-safe
for you to fetch changes up to 8c481d40a6746d31d566a9db0b5bbb395ad54031:
core-image-weston: add clutter examples (2013-06-20 17:06:11 +0100)
----------------------------------------------------------------
Ross Burton (7):
weston-init: fix a typo in a user-visible message
weston: add patches to make weston-launch work
mesa: remove a redundant do_install tweak
weston: move mtdev dependency to the DRM backend, where it belongs
cogl: add Wayland support
clutter: add Wayland support
core-image-weston: add clutter examples
meta/recipes-graphics/clutter/clutter-1.0.inc | 8 ++- meta/recipes-graphics/cogl/cogl-1.0.inc | 24 ++++--- meta/recipes-graphics/images/core-image-weston.bb | 2 +- meta/recipes-graphics/mesa/mesa.inc | 3 - meta/recipes-graphics/wayland/weston-init/init | 2 +- meta/recipes-graphics/wayland/weston/groups.patch | 47 +++++++++++++ .../wayland/weston/weston-launch-shell.patch | 74 ++++++++++++++++++++ meta/recipes-graphics/wayland/weston_1.1.0.bb | 6 +- 8 files changed, 148 insertions(+), 18 deletions(-) create mode 100644 meta/recipes-graphics/wayland/weston/groups.patch create mode 100644 meta/recipes-graphics/wayland/weston/weston-launch-shell.patch
Ross Burton (7):
weston-init: fix a typo in a user-visible message
weston: add patches to make weston-launch work
mesa: remove a redundant do_install tweak
weston: move mtdev dependency to the DRM backend, where it belongs
cogl: add Wayland support
clutter: add Wayland support
core-image-weston: add clutter examples
meta/recipes-graphics/clutter/clutter-1.0.inc | 8 ++- meta/recipes-graphics/cogl/cogl-1.0.inc | 24 ++++--- meta/recipes-graphics/images/core-image-weston.bb | 2 +- meta/recipes-graphics/mesa/mesa.inc | 3 - meta/recipes-graphics/wayland/weston-init/init | 2 +- meta/recipes-graphics/wayland/weston/groups.patch | 47 +++++++++++++ .../wayland/weston/weston-launch-shell.patch | 74 ++++++++++++++++++++ meta/recipes-graphics/wayland/weston_1.1.0.bb | 6 +- 8 files changed, 148 insertions(+), 18 deletions(-) create mode 100644 meta/recipes-graphics/wayland/weston/groups.patch create mode 100644 meta/recipes-graphics/wayland/weston/weston-launch-shell.patch
Signature · 1 line
1.7.10.4
PATCH 1/7 weston-init: fix a typo in a user-visible message
This is the weston init script, not X.
--- meta/recipes-graphics/wayland/weston-init/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/wayland/weston-init/init +1 -1
@@ -38,7 +38,7 @@ case "$1" in ;; stop) - echo "Stopping XServer" + echo "Stopping Weston" killproc weston ;;
Signature · 1 line
1.7.10.4
PATCH 2/7 weston: add patches to make weston-launch work
In reply to Ross Burton--- meta/recipes-graphics/wayland/weston/groups.patch | 47 +++++++++++++ .../wayland/weston/weston-launch-shell.patch | 74 ++++++++++++++++++++ meta/recipes-graphics/wayland/weston_1.1.0.bb | 2 + 3 files changed, 123 insertions(+) create mode 100644 meta/recipes-graphics/wayland/weston/groups.patch create mode 100644 meta/recipes-graphics/wayland/weston/weston-launch-shell.patch
meta/recipes-graphics/wayland/weston/groups.patch new file +47 -0
@@ -0,0 +1,47 @@ +Upstream-Status: Submitted (https://bugs.freedesktop.org/show_bug.cgi?id=65933) +Signed-off-by: Ross Burton <[email protected]> + +From 42821739a228a85ce3432be1796858e5cc31688b Mon Sep 17 00:00:00 2001 +From: Quentin Glidic <[email protected]> +Date: Wed, 19 Jun 2013 15:27:11 +0200 +Subject: [PATCH weston] weston-launch: Set all groups for user + +Signed-off-by: Quentin Glidic <[email protected]> +--- + configure.ac | 2 +- + src/weston-launch.c | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index b625221..db3feb0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -52,7 +52,7 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], + [[#include <time.h>]]) + AC_CHECK_HEADERS([execinfo.h]) + +-AC_CHECK_FUNCS([mkostemp strchrnul]) ++AC_CHECK_FUNCS([mkostemp strchrnul initgroups]) + + COMPOSITOR_MODULES="wayland-server >= 1.1.90 xkbcommon pixman-1" + +diff --git a/src/weston-launch.c b/src/weston-launch.c +index 76dcede..7d7b556 100644 +--- a/src/weston-launch.c ++++ b/src/weston-launch.c +@@ -631,9 +631,13 @@ main(int argc, char *argv[]) + } + + if (setgid(wl.pw->pw_gid) < 0 || ++#ifdef HAVE_INITGROUPS ++ initgroups(wl.pw->pw_name, wl.pw->pw_gid) < 0 || ++#endif + setuid(wl.pw->pw_uid) < 0) + error(1, errno, "dropping privilidges failed"); + ++ + if (sleep_fork) { + if (wl.verbose) + printf("weston-launch: waiting %d seconds\n", sleep_fork); +-- +1.8.3
meta/recipes-graphics/wayland/weston/weston-launch-shell.patch new file +74 -0
74 lines not on this page · raw message
meta/recipes-graphics/wayland/weston_1.1.0.bb +2 -0
@@ -7,6 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=275efac2559a224527bd4fd593d38466 \ SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ file://install-examples.patch \ + file://weston-launch-shell.patch \ + file://groups.patch \ file://weston.png \ file://weston.desktop" SRC_URI[md5sum] = "dd9f3043fc5228c6bc4e99873fae2254"
Signature · 1 line
1.7.10.4
PATCH 3/7 mesa: remove a redundant do_install tweak
In reply to Ross BurtonMesa isn't incorrectly installing GLU headers anymore, so we don't need to delete them.
--- meta/recipes-graphics/mesa/mesa.inc | 3 --- 1 file changed, 3 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +0 -3
@@ -78,9 +78,6 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \ " do_install_append () { - # GLU is now in libglu (this shouldn't be required in Mesa 9.x) - rm -f ${D}${includedir}/GL/glu* - # Drivers never need libtool .la files rm -f ${D}${libdir}/dri/*.la rm -f ${D}${libdir}/egl/*.la
Signature · 1 line
1.7.10.4
PATCH 4/7 weston: move mtdev dependency to the DRM backend, where it belongs
In reply to Ross Burton--- meta/recipes-graphics/wayland/weston_1.1.0.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/wayland/weston_1.1.0.bb +2 -2
@@ -17,7 +17,7 @@ SRC_URI[sha256sum] = "e7715d2c731f77a729c994a599ffdaebac1307b2dd9336136706869fa5 inherit autotools pkgconfig useradd -DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 mtdev jpeg" +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" DEPENDS += "wayland mesa virtual/egl" EXTRA_OECONF = "--disable-android-compositor \
@@ -40,7 +40,7 @@ PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'wayland', 'kms wayland', # Compositor choices # # Weston on KMS -PACKAGECONFIG[kms] = "--enable-drm-compositor --enable-weston-launch,--disable-drm-compositor --disable-weston-launch,drm udev mesa libpam" +PACKAGECONFIG[kms] = "--enable-drm-compositor --enable-weston-launch,--disable-drm-compositor --disable-weston-launch,drm udev mesa mtdev libpam" # Weston on Wayland (nested Weston) PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,mesa" # Weston on X11
Signature · 1 line
1.7.10.4
PATCH 5/7 cogl: add Wayland support
In reply to Ross BurtonAdd PACKAGECONFIG stanzas for Wayland client and server, and respect the x11 and wayland DISTRO_FEATURES to enable the relevant backends as appropriate by default.
--- meta/recipes-graphics/cogl/cogl-1.0.inc | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
meta/recipes-graphics/cogl/cogl-1.0.inc +16 -8
@@ -13,11 +13,12 @@ PACKAGES =+ "${PN}-examples" AUTOTOOLS_AUXDIR = "${S}/build" # Extra DEPENDS for PACKAGECONFIG -EDEPENDS_GL = "virtual/libgl libdrm" +EDEPENDS_GL = "virtual/libgl libdrm" EDEPENDS_GLES2 = "virtual/libgles2" -EDEPENDS_KMS = "libdrm virtual/egl" -EDEPENDS_EGL = "virtual/egl" -EDEPENDS_X11 = "virtual/libx11 libxcomposite libxfixes libxi libxrandr" +EDEPENDS_KMS = "libdrm virtual/egl" +EDEPENDS_EGL = "virtual/egl" +EDEPENDS_X11 = "virtual/libx11 libxcomposite libxfixes libxi libxrandr" +EDEPENDS_WAYLAND = "wayland" # Extra RDEPENDS for PACKAGECONFIG # This has to be explictly listed, because cogl dlopens the backends
@@ -34,15 +35,22 @@ EXTRA_OECONF += "--disable-introspection \ PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,${EDEPENDS_GL},${ERDEPENDS_GL}" PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,${EDEPENDS_GLES2}, ${ERDEPENDS_GLES2}" -# egl backends +# EGL backends PACKAGECONFIG[egl-kms] = "--enable-kms-egl-platform,--disable-kms-egl-platform,${EDEPENDS_KMS}" PACKAGECONFIG[egl-null] = "--enable-null-egl-platform,--disable-null-egl-platform" PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11}" +PACKAGECONFIG[egl-wayland] = "--enable-wayland-egl-platform,--disable-wayland-egl-platform,${EDEPENDS_WAYLAND}" -# glx +# GLX PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,${EDEPENDS_GL} ${EDEPENDS_X11}" -# Default to GLX -PACKAGECONFIG ??= "gl glx" +# Wayland server-side +PACKAGECONFIG[wayland-server] = "--enable-wayland-egl-server,--disable-wayland-egl-server,${EDEPENDS_WAYLAND}" + +# Respect the DISTRO_FEATURES to pull in GLX or Wayland as appropriate by +# default. +PACKAGECONFIG ??= "gl \ + ${@base_contains('DISTRO_FEATURES', 'wayland', 'egl-wayland', '', d)} \ + ${@base_contains('DISTRO_FEATURES', 'x11', 'glx', '', d)}" FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*"
Signature · 1 line
1.7.10.4
PATCH 6/7 clutter: add Wayland support
In reply to Ross BurtonAdd PACKAGECONFIG stanzas for Wayland client and server, and respect the x11 and wayland DISTRO_FEATURES to enable the relevant backends as appropriate by default.
--- meta/recipes-graphics/clutter/clutter-1.0.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-graphics/clutter/clutter-1.0.inc +5 -3
@@ -13,6 +13,7 @@ AUTOTOOLS_AUXDIR = "${S}/build" EDEPENDS_X11 = "virtual/libx11 libxi libxfixes" EDEPENDS_GLX = "virtual/libgl" EDEPENDS_EGL = "virtual/egl" +EDEPENDS_WAYLAND = "wayland libxkbcommon gdk-pixbuf" EDEPENDS_EVDEV = "libxkbcommon" ERDEPENDS_EVDEV = "xkeyboard-config"
@@ -22,8 +23,6 @@ EXTRA_OECONF += "--disable-introspection \ --disable-quartz-backend \ --disable-win32-backend \ --disable-gdk-backend \ - --disable-wayland-backend \ - --disable-wayland-compositor \ --disable-cex100-backend \ --disable-tslib-input \ "
@@ -32,9 +31,12 @@ PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,${EDEPENDS_X11} PACKAGECONFIG[glx] = ",,${EDEPENDS_X11} ${EDEPENDS_GLX}" PACKAGECONFIG[egl] = "--enable-egl-backend,--disable-egl-backend,${EDEPENDS_EGL}" PACKAGECONFIG[evdev] = "--enable-evdev-input,--disable-evdev-input,${EDEPENDS_EVDEV},${ERDEPENDS_EVDEV}" +PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,${EDEPENDS_WAYLAND}" +PACKAGECONFIG[wayland-compositor] = "--enable-wayland-compositor,--disable-wayland-compositor,wayland" # Default configuration, distros might want to override -PACKAGECONFIG ??= "x11 glx" +PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ + ${@base_contains('DISTRO_FEATURES', 'x11', 'glx x11', '', d)}" FILES_${PN}-examples = "${bindir}/test-* ${pkgdatadir}/redhand.png"
Signature · 1 line
1.7.10.4
PATCH 7/7 core-image-weston: add clutter examples
In reply to Ross BurtonNow that Clutter supports Wayland too, add the Clutter example app to the image.
--- meta/recipes-graphics/images/core-image-weston.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/images/core-image-weston.bb +1 -1
@@ -6,4 +6,4 @@ LICENSE = "MIT" inherit core-image -CORE_IMAGE_BASE_INSTALL += "weston weston-init weston-examples gtk+3-demo" +CORE_IMAGE_BASE_INSTALL += "weston weston-init weston-examples gtk+3-demo clutter-1.0-examples"
Signature · 1 line
1.7.10.4