diff options
Diffstat (limited to 'recipes-graphics/wayland')
14 files changed, 473 insertions, 307 deletions
diff --git a/recipes-graphics/wayland/required-distro-features.inc b/recipes-graphics/wayland/required-distro-features.inc new file mode 100644 index 00000000..bb4a0e8e --- /dev/null +++ b/recipes-graphics/wayland/required-distro-features.inc @@ -0,0 +1,8 @@ +# distro features required by weston recipes + +inherit features_check + +# requires pam enabled if started via systemd +# +REQUIRED_DISTRO_FEATURES = "wayland opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" + diff --git a/recipes-graphics/wayland/wayland-protocols_1.20.imx.bb b/recipes-graphics/wayland/wayland-protocols_1.32.imx.bb index 0d1f4726..6b2a7091 100644 --- a/recipes-graphics/wayland/wayland-protocols_1.20.imx.bb +++ b/recipes-graphics/wayland/wayland-protocols_1.32.imx.bb @@ -6,17 +6,26 @@ protocol either in Wayland core, or some other protocol in \ wayland-protocols." HOMEPAGE = "http://wayland.freedesktop.org" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ +LIC_FILES_CHKSUM = "file://LICENSE;md5=c7b12b6702da38ca028ace54aae3d484 \ file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53" -SRC_URI = "git://source.codeaurora.org/external/imx/wayland-protocols-imx.git;protocol=https;branch=wayland-protocols-imx-1.20" -SRCREV = "9cacf108d0ee5863c7a656da5d2271bc2396e43d" +SRC_URI = "git://github.com/nxp-imx/wayland-protocols-imx.git;protocol=https;branch=wayland-protocols-imx-${@oe.utils.trim_version("${PV}", 2)}" +SRCREV = "7ece577d467f8afb2f5a2f7fff3761a1e0ee9dad" + S = "${WORKDIR}/git" -inherit autotools pkgconfig +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +# NOTE: For i.MX drop allarch since the recipe is SOCARCH +#inherit meson pkgconfig allarch +inherit meson pkgconfig + +EXTRA_OEMESON += "-Dtests=false" PACKAGES = "${PN}" FILES:${PN} += "${datadir}/pkgconfig/wayland-protocols.pc" +BBCLASSEXTEND = "native nativesdk" + PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" +COMPATIBLE_MACHINE = "(mx6-nxp-bsp|mx7-nxp-bsp|mx8-nxp-bsp|mx9-nxp-bsp)" diff --git a/recipes-graphics/wayland/weston-10.0.5.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch b/recipes-graphics/wayland/weston-10.0.5.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch new file mode 100644 index 00000000..59f2a4b6 --- /dev/null +++ b/recipes-graphics/wayland/weston-10.0.5.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch @@ -0,0 +1,41 @@ +From 77eba6f6b04ff21b77c41500657495b4fd12a5f6 Mon Sep 17 00:00:00 2001 +From: Max Krummenacher <max.krummenacher@toradex.com> +Date: Mon, 11 Jul 2022 19:38:19 +0000 +Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto + toolchain" + +This reverts commit 7859a762617682bd804e210ad3bda6bdcd3ea24a. + +With openembedded commit e525db4eb9 ("wayland: update 1.20.0 -> 1.21.0") +package config seems no longer to provide the path to the native +weston scanner. + +Thus the build fails with: + +| Run-time dependency wayland-scanner found: YES 1.21.0 +| Program /usr/bin/wayland-scanner found: NO +| +| ../git/protocol/meson.build:2:0: ERROR: Program '/usr/bin/wayland-scanner' not found or not executable + +Dropping weston 9.0.0-imx commit 7859a762 (protocol: no found +wayland-scanner with Yocto toolchain") fixes the issue. + +Upstream-Status: Inappropriate [Cross-compile Specific] +Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> +--- + protocol/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/protocol/meson.build b/protocol/meson.build +index bdd322ac..e50b23bb 100644 +--- a/protocol/meson.build ++++ b/protocol/meson.build +@@ -1,4 +1,4 @@ +-dep_scanner = dependency('wayland-scanner', native: false) ++dep_scanner = dependency('wayland-scanner', native: true) + prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner')) + + dep_wp = dependency('wayland-protocols', version: '>= 1.24') +-- +2.17.1 + diff --git a/recipes-graphics/wayland/weston-10.0.5.imx/0001-g2d-renderer.c-Include-sys-stat.h.patch b/recipes-graphics/wayland/weston-10.0.5.imx/0001-g2d-renderer.c-Include-sys-stat.h.patch new file mode 100644 index 00000000..b9cb31fb --- /dev/null +++ b/recipes-graphics/wayland/weston-10.0.5.imx/0001-g2d-renderer.c-Include-sys-stat.h.patch @@ -0,0 +1,34 @@ +From 4afe9b2f9ef24ce0c9bf1cd41f94ca45afa4f445 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 12 Sep 2022 20:58:14 -0700 +Subject: [PATCH] g2d-renderer.c: Include sys/stat.h + +This is needed for getting stat() prototype, its flagged with clang-15 +as error. + +| ../git/libweston/renderer-g2d/g2d-renderer.c:2057:6: error: call to undeclared function 'stat'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] +| if (stat(gr->drm_device, &dev_stat) != 0) { +| ^ +| 1 error generated. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libweston/renderer-g2d/g2d-renderer.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libweston/renderer-g2d/g2d-renderer.c b/libweston/renderer-g2d/g2d-renderer.c +index f59fc4ee..36a458fc 100644 +--- a/libweston/renderer-g2d/g2d-renderer.c ++++ b/libweston/renderer-g2d/g2d-renderer.c +@@ -41,6 +41,7 @@ + #include <drm_fourcc.h> + #include <poll.h> + #include <errno.h> ++#include <sys/stat.h> /* stat() */ + + #include <libweston/libweston.h> + #include "g2d-renderer.h" +-- +2.37.3 + diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 5710e9b5..9d04df23 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -6,46 +6,88 @@ IMX_REQUIRED_DISTRO_FEATURES_REMOVE:imxgpu2d = "opengl" IMX_REQUIRED_DISTRO_FEATURES_REMOVE:imxgpu3d = "" REQUIRED_DISTRO_FEATURES:remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}" -SRC_URI:append:mx6sl = " file://weston.config" - -# To customize weston.ini, start by setting the desired assignment in weston.ini, -# commented out. For example: -# #xwayland=true -# Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS. -INI_UNCOMMENT_ASSIGNMENTS:append:imx = " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland=true', '', d)} \ -" -INI_UNCOMMENT_ASSIGNMENTS:append:mx8 = " \ - repaint-window=16 \ -" -INI_UNCOMMENT_ASSIGNMENTS:append:mx8mq = " \ - gbm-format=argb8888 \ - \\[shell\\] \ - size=1920x1080 \ -" +SRC_URI:append:mx6sl-nxp-bsp = " file://weston.config" -# FIXME: The 8QM and 8QXP SoCs have better performance without G2D so don't enable it -# Ideally, this should be seamless and Vivante ought to handle it internally and take the fastest -# rendering code. -INI_UNCOMMENT_USE_G2D:imxgpu2d ?= "use-g2d=1" -INI_UNCOMMENT_USE_G2D:mx8qm = "" -INI_UNCOMMENT_USE_G2D:mx8qxp = "" -INI_UNCOMMENT_ASSIGNMENTS:append:imxgpu2d = " \ - ${INI_UNCOMMENT_USE_G2D} \ +PACKAGECONFIG ??= " \ + no-idle-timeout \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xwayland', '', d)} \ + ${PACKAGECONFIG_GBM_FORMAT} \ + ${PACKAGECONFIG_REPAINT_WINDOW} \ + ${PACKAGECONFIG_SIZE} \ + ${PACKAGECONFIG_USE_G2D} \ " -uncomment() { - if ! grep -q "^#$1" $2 && ! grep -q "^$1" $2; then - bbwarn "Commented setting '#$1' not found in file $2" - fi - sed -i -e 's,^#'"$1"','"$1"',g' $2 -} +# Mainline BSPs dont support xwayland +PACKAGECONFIG:remove:use-mainline-bsp = "xwayland" + +PACKAGECONFIG_GBM_FORMAT ?= "" +PACKAGECONFIG_GBM_FORMAT:mx8mq-nxp-bsp ?= "gbm-format" +PACKAGECONFIG_GBM_FORMAT:mx93-nxp-bsp ?= "gbm-format" + +GBM_FORMAT_VALUE:mx8mq-nxp-bsp = "argb8888" +GBM_FORMAT_VALUE:mx93-nxp-bsp = "argb8888" + +PACKAGECONFIG_REPAINT_WINDOW ?= "" +PACKAGECONFIG_REPAINT_WINDOW:mx8-nxp-bsp ?= "repaint-window" +PACKAGECONFIG_REPAINT_WINDOW:mx9-nxp-bsp ?= "repaint-window" + +PACKAGECONFIG_SIZE ?= "" +PACKAGECONFIG_SIZE:mx8mq-nxp-bsp ?= "size" + +SIZE_VALUE:mx8mq-nxp-bsp = "1920x1080" + +HAS_G2D = "false" +HAS_G2D:imxgpu2d = "true" + +PACKAGECONFIG_USE_G2D ?= "" +PACKAGECONFIG_USE_G2D:imxgpu2d ?= "use-g2d" +PACKAGECONFIG_USE_G2D:mx8qm-nxp-bsp ?= "" +PACKAGECONFIG_USE_G2D:mx8qxp-nxp-bsp ?= "" +PACKAGECONFIG_USE_G2D:mx8dx-nxp-bsp ?= "" +PACKAGECONFIG_USE_G2D:mx93-nxp-bsp ?= "use-g2d" + +USE_G2D_VALUE = "true" +USE_G2D_VALUE:mx6-nxp-bsp = "1" +USE_G2D_VALUE:mx7-nxp-bsp = "1" + +PACKAGECONFIG[gbm-format] = ",," +PACKAGECONFIG[rdp] = ",," +PACKAGECONFIG[repaint-window] = ",," +PACKAGECONFIG[size] = ",," +PACKAGECONFIG[use-g2d] = ",," +PACKAGECONFIG[xwayland] = ",," do_install:append() { if [ -f "${WORKDIR}/weston.config" ]; then install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston fi - for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do - uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini - done + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'gbm-format', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[core\]/a gbm-format=${GBM_FORMAT_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'rdp', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "s|^command=${bindir}/weston .*|& --rdp-tls-cert=${sysconfdir}/freerdp/keys/server.crt --rdp-tls-key=${sysconfdir}/freerdp/keys/server.key|" ${D}${sysconfdir}/xdg/weston/weston.ini + sed -i -e "/^\[core\]/a modules=screen-share.so" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'repaint-window', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[core\]/a repaint-window=16" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'size', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[shell\]/a size=${SIZE_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-g2d', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[core\]/a use-g2d=${USE_G2D_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini + elif ${HAS_G2D}; then + sed -i -e "/^\[core\]/a #use-g2d=${USE_G2D_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "no" ]; then + sed -i -e "s/^xwayland=true/#xwayland=true/g" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + sed -i -e 's,@bindir@,${bindir},g' ${D}${sysconfdir}/xdg/weston/weston.ini } diff --git a/recipes-graphics/wayland/weston-init/imx/weston.ini b/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini index 916e621a..19e6ad24 100644 --- a/recipes-graphics/wayland/weston-init/imx/weston.ini +++ b/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini @@ -1,13 +1,7 @@ [core] -#gbm-format=argb8888 -idle-time=0 -#use-g2d=1 -#xwayland=true -#repaint-window=16 #enable-overlay-view=1 -#[shell] -#size=1920x1080 +[shell] [libinput] touchscreen_calibrator=true @@ -28,3 +22,4 @@ touchscreen_calibrator=true [screen-share] command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize +#start-on-startup=true diff --git a/recipes-graphics/wayland/weston-init/mx6sl/weston.config b/recipes-graphics/wayland/weston-init/mx6sl-nxp-bsp/weston.config index 6456cd24..6456cd24 100755 --- a/recipes-graphics/wayland/weston-init/mx6sl/weston.config +++ b/recipes-graphics/wayland/weston-init/mx6sl-nxp-bsp/weston.config diff --git a/recipes-graphics/wayland/weston/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch b/recipes-graphics/wayland/weston/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch new file mode 100644 index 00000000..4d2a333a --- /dev/null +++ b/recipes-graphics/wayland/weston/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch @@ -0,0 +1,38 @@ +From 3aa4024ac4107e68552be4dfe5fce511900629c9 Mon Sep 17 00:00:00 2001 +From: Max Krummenacher <max.krummenacher@toradex.com> +Date: Mon, 11 Jul 2022 19:38:19 +0000 +Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto + toolchain" + +This reverts commit 7859a762617682bd804e210ad3bda6bdcd3ea24a. + +With openembedded commit e525db4eb9 ("wayland: update 1.20.0 -> 1.21.0") +package config seems no longer to provide the path to the native +weston scanner. + +Thus the build fails with: + +| Run-time dependency wayland-scanner found: YES 1.21.0 +| Program /usr/bin/wayland-scanner found: NO +| +| ../git/protocol/meson.build:2:0: ERROR: Program '/usr/bin/wayland-scanner' not found or not executable + +Dropping weston 9.0.0-imx commit 7859a762 (protocol: no found +wayland-scanner with Yocto toolchain") fixes the issue. + +Upstream-Status: Inappropriate [Cross-compile specific] +Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> +--- + protocol/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: git/protocol/meson.build +=================================================================== +--- git.orig/protocol/meson.build ++++ git/protocol/meson.build +@@ -1,4 +1,4 @@ +-dep_scanner = dependency('wayland-scanner', native: false) ++dep_scanner = dependency('wayland-scanner', native: true) + prog_scanner = find_program(dep_scanner.get_variable(pkgconfig: 'wayland_scanner')) + + dep_wp = dependency('wayland-protocols', version: '>= 1.31', diff --git a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch deleted file mode 100644 index 3279a728..00000000 --- a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ /dev/null @@ -1,199 +0,0 @@ -From a1548c742bf2dedbb47282d8a00407b60bbab669 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 - - 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: 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> - ---- - 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 <pwd.h> - #include <grp.h> -+#ifdef HAVE_PAM - #include <security/pam_appl.h> -+#endif - - #ifdef HAVE_SYSTEMD_LOGIN - #include <systemd/sd-login.h> -@@ -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/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch deleted file mode 100644 index a4444e5d..00000000 --- a/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch +++ /dev/null @@ -1,23 +0,0 @@ -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 <raj.khem@gmail.com> - ---- 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/recipes-graphics/wayland/weston/systemd-notify.weston-start b/recipes-graphics/wayland/weston/systemd-notify.weston-start new file mode 100644 index 00000000..a97e7b38 --- /dev/null +++ b/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/recipes-graphics/wayland/weston/xwayland.weston-start b/recipes-graphics/wayland/weston/xwayland.weston-start index b483c97c..342ac8d1 100644 --- a/recipes-graphics/wayland/weston/xwayland.weston-start +++ b/recipes-graphics/wayland/weston/xwayland.weston-start @@ -1,7 +1,6 @@ #!/bin/sh if type Xwayland >/dev/null 2>/dev/null; then - mkdir -p /tmp/.X11-unix - - add_weston_argument "--modules=xwayland.so" + mkdir -m 775 -p /tmp/.X11-unix + chown root:video /tmp/.X11-unix fi diff --git a/recipes-graphics/wayland/weston_9.0.0.imx.bb b/recipes-graphics/wayland/weston_10.0.5.imx.bb index 76296c8e..99624887 100644 --- a/recipes-graphics/wayland/weston_9.0.0.imx.bb +++ b/recipes-graphics/wayland/weston_10.0.5.imx.bb @@ -3,33 +3,33 @@ # recipe. The second section customizes the recipe for i.MX. ########### OE-core copy ################## -# Upstream hash: 0a882490fe75915c7a119f3498df6750be25f8e0 +# Upstream hash: 4b42fd87da290ddea098605aea3a5cce1fb432a7 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" + file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \ + " -SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ +SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \ file://weston.png \ file://weston.desktop \ file://xwayland.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://systemd-notify.weston-start \ + " -SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " - -SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" +SRC_URI[sha256sum] = "89646ca0d9f8d413c2767e5c3828eaa3fa149c2a105b3729a6894fa7cf1549e7" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" +UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" + +inherit meson pkgconfig useradd -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)}" +# +require ${THISDIR}/required-distro-features.inc DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" @@ -38,19 +38,22 @@ LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" -EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" +EXTRA_OEMESON += "-Dpipewire=false" -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ - launch \ + ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \ image-jpeg \ screenshare \ shell-desktop \ shell-fullscreen \ shell-ivi" +# Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all' +SIMPLECLIENTS ?= "all" + # # Compositor choices # @@ -63,9 +66,11 @@ PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libx # Headless Weston PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" # Weston on framebuffer -PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" +PACKAGECONFIG[fbdev] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-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" +PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm" # VA-API desktop recorder PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" # Weston with EGL support @@ -81,11 +86,9 @@ 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" +PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" # Virtual remote output with GStreamer on DRM backend -PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0" -# Weston with PAM support -PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" +PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" # Weston with screen-share support PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" # Traditional desktop shell @@ -96,6 +99,8 @@ PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=fa PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" # JPEG image loading support PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" +# support libseat based launch +PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" do_install:append() { # Weston doesn't need the .la files to load modules, so wipe them @@ -114,6 +119,10 @@ do_install:append() { 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 @@ -146,16 +155,17 @@ GROUPADD_PARAM:${PN} = "--system weston-launch" SUMMARY = "Weston, a Wayland compositor, i.MX fork" +LIC_FILES_CHKSUM:remove = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70" +LIC_FILES_CHKSUM:append = "file://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70" + DEFAULT_PREFERENCE = "-1" -SRCBRANCH = "weston-imx-9.0" -SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ - file://weston.png \ - file://weston.desktop \ - file://xwayland.weston-start \ - file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ -" -SRCREV = "230e9bc3d647e511e0601e3d45034f22495ed3c7" +SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz" +SRC_URI:prepend = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " +SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch \ + file://0001-g2d-renderer.c-Include-sys-stat.h.patch" +SRCBRANCH = "weston-imx-10.0.5" +SRCREV = "0cc822a1e5a8faea6835a4e9259887d8792b86b4" S = "${WORKDIR}/git" # Disable OpenGL for parts with GPU support for 2D but not 3D @@ -166,7 +176,8 @@ PACKAGECONFIG_OPENGL = "opengl" PACKAGECONFIG_OPENGL:imxgpu2d = "" PACKAGECONFIG_OPENGL:imxgpu3d = "opengl" -PACKAGECONFIG:remove = "wayland x11" +PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11" +PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}" PACKAGECONFIG:append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" PACKAGECONFIG:remove:imxfbdev = "kms" @@ -174,11 +185,10 @@ PACKAGECONFIG:append:imxfbdev = " fbdev clients" PACKAGECONFIG:append:imxgpu = " imxgpu" PACKAGECONFIG:append:imxgpu2d = " imxg2d" -# Clients support -SIMPLE_CLIENTS = "all" -SIMPLE_CLIENTS:imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" -PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor" -PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" +SIMPLECLIENTS:imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" + +# Override +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor xwayland" # Weston with i.MX GPU support PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" # Weston with i.MX G2D renderer @@ -186,6 +196,15 @@ PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d # Weston with OpenGL support PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" +PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev libdrm" +EXTRA_OEMESON:append:imxfbdev = " -Dbackend-default=fbdev" + +EXTRA_OEMESON += "-Ddeprecated-wl-shell=true" + +# links with imx-gpu libs which are pre-built for glibc +# gcompat will address it during runtime +LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" + PACKAGE_ARCH = "${MACHINE_SOCARCH}" COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" diff --git a/recipes-graphics/wayland/weston_12.0.3.imx.bb b/recipes-graphics/wayland/weston_12.0.3.imx.bb new file mode 100644 index 00000000..8114ddbb --- /dev/null +++ b/recipes-graphics/wayland/weston_12.0.3.imx.bb @@ -0,0 +1,194 @@ +# This recipe is for the i.MX fork of weston. For ease of +# maintenance, the top section is a verbatim copy of an OE-core +# recipe. The second section customizes the recipe for i.MX. + +########### OE-core copy ################## +# Upstream hash: 92a460b55e7290ec0006365219189761f7226f7c + +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=eb6d5297798cabe2ddc65e2af519bcf0 \ + " + +SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \ + file://weston.png \ + file://weston.desktop \ + file://xwayland.weston-start \ + file://systemd-notify.weston-start \ + " + +SRC_URI[sha256sum] = "eb686a7cf00992a23b17f192fca9a887313e92c346ee35d8575196983d656b4a" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" +UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" + +inherit meson pkgconfig useradd + +# depends on virtual/egl +# +require ${THISDIR}/required-distro-features.inc + +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 += "-Dpipewire=false" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ + ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ + launcher-libseat \ + image-jpeg \ + screenshare \ + shell-desktop \ + shell-fullscreen \ + shell-ivi \ + shell-kiosk \ + " + +# Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all' +SIMPLECLIENTS ?= "all" + +# +# 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 libxcursor" +# Headless Weston +PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" +# Weston on RDP +PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" +# 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 support +PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd dbus" +# Weston with Xwayland support (requires X11 and Wayland) +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland" +# colord CMS support +PACKAGECONFIG[colord] = "-Ddeprecated-color-management-colord=true,-Ddeprecated-color-management-colord=false,colord" +# Clients support +PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -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 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" +# Kiosk shell +PACKAGECONFIG[shell-kiosk] = "-Dshell-kiosk=true,-Dshell-kiosk=false" +# JPEG image loading support +PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" +# support libseat based launch +PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" +# deprecated and superseded by libseat launcher +PACKAGECONFIG[launcher-logind] = "-Ddeprecated-launcher-logind=true,-Ddeprecated-launcher-logind=false," +# screencasting via PipeWire +PACKAGECONFIG[pipewire] = "-Dbackend-pipewire=true,-Dbackend-pipewire=false,pipewire" +# VNC remote screensharing +PACKAGECONFIG[vnc] = "-Dbackend-vnc=true,-Dbackend-vnc=false,neatvnc" + + +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} = "${sysconfdir} ${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" + +########### End of OE-core copy ########### + +########### i.MX overrides ################ + +SUMMARY = "Weston, a Wayland compositor, i.MX fork" +LIC_FILES_CHKSUM:remove = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70" +LIC_FILES_CHKSUM += "file://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70" + +DEFAULT_PREFERENCE = "-1" + +SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz" +SRC_URI:prepend = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " +SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch" +SRCBRANCH = "weston-imx-12.0.3" +SRCREV = "b0d890915ee191ceb10e79ea9a830281f5c6258f" +S = "${WORKDIR}/git" + +PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11" +PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}" + +PACKAGECONFIG:append = " ${PACKAGECONFIG_G2D}" +PACKAGECONFIG_G2D ??= "" +PACKAGECONFIG_G2D:imxgpu2d ??= "imxg2d" +PACKAGECONFIG_G2D:mx93-nxp-bsp ??= "imxg2d" + +# Weston with i.MX G2D renderer +PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" + +# links with imx-gpu libs which are pre-built for glibc +# gcompat will address it during runtime +LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" + +########### End of i.MX overrides ######### |