From patchwork Tue Mar 29 05:37:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 5972 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1405C433F5 for ; Tue, 29 Mar 2022 05:37:15 +0000 (UTC) Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by mx.groups.io with SMTP id smtpd.web12.3292.1648532226315626656 for ; Mon, 28 Mar 2022 22:37:06 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: denix.org, ip: 64.68.198.64, mailfrom: denis@denix.org) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id 4D39F40C1E; Tue, 29 Mar 2022 05:37:05 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id njvUbomLGLGH; Tue, 29 Mar 2022 05:37:05 +0000 (UTC) Received: from mail.denix.org (pool-100-15-86-127.washdc.fios.verizon.net [100.15.86.127]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id 2859440952; Tue, 29 Mar 2022 05:37:04 +0000 (UTC) Received: from thorin.denix (thorin.denix [192.168.30.9]) by mail.denix.org (Postfix) with ESMTP id D922A1747C9; Tue, 29 Mar 2022 01:37:03 -0400 (EDT) From: Denys Dmytriyenko To: meta-arago@lists.yoctoproject.org Cc: Denys Dmytriyenko Subject: [master][PATCH] DONOTMERGE: weston: overlay version 9.0.0 locally Date: Tue, 29 Mar 2022 05:37:03 +0000 Message-Id: <20220329053703.2367559-1-denis@denix.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 29 Mar 2022 05:37:15 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/13759 From: Denys Dmytriyenko OE-Core has upgraded weston to 10.0.0, that requires some new Mesa/GBM APIs, which currently breaks with SGX and RGX DDK versions provided by meta-ti. Until DDKs are upgraded in meta-ti, overlay older weston 9.0.0 directly from OE-Core before the upgrade, in order to get graphics stack built. Signed-off-by: Denys Dmytriyenko --- ...d-drm-Re-order-gbm-destruction-at-DR.patch | 50 +++++ ...001-meson.build-fix-incorrect-header.patch | 32 +++ ...ntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch | 47 +++++ ...ovide-a-default-version-that-doesn-t.patch | 199 ++++++++++++++++++ .../weston/dont-use-plane-add-prop.patch | 23 ++ .../weston/systemd-notify.weston-start | 9 + .../wayland/weston/weston.desktop | 9 + .../wayland/weston/weston.png | Bin 0 -> 2383 bytes .../wayland/weston/xwayland.weston-start | 5 + .../recipes-graphics/wayland/weston_9.0.0.bb | 143 +++++++++++++ 10 files changed, 517 insertions(+) create mode 100644 meta-arago-extras/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch create mode 100644 meta-arago-extras/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch create mode 100644 meta-arago-extras/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch create mode 100644 meta-arago-extras/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch create mode 100644 meta-arago-extras/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch create mode 100644 meta-arago-extras/recipes-graphics/wayland/weston/systemd-notify.weston-start create mode 100644 meta-arago-extras/recipes-graphics/wayland/weston/weston.desktop create mode 100644 meta-arago-extras/recipes-graphics/wayland/weston/weston.png create mode 100644 meta-arago-extras/recipes-graphics/wayland/weston/xwayland.weston-start create mode 100644 meta-arago-extras/recipes-graphics/wayland/weston_9.0.0.bb diff --git a/meta-arago-extras/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch b/meta-arago-extras/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch new file mode 100644 index 00000000..f8f75894 --- /dev/null +++ b/meta-arago-extras/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch @@ -0,0 +1,50 @@ +From c8bfa1f8d576cdc6d515dbbac36c48c6166be0d5 Mon Sep 17 00:00:00 2001 +From: Marius Vlad +Date: Thu, 1 Apr 2021 00:12:00 +0300 +Subject: [PATCH] libweston/backend-drm: Re-order gbm destruction at DRM-backend tear down + +Tearing down the drm-backend when there are no input devices, would call +for the gbm device destruction before compositor shutdown. The latter +would call into the renderer detroy function and assume that the +EGLDisplay, which was created using the before-mentioned gbm device, is +still available. This patch re-orders the gbm destruction after the +compositor shutdown when no one would make use of it. + +Fixes: #314 + +Signed-off-by: Marius Vlad +Suggested-by: Daniel Stone + +Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/weston/-/commit/d171c7b3ba346c4d0bd6494f45ebf0be3c3cc5fb] +--- + libweston/backend-drm/drm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c +index 2780f3b..fbcfeca 100644 +--- a/libweston/backend-drm/drm.c ++++ b/libweston/backend-drm/drm.c +@@ -3025,10 +3025,6 @@ err_drm_source: + err_udev_input: + udev_input_destroy(&b->input); + err_sprite: +-#ifdef BUILD_DRM_GBM +- if (b->gbm) +- gbm_device_destroy(b->gbm); +-#endif + destroy_sprites(b); + err_udev_dev: + udev_device_unref(drm_device); +@@ -3038,6 +3034,10 @@ err_launcher: + weston_launcher_destroy(compositor->launcher); + err_compositor: + weston_compositor_shutdown(compositor); ++#ifdef BUILD_DRM_GBM ++ if (b->gbm) ++ gbm_device_destroy(b->gbm); ++#endif + free(b); + return NULL; + } +-- +2.33.0 diff --git a/meta-arago-extras/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch b/meta-arago-extras/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch new file mode 100644 index 00000000..06e0f7ba --- /dev/null +++ b/meta-arago-extras/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch @@ -0,0 +1,32 @@ +From a2ba4714a6872e547621d29d9ddcb0f374b88cf6 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Tue, 20 Apr 2021 20:42:18 -0700 +Subject: [PATCH] meson.build: fix incorrect header + +The wayland.c actually include 'xdg-shell-client-protocol.h' instead of +the server one, so fix it. Otherwise, it's possible to get build failure +due to race condition. + +Upstream-Status: Pending + +Signed-off-by: Chen Qi +--- + libweston/backend-wayland/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libweston/backend-wayland/meson.build b/libweston/backend-wayland/meson.build +index 7e82513..29270b5 100644 +--- a/libweston/backend-wayland/meson.build ++++ b/libweston/backend-wayland/meson.build +@@ -10,7 +10,7 @@ srcs_wlwl = [ + fullscreen_shell_unstable_v1_protocol_c, + presentation_time_protocol_c, + presentation_time_server_protocol_h, +- xdg_shell_server_protocol_h, ++ xdg_shell_client_protocol_h, + xdg_shell_protocol_c, + ] + +-- +2.30.2 + diff --git a/meta-arago-extras/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch b/meta-arago-extras/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch new file mode 100644 index 00000000..6fe86ff3 --- /dev/null +++ b/meta-arago-extras/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch @@ -0,0 +1,47 @@ +From 58760e09eed662a72da939ff4802d605489cff8e Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko +Date: Tue, 8 Sep 2020 19:37:42 -0400 +Subject: [PATCH] tests: include fcntl.h for open(), O_RDWR, O_CLOEXEC and + O_CREAT + +musl libc (unlike glibc) requires explicitly incuding fcntl.h to define open(), +O_RDWR, O_CLOEXEC and O_CREAT. Otherwise the build fails with the errors: + +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c: In function 'wait_for_lock': +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:7: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~ +| | popen +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: error: 'O_RDWR' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~ +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: note: each undeclared identifier is reported only once for each function it appears in +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:32: error: 'O_CLOEXEC' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~~~~ +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:44: error: 'O_CREAT' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~~ + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/493/diffs?commit_id=b10c0e843dcb8148bbe869bb15261955b94ac98c] + +Signed-off-by: Denys Dmytriyenko +--- + tests/weston-test-fixture-compositor.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/weston-test-fixture-compositor.c b/tests/weston-test-fixture-compositor.c +index 0c9855f..e0e32c9 100644 +--- a/tests/weston-test-fixture-compositor.c ++++ b/tests/weston-test-fixture-compositor.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include "shared/helpers.h" + #include "weston-test-fixture-compositor.h" +-- +2.7.4 + diff --git a/meta-arago-extras/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta-arago-extras/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch new file mode 100644 index 00000000..f6ebfd8f --- /dev/null +++ b/meta-arago-extras/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -0,0 +1,199 @@ +From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001 +From: Tom Hochstein +Date: Wed, 22 Feb 2017 15:53:30 +0200 +Subject: [PATCH] weston-launch: Provide a default version that doesn't require + + PAM + +weston-launch requires PAM for starting weston as a non-root user. + +Since starting weston as root is a valid use case by itself, if +PAM is not available, provide a default version of weston-launch +without non-root-user support. + +Upstream-Status: Denied [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/725] + +Signed-off-by: Tom Hochstein +Signed-off-by: Jussi Kukkonen +Signed-off-by: Denys Dmytriyenko +Signed-off-by: Ming Liu + +--- + libweston/meson.build | 16 ++++++++++++---- + libweston/weston-launch.c | 21 +++++++++++++++++++++ + meson_options.txt | 7 +++++++ + 3 files changed, 40 insertions(+), 4 deletions(-) + +diff --git a/libweston/meson.build b/libweston/meson.build +index 08d23ec..cb9fd3f 100644 +--- a/libweston/meson.build ++++ b/libweston/meson.build +@@ -216,16 +216,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: common_inc, + install: true + ) +diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c +index 521cb2c..2d42d33 100644 +--- a/libweston/weston-launch.c ++++ b/libweston/weston-launch.c +@@ -51,7 +51,9 @@ + + #include + #include ++#ifdef HAVE_PAM + #include ++#endif + + #ifdef HAVE_SYSTEMD_LOGIN + #include +@@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) + #endif + + struct weston_launch { ++#ifdef HAVE_PAM + struct pam_conv pc; + pam_handle_t *ph; ++#endif + int tty; + int ttynr; + int sock[2]; +@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) + return false; + } + ++#ifdef HAVE_PAM + static int + pam_conversation_fn(int msg_count, + const struct pam_message **messages, +@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) + + return 0; + } ++#endif + + static int + setup_launcher_socket(struct weston_launch *wl) +@@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status) + close(wl->signalfd); + close(wl->sock[0]); + ++#ifdef HAVE_PAM + if (wl->new_user) { + err = pam_close_session(wl->ph, 0); + if (err) +@@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status) + err, pam_strerror(wl->ph, err)); + pam_end(wl->ph, err); + } ++#endif + + /* + * Get a fresh handle to the tty as the previous one is in +@@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv) + setenv("HOME", wl->pw->pw_dir, 1); + setenv("SHELL", wl->pw->pw_shell, 1); + ++#ifdef HAVE_PAM + env = pam_getenvlist(wl->ph); + if (env) { + for (i = 0; env[i]; ++i) { +@@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv) + } + free(env); + } ++#endif + + /* + * We open a new session, so it makes sense +@@ -789,8 +799,10 @@ static void + help(const char *name) + { + fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); ++#ifdef HAVE_PAM + fprintf(stderr, " -u, --user Start session as specified username,\n" + " e.g. -u joe, requires root.\n"); ++#endif + 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"); +@@ -804,7 +816,9 @@ main(int argc, char *argv[]) + int i, c; + char *tty = NULL; + struct option opts[] = { ++#ifdef HAVE_PAM + { "user", required_argument, NULL, 'u' }, ++#endif + { "tty", required_argument, NULL, 't' }, + { "verbose", no_argument, NULL, 'v' }, + { "help", no_argument, NULL, 'h' }, +@@ -816,11 +830,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) { + fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); + exit(EXIT_FAILURE); + } ++#else ++ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); ++ exit(EXIT_FAILURE); ++#endif + break; + case 't': + tty = optarg; +@@ -872,8 +891,10 @@ main(int argc, char *argv[]) + if (setup_tty(&wl, tty) < 0) + exit(EXIT_FAILURE); + ++#ifdef HAVE_PAM + if (wl.new_user && setup_pam(&wl) < 0) + exit(EXIT_FAILURE); ++#endif + + if (setup_launcher_socket(&wl) < 0) + exit(EXIT_FAILURE); +diff --git a/meson_options.txt b/meson_options.txt +index 239bd2d..99e4ec3 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, diff --git a/meta-arago-extras/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/meta-arago-extras/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch new file mode 100644 index 00000000..a4444e5d --- /dev/null +++ b/meta-arago-extras/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch @@ -0,0 +1,23 @@ +Fix atomic modesetting with musl + +atomic modesetting seems to fail with drm weston backend and this patch fixes +it, below errors are seen before weston exits + +atomic: couldn't commit new state: Invalid argument + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158] +Signed-off-by: Khem Raj + +--- a/libweston/backend-drm/kms.c ++++ b/libweston/backend-drm/kms.c +@@ -1168,8 +1168,8 @@ drm_pending_state_apply_atomic(struct dr + wl_list_for_each(plane, &b->plane_list, link) { + drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n", + (unsigned long) plane->plane_id); +- plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); +- plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); ++ //plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); ++ //plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); + } + + flags |= DRM_MODE_ATOMIC_ALLOW_MODESET; diff --git a/meta-arago-extras/recipes-graphics/wayland/weston/systemd-notify.weston-start b/meta-arago-extras/recipes-graphics/wayland/weston/systemd-notify.weston-start new file mode 100644 index 00000000..a97e7b38 --- /dev/null +++ b/meta-arago-extras/recipes-graphics/wayland/weston/systemd-notify.weston-start @@ -0,0 +1,9 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: Huawei Inc. +# SPDX-License-Identifier: Apache-2.0 + + +if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then + add_weston_module "systemd-notify.so" +fi diff --git a/meta-arago-extras/recipes-graphics/wayland/weston/weston.desktop b/meta-arago-extras/recipes-graphics/wayland/weston/weston.desktop new file mode 100644 index 00000000..1086ae8b --- /dev/null +++ b/meta-arago-extras/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-arago-extras/recipes-graphics/wayland/weston/weston.png b/meta-arago-extras/recipes-graphics/wayland/weston/weston.png new file mode 100644 index 0000000000000000000000000000000000000000..ea8b7e0e233c86301a88e5bc925f09b3de2f9dec GIT binary patch literal 2383 zcmV-V39$BwP)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^000SaNLh0L00vqB00vqCV0pn~000Od zNklxQqBu<>r2)6lHU)*YGzD6ustAQm;suEZ zhy*;Kma`z8lfl}Zs zt(P8+CIeqHN%sZD!;$E}D=->`wJ4A{*-ZKJL!lV-N%25gfT6XP%v!n#FS3o9;k$el zEw@6~y|s39h@#XAXucVg0ZW%aSL#DjK(fo5S{d|YSh)e1F0G!WRlt)hzVZG*NdkI5 z15N8gicM(04cdm>n3{&%QE--6R?H@77?5XY$sl)Z6)5!lt3D_jSY$*2q=0V$cTzkZ zbwTT`kn9Y_lnM4C*!e(lq7zo`f|f1r49k!^0hMem6S^$f=)Y@ltl+)tUPyMy^Xv%B zzBojZFQY3;9}=c~E`YBhg%g%8L=7qvdLD*Eb8QCtFK&aj!6{1pY8wJ09mH6&4LU#O z_OoDSKRA{Gz61;c7@=ijJ8*}u-Bp=3hxMW$`r+! zjnKSFK9{dT?sc#8YTywsra*%IA;JM~=b|oWlBP{-2sUX7u0202?EA<0ylV|`hAvyK#*9d29WHCbRpF%B?F|=_k9k`2FX+- zCF~dt0@7@Tj-b*|7=y|}*un{?r4zhnEMz(sO*4BP=#OKx0xL%eajTmqLu-m;X*{V{|`$$li(87AM z6WVTzx~?!5cgS09$n@!suwgVxWsa*sO&fyQc6}TY?eaXc4=(&vo;&V_)@?!Q&_LUV z#EqWhPe5fpj;T%$RN%ViO|pj7TTh$TLHb5W_dwTu(q=Eh#51sPRBBJM6Z$?2h8c`& z{h$QAC&kmXiR1==;m#u{x0MAbjJq?mYlkFzgo*A?2K6TU56F%}aa^`60NoD=s~RxV z(0of&Pu;y2mbdE+{8Ty@d@f(99ij|a`>6Zu2Ke-TsN|t|O2G9zEE(9n6Bgfs^bL?1 z40KeokbkQlsGP^t`Pk2;v+=8bs!x6%vkR}eZd`(^e{`1=1uMS@P49!2ZQ^p@?7ty* zyxvX5gjc6dBAfX{n=3QPG?l-=AhaZRdEmXr-oO9eMlQMOZEP+W-9_@-A9 zP5@V6djYZ)|`OK z9lZv%3aLU)+{c%JF+=U}8}dOBK{D{W zNWcX$b5JrYEOxPeW@^NEcx`ivaBdIePgVzb3HT9mC`RoFfeNwp3h)?Sl~+jMp80-s zLuO5j>*7QqZV!K-ABE|C)qrf^7f9In7$Qtnx$!$bFf>d)2jjbgLYX@v?A5#MwdSGV zUQgILnE085LLe33IpBLhA!NJ8eIBq1@HDU+_ehPl1laKh;p`IM;*?=-ME);6 zEA9*?kOzJOd=r=p1M-ND759{*kWevaII={P{KphDM+LD?Pgu2mQSKH>guL3XT(c-1&a zK^y}P0DFNqfJ!|u%Yjlr7cd9d{uSdP-&}^)&6_Bm*?_&c205a&x)WIht^lWzg?`-C zqn88oZkY0~$Z9TQrB4E|smyC$?(h~gMd+&X-GW#aR1B~%z*x0&tFCOWlNI>MZcDkiHCXvpcpM70000bbVXQnWMOn=I&E)cX=Zr/dev/null 2>/dev/null; then + mkdir -p /tmp/.X11-unix +fi diff --git a/meta-arago-extras/recipes-graphics/wayland/weston_9.0.0.bb b/meta-arago-extras/recipes-graphics/wayland/weston_9.0.0.bb new file mode 100644 index 00000000..59ab217a --- /dev/null +++ b/meta-arago-extras/recipes-graphics/wayland/weston_9.0.0.bb @@ -0,0 +1,143 @@ +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://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" + +SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://weston.png \ + file://weston.desktop \ + file://xwayland.weston-start \ + file://systemd-notify.weston-start \ + file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ + file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ + file://0001-meson.build-fix-incorrect-header.patch \ + file://0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch \ +" + +SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " + +SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit meson pkgconfig useradd features_check +# depends on virtual/egl +# weston-init requires pam enabled if started via systemd +REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" + +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" +DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" + +LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" + +WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" + +EXTRA_OEMESON += "-Dbackend-default=auto -Dpipewire=false" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', 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)} \ + launch \ + image-jpeg \ + screenshare \ + shell-desktop \ + shell-fullscreen \ + shell-ivi" + +# +# Compositor choices +# +# Weston on KMS +PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" +# Weston on Wayland (nested Weston) +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" +# Weston on X11 +PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" +# Headless Weston +PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" +# Weston on framebuffer +PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" +# Weston on RDP +PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" +# weston-launch +PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" +# VA-API desktop recorder +PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" +# Weston with EGL support +PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" +# Weston with lcms support +PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" +# Weston with webp support +PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" +# Weston with systemd-login support +PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" +# Weston with Xwayland support (requires X11 and Wayland) +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" +# colord CMS support +PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" +# Clients support +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,gstreamer1.0 gstreamer1.0-plugins-base" +# Weston with PAM support +PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" +# Weston with screen-share support +PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" +# Traditional desktop shell +PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" +# Fullscreen shell +PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" +# In-Vehicle Infotainment (IVI) shell +PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" +# JPEG image loading support +PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" + +do_install:append() { + # Weston doesn't need the .la files to load modules, so wipe them + rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la + + # If X11, ship a desktop file to launch it + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; 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 + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify + 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)} \ + libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" + +FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" +FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" + +FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" +SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." + +FILES:${PN}-examples = "${bindir}/*" + +FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" +RDEPENDS:${PN}-xwayland += "xwayland" + +RDEPENDS:${PN} += "xkeyboard-config" +RRECOMMENDS:${PN} = "weston-init liberation-fonts" +RRECOMMENDS:${PN}-dev += "wayland-protocols" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "--system weston-launch"