diff options
Diffstat (limited to 'meta/recipes-graphics/wayland')
24 files changed, 305 insertions, 497 deletions
diff --git a/meta/recipes-graphics/wayland/libinput/determinism.patch b/meta/recipes-graphics/wayland/libinput/determinism.patch deleted file mode 100644 index cb554030cf..0000000000 --- a/meta/recipes-graphics/wayland/libinput/determinism.patch +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | This finds our outer git tree and that version information breaks | ||
2 | determinism of this recipe. Disable it. | ||
3 | |||
4 | RP 2020/2/6 | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
8 | |||
9 | Index: libinput-1.14.3/meson.build | ||
10 | =================================================================== | ||
11 | --- libinput-1.14.3.orig/meson.build | ||
12 | +++ libinput-1.14.3/meson.build | ||
13 | @@ -387,7 +387,7 @@ pkgconfig.generate( | ||
14 | libraries : lib_libinput | ||
15 | ) | ||
16 | |||
17 | -git_version_h = vcs_tag(command : ['git', 'describe'], | ||
18 | +git_version_h = vcs_tag(command : ['false'], | ||
19 | fallback : 'unknown', | ||
20 | input : 'src/libinput-git-version.h.in', | ||
21 | output :'libinput-git-version.h') | ||
diff --git a/meta/recipes-graphics/wayland/libinput/run-ptest b/meta/recipes-graphics/wayland/libinput/run-ptest index 5a84c568b9..d11e6eb25b 100644 --- a/meta/recipes-graphics/wayland/libinput/run-ptest +++ b/meta/recipes-graphics/wayland/libinput/run-ptest | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | /usr/libexec/libinput/libinput-test-suite | 3 | /usr/libexec/libinput/libinput-test-suite -j1 |
4 | if [ $? -eq 0 ]; then | 4 | if [ $? -eq 0 ]; then |
5 | echo 'PASS: libinput-test-suite' | 5 | echo 'PASS: libinput-test-suite' |
6 | else | 6 | else |
diff --git a/meta/recipes-graphics/wayland/libinput_1.16.4.bb b/meta/recipes-graphics/wayland/libinput_1.25.0.bb index 17b73e3827..517b247fed 100644 --- a/meta/recipes-graphics/wayland/libinput_1.16.4.bb +++ b/meta/recipes-graphics/wayland/libinput_1.25.0.bb | |||
@@ -8,42 +8,42 @@ HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/" | |||
8 | SECTION = "libs" | 8 | SECTION = "libs" |
9 | 9 | ||
10 | LICENSE = "MIT" | 10 | LICENSE = "MIT" |
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=1f2ea9ebff3a2c6d458faf58492efb63" | 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=bab4ac7dc1c10bc0fb037dc76c46ef8a" |
12 | 12 | ||
13 | DEPENDS = "libevdev udev mtdev libcheck" | 13 | DEPENDS = "libevdev udev mtdev" |
14 | 14 | ||
15 | SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \ | 15 | SRC_URI = "git://gitlab.freedesktop.org/libinput/libinput.git;protocol=https;branch=main \ |
16 | file://run-ptest \ | 16 | file://run-ptest \ |
17 | file://determinism.patch \ | ||
18 | " | 17 | " |
19 | SRC_URI[sha256sum] = "65923a06d5a8970e4a999c4668797b9b689614b62b1d44432ab1c87b65e39e29" | 18 | SRCREV = "3fd38d89276b679ac3565efd7c2150fd047902cb" |
19 | S = "${WORKDIR}/git" | ||
20 | 20 | ||
21 | UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" | 21 | UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" |
22 | 22 | ||
23 | inherit meson pkgconfig lib_package ptest | 23 | inherit meson pkgconfig lib_package ptest |
24 | 24 | ||
25 | # Patch out build directory, otherwise it leaks into ptest binary | 25 | # Patch out build directory, otherwise it leaks into ptest binary |
26 | do_configure_append() { | 26 | do_configure:append() { |
27 | sed -i -e "s,${WORKDIR},,g" config.h | 27 | sed -i -e "s,${WORKDIR},,g" config.h |
28 | if [ -e "litest-config.h" ]; then | 28 | if [ -e "litest-config.h" ]; then |
29 | sed -i -e "s,${WORKDIR},,g" litest-config.h | 29 | sed -i -e "s,${WORKDIR},,g" litest-config.h |
30 | fi | 30 | fi |
31 | } | 31 | } |
32 | 32 | ||
33 | PACKAGECONFIG ??= "" | 33 | PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" |
34 | PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom" | 34 | PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom" |
35 | PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3" | 35 | PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3" |
36 | PACKAGECONFIG[tests] = "-Dtests=true -Dinstall-tests=true,-Dtests=false -Dinstall-tests=false,libcheck" | ||
36 | 37 | ||
37 | UDEVDIR = "`pkg-config --variable=udevdir udev`" | 38 | UDEVDIR = "`pkg-config --variable=udevdir udev`" |
38 | 39 | ||
39 | EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \ | 40 | EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \ |
40 | -Ddocumentation=false \ | 41 | -Ddocumentation=false \ |
41 | ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dtests=true -Dinstall-tests=true', '-Dtests=false -Dinstall-tests=false', d)} \ | ||
42 | -Dzshcompletiondir=no" | 42 | -Dzshcompletiondir=no" |
43 | 43 | ||
44 | # package name changed in 1.8.1 upgrade: make sure package upgrades work | 44 | # package name changed in 1.8.1 upgrade: make sure package upgrades work |
45 | RPROVIDES_${PN} = "libinput" | 45 | RPROVIDES:${PN} = "libinput" |
46 | RREPLACES_${PN} = "libinput" | 46 | RREPLACES:${PN} = "libinput" |
47 | RCONFLICTS_${PN} = "libinput" | 47 | RCONFLICTS:${PN} = "libinput" |
48 | 48 | ||
49 | FILES_${PN}-ptest += "${libexecdir}/libinput/libinput-test-suite" | 49 | FILES:${PN}-ptest += "${libexecdir}/libinput/libinput-test-suite" |
diff --git a/meta/recipes-graphics/wayland/mtdev_1.1.6.bb b/meta/recipes-graphics/wayland/mtdev_1.1.7.bb index 7c1cb5e4ec..24803c4238 100644 --- a/meta/recipes-graphics/wayland/mtdev_1.1.6.bb +++ b/meta/recipes-graphics/wayland/mtdev_1.1.7.bb | |||
@@ -12,7 +12,6 @@ LICENSE = "MIT" | |||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea6bd0268bb0fcd6b27698616ceee5d6" | 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea6bd0268bb0fcd6b27698616ceee5d6" |
13 | 13 | ||
14 | SRC_URI = "http://bitmath.org/code/${BPN}/${BP}.tar.bz2" | 14 | SRC_URI = "http://bitmath.org/code/${BPN}/${BP}.tar.bz2" |
15 | SRC_URI[md5sum] = "bf8ef2482e84a00b5db8fbd3ce00e249" | 15 | SRC_URI[sha256sum] = "a107adad2101fecac54ac7f9f0e0a0dd155d954193da55c2340c97f2ff1d814e" |
16 | SRC_URI[sha256sum] = "15d7b28da8ac71d8bc8c9287c2045fd174267bc740bec10cfda332dc1204e0e0" | ||
17 | 16 | ||
18 | inherit autotools pkgconfig | 17 | inherit autotools pkgconfig |
diff --git a/meta/recipes-graphics/wayland/required-distro-features.inc b/meta/recipes-graphics/wayland/required-distro-features.inc new file mode 100644 index 0000000000..bb4a0e8ebd --- /dev/null +++ b/meta/recipes-graphics/wayland/required-distro-features.inc | |||
@@ -0,0 +1,8 @@ | |||
1 | # distro features required by weston recipes | ||
2 | |||
3 | inherit features_check | ||
4 | |||
5 | # requires pam enabled if started via systemd | ||
6 | # | ||
7 | REQUIRED_DISTRO_FEATURES = "wayland opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" | ||
8 | |||
diff --git a/meta/recipes-graphics/wayland/wayland-protocols_1.20.bb b/meta/recipes-graphics/wayland/wayland-protocols_1.35.bb index 3fb78f658c..7e70de346c 100644 --- a/meta/recipes-graphics/wayland/wayland-protocols_1.20.bb +++ b/meta/recipes-graphics/wayland/wayland-protocols_1.35.bb | |||
@@ -9,14 +9,17 @@ LICENSE = "MIT" | |||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ |
10 | file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53" | 10 | file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53" |
11 | 11 | ||
12 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | 12 | SRC_URI = "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/${PV}/downloads/wayland-protocols-${PV}.tar.xz" |
13 | " | 13 | SRC_URI[sha256sum] = "37a2716a28133dc819341c568a29d21e8cb72130e5c126a1fcfc9f42c23d95ab" |
14 | SRC_URI[md5sum] = "b0836533a3f2dc6585b1dae00341157f" | ||
15 | SRC_URI[sha256sum] = "9782b7a1a863d82d7c92478497d13c758f52e7da4f197aa16443f73de77e4de7" | ||
16 | 14 | ||
17 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | 15 | UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/tags" |
18 | 16 | ||
19 | inherit allarch autotools pkgconfig | 17 | inherit meson pkgconfig allarch |
18 | |||
19 | EXTRA_OEMESON += "-Dtests=false" | ||
20 | 20 | ||
21 | PACKAGES = "${PN}" | 21 | PACKAGES = "${PN}" |
22 | FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc" | 22 | FILES:${PN} += "${datadir}/pkgconfig/wayland-protocols.pc" |
23 | |||
24 | BBCLASSEXTEND = "native nativesdk" | ||
25 | |||
diff --git a/meta/recipes-graphics/wayland/wayland-utils_1.0.0.bb b/meta/recipes-graphics/wayland/wayland-utils_1.2.0.bb index 4c51f7e8c5..878c7a267e 100644 --- a/meta/recipes-graphics/wayland/wayland-utils_1.0.0.bb +++ b/meta/recipes-graphics/wayland/wayland-utils_1.2.0.bb | |||
@@ -9,12 +9,14 @@ LICENSE = "MIT" | |||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=548a66038a77415e1df51118625e832f \ | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=548a66038a77415e1df51118625e832f \ |
10 | " | 10 | " |
11 | 11 | ||
12 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | 12 | SRC_URI = "https://gitlab.freedesktop.org/wayland/wayland-utils/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz" |
13 | " | 13 | SRC_URI[sha256sum] = "d9278c22554586881802540751bcc42569262bf80cd9ac9b0fd12ff4bd09a9e4" |
14 | SRC_URI[sha256sum] = "64fecc4c58e87ae9b302901abe10c2e8af69c7503c221a96ecd0700e0aa268c0" | ||
15 | 14 | ||
16 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | 15 | UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/wayland/wayland-utils/-/tags" |
17 | 16 | ||
18 | inherit meson pkgconfig | 17 | inherit meson pkgconfig |
19 | 18 | ||
20 | DEPENDS += "wayland wayland-native wayland-protocols" | 19 | DEPENDS += "wayland wayland-native wayland-protocols" |
20 | |||
21 | PACKAGECONFIG ??= "drm" | ||
22 | PACKAGECONFIG[drm] = "-Ddrm=enabled,-Ddrm=disabled,libdrm" | ||
diff --git a/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch b/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch index ad1063b2c3..bc753de113 100644 --- a/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch +++ b/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 6a6223a8e217664a348835e92d5a602f50e18b2c Mon Sep 17 00:00:00 2001 | 1 | From b4c64b6f07743e3fb63ce52359bc664ab7d60df0 Mon Sep 17 00:00:00 2001 |
2 | From: Joshua Watt <JPEWhacker@gmail.com> | 2 | From: Joshua Watt <JPEWhacker@gmail.com> |
3 | Date: Thu, 20 Feb 2020 15:20:45 -0600 | 3 | Date: Thu, 20 Feb 2020 15:20:45 -0600 |
4 | Subject: [PATCH] build: Fix strndup detection on MinGW | 4 | Subject: [PATCH] build: Fix strndup detection on MinGW |
@@ -11,27 +11,31 @@ for strndup(). | |||
11 | 11 | ||
12 | See: https://github.com/mesonbuild/meson/issues/3672 | 12 | See: https://github.com/mesonbuild/meson/issues/3672 |
13 | 13 | ||
14 | Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> | ||
15 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/63] | 14 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/63] |
16 | 15 | ||
16 | Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> | ||
17 | Signed-off-by: Denys Dmytriyenko <denis@denix.org> | ||
17 | --- | 18 | --- |
18 | meson.build | 2 +- | 19 | meson.build | 2 +- |
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | 20 | 1 file changed, 1 insertion(+), 1 deletion(-) |
20 | 21 | ||
21 | diff --git a/meson.build b/meson.build | 22 | diff --git a/meson.build b/meson.build |
22 | index 11c35fa..80729d0 100644 | 23 | index 3bc25c9..adde7b9 100644 |
23 | --- a/meson.build | 24 | --- a/meson.build |
24 | +++ b/meson.build | 25 | +++ b/meson.build |
25 | @@ -36,11 +36,11 @@ have_funcs = [ | 26 | @@ -38,11 +38,11 @@ have_funcs = [ |
26 | 'posix_fallocate', | ||
27 | 'prctl', | 27 | 'prctl', |
28 | 'memfd_create', | 28 | 'memfd_create', |
29 | 'mremap', | ||
29 | - 'strndup', | 30 | - 'strndup', |
30 | ] | 31 | ] |
31 | foreach f: have_funcs | 32 | foreach f: have_funcs |
32 | config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f)) | 33 | config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f)) |
33 | endforeach | 34 | endforeach |
34 | +config_h.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup')) | 35 | +config_h.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup')) |
35 | 36 | config_h.set10('HAVE_XUCRED_CR_PID', cc.has_member('struct xucred', 'cr_pid', prefix : '#include <sys/ucred.h>')) | |
36 | if get_option('libraries') | 37 | have_broken_msg_cmsg_cloexec = false |
37 | ffi_dep = dependency('libffi') | 38 | if host_machine.system() == 'freebsd' |
39 | -- | ||
40 | 2.7.4 | ||
41 | |||
diff --git a/meta/recipes-graphics/wayland/wayland/0002-Consider-pkgconfig-sysroot-for-pkgdatadir.patch b/meta/recipes-graphics/wayland/wayland/0002-Consider-pkgconfig-sysroot-for-pkgdatadir.patch new file mode 100644 index 0000000000..4573bb635a --- /dev/null +++ b/meta/recipes-graphics/wayland/wayland/0002-Consider-pkgconfig-sysroot-for-pkgdatadir.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From ff8ecbe8891d592e645927659318720f9e190054 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Cord-Landwehr <cordlandwehr@kde.org> | ||
3 | Date: Sun, 6 Feb 2022 17:23:46 +0100 | ||
4 | Subject: [PATCH] Consider pkgconfig sysroot for pkgdatadir | ||
5 | |||
6 | For libs/cflags this is done automatically, but not for manually accessed | ||
7 | variables. This matches what wayland-protocols does. | ||
8 | |||
9 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/272] | ||
10 | --- | ||
11 | src/meson.build | 6 +++--- | ||
12 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
13 | |||
14 | diff --git a/src/meson.build b/src/meson.build | ||
15 | index a8a1d2b..721e151 100644 | ||
16 | --- a/src/meson.build | ||
17 | +++ b/src/meson.build | ||
18 | @@ -65,7 +65,7 @@ if get_option('scanner') | ||
19 | version: meson.project_version(), | ||
20 | variables: [ | ||
21 | 'datarootdir=' + join_paths('${prefix}', get_option('datadir')), | ||
22 | - 'pkgdatadir=' + join_paths('${datarootdir}', meson.project_name()), | ||
23 | + 'pkgdatadir=' + join_paths('${pc_sysrootdir}${datarootdir}', meson.project_name()), | ||
24 | 'bindir=' + join_paths('${prefix}', get_option('bindir')), | ||
25 | 'wayland_scanner=${bindir}/wayland-scanner' | ||
26 | ], | ||
27 | @@ -211,7 +211,7 @@ if get_option('libraries') | ||
28 | filebase: 'wayland-server', | ||
29 | variables: [ | ||
30 | 'datarootdir=' + join_paths('${prefix}', get_option('datadir')), | ||
31 | - 'pkgdatadir=' + join_paths('${datarootdir}', meson.project_name()) | ||
32 | + 'pkgdatadir=' + join_paths('${pc_sysrootdir}${datarootdir}', meson.project_name()) | ||
33 | ] | ||
34 | ) | ||
35 | |||
36 | @@ -250,7 +250,7 @@ if get_option('libraries') | ||
37 | filebase: 'wayland-client', | ||
38 | variables: [ | ||
39 | 'datarootdir=' + join_paths('${prefix}', get_option('datadir')), | ||
40 | - 'pkgdatadir=' + join_paths('${datarootdir}', meson.project_name()) | ||
41 | + 'pkgdatadir=' + join_paths('${pc_sysrootdir}${datarootdir}', meson.project_name()) | ||
42 | ] | ||
43 | ) | ||
44 | |||
45 | -- | ||
46 | 2.37.2 | ||
diff --git a/meta/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch b/meta/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch deleted file mode 100644 index e3e71925b8..0000000000 --- a/meta/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | From 3e7cd56611aeec274e48a4816bc7c21f74f15be0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Mon, 17 Feb 2020 21:46:18 +0100 | ||
4 | Subject: [PATCH] Do not hardcode the path to wayland-scanner | ||
5 | |||
6 | This results in host contamination during builds. | ||
7 | |||
8 | Upstream-Status: Inappropriate [oe-core specific] | ||
9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
10 | |||
11 | --- | ||
12 | src/meson.build | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/src/meson.build b/src/meson.build | ||
16 | index 15730a3..61edbc8 100644 | ||
17 | --- a/src/meson.build | ||
18 | +++ b/src/meson.build | ||
19 | @@ -52,7 +52,7 @@ if get_option('scanner') | ||
20 | 'datarootdir=' + join_paths('${prefix}', get_option('datadir')), | ||
21 | 'pkgdatadir=' + join_paths('${datarootdir}', meson.project_name()), | ||
22 | 'bindir=' + join_paths('${prefix}', get_option('bindir')), | ||
23 | - 'wayland_scanner=${bindir}/wayland-scanner' | ||
24 | + 'wayland_scanner=wayland-scanner' | ||
25 | ], | ||
26 | filebase: 'wayland-scanner' | ||
27 | ) | ||
diff --git a/meta/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch b/meta/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch deleted file mode 100644 index 11dc069147..0000000000 --- a/meta/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 98e7902a4ddcd80b61cce6f35f97907e841a5eda Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Sun, 16 Feb 2020 16:29:53 +0100 | ||
4 | Subject: [PATCH] meson.build: find the native wayland-scanner directly in PATH | ||
5 | |||
6 | Otherwise, meson attempts to use the target pkg-config and fails. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
10 | |||
11 | --- | ||
12 | src/meson.build | 3 +-- | ||
13 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/src/meson.build b/src/meson.build | ||
16 | index d91c503..15730a3 100644 | ||
17 | --- a/src/meson.build | ||
18 | +++ b/src/meson.build | ||
19 | @@ -59,8 +59,7 @@ if get_option('scanner') | ||
20 | endif | ||
21 | |||
22 | if meson.is_cross_build() or not get_option('scanner') | ||
23 | - scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version()) | ||
24 | - wayland_scanner_for_build = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner')) | ||
25 | + wayland_scanner_for_build = find_program('wayland-scanner') | ||
26 | else | ||
27 | wayland_scanner_for_build = wayland_scanner | ||
28 | endif | ||
diff --git a/meta/recipes-graphics/wayland/wayland_1.19.0.bb b/meta/recipes-graphics/wayland/wayland_1.22.0.bb index 8f121601c4..6aa76063ea 100644 --- a/meta/recipes-graphics/wayland/wayland_1.19.0.bb +++ b/meta/recipes-graphics/wayland/wayland_1.22.0.bb | |||
@@ -12,15 +12,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \ | |||
12 | 12 | ||
13 | DEPENDS = "expat libffi wayland-native" | 13 | DEPENDS = "expat libffi wayland-native" |
14 | 14 | ||
15 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | 15 | SRC_URI = "https://gitlab.freedesktop.org/wayland/wayland/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \ |
16 | file://run-ptest \ | 16 | file://run-ptest \ |
17 | file://0002-meson.build-find-the-native-wayland-scanner-directly.patch \ | ||
18 | file://0002-Do-not-hardcode-the-path-to-wayland-scanner.patch \ | ||
19 | file://0001-build-Fix-strndup-detection-on-MinGW.patch \ | 17 | file://0001-build-Fix-strndup-detection-on-MinGW.patch \ |
18 | file://0002-Consider-pkgconfig-sysroot-for-pkgdatadir.patch \ | ||
20 | " | 19 | " |
21 | SRC_URI[sha256sum] = "baccd902300d354581cd5ad3cc49daa4921d55fb416a5883e218750fef166d15" | 20 | SRC_URI[sha256sum] = "1540af1ea698a471c2d8e9d288332c7e0fd360c8f1d12936ebb7e7cbc2425842" |
22 | 21 | ||
23 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | 22 | UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/wayland/wayland/-/tags" |
23 | UPSTREAM_CHECK_REGEX = "wayland-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" | ||
24 | 24 | ||
25 | inherit meson pkgconfig ptest | 25 | inherit meson pkgconfig ptest |
26 | 26 | ||
@@ -28,11 +28,11 @@ PACKAGECONFIG ??= "dtd-validation" | |||
28 | PACKAGECONFIG[dtd-validation] = "-Ddtd_validation=true,-Ddtd_validation=false,libxml2,," | 28 | PACKAGECONFIG[dtd-validation] = "-Ddtd_validation=true,-Ddtd_validation=false,libxml2,," |
29 | 29 | ||
30 | EXTRA_OEMESON = "-Ddocumentation=false" | 30 | EXTRA_OEMESON = "-Ddocumentation=false" |
31 | EXTRA_OEMESON_class-native = "-Ddocumentation=false -Dlibraries=false" | 31 | EXTRA_OEMESON:class-native = "-Ddocumentation=false" |
32 | 32 | ||
33 | # Wayland installs a M4 macro for other projects to use, which uses the target | 33 | # Wayland installs a M4 macro for other projects to use, which uses the target |
34 | # pkg-config to find files. Replace pkg-config with pkg-config-native. | 34 | # pkg-config to find files. Replace pkg-config with pkg-config-native. |
35 | do_install_append_class-native() { | 35 | do_install:append:class-native() { |
36 | sed -e 's,PKG_CHECK_MODULES(.*),,g' \ | 36 | sed -e 's,PKG_CHECK_MODULES(.*),,g' \ |
37 | -e 's,$PKG_CONFIG,pkg-config-native,g' \ | 37 | -e 's,$PKG_CONFIG,pkg-config-native,g' \ |
38 | -i ${D}/${datadir}/aclocal/wayland-scanner.m4 | 38 | -i ${D}/${datadir}/aclocal/wayland-scanner.m4 |
@@ -47,14 +47,16 @@ do_install_ptest() { | |||
47 | cp -rf ${S}/egl/wayland-egl-symbols-check ${D}${PTEST_PATH}/tests/ | 47 | cp -rf ${S}/egl/wayland-egl-symbols-check ${D}${PTEST_PATH}/tests/ |
48 | } | 48 | } |
49 | 49 | ||
50 | sysroot_stage_all_append_class-target () { | 50 | sysroot_stage_all:append:class-target () { |
51 | rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4 | 51 | rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4 |
52 | cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/ | 52 | cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/ |
53 | } | 53 | } |
54 | 54 | ||
55 | FILES_${PN} = "${libdir}/*${SOLIBS}" | 55 | PACKAGES =+ "${PN}-tools" |
56 | FILES_${PN}-dev += "${bindir} ${datadir}/wayland" | 56 | |
57 | FILES:${PN}-tools = "${bindir}/wayland-scanner" | ||
58 | FILES:${PN}-dev += "${datadir}/${BPN}/wayland-scanner.mk" | ||
57 | 59 | ||
58 | BBCLASSEXTEND = "native nativesdk" | 60 | BBCLASSEXTEND = "native nativesdk" |
59 | 61 | ||
60 | RDEPENDS_${PN}-ptest += "binutils sed" | 62 | RDEPENDS:${PN}-ptest += "binutils sed ${PN}-tools" |
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index 65d7b81dc5..024e400665 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb | |||
@@ -9,73 +9,88 @@ SRC_URI = "file://init \ | |||
9 | file://weston.ini \ | 9 | file://weston.ini \ |
10 | file://weston.service \ | 10 | file://weston.service \ |
11 | file://weston.socket \ | 11 | file://weston.socket \ |
12 | file://weston-socket.sh \ | ||
12 | file://weston-autologin \ | 13 | file://weston-autologin \ |
13 | file://weston-start" | 14 | file://weston-start" |
14 | 15 | ||
15 | S = "${WORKDIR}" | 16 | S = "${WORKDIR}" |
16 | 17 | ||
17 | PACKAGECONFIG ??= "" | 18 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xwayland', '', d)}" |
19 | PACKAGECONFIG:append:qemuriscv64 = " use-pixman" | ||
20 | PACKAGECONFIG:append:qemuppc64 = " use-pixman" | ||
18 | 21 | ||
22 | PACKAGECONFIG[xwayland] = ",," | ||
19 | PACKAGECONFIG[no-idle-timeout] = ",," | 23 | PACKAGECONFIG[no-idle-timeout] = ",," |
24 | PACKAGECONFIG[use-pixman] = ",," | ||
20 | 25 | ||
21 | DEFAULTBACKEND ??= "" | 26 | DEFAULTBACKEND ??= "" |
22 | DEFAULTBACKEND_qemuall ?= "fbdev" | 27 | DEFAULTBACKEND:qemuall ?= "drm" |
23 | DEFAULTBACKEND_qemuarm64 = "drm" | ||
24 | DEFAULTBACKEND_qemux86 = "drm" | ||
25 | DEFAULTBACKEND_qemux86-64 = "drm" | ||
26 | # gallium swrast was found to crash weston on startup in x32 qemu | ||
27 | DEFAULTBACKEND_qemux86-64_x86-x32 = "fbdev" | ||
28 | DEFAULTBACKEND_x86-x32 = "fbdev" | ||
29 | 28 | ||
30 | do_install() { | 29 | do_install() { |
31 | if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then | 30 | # Install weston-start script |
31 | if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then | ||
32 | install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start | ||
33 | sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start | ||
34 | sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start | ||
32 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston | 35 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston |
33 | fi | 36 | sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston |
37 | fi | ||
38 | |||
39 | # Install Weston systemd service | ||
40 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
41 | install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service | ||
42 | install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket | ||
43 | install -D -p -m0644 ${WORKDIR}/weston-socket.sh ${D}${sysconfdir}/profile.d/weston-socket.sh | ||
44 | sed -i -e s:/etc:${sysconfdir}:g \ | ||
45 | -e s:/usr/bin:${bindir}:g \ | ||
46 | -e s:/var:${localstatedir}:g \ | ||
47 | ${D}${systemd_system_unitdir}/weston.service | ||
48 | fi | ||
49 | |||
50 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then | ||
51 | install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin | ||
52 | fi | ||
53 | |||
34 | install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini | 54 | install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini |
35 | install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston | 55 | install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston |
36 | 56 | ||
37 | # Install Weston systemd service and accompanying udev rule | 57 | if [ -n "${DEFAULTBACKEND}" ]; then |
38 | install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service | ||
39 | install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket | ||
40 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then | ||
41 | install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin | ||
42 | fi | ||
43 | sed -i -e s:/etc:${sysconfdir}:g \ | ||
44 | -e s:/usr/bin:${bindir}:g \ | ||
45 | -e s:/var:${localstatedir}:g \ | ||
46 | ${D}${systemd_unitdir}/system/weston.service | ||
47 | # Install weston-start script | ||
48 | install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start | ||
49 | sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start | ||
50 | sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start | ||
51 | if [ -n "${DEFAULTBACKEND}" ]; then | ||
52 | sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini | 58 | sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini |
53 | fi | 59 | fi |
54 | 60 | ||
61 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then | ||
62 | sed -i -e "/^\[core\]/a xwayland=true" ${D}${sysconfdir}/xdg/weston/weston.ini | ||
63 | fi | ||
64 | |||
55 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 'no', d)}" = "yes" ]; then | 65 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 'no', d)}" = "yes" ]; then |
56 | sed -i -e "/^\[core\]/a idle-time=0" ${D}${sysconfdir}/xdg/weston/weston.ini | 66 | sed -i -e "/^\[core\]/a idle-time=0" ${D}${sysconfdir}/xdg/weston/weston.ini |
57 | fi | 67 | fi |
58 | 68 | ||
69 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-pixman', 'yes', 'no', d)}" = "yes" ]; then | ||
70 | sed -i -e "/^\[core\]/a use-pixman=true" ${D}${sysconfdir}/xdg/weston/weston.ini | ||
71 | fi | ||
72 | |||
59 | install -dm 755 -o weston -g weston ${D}/home/weston | 73 | install -dm 755 -o weston -g weston ${D}/home/weston |
60 | } | 74 | } |
61 | 75 | ||
62 | INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}" | 76 | INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}" |
63 | 77 | ||
64 | inherit update-rc.d features_check systemd useradd | 78 | inherit update-rc.d systemd useradd |
65 | 79 | ||
66 | USERADD_PACKAGES = "${PN}" | 80 | USERADD_PACKAGES = "${PN}" |
67 | 81 | ||
68 | # rdepends on weston which depends on virtual/egl | 82 | # rdepends on weston which depends on virtual/egl |
69 | # requires pam enabled if started via systemd | 83 | # |
70 | REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" | 84 | require ${THISDIR}/required-distro-features.inc |
71 | 85 | ||
72 | RDEPENDS_${PN} = "weston kbd" | 86 | RDEPENDS:${PN} = "weston kbd" |
73 | 87 | ||
74 | INITSCRIPT_NAME = "weston" | 88 | INITSCRIPT_NAME = "weston" |
75 | INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." | 89 | INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." |
76 | 90 | ||
77 | FILES_${PN} += "\ | 91 | FILES:${PN} += "\ |
78 | ${sysconfdir}/xdg/weston/weston.ini \ | 92 | ${sysconfdir}/xdg/weston/weston.ini \ |
93 | ${sysconfdir}/profile.d/weston-socket.sh \ | ||
79 | ${systemd_system_unitdir}/weston.service \ | 94 | ${systemd_system_unitdir}/weston.service \ |
80 | ${systemd_system_unitdir}/weston.socket \ | 95 | ${systemd_system_unitdir}/weston.socket \ |
81 | ${sysconfdir}/default/weston \ | 96 | ${sysconfdir}/default/weston \ |
@@ -83,9 +98,9 @@ FILES_${PN} += "\ | |||
83 | /home/weston \ | 98 | /home/weston \ |
84 | " | 99 | " |
85 | 100 | ||
86 | CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston" | 101 | CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston" |
87 | 102 | ||
88 | SYSTEMD_SERVICE_${PN} = "weston.service weston.socket" | 103 | SYSTEMD_SERVICE:${PN} = "weston.service weston.socket" |
89 | USERADD_PARAM_${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input weston" | 104 | USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,wayland weston" |
90 | GROUPADD_PARAM_${PN} = "-r wayland" | 105 | GROUPADD_PARAM:${PN} = "-r wayland; -r render" |
91 | 106 | ||
diff --git a/meta/recipes-graphics/wayland/weston-init/init b/meta/recipes-graphics/wayland/weston-init/init index d3e87c6cef..a5c54e001e 100644 --- a/meta/recipes-graphics/wayland/weston-init/init +++ b/meta/recipes-graphics/wayland/weston-init/init | |||
@@ -30,8 +30,9 @@ done | |||
30 | case "$1" in | 30 | case "$1" in |
31 | start) | 31 | start) |
32 | . /etc/profile | 32 | . /etc/profile |
33 | export HOME=ROOTHOME | ||
33 | 34 | ||
34 | weston-start -- $OPTARGS | 35 | WESTON_USER=weston weston-start $OPTARGS & |
35 | ;; | 36 | ;; |
36 | 37 | ||
37 | stop) | 38 | stop) |
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-socket.sh b/meta/recipes-graphics/wayland/weston-init/weston-socket.sh new file mode 100755 index 0000000000..86389d63a3 --- /dev/null +++ b/meta/recipes-graphics/wayland/weston-init/weston-socket.sh | |||
@@ -0,0 +1,20 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # set weston variables for use with global weston socket | ||
4 | global_socket="/run/wayland-0" | ||
5 | if [ -e "$global_socket" ]; then | ||
6 | weston_group=$(stat -c "%G" "$global_socket") | ||
7 | if [ "$(id -u)" = "0" ]; then | ||
8 | export WAYLAND_DISPLAY="$global_socket" | ||
9 | else | ||
10 | case "$(groups "$USER")" in | ||
11 | *"$weston_group"*) | ||
12 | export WAYLAND_DISPLAY="$global_socket" | ||
13 | ;; | ||
14 | *) | ||
15 | ;; | ||
16 | esac | ||
17 | fi | ||
18 | unset weston_group | ||
19 | fi | ||
20 | unset global_socket | ||
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start index 0b93dc964a..01670cd4f5 100755 --- a/meta/recipes-graphics/wayland/weston-init/weston-start +++ b/meta/recipes-graphics/wayland/weston-init/weston-start | |||
@@ -6,7 +6,7 @@ export PATH="/sbin:/usr/sbin:/bin:/usr/bin" | |||
6 | 6 | ||
7 | usage() { | 7 | usage() { |
8 | cat <<EOF | 8 | cat <<EOF |
9 | $0 [<openvt arguments>] [-- <weston options>] | 9 | $0 [<weston options>] |
10 | EOF | 10 | EOF |
11 | } | 11 | } |
12 | 12 | ||
@@ -18,9 +18,12 @@ add_weston_argument() { | |||
18 | weston_args="$weston_args $1" | 18 | weston_args="$weston_args $1" |
19 | } | 19 | } |
20 | 20 | ||
21 | # Add openvt extra argument | 21 | ## Add module to --modules argument |
22 | add_openvt_argument() { | 22 | add_weston_module() { |
23 | openvt_args="$openvt_args $1" | 23 | if [[ "x${weston_modules}" == "x" ]]; then |
24 | weston_modules="--modules " | ||
25 | fi; | ||
26 | weston_modules+="${1}," | ||
24 | } | 27 | } |
25 | 28 | ||
26 | if [ -n "$WAYLAND_DISPLAY" ]; then | 29 | if [ -n "$WAYLAND_DISPLAY" ]; then |
@@ -29,33 +32,12 @@ if [ -n "$WAYLAND_DISPLAY" ]; then | |||
29 | fi | 32 | fi |
30 | 33 | ||
31 | if [ -n "$WESTON_USER" ]; then | 34 | if [ -n "$WESTON_USER" ]; then |
32 | if [ -z "$WESTON_TTY" ]; then | ||
33 | echo "ERROR: If you have WESTON_USER variable set, you also need WESTON_TTY." | ||
34 | exit 1 | ||
35 | fi | ||
36 | if [ -z "$WESTON_GROUP" ]; then | 35 | if [ -z "$WESTON_GROUP" ]; then |
37 | # no explicit WESTON_GROUP given, therefore use WESTON_USER | 36 | # no explicit WESTON_GROUP given, therefore use WESTON_USER |
38 | export WESTON_GROUP="${WESTON_USER}" | 37 | export WESTON_GROUP="${WESTON_USER}" |
39 | fi | 38 | fi |
40 | weston_args_user="-u $WESTON_USER -t $WESTON_TTY" | ||
41 | fi | ||
42 | |||
43 | if [ -n "$DISPLAY" ]; then | ||
44 | launcher="weston" | ||
45 | else | ||
46 | launcher="weston-launch $weston_args_user --" | ||
47 | fi | 39 | fi |
48 | 40 | ||
49 | openvt_args="-s" | ||
50 | while [ -n "$1" ]; do | ||
51 | if [ "$1" = "--" ]; then | ||
52 | shift | ||
53 | break | ||
54 | fi | ||
55 | openvt_args="$openvt_args $1" | ||
56 | shift | ||
57 | done | ||
58 | |||
59 | weston_args=$* | 41 | weston_args=$* |
60 | 42 | ||
61 | # Load and run modules | 43 | # Load and run modules |
@@ -68,6 +50,9 @@ if [ -d "$modules_dir" ]; then | |||
68 | 50 | ||
69 | # process module | 51 | # process module |
70 | . $m | 52 | . $m |
53 | if [[ x"{$weston_modules}" != "x" ]]; then | ||
54 | add_weston_argument "${weston_modules}" | ||
55 | fi; | ||
71 | done | 56 | done |
72 | fi | 57 | fi |
73 | 58 | ||
@@ -83,4 +68,4 @@ if test -z "$XDG_RUNTIME_DIR"; then | |||
83 | fi | 68 | fi |
84 | fi | 69 | fi |
85 | 70 | ||
86 | exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log | 71 | su -c "XDG_RUNTIME_DIR=/run/user/`id -u ${WESTON_USER}` weston $weston_args --log=/tmp/weston.log" $WESTON_USER |
diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service b/meta/recipes-graphics/wayland/weston-init/weston.service index e09625b31c..80745998ed 100644 --- a/meta/recipes-graphics/wayland/weston-init/weston.service +++ b/meta/recipes-graphics/wayland/weston-init/weston.service | |||
@@ -37,8 +37,8 @@ EnvironmentFile=/etc/default/weston | |||
37 | ExecStart=/usr/bin/weston --modules=systemd-notify.so | 37 | ExecStart=/usr/bin/weston --modules=systemd-notify.so |
38 | 38 | ||
39 | # Optional watchdog setup | 39 | # Optional watchdog setup |
40 | TimeoutStartSec=60 | 40 | #TimeoutStartSec=60 |
41 | WatchdogSec=20 | 41 | #WatchdogSec=20 |
42 | 42 | ||
43 | # The user to run Weston as. | 43 | # The user to run Weston as. |
44 | User=weston | 44 | User=weston |
diff --git a/meta/recipes-graphics/wayland/weston/0001-libweston-tools-Include-libgen.h-for-basename-signat.patch b/meta/recipes-graphics/wayland/weston/0001-libweston-tools-Include-libgen.h-for-basename-signat.patch new file mode 100644 index 0000000000..1d281fa832 --- /dev/null +++ b/meta/recipes-graphics/wayland/weston/0001-libweston-tools-Include-libgen.h-for-basename-signat.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 2b53236ac637dfa7fb0f438f7391a73f6ef92a06 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 14 Dec 2023 09:13:54 -0800 | ||
4 | Subject: [PATCH] libweston,tools: Include libgen.h for basename signature | ||
5 | |||
6 | Latest musl has removed the declaration from string.h [1] as it only | ||
7 | implements POSIX version alone and string.h in glibc implements GNU | ||
8 | version of basename. This now results in compile errors on musl. | ||
9 | |||
10 | This might be a warning with older compilers but it is error with | ||
11 | Clang-17+ as it treats -Wimplicit-function-declaration as error | ||
12 | |||
13 | [1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 | ||
14 | |||
15 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1420] | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | libweston/backend-drm/libbacklight.c | 1 + | ||
19 | tools/zunitc/src/zunitc_impl.c | 1 + | ||
20 | 2 files changed, 2 insertions(+) | ||
21 | |||
22 | diff --git a/libweston/backend-drm/libbacklight.c b/libweston/backend-drm/libbacklight.c | ||
23 | index ca7f2d68..74690fa7 100644 | ||
24 | --- a/libweston/backend-drm/libbacklight.c | ||
25 | +++ b/libweston/backend-drm/libbacklight.c | ||
26 | @@ -41,6 +41,7 @@ | ||
27 | #include <drm.h> | ||
28 | #include <fcntl.h> | ||
29 | #include <malloc.h> | ||
30 | +#include <libgen.h> | ||
31 | #include <string.h> | ||
32 | #include <errno.h> | ||
33 | |||
34 | diff --git a/tools/zunitc/src/zunitc_impl.c b/tools/zunitc/src/zunitc_impl.c | ||
35 | index 18f03015..9b460fa0 100644 | ||
36 | --- a/tools/zunitc/src/zunitc_impl.c | ||
37 | +++ b/tools/zunitc/src/zunitc_impl.c | ||
38 | @@ -27,6 +27,7 @@ | ||
39 | |||
40 | #include <errno.h> | ||
41 | #include <fcntl.h> | ||
42 | +#include <libgen.h> | ||
43 | #include <stdarg.h> | ||
44 | #include <stdbool.h> | ||
45 | #include <stdio.h> | ||
46 | -- | ||
47 | 2.43.0 | ||
48 | |||
diff --git a/meta/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch b/meta/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch deleted file mode 100644 index 6fe86ff3f0..0000000000 --- a/meta/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From 58760e09eed662a72da939ff4802d605489cff8e Mon Sep 17 00:00:00 2001 | ||
2 | From: Denys Dmytriyenko <denys@ti.com> | ||
3 | Date: Tue, 8 Sep 2020 19:37:42 -0400 | ||
4 | Subject: [PATCH] tests: include fcntl.h for open(), O_RDWR, O_CLOEXEC and | ||
5 | O_CREAT | ||
6 | |||
7 | musl libc (unlike glibc) requires explicitly incuding fcntl.h to define open(), | ||
8 | O_RDWR, O_CLOEXEC and O_CREAT. Otherwise the build fails with the errors: | ||
9 | |||
10 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c: In function 'wait_for_lock': | ||
11 | | ../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] | ||
12 | | 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); | ||
13 | | | ^~~~ | ||
14 | | | popen | ||
15 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: error: 'O_RDWR' undeclared (first use in this function) | ||
16 | | 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); | ||
17 | | | ^~~~~~ | ||
18 | | ../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 | ||
19 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:32: error: 'O_CLOEXEC' undeclared (first use in this function) | ||
20 | | 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); | ||
21 | | | ^~~~~~~~~ | ||
22 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:44: error: 'O_CREAT' undeclared (first use in this function) | ||
23 | | 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); | ||
24 | | | ^~~~~~~ | ||
25 | |||
26 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/493/diffs?commit_id=b10c0e843dcb8148bbe869bb15261955b94ac98c] | ||
27 | |||
28 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | ||
29 | --- | ||
30 | tests/weston-test-fixture-compositor.c | 1 + | ||
31 | 1 file changed, 1 insertion(+) | ||
32 | |||
33 | diff --git a/tests/weston-test-fixture-compositor.c b/tests/weston-test-fixture-compositor.c | ||
34 | index 0c9855f..e0e32c9 100644 | ||
35 | --- a/tests/weston-test-fixture-compositor.c | ||
36 | +++ b/tests/weston-test-fixture-compositor.c | ||
37 | @@ -31,6 +31,7 @@ | ||
38 | #include <unistd.h> | ||
39 | #include <sys/file.h> | ||
40 | #include <errno.h> | ||
41 | +#include <fcntl.h> | ||
42 | |||
43 | #include "shared/helpers.h" | ||
44 | #include "weston-test-fixture-compositor.h" | ||
45 | -- | ||
46 | 2.7.4 | ||
47 | |||
diff --git a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch deleted file mode 100644 index 3279a728cc..0000000000 --- a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ /dev/null | |||
@@ -1,199 +0,0 @@ | |||
1 | From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Hochstein <tom.hochstein@nxp.com> | ||
3 | Date: Wed, 22 Feb 2017 15:53:30 +0200 | ||
4 | Subject: [PATCH] weston-launch: Provide a default version that doesn't require | ||
5 | |||
6 | PAM | ||
7 | |||
8 | weston-launch requires PAM for starting weston as a non-root user. | ||
9 | |||
10 | Since starting weston as root is a valid use case by itself, if | ||
11 | PAM is not available, provide a default version of weston-launch | ||
12 | without non-root-user support. | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | ||
17 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
18 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | ||
19 | Signed-off-by: Ming Liu <ming.liu@toradex.com> | ||
20 | |||
21 | --- | ||
22 | libweston/meson.build | 16 ++++++++++++---- | ||
23 | libweston/weston-launch.c | 21 +++++++++++++++++++++ | ||
24 | meson_options.txt | 7 +++++++ | ||
25 | 3 files changed, 40 insertions(+), 4 deletions(-) | ||
26 | |||
27 | diff --git a/libweston/meson.build b/libweston/meson.build | ||
28 | index 08d23ec..cb9fd3f 100644 | ||
29 | --- a/libweston/meson.build | ||
30 | +++ b/libweston/meson.build | ||
31 | @@ -216,16 +216,24 @@ dep_vertex_clipping = declare_dependency( | ||
32 | ) | ||
33 | |||
34 | if get_option('weston-launch') | ||
35 | - dep_pam = cc.find_library('pam') | ||
36 | + deps_weston_launch = [systemd_dep, dep_libdrm] | ||
37 | |||
38 | - if not cc.has_function('pam_open_session', dependencies: dep_pam) | ||
39 | - error('pam_open_session not found for weston-launch') | ||
40 | + if get_option('pam') | ||
41 | + dep_pam = cc.find_library('pam') | ||
42 | + if not cc.has_function('pam_open_session', dependencies: dep_pam) | ||
43 | + error('pam_open_session not found for weston-launch') | ||
44 | + endif | ||
45 | + | ||
46 | + if dep_pam.found() | ||
47 | + deps_weston_launch += dep_pam | ||
48 | + config_h.set('HAVE_PAM', '1') | ||
49 | + endif | ||
50 | endif | ||
51 | |||
52 | executable( | ||
53 | 'weston-launch', | ||
54 | 'weston-launch.c', | ||
55 | - dependencies: [dep_pam, systemd_dep, dep_libdrm], | ||
56 | + dependencies: deps_weston_launch, | ||
57 | include_directories: common_inc, | ||
58 | install: true | ||
59 | ) | ||
60 | diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c | ||
61 | index 521cb2c..2d42d33 100644 | ||
62 | --- a/libweston/weston-launch.c | ||
63 | +++ b/libweston/weston-launch.c | ||
64 | @@ -51,7 +51,9 @@ | ||
65 | |||
66 | #include <pwd.h> | ||
67 | #include <grp.h> | ||
68 | +#ifdef HAVE_PAM | ||
69 | #include <security/pam_appl.h> | ||
70 | +#endif | ||
71 | |||
72 | #ifdef HAVE_SYSTEMD_LOGIN | ||
73 | #include <systemd/sd-login.h> | ||
74 | @@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) | ||
75 | #endif | ||
76 | |||
77 | struct weston_launch { | ||
78 | +#ifdef HAVE_PAM | ||
79 | struct pam_conv pc; | ||
80 | pam_handle_t *ph; | ||
81 | +#endif | ||
82 | int tty; | ||
83 | int ttynr; | ||
84 | int sock[2]; | ||
85 | @@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) | ||
86 | return false; | ||
87 | } | ||
88 | |||
89 | +#ifdef HAVE_PAM | ||
90 | static int | ||
91 | pam_conversation_fn(int msg_count, | ||
92 | const struct pam_message **messages, | ||
93 | @@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | +#endif | ||
98 | |||
99 | static int | ||
100 | setup_launcher_socket(struct weston_launch *wl) | ||
101 | @@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status) | ||
102 | close(wl->signalfd); | ||
103 | close(wl->sock[0]); | ||
104 | |||
105 | +#ifdef HAVE_PAM | ||
106 | if (wl->new_user) { | ||
107 | err = pam_close_session(wl->ph, 0); | ||
108 | if (err) | ||
109 | @@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status) | ||
110 | err, pam_strerror(wl->ph, err)); | ||
111 | pam_end(wl->ph, err); | ||
112 | } | ||
113 | +#endif | ||
114 | |||
115 | /* | ||
116 | * Get a fresh handle to the tty as the previous one is in | ||
117 | @@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | ||
118 | setenv("HOME", wl->pw->pw_dir, 1); | ||
119 | setenv("SHELL", wl->pw->pw_shell, 1); | ||
120 | |||
121 | +#ifdef HAVE_PAM | ||
122 | env = pam_getenvlist(wl->ph); | ||
123 | if (env) { | ||
124 | for (i = 0; env[i]; ++i) { | ||
125 | @@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | ||
126 | } | ||
127 | free(env); | ||
128 | } | ||
129 | +#endif | ||
130 | |||
131 | /* | ||
132 | * We open a new session, so it makes sense | ||
133 | @@ -789,8 +799,10 @@ static void | ||
134 | help(const char *name) | ||
135 | { | ||
136 | fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); | ||
137 | +#ifdef HAVE_PAM | ||
138 | fprintf(stderr, " -u, --user Start session as specified username,\n" | ||
139 | " e.g. -u joe, requires root.\n"); | ||
140 | +#endif | ||
141 | fprintf(stderr, " -t, --tty Start session on alternative tty,\n" | ||
142 | " e.g. -t /dev/tty4, requires -u option.\n"); | ||
143 | fprintf(stderr, " -v, --verbose Be verbose\n"); | ||
144 | @@ -804,7 +816,9 @@ main(int argc, char *argv[]) | ||
145 | int i, c; | ||
146 | char *tty = NULL; | ||
147 | struct option opts[] = { | ||
148 | +#ifdef HAVE_PAM | ||
149 | { "user", required_argument, NULL, 'u' }, | ||
150 | +#endif | ||
151 | { "tty", required_argument, NULL, 't' }, | ||
152 | { "verbose", no_argument, NULL, 'v' }, | ||
153 | { "help", no_argument, NULL, 'h' }, | ||
154 | @@ -816,11 +830,16 @@ main(int argc, char *argv[]) | ||
155 | while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { | ||
156 | switch (c) { | ||
157 | case 'u': | ||
158 | +#ifdef HAVE_PAM | ||
159 | wl.new_user = optarg; | ||
160 | if (getuid() != 0) { | ||
161 | fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); | ||
162 | exit(EXIT_FAILURE); | ||
163 | } | ||
164 | +#else | ||
165 | + fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); | ||
166 | + exit(EXIT_FAILURE); | ||
167 | +#endif | ||
168 | break; | ||
169 | case 't': | ||
170 | tty = optarg; | ||
171 | @@ -872,8 +891,10 @@ main(int argc, char *argv[]) | ||
172 | if (setup_tty(&wl, tty) < 0) | ||
173 | exit(EXIT_FAILURE); | ||
174 | |||
175 | +#ifdef HAVE_PAM | ||
176 | if (wl.new_user && setup_pam(&wl) < 0) | ||
177 | exit(EXIT_FAILURE); | ||
178 | +#endif | ||
179 | |||
180 | if (setup_launcher_socket(&wl) < 0) | ||
181 | exit(EXIT_FAILURE); | ||
182 | diff --git a/meson_options.txt b/meson_options.txt | ||
183 | index 239bd2d..99e4ec3 100644 | ||
184 | --- a/meson_options.txt | ||
185 | +++ b/meson_options.txt | ||
186 | @@ -73,6 +73,13 @@ option( | ||
187 | ) | ||
188 | |||
189 | option( | ||
190 | + 'pam', | ||
191 | + type: 'boolean', | ||
192 | + value: true, | ||
193 | + description: 'Define if PAM is available' | ||
194 | +) | ||
195 | + | ||
196 | +option( | ||
197 | 'xwayland', | ||
198 | type: 'boolean', | ||
199 | value: true, | ||
diff --git a/meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch deleted file mode 100644 index a4444e5d18..0000000000 --- a/meta/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/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start new file mode 100644 index 0000000000..a97e7b38d9 --- /dev/null +++ b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start | |||
@@ -0,0 +1,9 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # SPDX-FileCopyrightText: Huawei Inc. | ||
4 | # SPDX-License-Identifier: Apache-2.0 | ||
5 | |||
6 | |||
7 | if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then | ||
8 | add_weston_module "systemd-notify.so" | ||
9 | fi | ||
diff --git a/meta/recipes-graphics/wayland/weston/xwayland.weston-start b/meta/recipes-graphics/wayland/weston/xwayland.weston-start index b483c97cf1..342ac8d129 100644 --- a/meta/recipes-graphics/wayland/weston/xwayland.weston-start +++ b/meta/recipes-graphics/wayland/weston/xwayland.weston-start | |||
@@ -1,7 +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 | 5 | chown root:video /tmp/.X11-unix | |
6 | add_weston_argument "--modules=xwayland.so" | ||
7 | fi | 6 | fi |
diff --git a/meta/recipes-graphics/wayland/weston_9.0.0.bb b/meta/recipes-graphics/wayland/weston_13.0.0.bb index 50fbfa613b..b728bd0ef3 100644 --- a/meta/recipes-graphics/wayland/weston_9.0.0.bb +++ b/meta/recipes-graphics/wayland/weston_13.0.0.bb | |||
@@ -3,26 +3,27 @@ DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" | |||
3 | HOMEPAGE = "http://wayland.freedesktop.org" | 3 | HOMEPAGE = "http://wayland.freedesktop.org" |
4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ |
6 | file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" | 6 | file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \ |
7 | " | ||
7 | 8 | ||
8 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | 9 | SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \ |
10 | file://0001-libweston-tools-Include-libgen.h-for-basename-signat.patch \ | ||
9 | file://weston.png \ | 11 | file://weston.png \ |
10 | file://weston.desktop \ | 12 | file://weston.desktop \ |
11 | file://xwayland.weston-start \ | 13 | file://xwayland.weston-start \ |
12 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ | 14 | file://systemd-notify.weston-start \ |
13 | file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ | 15 | " |
14 | " | ||
15 | 16 | ||
16 | SRC_URI_append_libc-musl = " file://dont-use-plane-add-prop.patch " | 17 | SRC_URI[sha256sum] = "52ff1d4aa2394a2e416c85a338b627ce97fa71d43eb762fd4aaf145d36fc795a" |
17 | 18 | ||
18 | SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" | 19 | UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/wayland/weston/-/tags" |
20 | UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" | ||
19 | 21 | ||
20 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | 22 | inherit meson pkgconfig useradd |
21 | 23 | ||
22 | inherit meson pkgconfig useradd features_check | ||
23 | # depends on virtual/egl | 24 | # depends on virtual/egl |
24 | # weston-init requires pam enabled if started via systemd | 25 | # |
25 | REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" | 26 | require ${THISDIR}/required-distro-features.inc |
26 | 27 | ||
27 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" | 28 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" |
28 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" | 29 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" |
@@ -31,34 +32,36 @@ LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', | |||
31 | 32 | ||
32 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" | 33 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" |
33 | 34 | ||
34 | EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" | 35 | EXTRA_OEMESON += "-Dpipewire=false" |
35 | 36 | ||
36 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ | 37 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ |
37 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ | 38 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ |
38 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ | 39 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ |
39 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ | 40 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ |
40 | launch \ | ||
41 | image-jpeg \ | 41 | image-jpeg \ |
42 | screenshare \ | 42 | screenshare \ |
43 | shell-desktop \ | 43 | shell-desktop \ |
44 | shell-fullscreen \ | 44 | shell-fullscreen \ |
45 | shell-ivi" | 45 | shell-ivi \ |
46 | shell-kiosk \ | ||
47 | " | ||
48 | |||
49 | # Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all' | ||
50 | SIMPLECLIENTS ?= "all" | ||
46 | 51 | ||
47 | # | 52 | # |
48 | # Compositor choices | 53 | # Compositor choices |
49 | # | 54 | # |
50 | # Weston on KMS | 55 | # Weston on KMS |
51 | PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" | 56 | PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev seatd virtual/egl virtual/libgles2 virtual/libgbm mtdev" |
52 | # Weston on Wayland (nested Weston) | 57 | # Weston on Wayland (nested Weston) |
53 | PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" | 58 | PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" |
54 | # Weston on X11 | 59 | # Weston on X11 |
55 | PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" | 60 | PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcursor" |
56 | # Headless Weston | 61 | # Headless Weston |
57 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" | 62 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" |
58 | # Weston on framebuffer | 63 | # Weston on RDP |
59 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" | 64 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" |
60 | # weston-launch | ||
61 | PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" | ||
62 | # VA-API desktop recorder | 65 | # VA-API desktop recorder |
63 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" | 66 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" |
64 | # Weston with EGL support | 67 | # Weston with EGL support |
@@ -67,18 +70,16 @@ PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" | |||
67 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" | 70 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" |
68 | # Weston with webp support | 71 | # Weston with webp support |
69 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" | 72 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" |
70 | # Weston with systemd-login support | 73 | # Weston with systemd support |
71 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" | 74 | PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd dbus" |
72 | # Weston with Xwayland support (requires X11 and Wayland) | 75 | # Weston with Xwayland support (requires X11 and Wayland) |
73 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" | 76 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland" |
74 | # colord CMS support | 77 | # colord CMS support |
75 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" | 78 | PACKAGECONFIG[colord] = "-Ddeprecated-color-management-colord=true,-Ddeprecated-color-management-colord=false,colord" |
76 | # Clients support | 79 | # Clients support |
77 | PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | 80 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" |
78 | # Virtual remote output with GStreamer on DRM backend | 81 | # Virtual remote output with GStreamer on DRM backend |
79 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" | 82 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" |
80 | # Weston with PAM support | ||
81 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" | ||
82 | # Weston with screen-share support | 83 | # Weston with screen-share support |
83 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" | 84 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" |
84 | # Traditional desktop shell | 85 | # Traditional desktop shell |
@@ -87,10 +88,17 @@ PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" | |||
87 | PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" | 88 | PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" |
88 | # In-Vehicle Infotainment (IVI) shell | 89 | # In-Vehicle Infotainment (IVI) shell |
89 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" | 90 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" |
91 | # Kiosk shell | ||
92 | PACKAGECONFIG[shell-kiosk] = "-Dshell-kiosk=true,-Dshell-kiosk=false" | ||
90 | # JPEG image loading support | 93 | # JPEG image loading support |
91 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" | 94 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" |
95 | # screencasting via PipeWire | ||
96 | PACKAGECONFIG[pipewire] = "-Dbackend-pipewire=true,-Dbackend-pipewire=false,pipewire" | ||
97 | # VNC remote screensharing | ||
98 | PACKAGECONFIG[vnc] = "-Dbackend-vnc=true,-Dbackend-vnc=false,neatvnc" | ||
99 | |||
92 | 100 | ||
93 | do_install_append() { | 101 | do_install:append() { |
94 | # Weston doesn't need the .la files to load modules, so wipe them | 102 | # Weston doesn't need the .la files to load modules, so wipe them |
95 | rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la | 103 | rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la |
96 | 104 | ||
@@ -107,6 +115,10 @@ do_install_append() { | |||
107 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland | 115 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland |
108 | fi | 116 | fi |
109 | 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 | |||
110 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then | 122 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then |
111 | chmod u+s ${D}${bindir}/weston-launch | 123 | chmod u+s ${D}${bindir}/weston-launch |
112 | fi | 124 | fi |
@@ -115,20 +127,20 @@ do_install_append() { | |||
115 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ | 127 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ |
116 | libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" | 128 | libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" |
117 | 129 | ||
118 | FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" | 130 | FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" |
119 | FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" | 131 | FILES:${PN} = "${sysconfdir} ${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" |
120 | 132 | ||
121 | FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" | 133 | FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" |
122 | SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." | 134 | SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." |
123 | 135 | ||
124 | FILES_${PN}-examples = "${bindir}/*" | 136 | FILES:${PN}-examples = "${bindir}/*" |
125 | 137 | ||
126 | FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" | 138 | FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" |
127 | RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" | 139 | RDEPENDS:${PN}-xwayland += "xwayland" |
128 | 140 | ||
129 | RDEPENDS_${PN} += "xkeyboard-config" | 141 | RDEPENDS:${PN} += "xkeyboard-config" |
130 | RRECOMMENDS_${PN} = "weston-init liberation-fonts" | 142 | RRECOMMENDS:${PN} = "weston-init liberation-fonts" |
131 | RRECOMMENDS_${PN}-dev += "wayland-protocols" | 143 | RRECOMMENDS:${PN}-dev += "wayland-protocols" |
132 | 144 | ||
133 | USERADD_PACKAGES = "${PN}" | 145 | USERADD_PACKAGES = "${PN}" |
134 | GROUPADD_PARAM_${PN} = "--system weston-launch" | 146 | GROUPADD_PARAM:${PN} = "--system weston-launch" |