From b6864b13b01f466dcb8602a08f99d6d2a7a3d48b Mon Sep 17 00:00:00 2001 From: Fathi Boudra Date: Sat, 29 Oct 2016 17:47:52 +0300 Subject: weston: upgrade from 1.11.0 to 1.11.1 * Refresh patches to apply cleanly without hunk on 1.11.1 (no changes): - 0001-make-error-portable.patch - 0001-configure.ac-Fix-wayland-protocols-path.patch - 0001-shared-include-stdint.h-for-int32_t.patch - 0001-weston-launch-Provide-a-default-version-that-doesn-t.patch * Remove make-weston-launch-exit-for-unrecognized-option.patch applied upstream https://cgit.freedesktop.org/wayland/weston/commit/?h=1.11&id=fc3dd183 * Add 0001-Add-configuration-option-for-no-input-device.patch backported from upstream https://cgit.freedesktop.org/wayland/weston/commit/?id=75b7197f Signed-off-by: Fathi Boudra Signed-off-by: Ross Burton --- ...-configuration-option-for-no-input-device.patch | 112 ++++++++++++++++++++ ...1-configure.ac-Fix-wayland-protocols-path.patch | 9 +- .../wayland/weston/0001-make-error-portable.patch | 24 ++--- .../0001-shared-include-stdint.h-for-int32_t.patch | 7 +- ...ch-Provide-a-default-version-that-doesn-t.patch | 19 ++-- ...eston-launch-exit-for-unrecognized-option.patch | 33 ------ meta/recipes-graphics/wayland/weston_1.11.0.bb | 117 --------------------- meta/recipes-graphics/wayland/weston_1.11.1.bb | 117 +++++++++++++++++++++ 8 files changed, 245 insertions(+), 193 deletions(-) create mode 100644 meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch delete mode 100644 meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch delete mode 100644 meta/recipes-graphics/wayland/weston_1.11.0.bb create mode 100644 meta/recipes-graphics/wayland/weston_1.11.1.bb diff --git a/meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch b/meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch new file mode 100644 index 0000000000..c45f3addfc --- /dev/null +++ b/meta/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch @@ -0,0 +1,112 @@ +From 75b7197f4e072a4e2de124ddbe93b85cffb1c0f8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20D=C3=ADaz?= +Date: Fri, 21 Oct 2016 14:03:13 -0500 +Subject: [PATCH] Add configuration option for no input device. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +As it has been discussed in the past [1], running Weston +without any input device at launch might be beneficial for +some use cases. + +Certainly, it's best for the vast majority of users (and +the project) to require an input device to be present, as +to avoid frustration and hassle, but for those brave souls +that so prefer, this patch lets them run without any input +device at all. + +This introduces a simple configuration in weston.ini: + [core] + require-input=true + +True is the default, so no behavioral change is introduced. + +[1] https://lists.freedesktop.org/archives/wayland-devel/2015-November/025193.html + +Signed-off-by: Daniel Díaz +Reviewed-by: Peter Hutterer +Reviewed-by: Daniel Stone + +Upstream-Status: backport from +https://cgit.freedesktop.org/wayland/weston/commit/?id=75b7197f +--- + man/weston.ini.man | 5 +++++ + src/compositor.h | 3 +++ + src/libinput-seat.c | 6 ++++++ + src/main.c | 5 +++++ + weston.ini.in | 1 + + 5 files changed, 20 insertions(+) + +--- a/src/main.c ++++ b/src/main.c +@@ -1298,6 +1298,7 @@ int main(int argc, char *argv[]) + struct wl_client *primary_client; + struct wl_listener primary_client_destroyed; + struct weston_seat *seat; ++ int require_input; + + const struct weston_option core_options[] = { + { WESTON_OPTION_STRING, "backend", 'B', &backend }, +@@ -1373,6 +1374,10 @@ int main(int argc, char *argv[]) + if (weston_compositor_init_config(ec, config) < 0) + goto out; + ++ weston_config_section_get_bool(section, "require-input", ++ &require_input, true); ++ ec->require_input = require_input; ++ + if (load_backend(ec, backend, &argc, argv, config) < 0) { + weston_log("fatal: failed to create compositor backend\n"); + goto out; +--- a/src/compositor.h ++++ b/src/compositor.h +@@ -803,6 +803,9 @@ struct weston_compositor { + + void *user_data; + void (*exit)(struct weston_compositor *c); ++ ++ /* Whether to let the compositor run without any input device. */ ++ bool require_input; + }; + + struct weston_buffer { +--- a/src/libinput-seat.c ++++ b/src/libinput-seat.c +@@ -255,6 +255,12 @@ udev_input_enable(struct udev_input *inp + devices_found = 1; + } + ++ if (devices_found == 0 && !c->require_input) { ++ weston_log("warning: no input devices found, but none required " ++ "as per configuration.\n"); ++ return 0; ++ } ++ + if (devices_found == 0) { + weston_log( + "warning: no input devices on entering Weston. " +--- a/man/weston.ini.man ++++ b/man/weston.ini.man +@@ -169,6 +169,11 @@ time, the one specified in the command-l + hand, if none of these sets the value, default idle timeout will be + set to 300 seconds. + .RS ++.PP ++.RE ++.TP 7 ++.BI "require-input=" true ++require an input device for launch + + .SH "LIBINPUT SECTION" + The +--- a/weston.ini.in ++++ b/weston.ini.in +@@ -2,6 +2,7 @@ + #modules=xwayland.so,cms-colord.so + #shell=desktop-shell.so + #gbm-format=xrgb2101010 ++#require-input=true + + [shell] + background-image=/usr/share/backgrounds/gnome/Aqua.jpg diff --git a/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch b/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch index 00118d78bb..edd3b918f6 100644 --- a/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch +++ b/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch @@ -13,14 +13,12 @@ breaks multilib weston as it would point to multilib sysroot when the Signed-off-by: Jussi Kukkonen Upstream-Status: Inappropriate [embedded specific] --- - configure.ac | 2 +- + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/configure.ac b/configure.ac -index bc7c329..15a05d3 100644 --- a/configure.ac +++ b/configure.ac -@@ -187,7 +187,7 @@ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.8.0]) +@@ -187,7 +187,7 @@ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [lib PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES]) PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.2], @@ -29,6 +27,3 @@ index bc7c329..15a05d3 100644 AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir) AC_ARG_ENABLE(wayland-compositor, [ --enable-wayland-compositor],, --- -2.1.4 - diff --git a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch index 148848d8d2..f7b52843d9 100644 --- a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +++ b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch @@ -10,17 +10,15 @@ Signed-off-by: Khem Raj --- Upstream-Status: Submitted - configure.ac | 2 ++ - src/weston-error.h | 20 ++++++++++++++++++++ - src/weston-launch.c | 2 +- + 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,[], +@@ -60,6 +60,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], [[#include ]]) AC_CHECK_HEADERS([execinfo.h]) @@ -28,10 +26,7 @@ index 263fc22..f52cd62 100644 + 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 + COMPOSITOR_MODULES="wayland-server >= $WAYLAND_PREREQ_VERSION pixman-1 >= 0.25.2" --- /dev/null +++ b/src/weston-error.h @@ -0,0 +1,20 @@ @@ -55,11 +50,9 @@ index 0000000..2089d02 + +#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 @@ +@@ -33,7 +33,6 @@ #include #include @@ -67,7 +60,7 @@ index 10c66de..3e6d30a 100644 #include #include -@@ -56,6 +55,7 @@ +@@ -59,6 +58,7 @@ #endif #include "weston-launch.h" @@ -75,6 +68,3 @@ index 10c66de..3e6d30a 100644 #define DRM_MAJOR 226 --- -2.1.4 - diff --git a/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch b/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch index 91ef727d32..ee66c20aa8 100644 --- a/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch +++ b/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch @@ -8,11 +8,9 @@ This fixes build on musl. Signed-off-by: Jussi Kukkonen Upstream-Status: Submitted --- - shared/xalloc.h | 1 + + shared/xalloc.h | 1 + 1 file changed, 1 insertion(+) -diff --git a/shared/xalloc.h b/shared/xalloc.h -index 85fccb4..484de2d 100644 --- a/shared/xalloc.h +++ b/shared/xalloc.h @@ -30,6 +30,7 @@ @@ -23,6 +21,3 @@ index 85fccb4..484de2d 100644 #include #include --- -2.1.4 - diff --git a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch index 5542036be2..d684b1c1bc 100644 --- a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -14,12 +14,10 @@ Upstream-Status: Pending Signed-off-by: Tom Hochstein --- - configure.ac | 9 +++++++-- - src/weston-launch.c | 20 ++++++++++++++++++++ + configure.ac | 9 +++++++-- + src/weston-launch.c | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) -diff --git a/configure.ac b/configure.ac -index 32fdde7..240966f 100644 --- a/configure.ac +++ b/configure.ac @@ -416,13 +416,17 @@ AC_ARG_ENABLE(resize-optimization, @@ -50,8 +48,6 @@ index 32fdde7..240966f 100644 systemd-login support ${have_systemd_login} systemd notify support ${enable_systemd_notify} -diff --git a/src/weston-launch.c b/src/weston-launch.c -index b8b2ba0..a865061 100644 --- a/src/weston-launch.c +++ b/src/weston-launch.c @@ -51,7 +51,9 @@ @@ -75,7 +71,7 @@ index b8b2ba0..a865061 100644 int tty; int ttynr; int sock[2]; -@@ -181,6 +185,7 @@ weston_launch_allowed(struct weston_launch *wl) +@@ -181,6 +185,7 @@ weston_launch_allowed(struct weston_laun return false; } @@ -91,7 +87,7 @@ index b8b2ba0..a865061 100644 static int setup_launcher_socket(struct weston_launch *wl) -@@ -414,6 +420,7 @@ quit(struct weston_launch *wl, int status) +@@ -414,6 +420,7 @@ quit(struct weston_launch *wl, int statu close(wl->signalfd); close(wl->sock[0]); @@ -99,7 +95,7 @@ index b8b2ba0..a865061 100644 if (wl->new_user) { err = pam_close_session(wl->ph, 0); if (err) -@@ -421,6 +428,7 @@ quit(struct weston_launch *wl, int status) +@@ -421,6 +428,7 @@ quit(struct weston_launch *wl, int statu err, pam_strerror(wl->ph, err)); pam_end(wl->ph, err); } @@ -157,7 +153,7 @@ index b8b2ba0..a865061 100644 break; case 't': tty = optarg; -@@ -730,8 +748,10 @@ main(int argc, char *argv[]) +@@ -732,8 +750,10 @@ main(int argc, char *argv[]) if (setup_tty(&wl, tty) < 0) exit(EXIT_FAILURE); @@ -168,6 +164,3 @@ index b8b2ba0..a865061 100644 if (setup_launcher_socket(&wl) < 0) exit(EXIT_FAILURE); --- -2.1.4 - diff --git a/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch b/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch deleted file mode 100644 index 0c408a43d6..0000000000 --- a/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch +++ /dev/null @@ -1,33 +0,0 @@ -From e8b615250f700f7854b423aaaf0a0aeea92c05a9 Mon Sep 17 00:00:00 2001 -From: Tom Hochstein -Date: Sat, 7 May 2016 08:51:58 -0300 -Subject: [PATCH] weston-launch: Handle invalid command line options -Organization: O.S. Systems Software LTDA. - -Exit the program if an unrecognized command line option is found. - -Upstream-Status: Submitted - -Signed-off-by: Tom Hochstein -Signed-off-by: Otavio Salvador ---- - - src/weston-launch.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/weston-launch.c b/src/weston-launch.c -index b8dfb17..9987d8e 100644 ---- a/src/weston-launch.c -+++ b/src/weston-launch.c -@@ -703,6 +703,8 @@ main(int argc, char *argv[]) - case 'h': - help("weston-launch"); - exit(EXIT_FAILURE); -+ default: -+ exit(EXIT_FAILURE); - } - } - --- -2.8.2 - diff --git a/meta/recipes-graphics/wayland/weston_1.11.0.bb b/meta/recipes-graphics/wayland/weston_1.11.0.bb deleted file mode 100644 index 3ad309dab6..0000000000 --- a/meta/recipes-graphics/wayland/weston_1.11.0.bb +++ /dev/null @@ -1,117 +0,0 @@ -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=d79ee9e66bb0f95d3386a7acae780b70 \ - file://src/compositor.c;endline=23;md5=1d535fed266cf39f6d8c0647f52ac331" - -SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ - file://weston.png \ - file://weston.desktop \ - file://0001-make-error-portable.patch \ - file://0001-configure.ac-Fix-wayland-protocols-path.patch \ - file://0001-shared-include-stdint.h-for-int32_t.patch \ - file://xwayland.weston-start \ - file://make-weston-launch-exit-for-unrecognized-option.patch \ - file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ -" -SRC_URI[md5sum] = "bc6f90a2039163804aecfa663b69c4c2" -SRC_URI[sha256sum] = "05e086e9f186a06843b9f7a5e1abf19347b1a6e4be26d7e74927abc17b6b7125" - -inherit autotools pkgconfig useradd distro_features_check -# depends on virtual/egl -REQUIRED_DISTRO_FEATURES = "opengl" - -DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" -DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" - -EXTRA_OECONF = "--enable-setuid-install \ - --disable-rpi-compositor \ - --disable-rdp-compositor \ - WAYLAND_PROTOCOLS_SYSROOT_DIR=${STAGING_DIR}/${MACHINE} \ - " -EXTRA_OECONF[vardepsexclude] = "MACHINE" - -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', 'x11 wayland', 'xwayland', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ - clients launch" -# -# 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,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] = "--with-webp,--without-webp,libwebp" -# Weston with unwinding support -PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind" -# Weston with systemd-login support -PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" -# Weston with Xwayland support (requires X11 and Wayland) -PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" -# colord CMS support -PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" -# Clients support -PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" -# Weston with PAM support -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" - -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 - - if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then - install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland - fi -} - -PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)}" -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}/*" - -FILES_${PN}-xwayland = "${libdir}/${BPN}/xwayland.so" -RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" - -RDEPENDS_${PN} += "xkeyboard-config" -RRECOMMENDS_${PN} = "liberation-fonts" -RRECOMMENDS_${PN}-dev += "wayland-protocols" - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "--system weston-launch" diff --git a/meta/recipes-graphics/wayland/weston_1.11.1.bb b/meta/recipes-graphics/wayland/weston_1.11.1.bb new file mode 100644 index 0000000000..7e75cf7a0d --- /dev/null +++ b/meta/recipes-graphics/wayland/weston_1.11.1.bb @@ -0,0 +1,117 @@ +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=d79ee9e66bb0f95d3386a7acae780b70 \ + file://src/compositor.c;endline=23;md5=1d535fed266cf39f6d8c0647f52ac331" + +SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://weston.png \ + file://weston.desktop \ + file://0001-make-error-portable.patch \ + file://0001-configure.ac-Fix-wayland-protocols-path.patch \ + file://0001-shared-include-stdint.h-for-int32_t.patch \ + file://xwayland.weston-start \ + file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ + file://0001-Add-configuration-option-for-no-input-device.patch \ +" +SRC_URI[md5sum] = "c5fdc02ab67d33c0fca8f72d341facdf" +SRC_URI[sha256sum] = "548973496a5c8613d6690f9120f21066946a544df65ce4fe0ef153a8dc0bf6de" + +inherit autotools pkgconfig useradd distro_features_check +# depends on virtual/egl +REQUIRED_DISTRO_FEATURES = "opengl" + +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" +DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" + +EXTRA_OECONF = "--enable-setuid-install \ + --disable-rpi-compositor \ + --disable-rdp-compositor \ + WAYLAND_PROTOCOLS_SYSROOT_DIR=${STAGING_DIR}/${MACHINE} \ + " +EXTRA_OECONF[vardepsexclude] = "MACHINE" + +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', 'x11 wayland', 'xwayland', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ + clients launch" +# +# 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,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] = "--with-webp,--without-webp,libwebp" +# Weston with unwinding support +PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind" +# Weston with systemd-login support +PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" +# Weston with Xwayland support (requires X11 and Wayland) +PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" +# colord CMS support +PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" +# Clients support +PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" +# Weston with PAM support +PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" + +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 + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland + fi +} + +PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)}" +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}/*" + +FILES_${PN}-xwayland = "${libdir}/${BPN}/xwayland.so" +RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" + +RDEPENDS_${PN} += "xkeyboard-config" +RRECOMMENDS_${PN} = "liberation-fonts" +RRECOMMENDS_${PN}-dev += "wayland-protocols" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system weston-launch" -- cgit 1.2.3-korg