Wednesday, November 08, 2023

seatd: switch to upstream SITES

Hi,

now that seatd 0.8.0 has been released with some level of
NetBSD/FreeBSD support, it becomes easier to switch to the upstream
distribution and ship patches for OpenBSD.

There is no actual functionnal change between the previous package and
the new one.

comments, oks? (still not linked).

Index: Makefile
===================================================================
RCS file: /local/cvs/ports/sysutils/seatd/Makefile,v
diff -u -p -u -r1.3 Makefile
--- Makefile 27 Sep 2023 17:16:33 -0000 1.3
+++ Makefile 8 Nov 2023 11:20:02 -0000
@@ -1,12 +1,12 @@
COMMENT = minimal seat management daemon and universal library

-V = 20230813
-PKGNAME = seatd-$V
-DISTNAME = seatd-openbsd-$V
+V = 0.8.0
+EPOCH = 0
+DISTNAME = seatd-$V
CATEGORIES = sysutils
-REVISION = 0

-SITES = https://gitlab.tetaneutral.net/mherrb/seatd/-/archive/openbsd-${V}/
+SITES = https://git.sr.ht/~kennylevinsen/seatd/archive/
+DISTFILES = seatd-{}${V}${EXTRACT_SUFX}

SHARED_LIBS+= seat 0.0 # 0.0

Index: distinfo
===================================================================
RCS file: /local/cvs/ports/sysutils/seatd/distinfo,v
diff -u -p -u -r1.2 distinfo
--- distinfo 23 Aug 2023 14:03:31 -0000 1.2
+++ distinfo 8 Nov 2023 11:20:02 -0000
@@ -1,2 +1,2 @@
-SHA256 (seatd-openbsd-20230813.tar.gz) = mw/4GTTgnfi7E5yMIDxH6KqWeYsX+K3VsFxvftDW+9U=
-SIZE (seatd-openbsd-20230813.tar.gz) = 39459
+SHA256 (seatd-0.8.0.tar.gz) = pWKkTuM8yyCVShweyakOyy23oHrWsY0KyQQyjvvPZaA=
+SIZE (seatd-0.8.0.tar.gz) = 39349
Index: patches/patch-common_drm_c
===================================================================
RCS file: patches/patch-common_drm_c
diff -N patches/patch-common_drm_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-common_drm_c 8 Nov 2023 11:20:02 -0000
@@ -0,0 +1,14 @@
+OpenBSD support
+
+Index: common/drm.c
+--- common/drm.c.orig
++++ common/drm.c
+@@ -21,7 +21,7 @@ int drm_drop_master(int fd) {
+ return ioctl(fd, DRM_IOCTL_DROP_MASTER, 0);
+ }
+
+-#if defined(__linux__) || defined(__NetBSD__)
++#if defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ int path_is_drm(const char *path) {
+ if (STR_HAS_PREFIX("/dev/dri/", path))
+ return 1;
Index: patches/patch-common_evdev_c
===================================================================
RCS file: patches/patch-common_evdev_c
diff -N patches/patch-common_evdev_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-common_evdev_c 8 Nov 2023 11:20:02 -0000
@@ -0,0 +1,14 @@
+OpenBSD support
+
+Index: common/evdev.c
+--- common/evdev.c.orig
++++ common/evdev.c
+@@ -25,7 +25,7 @@ int path_is_evdev(const char *path) {
+ int evdev_revoke(int fd) {
+ return ioctl(fd, EVIOCREVOKE, NULL);
+ }
+-#elif defined(__NetBSD__)
++#elif defined(__NetBSD__) || defined(__OpenBSD__)
+ int path_is_evdev(const char *path) {
+ (void)path;
+ return 0;
Index: patches/patch-common_terminal_c
===================================================================
RCS file: patches/patch-common_terminal_c
diff -N patches/patch-common_terminal_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-common_terminal_c 8 Nov 2023 11:20:02 -0000
@@ -0,0 +1,38 @@
+OpenBSD console support
+
+Index: common/terminal.c
+--- common/terminal.c.orig
++++ common/terminal.c
+@@ -21,7 +21,7 @@
+ #define K_ENABLE K_XLATE
+ #define K_DISABLE K_RAW
+ #define FRSIG SIGIO
+-#elif defined(__NetBSD__)
++#elif defined(__NetBSD__) || defined(__OpenBSD__)
+ #include <dev/wscons/wsdisplay_usl_io.h>
+ #define K_ENABLE K_XLATE
+ #define K_DISABLE K_RAW
+@@ -147,6 +147,14 @@ static int get_tty_path(int tty, char path[static TTYP
+ }
+ return 0;
+ }
++#elif defined(__OpenBSD__)
++static int get_tty_path(int tty, char path[static TTYPATHLEN]) {
++ assert(tty >= 0);
++ if (snprintf(path, TTYPATHLEN, "/dev/ttyC%d", tty) == -1) {
++ return -1;
++ }
++ return 0;
++}
+ #else
+ #error Unsupported platform
+

No comments:

Post a Comment