pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/libopeninput
Module Name: pkgsrc
Committed By: kikadf
Date: Tue Sep 22 14:38:21 UTC 2026
Modified Files:
pkgsrc/devel/libopeninput: Makefile Makefile.common distinfo
pkgsrc/devel/libopeninput/patches: patch-src_wscons.c
patch-src_wscons.h
Log Message:
libopeninput: update to 1.31.3
no changelog
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/libopeninput/Makefile \
pkgsrc/devel/libopeninput/Makefile.common \
pkgsrc/devel/libopeninput/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/libopeninput/patches/patch-src_wscons.c \
pkgsrc/devel/libopeninput/patches/patch-src_wscons.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/libopeninput/Makefile
diff -u pkgsrc/devel/libopeninput/Makefile:1.2 pkgsrc/devel/libopeninput/Makefile:1.3
--- pkgsrc/devel/libopeninput/Makefile:1.2 Wed May 27 17:14:19 2026
+++ pkgsrc/devel/libopeninput/Makefile Tue Sep 22 14:38:21 2026
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2026/05/27 17:14:19 kikadf Exp $
+# $NetBSD: Makefile,v 1.3 2026/09/22 14:38:21 kikadf Exp $
.include "Makefile.common"
-PKGREVISION= 1
COMMENT= Wscons(4) and kqueue(2) based port of libinput
USE_TOOLS+= pkg-config
Index: pkgsrc/devel/libopeninput/Makefile.common
diff -u pkgsrc/devel/libopeninput/Makefile.common:1.2 pkgsrc/devel/libopeninput/Makefile.common:1.3
--- pkgsrc/devel/libopeninput/Makefile.common:1.2 Wed May 27 17:14:19 2026
+++ pkgsrc/devel/libopeninput/Makefile.common Tue Sep 22 14:38:21 2026
@@ -1,14 +1,14 @@
-# $NetBSD: Makefile.common,v 1.2 2026/05/27 17:14:19 kikadf Exp $
+# $NetBSD: Makefile.common,v 1.3 2026/09/22 14:38:21 kikadf Exp $
# used by devel/libopeninput/Makefile
# used by devel/input-headers/Makefile
DISTNAME= libopeninput-${VERSION}
-VERSION= 1.30.2
+VERSION= 1.31.3
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=sizeofvoid/}
GITHUB_PROJECT= libopeninput
-GITHUB_TAG= dcf8584ec3f5cde2a2098de25276242d2d815cc7
+GITHUB_TAG= 10995219206280da0f1a3ba124abe4c8ef89e021
MAINTAINER= kikadf%NetBSD.org@localhost
HOMEPAGE= https://github.com/sizeofvoid/libopeninput/tree/libopeninput/
Index: pkgsrc/devel/libopeninput/distinfo
diff -u pkgsrc/devel/libopeninput/distinfo:1.2 pkgsrc/devel/libopeninput/distinfo:1.3
--- pkgsrc/devel/libopeninput/distinfo:1.2 Wed May 27 17:14:19 2026
+++ pkgsrc/devel/libopeninput/distinfo Tue Sep 22 14:38:21 2026
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.2 2026/05/27 17:14:19 kikadf Exp $
+$NetBSD: distinfo,v 1.3 2026/09/22 14:38:21 kikadf Exp $
-BLAKE2s (libopeninput-1.30.2-dcf8584ec3f5cde2a2098de25276242d2d815cc7.tar.gz) = 28117e461e18488812c475959e22f02d6477d4dfada1290ee6a809edea224d96
-SHA512 (libopeninput-1.30.2-dcf8584ec3f5cde2a2098de25276242d2d815cc7.tar.gz) =
1bd9a29efd466bb79b276d5fa6be64a0ce6f1deefa277f32f1d88a2e097c07602cd78ae62d0c10cbd427a24db9881e6ba49670b2f0ab0afcc7cee5bc08a0492b
-Size (libopeninput-1.30.2-dcf8584ec3f5cde2a2098de25276242d2d815cc7.tar.gz) = 1189070 bytes
-SHA1 (patch-src_wscons.c) = ccec4d8ced02d46525e62f082adc7bb03730c2e8
-SHA1 (patch-src_wscons.h) = 20c749ef79352094e1b646fdbe9566f95d7e0a41
+BLAKE2s (libopeninput-1.31.3-10995219206280da0f1a3ba124abe4c8ef89e021.tar.gz) = 1bb9295eb9bf288dd512d09e94d318241a820f5fb8d1d39f094df2c3794e0ece
+SHA512 (libopeninput-1.31.3-10995219206280da0f1a3ba124abe4c8ef89e021.tar.gz) =
4957ef42cfc6868546225d0b690acf51bc2a2fb799161a603fd3560c3d2b13af298161f4682f11e909aeaf443106b65cc4625a0afbc2b3fbd7fa27f61d34ef47
+Size (libopeninput-1.31.3-10995219206280da0f1a3ba124abe4c8ef89e021.tar.gz) = 1203451 bytes
+SHA1 (patch-src_wscons.c) = f4cee7cd0145ecd8e90cc85a7aac80d5a9fc0b48
+SHA1 (patch-src_wscons.h) = d4ce816f3e1b33e4f6dc4dc9d15f41400bccf2a4
Index: pkgsrc/devel/libopeninput/patches/patch-src_wscons.c
diff -u pkgsrc/devel/libopeninput/patches/patch-src_wscons.c:1.1 pkgsrc/devel/libopeninput/patches/patch-src_wscons.c:1.2
--- pkgsrc/devel/libopeninput/patches/patch-src_wscons.c:1.1 Mon Apr 13 15:19:37 2026
+++ pkgsrc/devel/libopeninput/patches/patch-src_wscons.c Tue Sep 22 14:38:21 2026
@@ -1,35 +1,26 @@
-$NetBSD: patch-src_wscons.c,v 1.1 2026/04/13 15:19:37 kikadf Exp $
+$NetBSD: patch-src_wscons.c,v 1.2 2026/09/22 14:38:21 kikadf Exp $
* Handle attached-detached devices with udev monitor
---- src/wscons.c.orig 2026-03-08 12:38:09.000000000 +0000
+--- src/wscons.c.orig 2026-08-29 17:19:47.000000000 +0000
+++ src/wscons.c
-@@ -46,51 +46,121 @@ static void
+@@ -47,6 +47,126 @@ static void
wscons_device_init_pointer_acceleration(struct wscons_device *device,
struct motion_filter *filter);
--static int
--udev_input_enable(struct libinput *libinput)
++#if defined(__NetBSD__)
+static void
+wscons_udev_handler(void *data)
- {
++{
+ struct udev_input *input = data;
+ struct udev_device *udev_device;
- struct libinput_seat *seat;
- struct libinput_device *device;
-+ uint64_t time;
++ struct libinput_seat *seat;
++ struct libinput_device *device;
++ usec_t time;
+ struct timespec ts;
+ struct libinput_event *event;
+ const char *action, *devnode, *sysname;
-
-- seat = wscons_seat_get(libinput, default_seat, default_seat_name);
-- list_for_each(device, &seat->devices_list, link) {
-- device->fd = open_restricted(libinput, device->devname, O_RDWR);
-- device->source =
-- libinput_add_fd(libinput, device->fd,
-- wscons_device_dispatch, device);
-- if (!device->source) {
-- return -ENOMEM;
++
+ udev_device = udev_monitor_receive_device(input->udev_monitor);
+ if (!udev_device)
+ return;
@@ -48,7 +39,7 @@ $NetBSD: patch-src_wscons.c,v 1.1 2026/0
+ if (!device)
+ goto out;
+ clock_gettime(CLOCK_REALTIME, &ts);
-+ time = s2us(ts.tv_sec) + ns2us(ts.tv_nsec);
++ time = usec_from_timespec(&ts);
+ event = calloc(1, sizeof(*event));
+ post_device_event(device, time, LIBINPUT_EVENT_DEVICE_ADDED, event);
+ }
@@ -57,15 +48,14 @@ $NetBSD: patch-src_wscons.c,v 1.1 2026/0
+ list_for_each(device, &seat->devices_list, link) {
+ if (device->devname && strcmp(device->devname, devnode) == 0) {
+ clock_gettime(CLOCK_REALTIME, &ts);
-+ time = s2us(ts.tv_sec) + ns2us(ts.tv_nsec);
++ time = usec_from_timespec(&ts);
+ event = calloc(1, sizeof(*event));
+ post_device_event(device, time, LIBINPUT_EVENT_DEVICE_REMOVED, event);
+ libinput_path_remove_device(device);
+ break;
+ }
- }
- }
-- return 0;
++ }
++ }
+
+out:
+ udev_device_unref(udev_device);
@@ -109,22 +99,13 @@ $NetBSD: patch-src_wscons.c,v 1.1 2026/0
+ input->udev_monitor = NULL;
+ }
+ return -1;
- }
-
- static void
- udev_input_disable(struct libinput *libinput)
- {
-- struct libinput_seat *seat;
-- struct libinput_device *device;
++}
++
++static void
++udev_input_disable(struct libinput *libinput)
++{
+ struct udev_input *input = (struct udev_input*)libinput;
-
-- seat = wscons_seat_get(libinput, default_seat, default_seat_name);
-- list_for_each(device, &seat->devices_list, link) {
-- if (device->source) {
-- libinput_remove_source(libinput, device->source);
-- device->source = NULL;
-- }
-- close_restricted(libinput, device->fd);
++
+ if (input->udev_monitor_source) {
+ libinput_remove_source(&input->base, input->udev_monitor_source);
+ input->udev_monitor_source = NULL;
@@ -132,77 +113,140 @@ $NetBSD: patch-src_wscons.c,v 1.1 2026/0
+ if (input->udev_monitor) {
+ udev_monitor_unref(input->udev_monitor);
+ input->udev_monitor = NULL;
- }
- }
-
- static void
- udev_input_destroy(struct libinput *libinput)
- {
-- struct libinput_seat *seat;
-- struct libinput_device *device;
++ }
++}
++
++static void
++udev_input_destroy(struct libinput *libinput)
++{
+ struct udev_input *input = (struct udev_input*)libinput;
-
-- fprintf(stderr, "%s", __func__);
-- seat = wscons_seat_get(libinput, default_seat, default_seat_name);
-- list_for_each(device, &seat->devices_list, link) {
-- close_restricted(libinput, device->fd);
++
+ if (input->udev) {
+ udev_unref(input->udev);
+ input->udev = NULL;
++ }
++}
++
++#else // OpenBSD
+ static int
+ udev_input_enable(struct libinput *libinput)
+ {
+@@ -94,6 +214,7 @@ udev_input_destroy(struct libinput *libi
+ close_restricted(libinput, device->fd);
}
}
++#endif // if NetBSD else OpenBSD
-@@ -295,17 +365,24 @@ libinput_udev_create_context(const struc
- void *user_data,
- struct udev *udev)
- {
-- struct libinput *libinput;
-+ struct udev_input *input;
+ static int
+ udev_device_change_seat(struct libinput_device *device,
+@@ -303,6 +424,83 @@ wscons_seat_get(struct libinput *libinpu
+ return seat;
+ }
-- libinput = calloc(1, sizeof(*libinput));
-- if (libinput == NULL)
++#if defined(__NetBSD__)
++LIBINPUT_EXPORT struct libinput *
++libinput_udev_create_context(const struct libinput_interface *interface,
++ void *user_data,
++ struct udev *udev)
++{
++ struct udev_input *input;
++
+ if (!interface || !udev)
+ return NULL;
+
+ input = calloc(1, sizeof(*input));
+ if (!input)
- return NULL;
-
-- if (libinput_init(libinput, interface, &interface_backend, user_data) != 0) {
-- free(libinput);
++ return NULL;
++
+ if (libinput_init(&input->base, interface, &interface_backend, user_data) != 0) {
+ libinput_unref(&input->base);
+ free(input);
- return NULL;
- }
-- return libinput;
++ return NULL;
++ }
+
+ input->udev = udev_ref(udev);
+
+ return &input->base;
- }
-
- LIBINPUT_EXPORT int
-@@ -317,6 +394,7 @@ libinput_udev_assign_seat(struct libinpu
- uint64_t time;
- struct timespec ts;
- struct libinput_event *event;
++}
++
++LIBINPUT_EXPORT int
++libinput_udev_assign_seat(struct libinput *libinput, const char *seat_id)
++{
++ struct libinput_seat *seat;
++ struct libinput_device *device;
++ usec_t time;
++ struct timespec ts;
++ struct libinput_event *event;
++ struct udev_list_entry *entry;
+ struct udev_input *input = (struct udev_input*)libinput;
-
- /* Add standard devices */
- for (int i = 0; i < 10; i++) {
-@@ -342,6 +420,10 @@ libinput_udev_assign_seat(struct libinpu
- post_device_event(device, time, LIBINPUT_EVENT_DEVICE_ADDED,
- event);
- }
++ struct udev *udev = input->udev;
++
++ /* Add standard devices */
++ _unref_(udev_enumerate) *e = udev_enumerate_new(udev);
++ udev_enumerate_add_match_subsystem(e, "input");
++ udev_enumerate_scan_devices(e);
++ udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(e)) {
++ const char *path = udev_list_entry_get_name(entry);
++ _unref_(udev_device) *device = udev_device_new_from_syspath(udev, path);
++ if (!device)
++ continue;
++
++ const char *sysname = udev_device_get_sysname(device);
++ if (!sysname ||
++ (!strstartswith(sysname, "wskbd") &&
++ !strstartswith(sysname, "wsmouse"))) {
++ continue;
++ }
++
++ const char *devnode = udev_device_get_devnode(device);
++ if (!devnode)
++ continue;
++ libinput_path_add_device(libinput, devnode);
++ }
++
++ seat = wscons_seat_get(libinput, default_seat, default_seat_name);
++ list_for_each(device, &seat->devices_list, link) {
++ clock_gettime(CLOCK_REALTIME, &ts);
++ time = usec_from_timespec(&ts);
++ event = calloc(1, sizeof(*event));
++ post_device_event(device, time, LIBINPUT_EVENT_DEVICE_ADDED,
++ event);
++ }
+
+ if (udev_input_enable(&input->base) < 0)
+ return -1;
+
++ return 0;
++}
++
++#else // OpenBSD
+ LIBINPUT_EXPORT struct libinput *
+ libinput_udev_create_context(const struct libinput_interface *interface,
+ void *user_data,
+@@ -357,6 +555,7 @@ libinput_udev_assign_seat(struct libinpu
+ }
+ return 0;
+ }
++#endif // if NetBSD else OpenBSD
+
+ LIBINPUT_EXPORT struct libinput *
+ libinput_path_create_context(const struct libinput_interface *interface,
+@@ -554,6 +753,14 @@ wscons_device_init(struct wscons_device
return 0;
}
-@@ -609,6 +691,7 @@ libinput_path_remove_device(struct libin
++void
++wscons_device_destroy(struct wscons_device *wscons_device)
++{
++ filter_destroy(wscons_device->pointer.filter);
++ free(wscons_device->base.devname);
++ free(wscons_device);
++}
++
+ LIBINPUT_EXPORT struct libinput_device *
+ libinput_path_add_device(struct libinput *libinput,
+ const char *path)
+@@ -622,6 +829,7 @@ libinput_path_remove_device(struct libin
{
struct libinput *libinput = device->seat->libinput;
Index: pkgsrc/devel/libopeninput/patches/patch-src_wscons.h
diff -u pkgsrc/devel/libopeninput/patches/patch-src_wscons.h:1.1 pkgsrc/devel/libopeninput/patches/patch-src_wscons.h:1.2
--- pkgsrc/devel/libopeninput/patches/patch-src_wscons.h:1.1 Mon Apr 13 15:19:37 2026
+++ pkgsrc/devel/libopeninput/patches/patch-src_wscons.h Tue Sep 22 14:38:21 2026
@@ -1,19 +1,29 @@
-$NetBSD: patch-src_wscons.h,v 1.1 2026/04/13 15:19:37 kikadf Exp $
+$NetBSD: patch-src_wscons.h,v 1.2 2026/09/22 14:38:21 kikadf Exp $
* Handle attached-detached devices with udev monitor
---- src/wscons.h.orig 2026-03-08 12:38:09.000000000 +0000
+--- src/wscons.h.orig 2026-08-29 17:19:47.000000000 +0000
+++ src/wscons.h
-@@ -25,6 +25,12 @@ struct wscons_device {
+@@ -25,6 +25,14 @@ struct wscons_device {
} pointer;
};
++#if defined(__NetBSD__)
+struct udev_input {
+ struct libinput base;
+ struct udev *udev;
+ struct udev_monitor *udev_monitor;
+ struct libinput_source *udev_monitor_source;
+};
++#endif
static inline struct wscons_device *
wscons_device(struct libinput_device *device)
+@@ -32,6 +40,7 @@ wscons_device(struct libinput_device *de
+ return container_of(device, struct wscons_device, base);
+ }
+ extern int wscons_keyboard_init(struct wscons_device *);
++extern void wscons_device_destroy(struct wscons_device *);
+ extern uint32_t wskey_transcode(struct TransMapRec *, int);
+ extern void post_device_event(struct libinput_device *, usec_t ,
+ enum libinput_event_type , struct libinput_event *);
Home |
Main Index |
Thread Index |
Old Index