From: ayaka <[email protected]>

Weston would adapt the libseat for granting privilege and VT switch.
wlroots has merged it.

Signed-off-by: ayaka <[email protected]>
---
 ...build-fixup-standalone-without-seatd.patch | 71 +++++++++++++++++++
 meta/recipes-core/seatd/seatd_0.5.0.bb        | 33 +++++++++
 2 files changed, 104 insertions(+)
 create mode 100644 
meta/recipes-core/seatd/seatd/0001-build-fixup-standalone-without-seatd.patch
 create mode 100644 meta/recipes-core/seatd/seatd_0.5.0.bb

diff --git 
a/meta/recipes-core/seatd/seatd/0001-build-fixup-standalone-without-seatd.patch 
b/meta/recipes-core/seatd/seatd/0001-build-fixup-standalone-without-seatd.patch
new file mode 100644
index 0000000000..66e1ac73ab
--- /dev/null
+++ 
b/meta/recipes-core/seatd/seatd/0001-build-fixup-standalone-without-seatd.patch
@@ -0,0 +1,71 @@
+From 084df8ab271ce4b09c1ef5d9c5a859b2d02d20e7 Mon Sep 17 00:00:00 2001
+From: ayaka <[email protected]>
+Date: Mon, 19 Apr 2021 22:15:46 +0800
+Subject: [PATCH] build: fixup standalone without seatd
+
+I think that server option means the same thing as seatd, so I
+get rid of it.
+---
+ meson.build       | 10 +++++-----
+ meson_options.txt |  1 -
+ 2 files changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 7a70cb6..a2166c5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -104,10 +104,11 @@ server_files = [
+ 
+ with_seatd = get_option('seatd') == 'enabled'
+ with_builtin = get_option('builtin') == 'enabled'
+-with_server = get_option('server') == 'enabled'
+ 
+-if with_seatd
++if with_seatd or with_builtin
+       private_files += 'libseat/backend/seatd.c'
++endif
++if with_seatd
+       add_project_arguments('-DSEATD_ENABLED=1', language: 'c')
+ endif
+ 
+@@ -189,7 +190,7 @@ libseat = declare_dependency(
+       variables: libseat_vars,
+ )
+ 
+-if with_server
++if with_seatd
+       executable(
+               'seatd',
+               [ server_files, 'seatd/seatd.c' ],
+@@ -221,7 +222,7 @@ foreach name, value : tests
+               include_directories: [include_directories('.', 'include')]))
+ endforeach
+ 
+-if with_server
++if with_seatd
+       scdoc = dependency('scdoc', required: get_option('man-pages'), version: 
'>= 1.9.7', native: true)
+ else
+       scdoc = disabler()
+@@ -252,7 +253,6 @@ endif
+ summary({
+       'seatd': with_seatd,
+       'builtin': with_builtin,
+-      'server': with_server,
+       'systemd': logind.found() and logind_provider == 'systemd',
+       'elogind': logind.found() and logind_provider == 'elogind',
+ }, bool_yn: true)
+diff --git a/meson_options.txt b/meson_options.txt
+index 144ce7a..c61d473 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,7 +1,6 @@
+ option('logind', type: 'combo', choices: ['auto', 'disabled', 'elogind', 
'systemd'], value: 'auto', description: 'logind support')
+ option('seatd', type: 'combo', choices: ['enabled', 'disabled'], value: 
'enabled', description: 'seatd support')
+ option('builtin', type: 'combo', choices: ['enabled', 'disabled'], value: 
'disabled', description: 'builtin seatd server')
+-option('server', type: 'combo', choices: ['enabled', 'disabled'], value: 
'enabled', description: 'seatd server')
+ option('examples', type: 'combo', choices: ['enabled', 'disabled'], value: 
'disabled', description: 'libseat example programs')
+ option('man-pages', type: 'feature', value: 'auto', description: 'Generate 
and install man pages')
+ option('defaultpath', type: 'string', value: '', description: 'Default 
location for seatd socket (empty for default)')
+-- 
+2.30.2
+
diff --git a/meta/recipes-core/seatd/seatd_0.5.0.bb 
b/meta/recipes-core/seatd/seatd_0.5.0.bb
new file mode 100644
index 0000000000..edda037a0a
--- /dev/null
+++ b/meta/recipes-core/seatd/seatd_0.5.0.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Seat management daemon and library"
+HOMEPAGE = "https://git.sr.ht/~kennylevinsen/seatd";
+SECTION = "base"
+
+DESCRIPTION = "A minimal seat management daemon, and a universal seat 
management \
+library. Seat management takes care of mediating access to shared devices \
+(graphics, input), without requiring the applications needing access to be 
root."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 
"file://LICENSE;beginline=3;md5=6a01e8ccc65bea4e8bfa79b09ea1444c"
+
+SRCREV = "5535c2c3b19b42ebfe4c451600059e9418e401a6"
+SRCBRANCH = "master"
+SRC_URI = 
"git://git.sr.ht/~kennylevinsen/seatd;protocol=http;branch=${SRCBRANCH} \
+           file://0001-build-fixup-standalone-without-seatd.patch"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig meson
+
+EXTRA_OEMESON += " -Dbuiltin=enabled"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+
+PACKAGECONFIG[seatd] = "-Dseatd=enabled, -Dseatd=disabled"
+PACKAGECONFIG[systemd] = "-Dlogind=systemd, -Dlogind=disabled, systemd dbus"
+
+PACKAGES += "libseat libseat-dev"
+
+FILES_libseat-dev += "${FILES_SOLIBSDEV} ${includedir} ${libdir}/pkgconfig" 
+FILES_libseat =  "${libdir}/lib*${SOLIBS}"
+
+FILES_${PN} = "${bindir}/seatd"
-- 
2.30.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#150696): 
https://lists.openembedded.org/g/openembedded-core/message/150696
Mute This Topic: https://lists.openembedded.org/mt/82230372/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to