diff --git a/x11/libinput/Makefile b/x11/libinput/Makefile index 910bd21b2f69..54ccc291fe83 100644 --- a/x11/libinput/Makefile +++ b/x11/libinput/Makefile @@ -1,64 +1,64 @@ PORTNAME= libinput -DISTVERSION= 1.28.1 +DISTVERSION= 1.31.1 CATEGORIES= x11 MAINTAINER= x11@FreeBSD.org COMMENT= Generic input library WWW= https://www.freedesktop.org/wiki/Software/libinput/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}evdev>0:devel/py-evdev@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyudev>0:devel/py-pyudev@${PY_FLAVOR} LIB_DEPENDS= libevdev.so:devel/libevdev \ libepoll-shim.so:devel/libepoll-shim \ libudev.so:devel/libudev-devd \ libmtdev.so:devel/libmtdev TEST_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} -USES= cpe localbase meson pkgconfig python:run,test shebangfix +USES= cpe localbase lua meson pkgconfig python:run,test shebangfix USE_LDCONFIG= yes USE_GITLAB= yes GL_SITE= https://gitlab.freedesktop.org CPE_VENDOR= freedesktop MESON_ARGS= -Ddocumentation=false SHEBANG_FILES= tools/*.py \ test/*.py \ test/*.sh \ test/symbols-leak-test OPTIONS_DEFINE= DEBUG_GUI LIBWACOM TEST OPTIONS_DEFAULT=LIBWACOM OPTIONS_SUB= yes DEBUG_GUI_DESC= Build the GUI event viewer LIBWACOM_DESC= Libwacom support DEBUG_GUI_USES= gnome xorg DEBUG_GUI_USE= GNOME=gtk30,glib20,cairo xorg=x11 DEBUG_GUI_LIB_DEPENDS= libwayland-client.so:graphics/wayland DEBUG_GUI_MESON_TRUE= debug-gui LIBWACOM_LIB_DEPENDS= libwacom.so:x11/libwacom LIBWACOM_MESON_TRUE= libwacom # If built with WITH_DEBUG=yes running tests require /dev/input/* devices # In case of poudriere jail run following commands on host: # devfs -m /usr/local/poudriere/data/.m/-/ref/dev rule apply path 'input' unhide # devfs -m /usr/local/poudriere/data/.m/-/ref/dev rule apply path 'input/*' unhide TEST_LIB_DEPENDS= libcheck.so:devel/check TEST_MESON_TRUE= tests TESTING_UNSAFE= Some tests fail until https://github.com/wulf7/libudev-devd/pull/13 post-patch: ${REINPLACE_CMD} -e 's|sed|sed -E|g' ${WRKSRC}/test/symbols-leak-test post-install: ${RM} -r ${STAGEDIR}${PREFIX}/lib/udev .include diff --git a/x11/libinput/distinfo b/x11/libinput/distinfo index 90849d84dd0b..5787d338a3f6 100644 --- a/x11/libinput/distinfo +++ b/x11/libinput/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1753347960 -SHA256 (libinput-1.28.1.tar.bz2) = 19e5337ec10fdf920c8d1f4ece63cd7d1c12279ee26e347e30e98e2942d9e1aa -SIZE (libinput-1.28.1.tar.bz2) = 864820 +TIMESTAMP = 1777924501 +SHA256 (libinput-1.31.1.tar.bz2) = e0bb6537de892ce7c63fc5be9ad373eae894b7655c92220ef00316cc33097356 +SIZE (libinput-1.31.1.tar.bz2) = 934385 diff --git a/x11/libinput/files/patch-src_evdev.c b/x11/libinput/files/patch-src_evdev.c index e27b64542a36..4ee98b0664f7 100644 --- a/x11/libinput/files/patch-src_evdev.c +++ b/x11/libinput/files/patch-src_evdev.c @@ -1,37 +1,37 @@ When a process without full /dev/input access enumerates devices via libudev-devd, the udev_device structs do not get udev properties that mark them as inputs, keyboards, etc, and get rejected as not being input devices. libinput reopens devices just to check path equality. The udev_devices from reopening do have the right properties, so we just use them instead of the original (enumerated) ones. ---- src/evdev.c.orig 2025-04-01 02:46:07 UTC +--- src/evdev.c.orig 2026-04-02 01:04:12 UTC +++ src/evdev.c -@@ -1104,7 +1104,7 @@ evdev_sync_device(struct evdev_device *device) - evdev_device_dispatch_one(device, &ev); - } while (rc == LIBEVDEV_READ_STATUS_SYNC); +@@ -1007,7 +1007,7 @@ evdev_sync_device(struct libinput *libinput, struct ev + + evdev_device_dispatch_frame(libinput, device, frame); - return rc == -EAGAIN ? 0 : rc; + return (rc == -EAGAIN || rc == -EINVAL)? 0 : rc; } static inline void -@@ -1177,6 +1177,17 @@ evdev_device_dispatch(void *data) +@@ -1105,6 +1105,17 @@ evdev_device_dispatch(void *data) if (rc != -EAGAIN && rc != -EINTR) { libinput_remove_source(libinput, device->source); + /* + * Dirty hack to allow cuse-based evdev backends to release + * character device file when device has been detached + * but still have it descriptor opened. + * Issuing evdev_device_suspend() here leads to SIGSEGV + */ + int dummy_fd = open("/dev/null", O_RDONLY | O_CLOEXEC); + if (dummy_fd >= 0) { + dup2(dummy_fd, device->fd); + close(dummy_fd); + } device->source = NULL; } } diff --git a/x11/libinput/files/patch-test_litest-main.c b/x11/libinput/files/patch-test_litest-main.c new file mode 100644 index 000000000000..19acbf3197c5 --- /dev/null +++ b/x11/libinput/files/patch-test_litest-main.c @@ -0,0 +1,30 @@ +--- test/litest-main.c.orig 2026-04-02 01:04:12 UTC ++++ test/litest-main.c +@@ -39,7 +39,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -188,8 +187,8 @@ check_device_access(void) + return 77; + } + +- if (access("/dev/uinput", F_OK) == -1 && +- access("/dev/input/uinput", F_OK) == -1) { ++ if (access("/dev/uinput_skip_our_libudev_isnt_ready", F_OK) == -1 && ++ access("/dev/input/uinput_skip_our_libudev_isnt_ready", F_OK) == -1) { + fprintf(stderr, "uinput device is missing, skipping tests.\n"); + return 77; + } +@@ -230,7 +229,7 @@ main(int argc, char **argv) + if (getenv("NO_COLOR")) + use_colors = false; + +- in_debugger = is_debugger_attached(); ++ in_debugger = false; + if (in_debugger) { + jobs = 0; + } else if ((meson_testthreads = getenv("MESON_TESTTHREADS")) == NULL || diff --git a/x11/libinput/files/patch-test_litest-runner.c b/x11/libinput/files/patch-test_litest-runner.c index 9bcc44c072ba..7402e9f6ca68 100644 --- a/x11/libinput/files/patch-test_litest-runner.c +++ b/x11/libinput/files/patch-test_litest-runner.c @@ -1,10 +1,10 @@ ---- test/litest-runner.c.orig 2025-04-01 02:46:07 UTC +--- test/litest-runner.c.orig 2026-04-02 01:04:12 UTC +++ test/litest-runner.c @@ -26,7 +26,6 @@ #include + #include #include - #include -#include + #include #include #ifdef HAVE_PIDFD_OPEN - #include diff --git a/x11/libinput/files/patch-test_litest-runner.h b/x11/libinput/files/patch-test_litest-runner.h index fcd70b576d44..750a6a194186 100644 --- a/x11/libinput/files/patch-test_litest-runner.h +++ b/x11/libinput/files/patch-test_litest-runner.h @@ -1,11 +1,11 @@ ---- test/litest-runner.h.orig 2025-04-01 02:46:07 UTC +--- test/litest-runner.h.orig 2026-04-02 01:04:12 UTC +++ test/litest-runner.h -@@ -180,3 +180,8 @@ void litest_runner_abort(void); +@@ -198,3 +198,8 @@ litest_runner_abort(void); */ - __attribute__((noreturn)) - void litest_runner_abort(void); + __attribute__((noreturn)) void + litest_runner_abort(void); + +static int get_nprocs(void) +{ + return sysconf (_SC_NPROCESSORS_ONLN); +} diff --git a/x11/libinput/files/patch-test_litest.c b/x11/libinput/files/patch-test_litest.c index 81964c72efde..03427b146bc4 100644 --- a/x11/libinput/files/patch-test_litest.c +++ b/x11/libinput/files/patch-test_litest.c @@ -1,46 +1,22 @@ ---- test/litest.c.orig 2025-04-01 02:46:07 UTC +--- test/litest.c.orig 2026-04-02 01:04:12 UTC +++ test/litest.c -@@ -44,13 +44,13 @@ - #include +@@ -39,7 +39,6 @@ + #include + #include #include - #include -#include - #include - #if HAVE_LIBSYSTEMD - #include + #include + #include + #include +@@ -52,10 +51,10 @@ #endif #ifdef __FreeBSD__ #include +#include #endif - #include -@@ -66,8 +66,6 @@ - #include "util-backtrace.h" - #include "util-libinput.h" - + #include -#include -- - #define evbit(t, c) ((t) << 16U | (c & 0xffff)) - - #define UDEV_RULES_D "/run/udev/rules.d" -@@ -5322,8 +5320,8 @@ check_device_access(void) - return 77; - } - -- if (access("/dev/uinput", F_OK) == -1 && -- access("/dev/input/uinput", F_OK) == -1) { -+ if (access("/dev/uinput_skip_our_libudev_isnt_ready", F_OK) == -1 && -+ access("/dev/input/uinput_skip_our_libudev_isnt_ready", F_OK) == -1) { - fprintf(stderr, - "uinput device is missing, skipping tests.\n"); - return 77; -@@ -5365,7 +5363,7 @@ main(int argc, char **argv) - if (getenv("NO_COLOR")) - use_colors = false; + #include -- in_debugger = is_debugger_attached(); -+ in_debugger = false; - if (in_debugger) { - jobs = 0; - } else if ((meson_testthreads = getenv("MESON_TESTTHREADS")) == NULL || + #include "util-backtrace.h" diff --git a/x11/libinput/pkg-plist b/x11/libinput/pkg-plist index f97aca9d7d01..fb2e29083946 100644 --- a/x11/libinput/pkg-plist +++ b/x11/libinput/pkg-plist @@ -1,102 +1,103 @@ bin/libinput include/libinput.h lib/libinput.so lib/libinput.so.10 lib/libinput.so.10.13.0 libdata/pkgconfig/libinput.pc libexec/libinput/libinput-analyze libexec/libinput/libinput-analyze-buttons libexec/libinput/libinput-analyze-per-slot-delta libexec/libinput/libinput-analyze-recording libexec/libinput/libinput-analyze-touch-down-state libexec/libinput/libinput-debug-events %%DEBUG_GUI%%libexec/libinput/libinput-debug-gui libexec/libinput/libinput-debug-tablet +libexec/libinput/libinput-debug-tablet-pad libexec/libinput/libinput-list-devices libexec/libinput/libinput-list-kernel-devices libexec/libinput/libinput-measure libexec/libinput/libinput-measure-fuzz libexec/libinput/libinput-measure-touch-size libexec/libinput/libinput-measure-touchpad-pressure libexec/libinput/libinput-measure-touchpad-size libexec/libinput/libinput-measure-touchpad-tap libexec/libinput/libinput-quirks libexec/libinput/libinput-record libexec/libinput/libinput-replay libexec/libinput/libinput-test %%DATADIR%%/10-generic-keyboard.quirks %%DATADIR%%/10-generic-mouse.quirks %%DATADIR%%/10-generic-trackball.quirks %%DATADIR%%/30-vendor-a4tech.quirks %%DATADIR%%/30-vendor-aiptek.quirks %%DATADIR%%/30-vendor-alps.quirks %%DATADIR%%/30-vendor-contour.quirks %%DATADIR%%/30-vendor-cypress.quirks %%DATADIR%%/30-vendor-elantech.quirks %%DATADIR%%/30-vendor-glorious.quirks +%%DATADIR%%/30-vendor-goodix.quirks +%%DATADIR%%/30-vendor-hantick.quirks %%DATADIR%%/30-vendor-huion.quirks -%%DATADIR%%/30-vendor-ibm.quirks %%DATADIR%%/30-vendor-ite.quirks %%DATADIR%%/30-vendor-kensington.quirks %%DATADIR%%/30-vendor-logitech.quirks %%DATADIR%%/30-vendor-madcatz.quirks %%DATADIR%%/30-vendor-microsoft.quirks +%%DATADIR%%/30-vendor-nulea.quirks %%DATADIR%%/30-vendor-oracle.quirks +%%DATADIR%%/30-vendor-pixart.quirks %%DATADIR%%/30-vendor-qemu.quirks %%DATADIR%%/30-vendor-razer.quirks %%DATADIR%%/30-vendor-synaptics.quirks %%DATADIR%%/30-vendor-trust.quirks -%%DATADIR%%/30-vendor-uniwill.quirks %%DATADIR%%/30-vendor-vmware.quirks %%DATADIR%%/30-vendor-wacom.quirks %%DATADIR%%/50-system-acer.quirks %%DATADIR%%/50-system-apple.quirks %%DATADIR%%/50-system-asus.quirks -%%DATADIR%%/50-system-chicony.quirks -%%DATADIR%%/50-system-chuwi.quirks %%DATADIR%%/50-system-cyborg.quirks %%DATADIR%%/50-system-dell.quirks %%DATADIR%%/50-system-framework.quirks %%DATADIR%%/50-system-gigabyte.quirks %%DATADIR%%/50-system-google.quirks %%DATADIR%%/50-system-gpd.quirks %%DATADIR%%/50-system-graviton.quirks %%DATADIR%%/50-system-honor.quirks %%DATADIR%%/50-system-hp.quirks %%DATADIR%%/50-system-huawei.quirks %%DATADIR%%/50-system-icl.quirks %%DATADIR%%/50-system-lenovo.quirks %%DATADIR%%/50-system-lg.quirks %%DATADIR%%/50-system-minisforum.quirks %%DATADIR%%/50-system-pine64.quirks %%DATADIR%%/50-system-sony.quirks %%DATADIR%%/50-system-starlabs.quirks %%DATADIR%%/50-system-system76.quirks %%DATADIR%%/50-system-toshiba.quirks -%%DATADIR%%/50-system-vaio.quirks share/man/man1/libinput-analyze-buttons.1.gz share/man/man1/libinput-analyze-per-slot-delta.1.gz share/man/man1/libinput-analyze-recording.1.gz share/man/man1/libinput-analyze-touch-down-state.1.gz share/man/man1/libinput-analyze.1.gz share/man/man1/libinput-debug-events.1.gz %%DEBUG_GUI%%share/man/man1/libinput-debug-gui.1.gz share/man/man1/libinput-debug-tablet.1.gz +share/man/man1/libinput-debug-tablet-pad.1.gz share/man/man1/libinput-list-devices.1.gz share/man/man1/libinput-list-kernel-devices.1.gz share/man/man1/libinput-measure-fuzz.1.gz share/man/man1/libinput-measure-touch-size.1.gz share/man/man1/libinput-measure-touchpad-pressure.1.gz share/man/man1/libinput-measure-touchpad-size.1.gz share/man/man1/libinput-measure-touchpad-tap.1.gz share/man/man1/libinput-measure.1.gz share/man/man1/libinput-quirks-list.1.gz share/man/man1/libinput-quirks-validate.1.gz share/man/man1/libinput-quirks.1.gz share/man/man1/libinput-record.1.gz share/man/man1/libinput-replay.1.gz share/man/man1/libinput-test.1.gz %%TEST%%share/man/man1/libinput-test-suite.1.gz share/man/man1/libinput.1.gz share/zsh/site-functions/_libinput @dir %%ETCDIR%%