pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Import seatd
Module Name: pkgsrc-wip
Committed By: kikadf <kikadf.01%gmail.com@localhost>
Pushed By: kikadf
Date: Thu Sep 11 10:12:37 2025 +0200
Changeset: 6d7e224b3d582fa15416f02005e73a53e74e9572
Modified Files:
Makefile
Added Files:
seatd/DESCR
seatd/Makefile
seatd/PLIST
seatd/buildlink3.mk
seatd/distinfo
seatd/patches/patch-common_terminal.c
Log Message:
Import seatd
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6d7e224b3d582fa15416f02005e73a53e74e9572
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
seatd/DESCR | 7 ++++
seatd/Makefile | 30 ++++++++++++++
seatd/PLIST | 9 +++++
seatd/buildlink3.mk | 14 +++++++
seatd/distinfo | 6 +++
seatd/patches/patch-common_terminal.c | 76 +++++++++++++++++++++++++++++++++++
7 files changed, 143 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index a37a79a29f..17791d1734 100644
--- a/Makefile
+++ b/Makefile
@@ -5326,6 +5326,7 @@ SUBDIR+= seafile-client
SUBDIR+= seafile-gui
SUBDIR+= seafile-server
SUBDIR+= seagull
+SUBDIR+= seatd
SUBDIR+= sector-decomposition
SUBDIR+= seed7
SUBDIR+= seeks
diff --git a/seatd/DESCR b/seatd/DESCR
new file mode 100644
index 0000000000..39277969b0
--- /dev/null
+++ b/seatd/DESCR
@@ -0,0 +1,7 @@
+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.
+Seat management library allowing applications to
+use whatever seat management is available.
diff --git a/seatd/Makefile b/seatd/Makefile
new file mode 100644
index 0000000000..5f7c4f9257
--- /dev/null
+++ b/seatd/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD$
+
+DISTNAME= seatd-0.9.1
+CATEGORIES= sysutils
+MASTER_SITES= https://git.sr.ht/~kennylevinsen/seatd/archive/
+DISTFILES= ${PKGVERSION_NOREV}${EXTRACT_SUFX}
+
+MAINTAINER= kikadf.01%gmail.com@localhost
+HOMEPAGE= https://git.sr.ht/~kennylevinsen/seatd/
+COMMENT= Seat management daemon and library
+LICENSE= mit
+
+#USE_TOOLS+= pkg-config
+TOOL_DEPENDS+= scdoc-[0-9]*:../../textproc/scdoc
+
+MESON_ARGS+= -Dlibseat-logind=disabled
+MESON_ARGS+= -Dlibseat-builtin=enabled
+
+INSTALLATION_DIRS+= ${PKGMANDIR}/man1
+
+post-install:
+ scdoc < ${WRKSRC}/man/seatd.1.scd > ${WRKSRC}/man/seatd.1
+ scdoc < ${WRKSRC}/man/seatd-launch.1.scd > ${WRKSRC}/man/seatd-launch.1
+ ${INSTALL_MAN} ${WRKSRC}/man/seatd.1 \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/seatd.1
+ ${INSTALL_MAN} ${WRKSRC}/man/seatd-launch.1 \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/seatd-launch.1
+
+.include "../../devel/meson/build.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/seatd/PLIST b/seatd/PLIST
new file mode 100644
index 0000000000..ebce8100f7
--- /dev/null
+++ b/seatd/PLIST
@@ -0,0 +1,9 @@
+@comment $NetBSD$
+bin/seatd
+bin/seatd-launch
+include/libseat.h
+lib/libseat.so
+lib/libseat.so.1
+lib/pkgconfig/libseat.pc
+man/man1/seatd-launch.1
+man/man1/seatd.1
diff --git a/seatd/buildlink3.mk b/seatd/buildlink3.mk
new file mode 100644
index 0000000000..93395dcf3a
--- /dev/null
+++ b/seatd/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD$
+
+BUILDLINK_TREE+= seatd
+
+.if !defined(SEATD_BUILDLINK3_MK)
+SEATD_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.seatd+= seatd>=0.9.1
+BUILDLINK_ABI_DEPENDS.seatd+= seatd>=0.9.1
+BUILDLINK_PKGSRCDIR.seatd?= ../../wip/seatd
+
+.endif # SEATD_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -seatd
diff --git a/seatd/distinfo b/seatd/distinfo
new file mode 100644
index 0000000000..3da97ad95d
--- /dev/null
+++ b/seatd/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+BLAKE2s (0.9.1.tar.gz) = bfbe38c62913d54849d77d844c0382ee492c319ebba5632e93c6c7b29b07a2d9
+SHA512 (0.9.1.tar.gz) = 15d24a6646fa82a2bcc21d2a99693e1c54e71b9da24a0ba5c847a72c53d803410cbcee31fc847fef468b18d941d9685391bebf745819d4b24d056cd67e08c3fb
+Size (0.9.1.tar.gz) = 41968 bytes
+SHA1 (patch-common_terminal.c) = b397ffaad707f2f62258bcbb3178b8966acd830c
diff --git a/seatd/patches/patch-common_terminal.c b/seatd/patches/patch-common_terminal.c
new file mode 100644
index 0000000000..9625aabe3d
--- /dev/null
+++ b/seatd/patches/patch-common_terminal.c
@@ -0,0 +1,76 @@
+$NetBSD$
+
+* Wsconsio patch from OpenBSD
+
+--- common/terminal.c.orig 2024-10-30 19:43:26.000000000 +0000
++++ common/terminal.c
+@@ -22,6 +22,7 @@
+ #define K_DISABLE K_RAW
+ #define FRSIG SIGIO
+ #elif defined(__NetBSD__)
++#include <dev/wscons/wsconsio.h>
+ #include <dev/wscons/wsdisplay_usl_io.h>
+ #define K_ENABLE K_XLATE
+ #define K_DISABLE K_RAW
+@@ -201,7 +202,19 @@ int terminal_set_process_switching(int f
+ .acqsig = enable ? SIGUSR2 : 0,
+ .frsig = FRSIG,
+ };
+-
++ struct vt_mode current_mode;
++ if (ioctl(fd, VT_GETMODE, ¤t_mode) == -1) {
++ log_errorf("Could not query VT mode for %d: %s",
++ fd, strerror(errno));
++ return -1;
++ }
++ if (current_mode.mode == mode.mode &&
++ current_mode.relsig == mode.relsig &&
++ current_mode.acqsig == mode.acqsig &&
++ current_mode.frsig == mode.frsig) {
++ log_debugf("%s: %d already in mode %d", __func__, fd, enable);
++ return 0;
++ }
+ if (ioctl(fd, VT_SETMODE, &mode) == -1) {
+ log_errorf("Could not set VT mode to %s process switching: %s",
+ enable ? "enable" : "disable", strerror(errno));
+@@ -242,11 +255,20 @@ int terminal_ack_acquire(int fd) {
+
+ int terminal_set_keyboard(int fd, bool enable) {
+ log_debugf("Setting KD keyboard state to %d", enable);
++#ifndef __NetBSD__
+ if (ioctl(fd, KDSKBMODE, enable ? K_ENABLE : K_DISABLE) == -1) {
+ log_errorf("Could not set KD keyboard mode to %s: %s",
+ enable ? "enabled" : "disabled", strerror(errno));
+ return -1;
+ }
++#else
++ int mode = enable ? WSKBD_RAW : WSKBD_TRANSLATED;
++ if (ioctl(fd, WSKBDIO_SETMODE, &mode) == -1) {
++ log_errorf("Could not set keyboard mode to %s: %s",
++ enable ? "translated" : "raw", strerror(errno));
++ return -1;
++ }
++#endif
+ #if defined(__FreeBSD__)
+ struct termios tios;
+ if (tcgetattr(fd, &tios) == -1) {
+@@ -269,10 +291,19 @@ int terminal_set_keyboard(int fd, bool e
+
+ int terminal_set_graphics(int fd, bool enable) {
+ log_debugf("Setting KD graphics state to %d", enable);
++#ifndef __NetBSD__
+ if (ioctl(fd, KDSETMODE, enable ? KD_GRAPHICS : KD_TEXT) == -1) {
+ log_errorf("Could not set KD graphics mode to %s: %s", enable ? "graphics" : "text",
+ strerror(errno));
+ return -1;
+ }
++#else
++ int mode = enable ? WSDISPLAYIO_MODE_MAPPED : WSDISPLAYIO_MODE_EMUL;
++ if (ioctl(fd, WSDISPLAYIO_SMODE, &mode) == -1) {
++ log_errorf("Could not set graphics mode to %s: %s", enable ? "mapped" : "emul",
++ strerror(errno));
++ return -1;
++ }
++#endif
+ return 0;
+ }
Home |
Main Index |
Thread Index |
Old Index