diff options
Diffstat (limited to 'external/poky/meta/recipes-graphics/wayland')
24 files changed, 532 insertions, 257 deletions
diff --git a/external/poky/meta/recipes-graphics/wayland/libinput/determinism.patch b/external/poky/meta/recipes-graphics/wayland/libinput/determinism.patch new file mode 100644 index 00000000..cb554030 --- /dev/null +++ b/external/poky/meta/recipes-graphics/wayland/libinput/determinism.patch @@ -0,0 +1,21 @@ +This finds our outer git tree and that version information breaks +determinism of this recipe. Disable it. + +RP 2020/2/6 + +Upstream-Status: Pending +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Index: libinput-1.14.3/meson.build +=================================================================== +--- libinput-1.14.3.orig/meson.build ++++ libinput-1.14.3/meson.build +@@ -387,7 +387,7 @@ pkgconfig.generate( + libraries : lib_libinput + ) + +-git_version_h = vcs_tag(command : ['git', 'describe'], ++git_version_h = vcs_tag(command : ['false'], + fallback : 'unknown', + input : 'src/libinput-git-version.h.in', + output :'libinput-git-version.h') diff --git a/external/poky/meta/recipes-graphics/wayland/libinput_1.11.3.bb b/external/poky/meta/recipes-graphics/wayland/libinput_1.15.2.bb index 12e2091c..81053277 100644 --- a/external/poky/meta/recipes-graphics/wayland/libinput_1.11.3.bb +++ b/external/poky/meta/recipes-graphics/wayland/libinput_1.15.2.bb @@ -1,4 +1,9 @@ SUMMARY = "Library to handle input devices in Wayland compositors" +DESCRIPTION = "libinput is a library to handle input devices in Wayland \ +compositors and to provide a generic X.Org input driver. It provides \ +device detection, device handling, input device event processing and \ +abstraction so minimize the amount of custom input code compositors need to \ +provide the common set of functionality that users expect." HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/" SECTION = "libs" @@ -8,11 +13,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1f2ea9ebff3a2c6d458faf58492efb63" DEPENDS = "libevdev udev mtdev" SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \ + file://determinism.patch \ " -SRC_URI[md5sum] = "df6e877f11de4a9793511e9abfe7ef01" -SRC_URI[sha256sum] = "f31191d96e425b4f16319842279d65946d9d983dcd3d9e466ae1206aa10ecb06" +SRC_URI[md5sum] = "eb6bd2907ad33d53954d70dfb881a643" +SRC_URI[sha256sum] = "971c3fbfb624f95c911adeb2803c372e4e3647d1b98f278f660051f834597747" UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" + inherit meson pkgconfig lib_package PACKAGECONFIG ??= "" @@ -21,9 +28,13 @@ PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3" UDEVDIR = "`pkg-config --variable=udevdir udev`" -EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} -Ddocumentation=false -Dtests=false" +EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \ + -Ddocumentation=false \ + -Dtests=false \ + -Dzshcompletiondir=no" # package name changed in 1.8.1 upgrade: make sure package upgrades work RPROVIDES_${PN} = "libinput" RREPLACES_${PN} = "libinput" RCONFLICTS_${PN} = "libinput" + diff --git a/external/poky/meta/recipes-graphics/wayland/mtdev_1.1.5.bb b/external/poky/meta/recipes-graphics/wayland/mtdev_1.1.6.bb index ccd0ebbf..7c1cb5e4 100644 --- a/external/poky/meta/recipes-graphics/wayland/mtdev_1.1.5.bb +++ b/external/poky/meta/recipes-graphics/wayland/mtdev_1.1.6.bb @@ -12,7 +12,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=ea6bd0268bb0fcd6b27698616ceee5d6" SRC_URI = "http://bitmath.org/code/${BPN}/${BP}.tar.bz2" -SRC_URI[md5sum] = "52c9610b6002f71d1642dc1a1cca5ec1" -SRC_URI[sha256sum] = "6677d5708a7948840de734d8b4675d5980d4561171c5a8e89e54adf7a13eba7f" +SRC_URI[md5sum] = "bf8ef2482e84a00b5db8fbd3ce00e249" +SRC_URI[sha256sum] = "15d7b28da8ac71d8bc8c9287c2045fd174267bc740bec10cfda332dc1204e0e0" inherit autotools pkgconfig diff --git a/external/poky/meta/recipes-graphics/wayland/wayland-protocols_1.16.bb b/external/poky/meta/recipes-graphics/wayland/wayland-protocols_1.20.bb index fc4b7111..3fb78f65 100644 --- a/external/poky/meta/recipes-graphics/wayland/wayland-protocols_1.16.bb +++ b/external/poky/meta/recipes-graphics/wayland/wayland-protocols_1.20.bb @@ -11,8 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ " -SRC_URI[md5sum] = "e0b523ff162e30bab46be1d65d527683" -SRC_URI[sha256sum] = "6b1485951fdcd36a960c870c46f28b03a3e5121fb46246916333ed07f78c98c5" +SRC_URI[md5sum] = "b0836533a3f2dc6585b1dae00341157f" +SRC_URI[sha256sum] = "9782b7a1a863d82d7c92478497d13c758f52e7da4f197aa16443f73de77e4de7" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" diff --git a/external/poky/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch b/external/poky/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch new file mode 100644 index 00000000..c2ceae4a --- /dev/null +++ b/external/poky/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch @@ -0,0 +1,34 @@ +From e6783c99f051c6d8252db5f388d805cef0e16357 Mon Sep 17 00:00:00 2001 +From: Joshua Watt <JPEWhacker@gmail.com> +Date: Thu, 20 Feb 2020 15:20:45 -0600 +Subject: [PATCH] build: Fix strndup detection on MinGW + +GCC and meson conspire together to incorrectly detect that strndup() +exists on MinGW as __builtin_strndup, when no such function exists. As a +work around, meson will skip looking for __builtin functions if an +'#include' is in the prefix, so add '#include <string.h>' when looking +for strndup(). + +See: https://github.com/mesonbuild/meson/issues/3672 + +Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/63] +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -36,11 +36,11 @@ have_funcs = [ + 'posix_fallocate', + 'prctl', + 'memfd_create', +- 'strndup', + ] + foreach f: have_funcs + config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f)) + endforeach ++config_h.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup')) + + if get_option('libraries') + ffi_dep = dependency('libffi') diff --git a/external/poky/meta/recipes-graphics/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch b/external/poky/meta/recipes-graphics/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch new file mode 100644 index 00000000..61de0e04 --- /dev/null +++ b/external/poky/meta/recipes-graphics/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch @@ -0,0 +1,115 @@ +From b2c74f6a3dbe0aee2413800837314136947a4985 Mon Sep 17 00:00:00 2001 +From: Jan Beich <jbeich@FreeBSD.org> +Date: Sat, 15 Feb 2020 02:03:45 +0000 +Subject: [PATCH] meson/tests: add missing dependencies on protocol headers + +In file included from ../tests/connection-test.c:43: +In file included from ../tests/test-compositor.h:30: +../src/wayland-client.h:40:10: fatal error: 'wayland-client-protocol.h' file not found + #include "wayland-client-protocol.h" + ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +In file included from ../tests/display-test.c:45: +In file included from ../src/wayland-server.h:104: +src/wayland-server-protocol.h:4454:2: error: unterminated /* comment + /** + ^ +In file included from ../tests/cpp-compile-test.cpp:2: +In file included from src/wayland-server-protocol.h:8: +In file included from ../src/wayland-server.h:104: +src/wayland-server-protocol.h:3:2: error: unterminated conditional directive + #ifndef WAYLAND_SERVER_PROTOCOL_H + ^ +../tests/headers-protocol-test.c:33:2: error: including wayland-server-protocol.h did not include wayland-server.h! + #error including wayland-server-protocol.h did not include wayland-server.h! + ^ +In file included from ../tests/headers-protocol-test.c:26: +In file included from src/wayland-client-protocol.h:8: +In file included from ../src/wayland-client.h:40: +src/wayland-client-protocol.h:1358:2: error: unterminated conditional directive + #ifndef WL_SHM_FORMAT_ENUM + ^ +In file included from ../tests/protocol-logger-test.c:34: +In file included from ../src/wayland-client.h:40: +src/wayland-client-protocol.h:2613:1: error: unterminated /* comment +/** +^ +../tests/resources-test.c:49:36: error: use of undeclared identifier 'wl_seat_interface' + res = wl_resource_create(client, &wl_seat_interface, 4, 0); + ^ +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + tests/meson.build | 26 ++++++++++++++++++-------- + 1 file changed, 18 insertions(+), 8 deletions(-) + +diff --git a/tests/meson.build b/tests/meson.build +index c28a2a3..f1af7b4 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -69,7 +69,7 @@ test( + executable( + 'cpp-compile-test', + 'cpp-compile-test.cpp', +- wayland_server_protocol_core_h, ++ wayland_server_protocol_h, + include_directories: src_inc + ) + ) +@@ -91,17 +91,25 @@ tests = { + 'array-test': [], + 'client-test': [ wayland_server_protocol_h ], + 'display-test': [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, + tests_server_protocol_h, + tests_client_protocol_c, + tests_protocol_c, + ], +- 'connection-test': [ wayland_server_protocol_h ], ++ 'connection-test': [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, ++ ], + 'event-loop-test': [ wayland_server_protocol_h ], + 'fixed-test': [], + 'interface-test': [ wayland_client_protocol_h ], + 'list-test': [], + 'map-test': [], +- 'sanity-test' : [ wayland_server_protocol_h ], ++ 'sanity-test' : [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, ++ ], + 'socket-test': [ + wayland_client_protocol_h, + wayland_server_protocol_h, +@@ -116,7 +124,7 @@ tests = { + files('../src/wayland-server.c'), + wayland_server_protocol_h, + ], +- 'resources-test': [ wayland_server_protocol_core_h ], ++ 'resources-test': [ wayland_server_protocol_h ], + 'message-test': [ + wayland_client_protocol_h, + wayland_server_protocol_h, +@@ -126,14 +134,16 @@ tests = { + wayland_server_protocol_h, + ], + 'protocol-logger-test': [ +- wayland_server_protocol_core_h, +- wayland_client_protocol_core_h, ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, + ], + 'headers-test': [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, + 'headers-protocol-test.c', +- 'headers-protocol-core-test.c', +- wayland_server_protocol_core_h, + wayland_client_protocol_core_h, ++ wayland_server_protocol_core_h, ++ 'headers-protocol-core-test.c', + ], + 'os-wrappers-test': [], + } diff --git a/external/poky/meta/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch b/external/poky/meta/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch new file mode 100644 index 00000000..2199548b --- /dev/null +++ b/external/poky/meta/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch @@ -0,0 +1,26 @@ +From cbb28635a1079d68e62dbaa1e21791a20dbbbaf4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Mon, 17 Feb 2020 21:46:18 +0100 +Subject: [PATCH] Do not hardcode the path to wayland-scanner + +This results in host contamination during builds. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + src/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/meson.build b/src/meson.build +index 294aee0..7e410fa 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -49,7 +49,7 @@ pkgconfig.generate( + 'datarootdir=' + join_paths('${prefix}', get_option('datadir')), + 'pkgdatadir=' + join_paths('${datarootdir}', meson.project_name()), + 'bindir=' + join_paths('${prefix}', get_option('bindir')), +- 'wayland_scanner=${bindir}/wayland-scanner' ++ 'wayland_scanner=wayland-scanner' + ], + filebase: 'wayland-scanner' + ) diff --git a/external/poky/meta/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch b/external/poky/meta/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch new file mode 100644 index 00000000..f98037a8 --- /dev/null +++ b/external/poky/meta/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch @@ -0,0 +1,27 @@ +From 2582d2653ba80917d7bc47088e1a5f49530fddaa Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Sun, 16 Feb 2020 16:29:53 +0100 +Subject: [PATCH] meson.build: find the native wayland-scanner directly in PATH + +Otherwise, meson attempts to use the target pkg-config and fails. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + src/meson.build | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/meson.build b/src/meson.build +index 3e8c9bf..294aee0 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -55,8 +55,7 @@ pkgconfig.generate( + ) + + if meson.is_cross_build() +- scanner_dep = dependency('wayland-scanner', native: true, version: '>=1.14.0') +- wayland_scanner_for_build = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner')) ++ wayland_scanner_for_build = find_program('wayland-scanner') + else + wayland_scanner_for_build = wayland_scanner + endif diff --git a/external/poky/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch b/external/poky/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch deleted file mode 100644 index ad3526d9..00000000 --- a/external/poky/meta/recipes-graphics/wayland/wayland/fixpathinpcfiles.patch +++ /dev/null @@ -1,32 +0,0 @@ -Fix wayland-client and wayland-scanner pc files - -Upstream-Status: Pending - -Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> - -Index: wayland-1.14.0/src/wayland-client.pc.in -=================================================================== ---- wayland-1.14.0.orig/src/wayland-client.pc.in -+++ wayland-1.14.0/src/wayland-client.pc.in -@@ -1,7 +1,7 @@ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - datarootdir=@datarootdir@ --pkgdatadir=@datadir@/@PACKAGE@ -+pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@ - libdir=@libdir@ - includedir=@includedir@ - -Index: wayland-1.14.0/src/wayland-scanner.pc.in -=================================================================== ---- wayland-1.14.0.orig/src/wayland-scanner.pc.in -+++ wayland-1.14.0/src/wayland-scanner.pc.in -@@ -2,7 +2,7 @@ prefix=@prefix@ - exec_prefix=@exec_prefix@ - datarootdir=@datarootdir@ - pkgdatadir=@datadir@/@PACKAGE@ --wayland_scanner=@bindir@/wayland-scanner -+wayland_scanner=wayland-scanner - - Name: Wayland Scanner - Description: Wayland scanner diff --git a/external/poky/meta/recipes-graphics/wayland/wayland/run-ptest b/external/poky/meta/recipes-graphics/wayland/wayland/run-ptest new file mode 100644 index 00000000..7e8d9de0 --- /dev/null +++ b/external/poky/meta/recipes-graphics/wayland/wayland/run-ptest @@ -0,0 +1,17 @@ +#!/bin/sh + +export WAYLAND_SCANNER=wayland-scanner +export TEST_DATA_DIR=tests/data +export TEST_OUTPUT_DIR=tests/output +export SED=sed +export WAYLAND_EGL_LIB=/usr/lib/libwayland-egl.so.1 +export NM=nm + +for i in `ls tests/*-test tests/wayland-egl-symbols-check tests/scanner-test.sh`; do + $i + if [ $? -eq 0 ]; then + echo "PASS: $i" + else + echo "FAIL: $i" + fi +done diff --git a/external/poky/meta/recipes-graphics/wayland/wayland_1.16.0.bb b/external/poky/meta/recipes-graphics/wayland/wayland_1.18.0.bb index 112ee1a2..00be3aac 100644 --- a/external/poky/meta/recipes-graphics/wayland/wayland_1.16.0.bb +++ b/external/poky/meta/recipes-graphics/wayland/wayland_1.18.0.bb @@ -10,20 +10,27 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \ file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce" -DEPENDS = "expat libxml2 libffi wayland-native" +DEPENDS = "expat libffi wayland-native" SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ - file://fixpathinpcfiles.patch \ + file://run-ptest \ + file://0002-meson.build-find-the-native-wayland-scanner-directly.patch \ + file://0002-Do-not-hardcode-the-path-to-wayland-scanner.patch \ + file://0001-build-Fix-strndup-detection-on-MinGW.patch \ + file://0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch \ " -SRC_URI[md5sum] = "0c215e53de71d6fb26f7102cdc6432d3" -SRC_URI[sha256sum] = "4e72c2b56109ccfb6610d776e465f4ca0af2280c9c2f7d5cc23f0ed2548752f5" +SRC_URI[md5sum] = "23317697b6e3ff2e1ac8c5ba3ed57b65" +SRC_URI[sha256sum] = "4675a79f091020817a98fd0484e7208c8762242266967f55a67776936c2e294d" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" -inherit autotools pkgconfig +inherit meson pkgconfig ptest -EXTRA_OECONF = "--disable-documentation --with-host-scanner" -EXTRA_OECONF_class-native = "--disable-documentation --disable-libraries" +PACKAGECONFIG ??= "dtd-validation" +PACKAGECONFIG[dtd-validation] = "-Ddtd_validation=true,-Ddtd_validation=false,libxml2,," + +EXTRA_OEMESON = "-Ddocumentation=false" +EXTRA_OEMESON_class-native = "-Ddocumentation=false -Dlibraries=false" # Wayland installs a M4 macro for other projects to use, which uses the target # pkg-config to find files. Replace pkg-config with pkg-config-native. @@ -33,6 +40,15 @@ do_install_append_class-native() { -i ${D}/${datadir}/aclocal/wayland-scanner.m4 } +do_install_ptest() { + mkdir -p ${D}${PTEST_PATH}/tests/data + cp -rf ${B}/tests/*-test ${B}/tests/*-checker ${D}${PTEST_PATH}/tests + cp -rf ${B}/tests/*-checker ${D}${PTEST_PATH} + cp -rf ${S}/tests/scanner-test.sh ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/data/* ${D}${PTEST_PATH}/tests/data/ + cp -rf ${S}/egl/wayland-egl-symbols-check ${D}${PTEST_PATH}/tests/ +} + sysroot_stage_all_append_class-target () { rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4 cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/ @@ -42,3 +58,5 @@ FILES_${PN} = "${libdir}/*${SOLIBS}" FILES_${PN}-dev += "${bindir} ${datadir}/wayland" BBCLASSEXTEND = "native nativesdk" + +RDEPENDS_${PN}-ptest += "binutils sed" diff --git a/external/poky/meta/recipes-graphics/wayland/weston-conf.bb b/external/poky/meta/recipes-graphics/wayland/weston-conf.bb deleted file mode 100644 index f52200c4..00000000 --- a/external/poky/meta/recipes-graphics/wayland/weston-conf.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Weston, a Wayland compositor, configuration files" -HOMEPAGE = "http://wayland.freedesktop.org" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -CONFFILES_${PN} = "${sysconfdir}/xdg/weston/weston.ini" - -FILES_${PN} = "${sysconfdir}/xdg/weston/weston.ini" - -PACKAGES = "${PN}" - -do_configure[noexec] = '1' -do_compile[noexec] = '1' - -do_install() { - : -} - -do_install_qemux86() { - mkdir -p ${D}/${sysconfdir}/xdg/weston - cat << EOF > ${D}/${sysconfdir}/xdg/weston/weston.ini -[core] -backend=fbdev-backend.so -EOF -} - -do_install_qemux86-64() { - mkdir -p ${D}/${sysconfdir}/xdg/weston - cat << EOF > ${D}/${sysconfdir}/xdg/weston/weston.ini -[core] -backend=fbdev-backend.so -EOF -} diff --git a/external/poky/meta/recipes-graphics/wayland/weston-init.bb b/external/poky/meta/recipes-graphics/wayland/weston-init.bb index 22ba5f3f..40aa7629 100644 --- a/external/poky/meta/recipes-graphics/wayland/weston-init.bb +++ b/external/poky/meta/recipes-graphics/wayland/weston-init.bb @@ -2,23 +2,45 @@ SUMMARY = "Startup script and systemd unit file for the Weston Wayland composito LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +PACKAGE_ARCH = "${MACHINE_ARCH}" + SRC_URI = "file://init \ - file://weston.service \ + file://weston.env \ + file://weston.ini \ + file://weston@.service \ + file://71-weston-drm.rules \ file://weston-start" S = "${WORKDIR}" do_install() { install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston - install -Dm0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service - + install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini + install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston + + # Install Weston systemd service and accompanying udev rule + install -D -p -m0644 ${WORKDIR}/weston@.service ${D}${systemd_system_unitdir}/weston@.service + sed -i -e s:/etc:${sysconfdir}:g \ + -e s:/usr/bin:${bindir}:g \ + -e s:/var:${localstatedir}:g \ + ${D}${systemd_unitdir}/system/weston@.service + install -D -p -m0644 ${WORKDIR}/71-weston-drm.rules \ + ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules # Install weston-start script install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start } -inherit allarch update-rc.d distro_features_check systemd +do_install_append_libc-musl_qemux86() { + echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston +} + +do_install_append_libc-musl_qemux86-64() { + echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston +} + +inherit update-rc.d features_check systemd # rdepends on weston which depends on virtual/egl REQUIRED_DISTRO_FEATURES = "opengl" @@ -28,4 +50,10 @@ RDEPENDS_${PN} = "weston kbd" INITSCRIPT_NAME = "weston" INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." -SYSTEMD_SERVICE_${PN} = "weston.service" +FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service ${sysconfdir}/default/weston" + +CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston" + +SYSTEMD_SERVICE_${PN} = "weston@%i.service" +SYSTEMD_AUTO_ENABLE = "disable" + diff --git a/external/poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules b/external/poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules new file mode 100644 index 00000000..1a1b8bbd --- /dev/null +++ b/external/poky/meta/recipes-graphics/wayland/weston-init/71-weston-drm.rules @@ -0,0 +1,2 @@ +ACTION=="add", SUBSYSTEM=="graphics", KERNEL=="fb0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@root.service" +ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@root.service" diff --git a/external/poky/meta/recipes-graphics/wayland/weston-init/qemuall/weston.ini b/external/poky/meta/recipes-graphics/wayland/weston-init/qemuall/weston.ini new file mode 100644 index 00000000..17ebd7fd --- /dev/null +++ b/external/poky/meta/recipes-graphics/wayland/weston-init/qemuall/weston.ini @@ -0,0 +1,2 @@ +[core] +backend=fbdev-backend.so diff --git a/external/poky/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini b/external/poky/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/external/poky/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini diff --git a/external/poky/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini b/external/poky/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/external/poky/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini diff --git a/external/poky/meta/recipes-graphics/wayland/weston-init/weston-start b/external/poky/meta/recipes-graphics/wayland/weston-init/weston-start index e72fbaaa..ccc70934 100755 --- a/external/poky/meta/recipes-graphics/wayland/weston-init/weston-start +++ b/external/poky/meta/recipes-graphics/wayland/weston-init/weston-start @@ -5,8 +5,8 @@ export PATH="/sbin:/usr/sbin:/bin:/usr/bin" usage() { - cat <<EOF - $0 [<openvt arguments>] [-- <weston options>] + cat <<EOF + $0 [<openvt arguments>] [-- <weston options>] EOF } @@ -27,10 +27,19 @@ if [ -n "$WAYLAND_DISPLAY" ]; then echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet." exit 1 fi + +if [ -n "$WESTON_USER" ]; then + if [ -z "$WESTON_TTY" ]; then + echo "ERROR: If you have WESTON_USER variable set, you also need WESTON_TTY." + exit 1 + fi + weston_args_user="-u $WESTON_USER -t $WESTON_TTY" +fi + if [ -n "$DISPLAY" ]; then launcher="weston" else - launcher="weston-launch --" + launcher="weston-launch $weston_args_user --" fi openvt_args="-s" @@ -59,11 +68,15 @@ if [ -d "$modules_dir" ]; then fi if test -z "$XDG_RUNTIME_DIR"; then - export XDG_RUNTIME_DIR=/run/user/`id -u` - if ! test -d "$XDG_RUNTIME_DIR"; then - mkdir --parents $XDG_RUNTIME_DIR - chmod 0700 $XDG_RUNTIME_DIR - fi + export XDG_RUNTIME_DIR=/run/user/`id -u ${WESTON_USER}` + if ! test -d "$XDG_RUNTIME_DIR"; then + mkdir --parents $XDG_RUNTIME_DIR + chmod 0700 $XDG_RUNTIME_DIR + fi + if [ -n "$WESTON_USER" ] + then + chown $WESTON_USER:$WESTON_USER $XDG_RUNTIME_DIR + fi fi exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log diff --git a/external/poky/meta/recipes-graphics/wayland/weston-init/weston.env b/external/poky/meta/recipes-graphics/wayland/weston-init/weston.env new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/external/poky/meta/recipes-graphics/wayland/weston-init/weston.env diff --git a/external/poky/meta/recipes-graphics/wayland/weston-init/weston.ini b/external/poky/meta/recipes-graphics/wayland/weston-init/weston.ini new file mode 100644 index 00000000..1e6dff68 --- /dev/null +++ b/external/poky/meta/recipes-graphics/wayland/weston-init/weston.ini @@ -0,0 +1,75 @@ +# configuration file for Weston + +[core] +#modules=xwayland.so,cms-colord.so +#shell=desktop-shell.so +#gbm-format=xrgb2101010 +require-input=false + +#[shell] +#background-image=/usr/share/backgrounds/gnome/Aqua.jpg +#background-color=0xff002244 +#background-type=tile +#clock-format=minutes +#panel-color=0x90ff0000 +#locking=true +#animation=zoom +#startup-animation=fade +#binding-modifier=ctrl +#num-workspaces=6 +#cursor-theme=whiteglass +#cursor-size=24 + +#lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png +#lockscreen=/usr/share/backgrounds/gnome/Garden.jpg +#homescreen=/usr/share/backgrounds/gnome/Blinds.jpg +#animation=fade + +#[launcher] +#icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png +#path=/usr/bin/gnome-terminal + +#[launcher] +#icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png +#path=/usr/bin/weston-terminal + +#[launcher] +#icon=/usr/share/icons/hicolor/24x24/apps/google-chrome.png +#path=/usr/bin/google-chrome + +#[launcher] +#icon=/usr/share/icons/gnome/24x24/apps/arts.png +#path=/build/weston-0lEgCh/weston-1.11.0/weston-flower + +#[input-method] +#path=/usr/lib/weston/weston-keyboard + +#[output] +#name=LVDS1 +#mode=1680x1050 +#transform=90 +#icc_profile=/usr/share/color/icc/colord/Bluish.icc + +#[output] +#name=VGA1 +#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync +#transform=flipped + +#[output] +#name=X1 +#mode=1024x768 +#transform=flipped-90 + +#[libinput] +#enable_tap=true + +#[touchpad] +#constant_accel_factor = 50 +#min_accel_factor = 0.16 +#max_accel_factor = 1.0 + +#[screen-share] +#command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize + +#[xwayland] +#path=/usr/bin/Xwayland diff --git a/external/poky/meta/recipes-graphics/wayland/weston-init/weston.service b/external/poky/meta/recipes-graphics/wayland/weston-init/weston@.service index 18f72626..39e19301 100644 --- a/external/poky/meta/recipes-graphics/wayland/weston-init/weston.service +++ b/external/poky/meta/recipes-graphics/wayland/weston-init/weston@.service @@ -1,13 +1,15 @@ [Unit] Description=Weston Wayland Compositor RequiresMountsFor=/run +Conflicts=plymouth-quit.service +After=systemd-user-sessions.service plymouth-quit-wait.service [Service] -User=root +User=%i PAMName=login EnvironmentFile=-/etc/default/weston -ExecStart=/usr/bin/weston-start -v -e -- $OPTARGS - -[Install] -WantedBy=multi-user.target +StandardError=journal +PermissionsStartOnly=true +IgnoreSIGPIPE=no +ExecStart=/usr/bin/weston-start -v -e -- $OPTARGS diff --git a/external/poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/external/poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch deleted file mode 100644 index 09ec1559..00000000 --- a/external/poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch +++ /dev/null @@ -1,78 +0,0 @@ -From ad1d2161c811cff25d1684c33611f300adb753bc Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 29 May 2015 20:56:00 -0700 -Subject: [PATCH] make error() portable - -error() is not posix but gnu extension so may not be available on all -kind of systemsi e.g. musl. - -Upstream-Status: Submitted - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - configure.ac | 2 ++ - libweston/weston-error.h | 20 ++++++++++++++++++++ - libweston/weston-launch.c | 2 +- - 3 files changed, 23 insertions(+), 1 deletion(-) - create mode 100644 libweston/weston-error.h - -diff --git a/configure.ac b/configure.ac -index 7aebbdb..dc9c802 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -109,6 +109,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], - [[#include <time.h>]]) - AC_CHECK_HEADERS([execinfo.h]) - -+AC_CHECK_HEADERS([error.h]) -+ - AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) - - # check for libdrm as a build-time dependency only -diff --git a/libweston/weston-error.h b/libweston/weston-error.h -new file mode 100644 -index 0000000..2089d02 ---- /dev/null -+++ b/libweston/weston-error.h -@@ -0,0 +1,20 @@ -+#ifndef _WESTON_ERROR_H -+#define _WESTON_ERROR_H -+ -+#if defined(HAVE_ERROR_H) -+#include <error.h> -+#else -+#include <err.h> -+#include <string.h> -+#define _weston_error(S, E, F, ...) do { \ -+ if (E) \ -+ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \ -+ else \ -+ err(S, F, ##__VA_ARGS__); \ -+} while(0) -+ -+#define error _weston_error -+#endif -+ -+#endif -+ -diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 1adcf21..166bf3b 100644 ---- a/libweston/weston-launch.c -+++ b/libweston/weston-launch.c -@@ -33,7 +33,6 @@ - #include <poll.h> - #include <errno.h> - --#include <error.h> - #include <getopt.h> - - #include <sys/types.h> -@@ -59,6 +58,7 @@ - #endif - - #include "weston-launch.h" -+#include "weston-error.h" - - #define DRM_MAJOR 226 - diff --git a/external/poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/external/poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch index d648538b..62b864c1 100644 --- a/external/poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ b/external/poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -1,7 +1,8 @@ -From b98b9dbda902225cdd972b5bff6a641c36cc7e90 Mon Sep 17 00:00:00 2001 +From 5f2d71998eb77068cbaee2d468cbb296a42d5739 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 +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. @@ -14,46 +15,49 @@ Upstream-Status: Pending Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com> +Signed-off-by: Ming Liu <ming.liu@toradex.com> --- - configure.ac | 9 +++++++-- - libweston/weston-launch.c | 20 ++++++++++++++++++++ - 2 files changed, 27 insertions(+), 2 deletions(-) + libweston/meson.build | 16 ++++++++++++---- + libweston/weston-launch.c | 21 +++++++++++++++++++++ + meson_options.txt | 7 +++++++ + 3 files changed, 40 insertions(+), 4 deletions(-) -diff --git a/configure.ac b/configure.ac -index dc9c802..48cf5cb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -451,13 +451,17 @@ AC_ARG_ENABLE(resize-optimization, - AS_IF([test "x$enable_resize_optimization" = "xyes"], - [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) - -+AC_ARG_WITH(pam, -+ AS_HELP_STRING([--with-pam], [Use PAM]), -+ [use_pam=$withval], [use_pam=yes]) - AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes) - AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes) --if test x$enable_weston_launch = xyes; then -+if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then - WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no]) - if test x$have_pam = xno; then -- AC_ERROR([weston-launch requires pam]) -+ AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found]) - fi -+ AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available]) - fi - - AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") -@@ -702,6 +706,7 @@ AC_MSG_RESULT([ - Enable developer documentation ${enable_devdocs} - - weston-launch utility ${enable_weston_launch} -+ PAM support ${use_pam} - systemd-login support ${have_systemd_login} - systemd notify support ${enable_systemd_notify} - +diff --git a/libweston/meson.build b/libweston/meson.build +index 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 166bf3b..6fb9232 100644 +index 8a711b4..54c567a 100644 --- a/libweston/weston-launch.c +++ b/libweston/weston-launch.c @@ -51,7 +51,9 @@ @@ -66,7 +70,7 @@ index 166bf3b..6fb9232 100644 #ifdef HAVE_SYSTEMD_LOGIN #include <systemd/sd-login.h> -@@ -101,8 +103,10 @@ drmSetMaster(int drm_fd) +@@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) #endif struct weston_launch { @@ -77,7 +81,7 @@ index 166bf3b..6fb9232 100644 int tty; int ttynr; int sock[2]; -@@ -189,6 +193,7 @@ weston_launch_allowed(struct weston_launch *wl) +@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) return false; } @@ -85,7 +89,7 @@ index 166bf3b..6fb9232 100644 static int pam_conversation_fn(int msg_count, const struct pam_message **messages, -@@ -229,6 +234,7 @@ setup_pam(struct weston_launch *wl) +@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) return 0; } @@ -93,7 +97,7 @@ index 166bf3b..6fb9232 100644 static int setup_launcher_socket(struct weston_launch *wl) -@@ -422,6 +428,7 @@ quit(struct weston_launch *wl, int status) +@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status) close(wl->signalfd); close(wl->sock[0]); @@ -101,7 +105,7 @@ index 166bf3b..6fb9232 100644 if (wl->new_user) { err = pam_close_session(wl->ph, 0); if (err) -@@ -429,6 +436,7 @@ quit(struct weston_launch *wl, int status) +@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status) err, pam_strerror(wl->ph, err)); pam_end(wl->ph, err); } @@ -109,7 +113,7 @@ index 166bf3b..6fb9232 100644 if (ioctl(wl->tty, KDSKBMUTE, 0) && ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) -@@ -608,6 +616,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -666,6 +674,7 @@ setup_session(struct weston_launch *wl, char **child_argv) setenv("HOME", wl->pw->pw_dir, 1); setenv("SHELL", wl->pw->pw_shell, 1); @@ -117,7 +121,7 @@ index 166bf3b..6fb9232 100644 env = pam_getenvlist(wl->ph); if (env) { for (i = 0; env[i]; ++i) { -@@ -616,6 +625,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -674,6 +683,7 @@ setup_session(struct weston_launch *wl, char **child_argv) } free(env); } @@ -125,7 +129,7 @@ index 166bf3b..6fb9232 100644 /* * We open a new session, so it makes sense -@@ -683,8 +693,10 @@ static void +@@ -745,8 +755,10 @@ static void help(const char *name) { fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); @@ -136,7 +140,7 @@ index 166bf3b..6fb9232 100644 fprintf(stderr, " -t, --tty Start session on alternative tty,\n" " e.g. -t /dev/tty4, requires -u option.\n"); fprintf(stderr, " -v, --verbose Be verbose\n"); -@@ -698,7 +710,9 @@ main(int argc, char *argv[]) +@@ -760,7 +772,9 @@ main(int argc, char *argv[]) int i, c; char *tty = NULL; struct option opts[] = { @@ -146,21 +150,24 @@ index 166bf3b..6fb9232 100644 { "tty", required_argument, NULL, 't' }, { "verbose", no_argument, NULL, 'v' }, { "help", no_argument, NULL, 'h' }, -@@ -710,9 +724,13 @@ main(int argc, char *argv[]) +@@ -772,11 +786,16 @@ main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { switch (c) { case 'u': +#ifdef HAVE_PAM wl.new_user = optarg; - if (getuid() != 0) - error(1, 0, "Permission denied. -u allowed for root only"); + if (getuid() != 0) { + fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); + exit(EXIT_FAILURE); + } +#else -+ error(1, 0, "-u is unsupported in this weston-launch build"); ++ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); ++ exit(EXIT_FAILURE); +#endif break; case 't': tty = optarg; -@@ -753,8 +771,10 @@ main(int argc, char *argv[]) +@@ -828,8 +847,10 @@ main(int argc, char *argv[]) if (setup_tty(&wl, tty) < 0) exit(EXIT_FAILURE); @@ -171,3 +178,21 @@ index 166bf3b..6fb9232 100644 if (setup_launcher_socket(&wl) < 0) exit(EXIT_FAILURE); +diff --git a/meson_options.txt b/meson_options.txt +index c862ecc..73ef2c3 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/external/poky/meta/recipes-graphics/wayland/weston_5.0.0.bb b/external/poky/meta/recipes-graphics/wayland/weston_8.0.0.bb index e5171092..f8e9e15f 100644 --- a/external/poky/meta/recipes-graphics/wayland/weston_5.0.0.bb +++ b/external/poky/meta/recipes-graphics/wayland/weston_8.0.0.bb @@ -8,16 +8,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ file://weston.png \ file://weston.desktop \ - file://0001-make-error-portable.patch \ file://xwayland.weston-start \ file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ " -SRC_URI[md5sum] = "752a04ce3c65af4884cfac4e57231bdb" -SRC_URI[sha256sum] = "15a23423bcfa45e31e1dedc0cd524ba71e2930df174fde9c99b71a537c4e4caf" +SRC_URI[md5sum] = "53e4810d852df0601d01fd986a5b22b3" +SRC_URI[sha256sum] = "7518b49b2eaa1c3091f24671bdcc124fd49fc8f1af51161927afa4329c027848" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" -inherit autotools pkgconfig useradd distro_features_check +inherit meson pkgconfig useradd features_check # depends on virtual/egl REQUIRED_DISTRO_FEATURES = "opengl" @@ -26,48 +25,48 @@ DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" -EXTRA_OECONF = "--enable-setuid-install \ - --disable-rdp-compositor \ - " -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ +EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ - clients launch" + ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ + launch" # # Compositor choices # # Weston on KMS -PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa virtual/libgbm mtdev" +PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" # Weston on Wayland (nested Weston) -PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" # Weston on X11 -PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo" +PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" # Headless Weston -PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor" +PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" # Weston on framebuffer -PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev" +PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" # weston-launch -PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm" +PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" # VA-API desktop recorder -PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva" +PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" # Weston with EGL support -PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl" -# Weston with cairo glesv2 support -PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo" +PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" # Weston with lcms support -PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" +PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" # Weston with webp support -PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp" +PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" # Weston with systemd-login support -PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" +PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" # Weston with Xwayland support (requires X11 and Wayland) -PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" # colord CMS support -PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" +PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" # Clients support -PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" +PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" +# Virtual remote output with GStreamer on DRM backend +PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0" # Weston with PAM support -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" +PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" do_install_append() { # Weston doesn't need the .la files to load modules, so wipe them @@ -85,12 +84,17 @@ do_install_append() { if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then + chmod u+s ${D}${bindir}/weston-launch + fi } PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" -FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}" +FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" +FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." @@ -101,7 +105,7 @@ FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" RDEPENDS_${PN} += "xkeyboard-config" -RRECOMMENDS_${PN} = "weston-conf liberation-fonts" +RRECOMMENDS_${PN} = "weston-init liberation-fonts" RRECOMMENDS_${PN}-dev += "wayland-protocols" USERADD_PACKAGES = "${PN}" |