public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/wlroots: fix build with libinput 1.31
@ 2026-02-27 18:32 Bernd Kuhls
  2026-02-27 19:26 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2026-02-27 18:32 UTC (permalink / raw)
  To: buildroot; +Cc: Adrian Perez de Castro

Buildroot commit 0433c8d02af803de90b41c42bb41bbc9f2d436ff bumped
libinput to version 1.31.0 which causes a build error with wlroot:

../backend/libinput/switch.c: In function ‘handle_switch_toggle’:
../backend/libinput/switch.c:32:9: error: enumeration value
 ‘LIBINPUT_SWITCH_KEYPAD_SLIDE’ not handled in switch [-Werror=switch]
   32 |         switch (libinput_event_switch_get_switch(sevent)) {

The build error was not yet detected by the autobuilders but can be
reproduced using this defconfig:

BR2_x86_64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
BR2_PACKAGE_MESA3D_OPENGL_GLX=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_WLROOTS=y

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 ...ibinput-fix-build-with-libinput-1.31.patch | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 package/wlroots/0001-backend-libinput-fix-build-with-libinput-1.31.patch

diff --git a/package/wlroots/0001-backend-libinput-fix-build-with-libinput-1.31.patch b/package/wlroots/0001-backend-libinput-fix-build-with-libinput-1.31.patch
new file mode 100644
index 0000000000..c5ef11ecf0
--- /dev/null
+++ b/package/wlroots/0001-backend-libinput-fix-build-with-libinput-1.31.patch
@@ -0,0 +1,51 @@
+From c1452d88114710f5772662b1d8efb9c71edaa34c Mon Sep 17 00:00:00 2001
+From: Aleksei Bavshin <alebastr89@gmail.com>
+Date: Sat, 7 Feb 2026 17:48:16 -0800
+Subject: [PATCH] backend/libinput: fix build with libinput 1.31
+
+Upstream: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/c1452d88114710f5772662b1d8efb9c71edaa34c
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ backend/libinput/meson.build | 4 ++++
+ backend/libinput/switch.c    | 5 +++++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/backend/libinput/meson.build b/backend/libinput/meson.build
+index c244eb77a..091b0e0eb 100644
+--- a/backend/libinput/meson.build
++++ b/backend/libinput/meson.build
+@@ -29,3 +29,7 @@ features += { 'libinput-backend': true }
+ wlr_deps += libinput
+ 
+ internal_config.set10('HAVE_LIBINPUT_BUSTYPE', libinput.version().version_compare('>=1.26.0'))
++internal_config.set10(
++	'HAVE_LIBINPUT_SWITCH_KEYPAD_SLIDE',
++	libinput.version().version_compare('>=1.30.901')
++)
+diff --git a/backend/libinput/switch.c b/backend/libinput/switch.c
+index abeec86d7..9dde3c9cb 100644
+--- a/backend/libinput/switch.c
++++ b/backend/libinput/switch.c
+@@ -2,6 +2,7 @@
+ #include <libinput.h>
+ #include <wlr/interfaces/wlr_switch.h>
+ #include "backend/libinput.h"
++#include "config.h"
+ 
+ const struct wlr_switch_impl libinput_switch_impl = {
+ 	.name = "libinput-switch",
+@@ -36,6 +37,10 @@ void handle_switch_toggle(struct libinput_event *event,
+ 	case LIBINPUT_SWITCH_TABLET_MODE:
+ 		wlr_event.switch_type = WLR_SWITCH_TYPE_TABLET_MODE;
+ 		break;
++#if HAVE_LIBINPUT_SWITCH_KEYPAD_SLIDE
++	case LIBINPUT_SWITCH_KEYPAD_SLIDE:
++		return;
++#endif
+ 	}
+ 	switch (libinput_event_switch_get_switch_state(sevent)) {
+ 	case LIBINPUT_SWITCH_STATE_OFF:
+-- 
+GitLab
+
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/wlroots: fix build with libinput 1.31
  2026-02-27 18:32 [Buildroot] [PATCH 1/1] package/wlroots: fix build with libinput 1.31 Bernd Kuhls
@ 2026-02-27 19:26 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2026-02-27 19:26 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot, Adrian Perez de Castro

>>>>> "Bernd" == Bernd Kuhls <bernd@kuhls.net> writes:

 > Buildroot commit 0433c8d02af803de90b41c42bb41bbc9f2d436ff bumped
 > libinput to version 1.31.0 which causes a build error with wlroot:

 > ../backend/libinput/switch.c: In function ‘handle_switch_toggle’:
 > ../backend/libinput/switch.c:32:9: error: enumeration value
 >  ‘LIBINPUT_SWITCH_KEYPAD_SLIDE’ not handled in switch [-Werror=switch]
 >    32 |         switch (libinput_event_switch_get_switch(sevent)) {

 > The build error was not yet detected by the autobuilders but can be
 > reproduced using this defconfig:

 > BR2_x86_64=y
 > BR2_TOOLCHAIN_EXTERNAL=y
 > BR2_PER_PACKAGE_DIRECTORIES=y
 > BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
 > BR2_PACKAGE_MESA3D=y
 > BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
 > BR2_PACKAGE_MESA3D_OPENGL_GLX=y
 > BR2_PACKAGE_MESA3D_OPENGL_EGL=y
 > BR2_PACKAGE_MESA3D_OPENGL_ES=y
 > BR2_PACKAGE_XORG7=y
 > BR2_PACKAGE_WLROOTS=y

 > Signed-off-by: Bernd Kuhls <bernd@kuhls.net>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-27 19:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-27 18:32 [Buildroot] [PATCH 1/1] package/wlroots: fix build with libinput 1.31 Bernd Kuhls
2026-02-27 19:26 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox