Files
termux-packages/x11-packages/weston/0002-drop-deps-libinput.patch
2023-12-01 15:31:21 +00:00

118 lines
2.8 KiB
Diff

--- a/meson.build
+++ b/meson.build
@@ -136,7 +136,6 @@
dep_wayland_server = dependency('wayland-server', version: '>= 1.22.0')
dep_wayland_client = dependency('wayland-client', version: '>= 1.22.0')
dep_pixman = dependency('pixman-1', version: '>= 0.25.2')
-dep_libinput = dependency('libinput', version: '>= 1.2.0')
dep_libevdev = dependency('libevdev')
dep_libm = cc.find_library('m')
dep_libdl = cc.find_library('dl')
--- a/compositor/meson.build
+++ b/compositor/meson.build
@@ -12,7 +12,6 @@
deps_weston = [
dep_libshared,
dep_libweston_public,
- dep_libinput,
dep_libevdev,
dep_libdl,
dep_threads,
--- a/libweston/meson.build
+++ b/libweston/meson.build
@@ -181,7 +181,6 @@
install: false
)
dep_session_helper = declare_dependency(link_with: lib_session_helper)
-endif
lib_libinput_backend = static_library(
'libinput-backend',
@@ -202,6 +201,7 @@
link_with: lib_libinput_backend,
include_directories: include_directories('.')
)
+endif
dep_vertex_clipping = declare_dependency(
sources: 'vertex-clipping.c',
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -41,7 +41,9 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/socket.h>
+#ifndef __ANDROID__
#include <libinput.h>
+#endif
#include <libevdev/libevdev.h>
#include <linux/input.h>
#include <sys/time.h>
@@ -1046,6 +1048,7 @@
}
}
+#ifndef __ANDROID__
static int
save_touch_device_calibration(struct weston_compositor *compositor,
struct weston_touch_device *device,
@@ -1103,6 +1106,7 @@
return ret;
}
+#endif
static const struct {
const char *name;
@@ -1184,12 +1188,14 @@
compositor->use_color_manager = true;
}
+#ifndef __ANDROID__
/* weston.ini [libinput] */
s = weston_config_get_section(config, "libinput", NULL, NULL);
weston_config_section_get_bool(s, "touchscreen_calibrator", &cal, 0);
if (cal)
weston_compositor_enable_touch_calibrator(ec,
save_touch_device_calibration);
+#endif
return 0;
}
@@ -1905,6 +1911,7 @@
}
}
+#ifndef __ANDROID__
static void
configure_input_device_accel(struct weston_config_section *s,
struct libinput_device *device)
@@ -2106,6 +2113,7 @@
configure_input_device_scroll(s, device);
}
+#endif
static int
drm_backend_output_configure(struct weston_output *output,
@@ -3019,6 +3027,7 @@
load_drm_backend(struct weston_compositor *c, int *argc, char **argv,
struct weston_config *wc, enum weston_renderer_type renderer)
{
+#ifndef __ANDROID__
struct weston_drm_backend_config config = {{ 0, }};
struct weston_config_section *section;
struct wet_compositor *wet = to_wet_compositor(c);
@@ -3081,6 +3090,11 @@
free(config.seat_id);
free(config.specific_device);
+#else
+ weston_log("error: drm_backend is not avaiable on Android.\n");
+ abort();
+#endif
+
return 0;
}