diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2023-05-18 09:55:20 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-18 09:55:20 -0300 |
commit | 671eccefdc2ee9d35d259d037a28c23a4edf5e43 (patch) | |
tree | 903d93ad9c949a4aa17b77f610dd2ed5ce18b2eb /recipes-graphics/wayland | |
parent | cb365fdc9b2740508bac95e13a0f91d70fbbea45 (diff) | |
parent | 016e9bcbf71218a210c7173c33cdbff1ec3d8d2f (diff) | |
download | meta-freescale-671eccefdc2ee9d35d259d037a28c23a4edf5e43.tar.gz |
Merge pull request #1537 from thochstein/xwayland
weston upgrade, xwayland compatibility update
Diffstat (limited to 'recipes-graphics/wayland')
-rw-r--r-- | recipes-graphics/wayland/weston-10.0.3.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch | 40 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston-10.0.3.imx/0001-g2d-renderer.c-Include-sys-stat.h.patch (renamed from recipes-graphics/wayland/weston/0001-g2d-renderer.c-Include-sys-stat.h.patch) | 0 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch | 8 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston/0001-tests-Add-dependency-on-screenshooter-client-protoco.patch | 33 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch | 23 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston/xwayland.weston-start | 3 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston_10.0.3.imx.bb (renamed from recipes-graphics/wayland/weston_10.0.1.imx.bb) | 28 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston_11.0.1.imx.bb | 182 |
8 files changed, 240 insertions, 77 deletions
diff --git a/recipes-graphics/wayland/weston-10.0.3.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch b/recipes-graphics/wayland/weston-10.0.3.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch new file mode 100644 index 00000000..676d0338 --- /dev/null +++ b/recipes-graphics/wayland/weston-10.0.3.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 77eba6f6b04ff21b77c41500657495b4fd12a5f6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Max Krummenacher <max.krummenacher@toradex.com> | ||
3 | Date: Mon, 11 Jul 2022 19:38:19 +0000 | ||
4 | Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto | ||
5 | toolchain" | ||
6 | |||
7 | This reverts commit 7859a762617682bd804e210ad3bda6bdcd3ea24a. | ||
8 | |||
9 | With openembedded commit e525db4eb9 ("wayland: update 1.20.0 -> 1.21.0") | ||
10 | package config seems no longer to provide the path to the native | ||
11 | weston scanner. | ||
12 | |||
13 | Thus the build fails with: | ||
14 | |||
15 | | Run-time dependency wayland-scanner found: YES 1.21.0 | ||
16 | | Program /usr/bin/wayland-scanner found: NO | ||
17 | | | ||
18 | | ../git/protocol/meson.build:2:0: ERROR: Program '/usr/bin/wayland-scanner' not found or not executable | ||
19 | |||
20 | Dropping weston 9.0.0-imx commit 7859a762 (protocol: no found | ||
21 | wayland-scanner with Yocto toolchain") fixes the issue. | ||
22 | |||
23 | Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> | ||
24 | --- | ||
25 | protocol/meson.build | 2 +- | ||
26 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
27 | |||
28 | diff --git a/protocol/meson.build b/protocol/meson.build | ||
29 | index bdd322ac..e50b23bb 100644 | ||
30 | --- a/protocol/meson.build | ||
31 | +++ b/protocol/meson.build | ||
32 | @@ -1,4 +1,4 @@ | ||
33 | -dep_scanner = dependency('wayland-scanner', native: false) | ||
34 | +dep_scanner = dependency('wayland-scanner', native: true) | ||
35 | prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner')) | ||
36 | |||
37 | dep_wp = dependency('wayland-protocols', version: '>= 1.24') | ||
38 | -- | ||
39 | 2.17.1 | ||
40 | |||
diff --git a/recipes-graphics/wayland/weston/0001-g2d-renderer.c-Include-sys-stat.h.patch b/recipes-graphics/wayland/weston-10.0.3.imx/0001-g2d-renderer.c-Include-sys-stat.h.patch index b9cb31fb..b9cb31fb 100644 --- a/recipes-graphics/wayland/weston/0001-g2d-renderer.c-Include-sys-stat.h.patch +++ b/recipes-graphics/wayland/weston-10.0.3.imx/0001-g2d-renderer.c-Include-sys-stat.h.patch | |||
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 index 676d0338..39439ce1 100644 --- 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From 77eba6f6b04ff21b77c41500657495b4fd12a5f6 Mon Sep 17 00:00:00 2001 | 1 | From 3aa4024ac4107e68552be4dfe5fce511900629c9 Mon Sep 17 00:00:00 2001 |
2 | From: Max Krummenacher <max.krummenacher@toradex.com> | 2 | From: Max Krummenacher <max.krummenacher@toradex.com> |
3 | Date: Mon, 11 Jul 2022 19:38:19 +0000 | 3 | Date: Mon, 11 Jul 2022 19:38:19 +0000 |
4 | Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto | 4 | Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto |
@@ -26,7 +26,7 @@ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> | |||
26 | 1 file changed, 1 insertion(+), 1 deletion(-) | 26 | 1 file changed, 1 insertion(+), 1 deletion(-) |
27 | 27 | ||
28 | diff --git a/protocol/meson.build b/protocol/meson.build | 28 | diff --git a/protocol/meson.build b/protocol/meson.build |
29 | index bdd322ac..e50b23bb 100644 | 29 | index e8698530..ba52089b 100644 |
30 | --- a/protocol/meson.build | 30 | --- a/protocol/meson.build |
31 | +++ b/protocol/meson.build | 31 | +++ b/protocol/meson.build |
32 | @@ -1,4 +1,4 @@ | 32 | @@ -1,4 +1,4 @@ |
@@ -34,7 +34,7 @@ index bdd322ac..e50b23bb 100644 | |||
34 | +dep_scanner = dependency('wayland-scanner', native: true) | 34 | +dep_scanner = dependency('wayland-scanner', native: true) |
35 | prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner')) | 35 | prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner')) |
36 | 36 | ||
37 | dep_wp = dependency('wayland-protocols', version: '>= 1.24') | 37 | dep_wp = dependency('wayland-protocols', version: '>= 1.26', |
38 | -- | 38 | -- |
39 | 2.17.1 | 39 | 2.25.1 |
40 | 40 | ||
diff --git a/recipes-graphics/wayland/weston/0001-tests-Add-dependency-on-screenshooter-client-protoco.patch b/recipes-graphics/wayland/weston/0001-tests-Add-dependency-on-screenshooter-client-protoco.patch deleted file mode 100644 index 46538600..00000000 --- a/recipes-graphics/wayland/weston/0001-tests-Add-dependency-on-screenshooter-client-protoco.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 2ac6b6b084a877adde64db7faff2ed22eb3ea97a Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniel Stone <daniels@collabora.com> | ||
3 | Date: Tue, 8 Feb 2022 22:39:42 +0000 | ||
4 | Subject: [PATCH] tests: Add dependency on screenshooter client protocol | ||
5 | |||
6 | Given that the test-helper code relies on the screenshooter protocol, | ||
7 | make sure it's available for us to build, and the dependency ensures we | ||
8 | build in order. | ||
9 | |||
10 | Fixes: #588 | ||
11 | |||
12 | Signed-off-by: Daniel Stone <daniels@collabora.com> | ||
13 | --- | ||
14 | tests/meson.build | 3 ++- | ||
15 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/tests/meson.build b/tests/meson.build | ||
18 | index 2d464ddcc..222091cd1 100644 | ||
19 | --- a/tests/meson.build | ||
20 | +++ b/tests/meson.build | ||
21 | @@ -29,8 +29,9 @@ lib_test_client = static_library( | ||
22 | 'weston-test-client-helper.c', | ||
23 | 'weston-test-fixture-compositor.c', | ||
24 | weston_test_client_protocol_h, | ||
25 | - weston_screenshooter_protocol_c, | ||
26 | weston_test_protocol_c, | ||
27 | + weston_screenshooter_client_protocol_h, | ||
28 | + weston_screenshooter_protocol_c, | ||
29 | viewporter_client_protocol_h, | ||
30 | viewporter_protocol_c, | ||
31 | 'color_util.h', | ||
32 | |||
33 | |||
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 @@ | |||
1 | Fix atomic modesetting with musl | ||
2 | |||
3 | atomic modesetting seems to fail with drm weston backend and this patch fixes | ||
4 | it, below errors are seen before weston exits | ||
5 | |||
6 | atomic: couldn't commit new state: Invalid argument | ||
7 | |||
8 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | --- a/libweston/backend-drm/kms.c | ||
12 | +++ b/libweston/backend-drm/kms.c | ||
13 | @@ -1168,8 +1168,8 @@ drm_pending_state_apply_atomic(struct dr | ||
14 | wl_list_for_each(plane, &b->plane_list, link) { | ||
15 | drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n", | ||
16 | (unsigned long) plane->plane_id); | ||
17 | - plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); | ||
18 | - plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); | ||
19 | + //plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); | ||
20 | + //plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); | ||
21 | } | ||
22 | |||
23 | flags |= DRM_MODE_ATOMIC_ALLOW_MODESET; | ||
diff --git a/recipes-graphics/wayland/weston/xwayland.weston-start b/recipes-graphics/wayland/weston/xwayland.weston-start index db384b1a..342ac8d1 100644 --- a/recipes-graphics/wayland/weston/xwayland.weston-start +++ b/recipes-graphics/wayland/weston/xwayland.weston-start | |||
@@ -1,5 +1,6 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | if type Xwayland >/dev/null 2>/dev/null; then | 3 | if type Xwayland >/dev/null 2>/dev/null; then |
4 | mkdir -p /tmp/.X11-unix | 4 | mkdir -m 775 -p /tmp/.X11-unix |
5 | chown root:video /tmp/.X11-unix | ||
5 | fi | 6 | fi |
diff --git a/recipes-graphics/wayland/weston_10.0.1.imx.bb b/recipes-graphics/wayland/weston_10.0.3.imx.bb index 470a7b0b..f3e913fc 100644 --- a/recipes-graphics/wayland/weston_10.0.1.imx.bb +++ b/recipes-graphics/wayland/weston_10.0.3.imx.bb | |||
@@ -3,28 +3,27 @@ | |||
3 | # recipe. The second section customizes the recipe for i.MX. | 3 | # recipe. The second section customizes the recipe for i.MX. |
4 | 4 | ||
5 | ########### OE-core copy ################## | 5 | ########### OE-core copy ################## |
6 | # Upstream hash: 400aae43d08f0b9f787ac0d21cb3c97058d76748 | 6 | # Upstream hash: 4b42fd87da290ddea098605aea3a5cce1fb432a7 |
7 | 7 | ||
8 | SUMMARY = "Weston, a Wayland compositor" | 8 | SUMMARY = "Weston, a Wayland compositor" |
9 | DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" | 9 | DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" |
10 | HOMEPAGE = "http://wayland.freedesktop.org" | 10 | HOMEPAGE = "http://wayland.freedesktop.org" |
11 | LICENSE = "MIT" | 11 | LICENSE = "MIT" |
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ | 12 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70 \ |
13 | file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \ | 13 | file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \ |
14 | " | 14 | " |
15 | 15 | ||
16 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | 16 | SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \ |
17 | file://weston.png \ | 17 | file://weston.png \ |
18 | file://weston.desktop \ | 18 | file://weston.desktop \ |
19 | file://xwayland.weston-start \ | 19 | file://xwayland.weston-start \ |
20 | file://systemd-notify.weston-start \ | 20 | file://systemd-notify.weston-start \ |
21 | " | 21 | " |
22 | 22 | ||
23 | SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " | 23 | SRC_URI[sha256sum] = "89646ca0d9f8d413c2767e5c3828eaa3fa149c2a105b3729a6894fa7cf1549e7" |
24 | |||
25 | SRC_URI[sha256sum] = "5c23964112b90238bed39e5dd1e41cd71a79398813cdc3bbb15a9fdc94e547ae" | ||
26 | 24 | ||
27 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | 25 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" |
26 | UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" | ||
28 | 27 | ||
29 | inherit meson pkgconfig useradd | 28 | inherit meson pkgconfig useradd |
30 | 29 | ||
@@ -34,7 +33,6 @@ require ${THISDIR}/required-distro-features.inc | |||
34 | 33 | ||
35 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" | 34 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" |
36 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" | 35 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" |
37 | DEPENDS:append:imxfbdev = " libdrm" | ||
38 | 36 | ||
39 | LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" | 37 | LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" |
40 | 38 | ||
@@ -159,15 +157,12 @@ SUMMARY = "Weston, a Wayland compositor, i.MX fork" | |||
159 | 157 | ||
160 | DEFAULT_PREFERENCE = "-1" | 158 | DEFAULT_PREFERENCE = "-1" |
161 | 159 | ||
162 | SRC_URI:remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz" | 160 | SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz" |
163 | SRC_URI:prepend = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " | 161 | SRC_URI:prepend = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " |
164 | SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch \ | 162 | SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch \ |
165 | file://0001-g2d-renderer.c-Include-sys-stat.h.patch \ | 163 | file://0001-g2d-renderer.c-Include-sys-stat.h.patch" |
166 | file://0001-tests-Add-dependency-on-screenshooter-client-protoco.patch \ | 164 | SRCBRANCH = "weston-imx-10.0.3" |
167 | " | 165 | SRCREV = "c41675dc616886828219eba9b9ce22ec17533090" |
168 | SRCBRANCH = "weston-imx-10.0.1" | ||
169 | SRCREV = "3f8f336b5d2cf7ea7aa4e047d669d093fc46dfe6" | ||
170 | |||
171 | S = "${WORKDIR}/git" | 166 | S = "${WORKDIR}/git" |
172 | 167 | ||
173 | # Disable OpenGL for parts with GPU support for 2D but not 3D | 168 | # Disable OpenGL for parts with GPU support for 2D but not 3D |
@@ -178,7 +173,8 @@ PACKAGECONFIG_OPENGL = "opengl" | |||
178 | PACKAGECONFIG_OPENGL:imxgpu2d = "" | 173 | PACKAGECONFIG_OPENGL:imxgpu2d = "" |
179 | PACKAGECONFIG_OPENGL:imxgpu3d = "opengl" | 174 | PACKAGECONFIG_OPENGL:imxgpu3d = "opengl" |
180 | 175 | ||
181 | PACKAGECONFIG:remove = "wayland x11" | 176 | PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11" |
177 | PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}" | ||
182 | PACKAGECONFIG:append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" | 178 | PACKAGECONFIG:append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" |
183 | 179 | ||
184 | PACKAGECONFIG:remove:imxfbdev = "kms" | 180 | PACKAGECONFIG:remove:imxfbdev = "kms" |
@@ -197,7 +193,7 @@ PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d | |||
197 | # Weston with OpenGL support | 193 | # Weston with OpenGL support |
198 | PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" | 194 | PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" |
199 | 195 | ||
200 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" | 196 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev libdrm" |
201 | EXTRA_OEMESON:append:imxfbdev = " -Dbackend-default=fbdev" | 197 | EXTRA_OEMESON:append:imxfbdev = " -Dbackend-default=fbdev" |
202 | 198 | ||
203 | EXTRA_OEMESON += "-Ddeprecated-wl-shell=true" | 199 | EXTRA_OEMESON += "-Ddeprecated-wl-shell=true" |
diff --git a/recipes-graphics/wayland/weston_11.0.1.imx.bb b/recipes-graphics/wayland/weston_11.0.1.imx.bb new file mode 100644 index 00000000..a14f8d99 --- /dev/null +++ b/recipes-graphics/wayland/weston_11.0.1.imx.bb | |||
@@ -0,0 +1,182 @@ | |||
1 | # This recipe is for the i.MX fork of weston. For ease of | ||
2 | # maintenance, the top section is a verbatim copy of an OE-core | ||
3 | # recipe. The second section customizes the recipe for i.MX. | ||
4 | |||
5 | ########### OE-core copy ################## | ||
6 | # Upstream hash: eb00d50e5da97a726eb6290317a3ef7d8e1b90a3 | ||
7 | |||
8 | SUMMARY = "Weston, a Wayland compositor" | ||
9 | DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" | ||
10 | HOMEPAGE = "http://wayland.freedesktop.org" | ||
11 | LICENSE = "MIT" | ||
12 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70 \ | ||
13 | file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \ | ||
14 | " | ||
15 | |||
16 | SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \ | ||
17 | file://weston.png \ | ||
18 | file://weston.desktop \ | ||
19 | file://xwayland.weston-start \ | ||
20 | file://systemd-notify.weston-start \ | ||
21 | " | ||
22 | |||
23 | SRC_URI[sha256sum] = "a6138d4dc9554560ac304312df456019f4be025ec79130f05fb5f2e41c091e1d" | ||
24 | |||
25 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | ||
26 | UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" | ||
27 | |||
28 | inherit meson pkgconfig useradd | ||
29 | |||
30 | # depends on virtual/egl | ||
31 | # | ||
32 | require ${THISDIR}/required-distro-features.inc | ||
33 | |||
34 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" | ||
35 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" | ||
36 | |||
37 | LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" | ||
38 | |||
39 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" | ||
40 | |||
41 | EXTRA_OEMESON += "-Dpipewire=false" | ||
42 | |||
43 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ | ||
44 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ | ||
45 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ | ||
46 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ | ||
47 | ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \ | ||
48 | image-jpeg \ | ||
49 | screenshare \ | ||
50 | shell-desktop \ | ||
51 | shell-fullscreen \ | ||
52 | shell-ivi" | ||
53 | |||
54 | # Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all' | ||
55 | SIMPLECLIENTS ?= "all" | ||
56 | |||
57 | # | ||
58 | # Compositor choices | ||
59 | # | ||
60 | # Weston on KMS | ||
61 | PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" | ||
62 | # Weston on Wayland (nested Weston) | ||
63 | PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" | ||
64 | # Weston on X11 | ||
65 | PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" | ||
66 | # Headless Weston | ||
67 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" | ||
68 | # Weston on RDP | ||
69 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" | ||
70 | # VA-API desktop recorder | ||
71 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" | ||
72 | # Weston with EGL support | ||
73 | PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" | ||
74 | # Weston with lcms support | ||
75 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" | ||
76 | # Weston with webp support | ||
77 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" | ||
78 | # Weston with systemd-login support | ||
79 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" | ||
80 | # Weston with Xwayland support (requires X11 and Wayland) | ||
81 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" | ||
82 | # colord CMS support | ||
83 | PACKAGECONFIG[colord] = "-Ddeprecated-color-management-colord=true,-Ddeprecated-color-management-colord=false,colord" | ||
84 | # Clients support | ||
85 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | ||
86 | # Virtual remote output with GStreamer on DRM backend | ||
87 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" | ||
88 | # Weston with screen-share support | ||
89 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" | ||
90 | # Traditional desktop shell | ||
91 | PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" | ||
92 | # Fullscreen shell | ||
93 | PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" | ||
94 | # In-Vehicle Infotainment (IVI) shell | ||
95 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" | ||
96 | # JPEG image loading support | ||
97 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" | ||
98 | # support libseat based launch | ||
99 | PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" | ||
100 | |||
101 | do_install:append() { | ||
102 | # Weston doesn't need the .la files to load modules, so wipe them | ||
103 | rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la | ||
104 | |||
105 | # If X11, ship a desktop file to launch it | ||
106 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then | ||
107 | install -d ${D}${datadir}/applications | ||
108 | install ${WORKDIR}/weston.desktop ${D}${datadir}/applications | ||
109 | |||
110 | install -d ${D}${datadir}/icons/hicolor/48x48/apps | ||
111 | install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps | ||
112 | fi | ||
113 | |||
114 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then | ||
115 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland | ||
116 | fi | ||
117 | |||
118 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then | ||
119 | install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify | ||
120 | fi | ||
121 | |||
122 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then | ||
123 | chmod u+s ${D}${bindir}/weston-launch | ||
124 | fi | ||
125 | } | ||
126 | |||
127 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ | ||
128 | libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" | ||
129 | |||
130 | FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" | ||
131 | FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" | ||
132 | |||
133 | FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" | ||
134 | SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." | ||
135 | |||
136 | FILES:${PN}-examples = "${bindir}/*" | ||
137 | |||
138 | FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" | ||
139 | RDEPENDS:${PN}-xwayland += "xwayland" | ||
140 | |||
141 | RDEPENDS:${PN} += "xkeyboard-config" | ||
142 | RRECOMMENDS:${PN} = "weston-init liberation-fonts" | ||
143 | RRECOMMENDS:${PN}-dev += "wayland-protocols" | ||
144 | |||
145 | USERADD_PACKAGES = "${PN}" | ||
146 | GROUPADD_PARAM:${PN} = "--system weston-launch" | ||
147 | |||
148 | ########### End of OE-core copy ########### | ||
149 | |||
150 | ########### i.MX overrides ################ | ||
151 | |||
152 | SUMMARY = "Weston, a Wayland compositor, i.MX fork" | ||
153 | |||
154 | DEFAULT_PREFERENCE = "-1" | ||
155 | |||
156 | SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz" | ||
157 | SRC_URI:prepend = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " | ||
158 | SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch" | ||
159 | SRCBRANCH = "weston-imx-11.0.1" | ||
160 | SRCREV = "36ab06f0ad8e8981a482df6a08f39e1ae2a6a2dd" | ||
161 | S = "${WORKDIR}/git" | ||
162 | |||
163 | PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11" | ||
164 | PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}" | ||
165 | |||
166 | PACKAGECONFIG:append:imxgpu2d = " imxg2d" | ||
167 | PACKAGECONFIG:append:mx93-nxp-bsp = " imxg2d" | ||
168 | |||
169 | # Override | ||
170 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor xwayland" | ||
171 | |||
172 | # Weston with i.MX G2D renderer | ||
173 | PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" | ||
174 | |||
175 | # links with imx-gpu libs which are pre-built for glibc | ||
176 | # gcompat will address it during runtime | ||
177 | LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" | ||
178 | |||
179 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" | ||
180 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | ||
181 | |||
182 | ########### End of i.MX overrides ######### | ||