1################################################################################
2#
3# libinput
4#
5################################################################################
6
7LIBINPUT_VERSION = 1.25.0
8LIBINPUT_SOURCE = libinput-$(LIBINPUT_VERSION).tar.bz2
9LIBINPUT_SITE = https://gitlab.freedesktop.org/libinput/libinput/-/archive/$(LIBINPUT_VERSION)
10LIBINPUT_DEPENDENCIES = host-pkgconf libevdev mtdev udev
11LIBINPUT_INSTALL_STAGING = YES
12LIBINPUT_LICENSE = MIT
13LIBINPUT_LICENSE_FILES = COPYING
14LIBINPUT_CPE_ID_VENDOR = freedesktop
15# Tests need fork, so just disable them everywhere.
16LIBINPUT_CONF_OPTS = -Dtests=false -Dlibwacom=false -Ddocumentation=false
17
18ifeq ($(BR2_PACKAGE_LIBGTK3),y)
19LIBINPUT_CONF_OPTS += -Ddebug-gui=true
20LIBINPUT_DEPENDENCIES += libgtk3
21ifeq ($(BR2_PACKAGE_WAYLAND),y)
22LIBINPUT_DEPENDENCIES += wayland
23endif
24ifeq ($(BR2_PACKAGE_WAYLAND_PROTOCOLS),y)
25LIBINPUT_DEPENDENCIES += wayland-protocols
26endif
27ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
28LIBINPUT_DEPENDENCIES += xlib_libX11
29endif
30else
31LIBINPUT_CONF_OPTS += -Ddebug-gui=false
32endif
33
34ifeq ($(BR2_PACKAGE_LIBINPUT_PYTHON_TOOLS),)
35LIBINPUT_PYTHON_TOOLS = libinput-analyze-per-slot-delta \
36	libinput-analyze-recording \
37	libinput-analyze-touch-down-state \
38	libinput-measure-fuzz \
39	libinput-measure-touchpad-pressure \
40	libinput-measure-touchpad-size \
41	libinput-measure-touchpad-tap \
42	libinput-measure-touch-size \
43	libinput-replay
44
45define LIBINPUT_REMOVE_UNNEEDED_FILES
46	$(foreach f,$(LIBINPUT_PYTHON_TOOLS), \
47		rm -f $(TARGET_DIR)/usr/libexec/libinput/$(f)
48	)
49endef
50LIBINPUT_POST_INSTALL_TARGET_HOOKS += LIBINPUT_REMOVE_UNNEEDED_FILES
51endif
52
53$(eval $(meson-package))
54