diff options
author | jmbills <42755197+jmbills@users.noreply.github.com> | 2019-10-25 19:18:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-25 19:18:16 +0300 |
commit | 0dbb60593ebb5a62190c0e6cff7f1770493303a2 (patch) | |
tree | 0df2ce67404dbca3ddc4ee063dbfd9ae455be682 /poky/meta/recipes-graphics/wayland | |
parent | 34a3942845ac3264ce27c648ae5486d302c3e6d8 (diff) | |
parent | cc9cea46d74d280de03c713c8b555153fd811f09 (diff) | |
download | openbmc-0dbb60593ebb5a62190c0e6cff7f1770493303a2.tar.xz |
Merge branch 'intel' into intel2
Diffstat (limited to 'poky/meta/recipes-graphics/wayland')
13 files changed, 254 insertions, 214 deletions
diff --git a/poky/meta/recipes-graphics/wayland/libinput_1.13.2.bb b/poky/meta/recipes-graphics/wayland/libinput_1.14.1.bb index 049674c09..38bc8d2c3 100644 --- a/poky/meta/recipes-graphics/wayland/libinput_1.13.2.bb +++ b/poky/meta/recipes-graphics/wayland/libinput_1.14.1.bb @@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1f2ea9ebff3a2c6d458faf58492efb63" DEPENDS = "libevdev udev mtdev" SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz" -SRC_URI[md5sum] = "8b745894f5d1b2e883bfc686aebadcfe" -SRC_URI[sha256sum] = "1d9fa0698348dea46f75321d98788f8ac7181c069b70c4d10736910a12bb6a6d" +SRC_URI[md5sum] = "da29a704dc6f7ea2d5aac754db046340" +SRC_URI[sha256sum] = "e333a3242835c019ca37d2cef8b51a87d3138eb47444119c0153dc7a8656ee70" UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" @@ -21,7 +21,10 @@ PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3" UDEVDIR = "`pkg-config --variable=udevdir udev`" -EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} -Ddocumentation=false -Dtests=false" +EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \ + -Ddocumentation=false \ + -Dtests=false \ + -Dzshcompletiondir=no" # package name changed in 1.8.1 upgrade: make sure package upgrades work RPROVIDES_${PN} = "libinput" diff --git a/poky/meta/recipes-graphics/wayland/wayland-protocols_1.17.bb b/poky/meta/recipes-graphics/wayland/wayland-protocols_1.18.bb index ca8f06c55..c8bec66a4 100644 --- a/poky/meta/recipes-graphics/wayland/wayland-protocols_1.17.bb +++ b/poky/meta/recipes-graphics/wayland/wayland-protocols_1.18.bb @@ -11,8 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ " -SRC_URI[md5sum] = "55ddd5fdb02b73b9de9559aaec267315" -SRC_URI[sha256sum] = "df1319cf9705643aea9fd16f9056f4e5b2471bd10c0cc3713d4a4cdc23d6812f" +SRC_URI[md5sum] = "af38f22d8e233c2f2e00ddc8dcc94694" +SRC_URI[sha256sum] = "3d73b7e7661763dc09d7d9107678400101ecff2b5b1e531674abfa81e04874b3" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" diff --git a/poky/meta/recipes-graphics/wayland/weston-conf.bb b/poky/meta/recipes-graphics/wayland/weston-conf.bb deleted file mode 100644 index f52200c46..000000000 --- a/poky/meta/recipes-graphics/wayland/weston-conf.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Weston, a Wayland compositor, configuration files" -HOMEPAGE = "http://wayland.freedesktop.org" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -CONFFILES_${PN} = "${sysconfdir}/xdg/weston/weston.ini" - -FILES_${PN} = "${sysconfdir}/xdg/weston/weston.ini" - -PACKAGES = "${PN}" - -do_configure[noexec] = '1' -do_compile[noexec] = '1' - -do_install() { - : -} - -do_install_qemux86() { - mkdir -p ${D}/${sysconfdir}/xdg/weston - cat << EOF > ${D}/${sysconfdir}/xdg/weston/weston.ini -[core] -backend=fbdev-backend.so -EOF -} - -do_install_qemux86-64() { - mkdir -p ${D}/${sysconfdir}/xdg/weston - cat << EOF > ${D}/${sysconfdir}/xdg/weston/weston.ini -[core] -backend=fbdev-backend.so -EOF -} diff --git a/poky/meta/recipes-graphics/wayland/weston-init.bb b/poky/meta/recipes-graphics/wayland/weston-init.bb index 22ba5f3fb..8b6689717 100644 --- a/poky/meta/recipes-graphics/wayland/weston-init.bb +++ b/poky/meta/recipes-graphics/wayland/weston-init.bb @@ -2,23 +2,35 @@ SUMMARY = "Startup script and systemd unit file for the Weston Wayland composito LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +PACKAGE_ARCH = "${MACHINE_ARCH}" + SRC_URI = "file://init \ - file://weston.service \ + file://weston.ini \ + file://weston@.service \ + file://71-weston-drm.rules \ file://weston-start" S = "${WORKDIR}" do_install() { install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston - install -Dm0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service - + install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini + + # Install Weston systemd service and accompanying udev rule + install -D -p -m0644 ${WORKDIR}/weston@.service ${D}${systemd_system_unitdir}/weston@.service + sed -i -e s:/etc:${sysconfdir}:g \ + -e s:/usr/bin:${bindir}:g \ + -e s:/var:${localstatedir}:g \ + ${D}${systemd_unitdir}/system/weston@.service + install -D -p -m0644 ${WORKDIR}/71-weston-drm.rules \ + ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules # Install weston-start script install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start } -inherit allarch update-rc.d distro_features_check systemd +inherit update-rc.d distro_features_check systemd # rdepends on weston which depends on virtual/egl REQUIRED_DISTRO_FEATURES = "opengl" @@ -28,4 +40,10 @@ RDEPENDS_${PN} = "weston kbd" INITSCRIPT_NAME = "weston" INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." -SYSTEMD_SERVICE_${PN} = "weston.service" +FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service" + +CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini" + +SYSTEMD_SERVICE_${PN} = "weston@%i.service" +SYSTEMD_AUTO_ENABLE = "disable" + diff --git a/poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules b/poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules new file mode 100644 index 000000000..1a1b8bbda --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules @@ -0,0 +1,2 @@ +ACTION=="add", SUBSYSTEM=="graphics", KERNEL=="fb0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@root.service" +ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@root.service" diff --git a/poky/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini b/poky/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini new file mode 100644 index 000000000..17ebd7fda --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini @@ -0,0 +1,2 @@ +[core] +backend=fbdev-backend.so diff --git a/poky/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini b/poky/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini new file mode 100644 index 000000000..17ebd7fda --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini @@ -0,0 +1,2 @@ +[core] +backend=fbdev-backend.so diff --git a/poky/meta/recipes-graphics/wayland/weston-init/weston.ini b/poky/meta/recipes-graphics/wayland/weston-init/weston.ini new file mode 100644 index 000000000..1eecf48bc --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/weston-init/weston.ini @@ -0,0 +1,74 @@ +# configuration file for Weston + +#[core] +#modules=xwayland.so,cms-colord.so +#shell=desktop-shell.so +#gbm-format=xrgb2101010 + +#[shell] +#background-image=/usr/share/backgrounds/gnome/Aqua.jpg +#background-color=0xff002244 +#background-type=tile +#clock-format=minutes +#panel-color=0x90ff0000 +#locking=true +#animation=zoom +#startup-animation=fade +#binding-modifier=ctrl +#num-workspaces=6 +#cursor-theme=whiteglass +#cursor-size=24 + +#lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png +#lockscreen=/usr/share/backgrounds/gnome/Garden.jpg +#homescreen=/usr/share/backgrounds/gnome/Blinds.jpg +#animation=fade + +#[launcher] +#icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png +#path=/usr/bin/gnome-terminal + +#[launcher] +#icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png +#path=/usr/bin/weston-terminal + +#[launcher] +#icon=/usr/share/icons/hicolor/24x24/apps/google-chrome.png +#path=/usr/bin/google-chrome + +#[launcher] +#icon=/usr/share/icons/gnome/24x24/apps/arts.png +#path=/build/weston-0lEgCh/weston-1.11.0/weston-flower + +#[input-method] +#path=/usr/lib/weston/weston-keyboard + +#[output] +#name=LVDS1 +#mode=1680x1050 +#transform=90 +#icc_profile=/usr/share/color/icc/colord/Bluish.icc + +#[output] +#name=VGA1 +#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync +#transform=flipped + +#[output] +#name=X1 +#mode=1024x768 +#transform=flipped-90 + +#[libinput] +#enable_tap=true + +#[touchpad] +#constant_accel_factor = 50 +#min_accel_factor = 0.16 +#max_accel_factor = 1.0 + +#[screen-share] +#command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize + +#[xwayland] +#path=/usr/bin/Xwayland diff --git a/poky/meta/recipes-graphics/wayland/weston-init/weston.service b/poky/meta/recipes-graphics/wayland/weston-init/weston.service deleted file mode 100644 index 18f72626e..000000000 --- a/poky/meta/recipes-graphics/wayland/weston-init/weston.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Weston Wayland Compositor -RequiresMountsFor=/run - -[Service] -User=root -PAMName=login -EnvironmentFile=-/etc/default/weston -ExecStart=/usr/bin/weston-start -v -e -- $OPTARGS - -[Install] -WantedBy=multi-user.target - diff --git a/poky/meta/recipes-graphics/wayland/weston-init/weston@.service b/poky/meta/recipes-graphics/wayland/weston-init/weston@.service new file mode 100644 index 000000000..9ecf2ab06 --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/weston-init/weston@.service @@ -0,0 +1,37 @@ +[Unit] +Description=Weston Wayland Compositor (on tty7) +RequiresMountsFor=/run +Conflicts=getty@tty7.service plymouth-quit.service +After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service + +[Service] +User=%i +PermissionsStartOnly=true + +# Log us in via PAM so we get our XDG & co. environment and +# are treated as logged in so we can use the tty: +PAMName=login + +# Grab tty7 +UtmpIdentifier=tty7 +TTYPath=/dev/tty7 +TTYReset=yes +TTYVHangup=yes +TTYVTDisallocate=yes + +# stderr to journal so our logging doesn't get thrown into /dev/null +StandardOutput=tty +StandardInput=tty +StandardError=journal + +EnvironmentFile=-/etc/default/weston + +# Weston does not successfully change VT, nor does systemd place us on +# the VT it just activated for us. Switch manually: +ExecStartPre=/usr/bin/chvt 7 +ExecStart=/usr/bin/weston --log=${XDG_RUNTIME_DIR}/weston.log $OPTARGS + +IgnoreSIGPIPE=no + +#[Install] +#Alias=multi-user.target.wants/weston.service diff --git a/poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch deleted file mode 100644 index 0eb3d95a6..000000000 --- a/poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +++ /dev/null @@ -1,78 +0,0 @@ -From c4677e155736062e75687f1a655732c8902e912b 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] make error() portable - -error() is not posix but gnu extension so may not be available on all -kind of systemsi e.g. musl. - -Upstream-Status: Submitted - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - configure.ac | 2 ++ - libweston/weston-error.h | 20 ++++++++++++++++++++ - libweston/weston-launch.c | 2 +- - 3 files changed, 23 insertions(+), 1 deletion(-) - create mode 100644 libweston/weston-error.h - -diff --git a/configure.ac b/configure.ac -index c05ad01..6da6e04 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -126,6 +126,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], - [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")], - [[#include <time.h>]]) - -+AC_CHECK_HEADERS([error.h]) -+ - AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) - - # check for libdrm as a build-time dependency only -diff --git a/libweston/weston-error.h b/libweston/weston-error.h -new file mode 100644 -index 0000000..2089d02 ---- /dev/null -+++ b/libweston/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/libweston/weston-launch.c b/libweston/weston-launch.c -index bf73e0d..9064439 100644 ---- a/libweston/weston-launch.c -+++ b/libweston/weston-launch.c -@@ -33,7 +33,6 @@ - #include <poll.h> - #include <errno.h> - --#include <error.h> - #include <getopt.h> - - #include <sys/types.h> -@@ -59,6 +58,7 @@ - #endif - - #include "weston-launch.h" -+#include "weston-error.h" - - #define DRM_MAJOR 226 - diff --git a/poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch index a2f61bfdd..e50845b17 100644 --- a/poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ b/poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -1,4 +1,4 @@ -From 7d2fea61a95e9498b5a19c8cffcb2ab5631d5685 Mon Sep 17 00:00:00 2001 +From 682b7d79a7b81ec8e38760381104b24ad549e8c0 Mon Sep 17 00:00:00 2001 From: Tom Hochstein <tom.hochstein@nxp.com> Date: Wed, 22 Feb 2017 15:53:30 +0200 Subject: [PATCH] weston-launch: Provide a default version that doesn't require @@ -15,46 +15,48 @@ Upstream-Status: Pending Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com> - +Signed-off-by: Ming Liu <ming.liu@toradex.com> --- - configure.ac | 9 +++++++-- - libweston/weston-launch.c | 20 ++++++++++++++++++++ - 2 files changed, 27 insertions(+), 2 deletions(-) + libweston/meson.build | 16 ++++++++++++---- + libweston/weston-launch.c | 21 +++++++++++++++++++++ + meson_options.txt | 7 +++++++ + 3 files changed, 40 insertions(+), 4 deletions(-) -diff --git a/configure.ac b/configure.ac -index 6da6e04..681f7c8 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -515,13 +515,17 @@ AC_ARG_ENABLE(resize-optimization, - AS_IF([test "x$enable_resize_optimization" = "xyes"], - [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) - -+AC_ARG_WITH(pam, -+ AS_HELP_STRING([--with-pam], [Use PAM]), -+ [use_pam=$withval], [use_pam=yes]) - AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes) - AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes) --if test x$enable_weston_launch = xyes; then -+if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then - WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no]) - if test x$have_pam = xno; then -- AC_ERROR([weston-launch requires pam]) -+ AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found]) - fi -+ AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available]) - fi - - AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") -@@ -767,6 +771,7 @@ AC_MSG_RESULT([ - Enable developer documentation ${enable_devdocs} - - weston-launch utility ${enable_weston_launch} -+ PAM support ${use_pam} - systemd-login support ${have_systemd_login} - systemd notify support ${enable_systemd_notify} - +diff --git a/libweston/meson.build b/libweston/meson.build +index d8d3fc0..326683f 100644 +--- a/libweston/meson.build ++++ b/libweston/meson.build +@@ -199,16 +199,24 @@ dep_vertex_clipping = declare_dependency( + ) + + if get_option('weston-launch') +- dep_pam = cc.find_library('pam') ++ deps_weston_launch = [systemd_dep, dep_libdrm] + +- if not cc.has_function('pam_open_session', dependencies: dep_pam) +- error('pam_open_session not found for weston-launch') ++ if get_option('pam') ++ dep_pam = cc.find_library('pam') ++ if not cc.has_function('pam_open_session', dependencies: dep_pam) ++ error('pam_open_session not found for weston-launch') ++ endif ++ ++ if dep_pam.found() ++ deps_weston_launch += dep_pam ++ config_h.set('HAVE_PAM', '1') ++ endif + endif + + executable( + 'weston-launch', + 'weston-launch.c', +- dependencies: [dep_pam, systemd_dep, dep_libdrm], ++ dependencies: deps_weston_launch, + include_directories: include_directories('..'), + install: true + ) diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 9064439..c6abe92 100644 +index 4962bd6..fc531c5 100644 --- a/libweston/weston-launch.c +++ b/libweston/weston-launch.c @@ -51,7 +51,9 @@ @@ -67,7 +69,7 @@ index 9064439..c6abe92 100644 #ifdef HAVE_SYSTEMD_LOGIN #include <systemd/sd-login.h> -@@ -101,8 +103,10 @@ drmSetMaster(int drm_fd) +@@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) #endif struct weston_launch { @@ -78,7 +80,7 @@ index 9064439..c6abe92 100644 int tty; int ttynr; int sock[2]; -@@ -191,6 +195,7 @@ weston_launch_allowed(struct weston_launch *wl) +@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) return false; } @@ -86,7 +88,7 @@ index 9064439..c6abe92 100644 static int pam_conversation_fn(int msg_count, const struct pam_message **messages, -@@ -231,6 +236,7 @@ setup_pam(struct weston_launch *wl) +@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) return 0; } @@ -94,7 +96,7 @@ index 9064439..c6abe92 100644 static int setup_launcher_socket(struct weston_launch *wl) -@@ -424,6 +430,7 @@ quit(struct weston_launch *wl, int status) +@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status) close(wl->signalfd); close(wl->sock[0]); @@ -102,7 +104,7 @@ index 9064439..c6abe92 100644 if (wl->new_user) { err = pam_close_session(wl->ph, 0); if (err) -@@ -431,6 +438,7 @@ quit(struct weston_launch *wl, int status) +@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status) err, pam_strerror(wl->ph, err)); pam_end(wl->ph, err); } @@ -110,7 +112,7 @@ index 9064439..c6abe92 100644 if (ioctl(wl->tty, KDSKBMUTE, 0) && ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) -@@ -610,6 +618,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -660,6 +668,7 @@ setup_session(struct weston_launch *wl, char **child_argv) setenv("HOME", wl->pw->pw_dir, 1); setenv("SHELL", wl->pw->pw_shell, 1); @@ -118,7 +120,7 @@ index 9064439..c6abe92 100644 env = pam_getenvlist(wl->ph); if (env) { for (i = 0; env[i]; ++i) { -@@ -618,6 +627,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -668,6 +677,7 @@ setup_session(struct weston_launch *wl, char **child_argv) } free(env); } @@ -126,7 +128,7 @@ index 9064439..c6abe92 100644 /* * We open a new session, so it makes sense -@@ -685,8 +695,10 @@ static void +@@ -739,8 +749,10 @@ static void help(const char *name) { fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); @@ -137,7 +139,7 @@ index 9064439..c6abe92 100644 fprintf(stderr, " -t, --tty Start session on alternative tty,\n" " e.g. -t /dev/tty4, requires -u option.\n"); fprintf(stderr, " -v, --verbose Be verbose\n"); -@@ -700,7 +712,9 @@ main(int argc, char *argv[]) +@@ -754,7 +766,9 @@ main(int argc, char *argv[]) int i, c; char *tty = NULL; struct option opts[] = { @@ -147,21 +149,24 @@ index 9064439..c6abe92 100644 { "tty", required_argument, NULL, 't' }, { "verbose", no_argument, NULL, 'v' }, { "help", no_argument, NULL, 'h' }, -@@ -712,9 +726,13 @@ main(int argc, char *argv[]) +@@ -766,11 +780,16 @@ main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { switch (c) { case 'u': +#ifdef HAVE_PAM wl.new_user = optarg; - if (getuid() != 0) - error(1, 0, "Permission denied. -u allowed for root only"); + if (getuid() != 0) { + fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); + exit(EXIT_FAILURE); + } +#else -+ error(1, 0, "-u is unsupported in this weston-launch build"); ++ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); ++ exit(EXIT_FAILURE); +#endif break; case 't': tty = optarg; -@@ -755,8 +773,10 @@ main(int argc, char *argv[]) +@@ -822,8 +841,10 @@ main(int argc, char *argv[]) if (setup_tty(&wl, tty) < 0) exit(EXIT_FAILURE); @@ -172,3 +177,24 @@ index 9064439..c6abe92 100644 if (setup_launcher_socket(&wl) < 0) exit(EXIT_FAILURE); +diff --git a/meson_options.txt b/meson_options.txt +index d5bf1d5..254eb2b 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -73,6 +73,13 @@ option( + ) + + option( ++ 'pam', ++ type: 'boolean', ++ value: true, ++ description: 'Define if PAM is available' ++) ++ ++option( + 'xwayland', + type: 'boolean', + value: true, +-- +2.7.4 + diff --git a/poky/meta/recipes-graphics/wayland/weston_6.0.0.bb b/poky/meta/recipes-graphics/wayland/weston_7.0.0.bb index fa08dac91..d21275414 100644 --- a/poky/meta/recipes-graphics/wayland/weston_6.0.0.bb +++ b/poky/meta/recipes-graphics/wayland/weston_7.0.0.bb @@ -8,16 +8,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ file://weston.png \ file://weston.desktop \ - file://0001-make-error-portable.patch \ file://xwayland.weston-start \ file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ " -SRC_URI[md5sum] = "7c634e262f8a464a076c97fd50ad36b3" -SRC_URI[sha256sum] = "546323a90607b3bd7f48809ea9d76e64cd09718102f2deca6d95aa59a882e612" +SRC_URI[md5sum] = "cbfda483bc2501d0831af3f33c707850" +SRC_URI[sha256sum] = "a00a6d207b6a45f95f4401c604772a307c3767e5e2beecf3d879110c43909a64" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" -inherit autotools pkgconfig useradd distro_features_check +inherit meson pkgconfig useradd distro_features_check # depends on virtual/egl REQUIRED_DISTRO_FEATURES = "opengl" @@ -26,49 +25,48 @@ DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" -EXTRA_OECONF = "--enable-setuid-install \ - --disable-rdp-compositor \ - --enable-autotools \ - " +EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" + PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ + ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ clients launch" # # Compositor choices # # Weston on KMS -PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa virtual/libgbm mtdev" +PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" # Weston on Wayland (nested Weston) -PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" # Weston on X11 -PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo" +PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" # Headless Weston -PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor" +PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" # Weston on framebuffer -PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev" +PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" # weston-launch -PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm" +PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" # VA-API desktop recorder -PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva" +PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,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" +PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" # Weston with lcms support -PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" +PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" # Weston with webp support -PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp" +PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" # Weston with systemd-login support -PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" +PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" # Weston with Xwayland support (requires X11 and Wayland) -PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" # colord CMS support -PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" +PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" # Clients support -PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" +PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" +# Virtual remote output with GStreamer on DRM backend +PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0" # Weston with PAM support -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" +PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" do_install_append() { # Weston doesn't need the .la files to load modules, so wipe them @@ -86,6 +84,10 @@ do_install_append() { if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then + chmod u+s ${D}${bindir}/weston-launch + fi } PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ @@ -102,7 +104,7 @@ FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" RDEPENDS_${PN} += "xkeyboard-config" -RRECOMMENDS_${PN} = "weston-conf liberation-fonts" +RRECOMMENDS_${PN} = "weston-init liberation-fonts" RRECOMMENDS_${PN}-dev += "wayland-protocols" USERADD_PACKAGES = "${PN}" |