mirror of
https://git.yoctoproject.org/poky
synced 2026-04-19 06:32:13 +02:00
weston: wrapper for weston modules argument
Due to custom option parser implementation weston accepts only one argument of a given type. As the result if multiple modules add multiple --modules agruments only last will be used. This fix introduces wrapper around modules in terms of weston-init to prepare proper modules argument for weston and adds systemd-notify module into weston-init module to support Type=notify in systemd service file. (From OE-Core rev: c8aa0222ce2be647911114aaebcbb0d55d7caf87) Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
b0c788d7be
commit
28e89f8ade
@@ -21,6 +21,14 @@ add_weston_argument() {
|
||||
# Add openvt extra argument
|
||||
add_openvt_argument() {
|
||||
openvt_args="$openvt_args $1"
|
||||
|
||||
}
|
||||
## Add module to --modules argument
|
||||
add_weston_module() {
|
||||
if [[ "x${weston_modules}" == "x" ]]; then
|
||||
weston_modules="--modules "
|
||||
fi;
|
||||
weston_modules+="${1},"
|
||||
}
|
||||
|
||||
if [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
@@ -68,6 +76,9 @@ if [ -d "$modules_dir" ]; then
|
||||
|
||||
# process module
|
||||
. $m
|
||||
if [[ x"{$weston_modules}" != "x" ]]; then
|
||||
add_weston_argument "${weston_modules}"
|
||||
fi;
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# SPDX-FileCopyrightText: Huawei Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then
|
||||
add_weston_module "systemd-notify.so"
|
||||
fi
|
||||
@@ -9,6 +9,7 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
|
||||
file://weston.png \
|
||||
file://weston.desktop \
|
||||
file://xwayland.weston-start \
|
||||
file://systemd-notify.weston-start \
|
||||
file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
|
||||
file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \
|
||||
file://0001-meson.build-fix-incorrect-header.patch \
|
||||
@@ -111,6 +112,10 @@ do_install:append() {
|
||||
install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
|
||||
fi
|
||||
|
||||
if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
|
||||
install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
|
||||
fi
|
||||
|
||||
if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
|
||||
chmod u+s ${D}${bindir}/weston-launch
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user