From 7e2f255022501e29745acad01d37a0282b4cbd9e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 9 Jul 2021 12:35:18 +0300 Subject: [PATCH] sway-tiny: remove libevdev dependency --- wayland/sway-tiny/build | 2 + wayland/sway-tiny/checksums | 1 + wayland/sway-tiny/depends | 1 - wayland/sway-tiny/patches/no-evdev.patch | 119 +++++++++++++++++++++++ wayland/sway-tiny/sources | 1 + 5 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 wayland/sway-tiny/patches/no-evdev.patch diff --git a/wayland/sway-tiny/build b/wayland/sway-tiny/build index 33830426..c100a567 100755 --- a/wayland/sway-tiny/build +++ b/wayland/sway-tiny/build @@ -1,5 +1,7 @@ #!/bin/sh -e +patch -p1 < no-evdev.patch + # Remove conflict between static libseat and wlroots. sed 's/\(const long NSEC\)/static \1/' \ subprojects/seatd/common/log.c > _ diff --git a/wayland/sway-tiny/checksums b/wayland/sway-tiny/checksums index 78adb217..a2486293 100644 --- a/wayland/sway-tiny/checksums +++ b/wayland/sway-tiny/checksums @@ -1,3 +1,4 @@ 14220131e6444df0d0058f080047b87985cf140888ec5fffb4e4f2c8265a5784 af512d4abce21e200381f0d40e1e745c03a2f33f62c8453c50a9580851a6b228 45de0d0b7135d4c11cd9a2e8ddf8c0f179ecfb45987d205e35711e1a0a432a99 +f4ba997506cb10b72a54cea8ee6eb568e80b7fc76addb4a3520d028df7994559 diff --git a/wayland/sway-tiny/depends b/wayland/sway-tiny/depends index 0a788cda..5b8ea601 100644 --- a/wayland/sway-tiny/depends +++ b/wayland/sway-tiny/depends @@ -1,5 +1,4 @@ flex make -libevdev libinput libxkbcommon linux-headers make diff --git a/wayland/sway-tiny/patches/no-evdev.patch b/wayland/sway-tiny/patches/no-evdev.patch new file mode 100644 index 00000000..bc2bb697 --- /dev/null +++ b/wayland/sway-tiny/patches/no-evdev.patch @@ -0,0 +1,119 @@ +diff --git a/meson.build b/meson.build +index 596faf95..4cc59df0 100644 +--- a/meson.build ++++ b/meson.build +@@ -45,7 +45,6 @@ pango = dependency('pango') + gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: get_option('gdk-pixbuf')) + pixman = dependency('pixman-1') + glesv2 = dependency('glesv2') +-libevdev = dependency('libevdev') + libinput = dependency('libinput', version: '>=1.6.0') + xcb = dependency('xcb', required: get_option('xwayland')) + drm_full = dependency('libdrm') # only needed for drm_fourcc.h +diff --git a/sway/commands/bar/bind.c b/sway/commands/bar/bind.c +index b4b5bc45..27703128 100644 +--- a/sway/commands/bar/bind.c ++++ b/sway/commands/bar/bind.c +@@ -1,4 +1,4 @@ +-#include ++#include + #include + #include + #include +diff --git a/sway/commands/bind.c b/sway/commands/bind.c +index 4c67b3ce..e9c0eab4 100644 +--- a/sway/commands/bind.c ++++ b/sway/commands/bind.c +@@ -1,5 +1,4 @@ + #define _POSIX_C_SOURCE 200809L +-#include + #include + #include + #include +diff --git a/sway/commands/input/scroll_button.c b/sway/commands/input/scroll_button.c +index 6b331419..039f5335 100644 +--- a/sway/commands/input/scroll_button.c ++++ b/sway/commands/input/scroll_button.c +@@ -1,4 +1,4 @@ +-#include ++#include + #include "sway/config.h" + #include "sway/commands.h" + #include "sway/input/cursor.h" +diff --git a/sway/input/cursor.c b/sway/input/cursor.c +index 95edf7be..99df15f9 100644 +--- a/sway/input/cursor.c ++++ b/sway/input/cursor.c +@@ -1,7 +1,7 @@ + #define _POSIX_C_SOURCE 200809L + #include + #include +-#include ++#include + #include + #include + #include +@@ -1202,7 +1202,7 @@ uint32_t get_mouse_bindsym(const char *name, char **error) { + return buttons[number - 1]; + } else if (strncmp(name, "BTN_", strlen("BTN_")) == 0) { + // Get event code from name +- int code = libevdev_event_code_from_name(EV_KEY, name); ++ int code = libinput_event_code_from_name(EV_KEY, name); + if (code == -1) { + size_t len = snprintf(NULL, 0, "Unknown event %s", name) + 1; + *error = malloc(len); +@@ -1228,7 +1228,7 @@ uint32_t get_mouse_bindcode(const char *name, char **error) { + *error = strdup("Button event code out of range."); + return 0; + } +- const char *event = libevdev_event_code_get_name(EV_KEY, code); ++ const char *event = libinput_event_code_get_name(EV_KEY, code); + if (!event || strncmp(event, "BTN_", strlen("BTN_")) != 0) { + size_t len = snprintf(NULL, 0, "Event code %d (%s) is not a button", + code, event ? event : "(null)") + 1; +@@ -1251,7 +1251,7 @@ uint32_t get_mouse_button(const char *name, char **error) { + } + + const char *get_mouse_button_name(uint32_t button) { +- const char *name = libevdev_event_code_get_name(EV_KEY, button); ++ const char *name = libinput_event_code_get_name(EV_KEY, button); + if (!name) { + if (button == SWAY_SCROLL_UP) { + name = "SWAY_SCROLL_UP"; +diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c +index f9eb8c8a..681ca263 100644 +--- a/sway/input/seatop_default.c ++++ b/sway/input/seatop_default.c +@@ -1,6 +1,6 @@ + #define _POSIX_C_SOURCE 200809L + #include +-#include ++#include + #include + #include + #include +diff --git a/sway/ipc-json.c b/sway/ipc-json.c +index 2c0cf3e2..839e6ae0 100644 +--- a/sway/ipc-json.c ++++ b/sway/ipc-json.c +@@ -3,7 +3,7 @@ + #ifdef HAVE_JSON + #include + #endif +-#include ++#include + #include + #include + #include +diff --git a/sway/meson.build b/sway/meson.build +index 4b1894ad..b1529156 100644 +--- a/sway/meson.build ++++ b/sway/meson.build +@@ -205,7 +205,6 @@ sway_sources = files( + + sway_deps = [ + drm, +- libevdev, + libinput, + libudev, + math, diff --git a/wayland/sway-tiny/sources b/wayland/sway-tiny/sources index 04bc4c46..223a6800 100644 --- a/wayland/sway-tiny/sources +++ b/wayland/sway-tiny/sources @@ -1,3 +1,4 @@ https://github.com/DCVIII/sway/archive/cd493f533b3a6f85761ac92eefeea3252b059c65.tar.gz https://github.com/swaywm/wlroots/archive/a48e569d3860e91428c74e876a5d886314767c7b.tar.gz subprojects/wlroots https://github.com/DCVIII/seatd/archive/23ee555f432f9971a15522fc0b3f980d78ffa6cc.tar.gz subprojects/seatd +patches/no-evdev.patch