|
| 1 | +-- compat.libinput — libinput 1.31.3, the input stack a compositor drives. |
| 2 | +-- |
| 3 | +-- Touchpads, mice, tablets, touchscreens, keyboards: libinput turns evdev |
| 4 | +-- streams into gestures, scroll, pointer acceleration and tap-to-click. It is |
| 5 | +-- the last piece of the input chain — libevdev reads the device, libudev finds |
| 6 | +-- it, mtdev normalises multitouch, and libinput makes it behave. |
| 7 | +-- |
| 8 | +-- ───────────────────────────────────────────────────────────────────────── |
| 9 | +-- SHAPE: inline, and it is the top of a four-package chain |
| 10 | +-- |
| 11 | +-- compat.libinput |
| 12 | +-- ├── freedesktop.libevdev the evdev wrapper |
| 13 | +-- ├── compat.libudev libudev-zero, no systemd |
| 14 | +-- └── compat.mtdev multitouch protocol A -> B |
| 15 | +-- |
| 16 | +-- None of the four needs a fork of libinput itself: the sources are listed in |
| 17 | +-- meson and there is no code generation. The forks in that list are there for |
| 18 | +-- their own generated files, not for this one. |
| 19 | +-- |
| 20 | +-- ───────────────────────────────────────────────────────────────────────── |
| 21 | +-- WHAT IS DELIBERATELY OFF |
| 22 | +-- |
| 23 | +-- LUA PLUGINS. libinput 1.31 grew a Lua plugin system; upstream makes it |
| 24 | +-- optional (`required: get_option('lua-plugins')`). It is off here because a |
| 25 | +-- device-input library that embeds a scripting runtime is a larger promise |
| 26 | +-- than this package should make on its own — `compat.lua` is in the index for |
| 27 | +-- a project that wants it, and turning it on is a descriptor change rather |
| 28 | +-- than a fork. |
| 29 | +-- |
| 30 | +-- LIBWACOM. Tablet model data, an optional dependency upstream guards the same |
| 31 | +-- way. Nothing in this index provides it, and without it libinput falls back |
| 32 | +-- to generic tablet handling rather than failing. |
| 33 | +-- |
| 34 | +-- The quirks database (`quirks.c`) reads `.quirks` files at runtime from a |
| 35 | +-- directory compiled in as `LIBINPUT_QUIRKS_DIR`. That path is EMPTY here for |
| 36 | +-- the same reason libgbm's backend path and libxkbcommon's config root are: |
| 37 | +-- upstream's default points into the build prefix, which after relocation is |
| 38 | +-- the HOST's dataset. Empty means devices get libinput's built-in defaults |
| 39 | +-- rather than a host machine's model quirks — correct behaviour, one fewer |
| 40 | +-- silent host edge. |
| 41 | +package = { |
| 42 | + spec = "1", |
| 43 | + namespace = "compat", |
| 44 | + name = "libinput", |
| 45 | + description = "libinput 1.31.3 — touchpad, mouse, tablet and keyboard input handling for compositors", |
| 46 | + licenses = {"MIT"}, |
| 47 | + repo = "https://gitlab.freedesktop.org/libinput/libinput", |
| 48 | + type = "package", |
| 49 | + |
| 50 | + xpm = { |
| 51 | + linux = { |
| 52 | + ["1.31.3"] = { |
| 53 | + url = { |
| 54 | + GLOBAL = "https://gitlab.freedesktop.org/libinput/libinput/-/archive/1.31.3/libinput-1.31.3.tar.gz", |
| 55 | + CN = "https://gitcode.com/mcpp-res/libinput/releases/download/1.31.3/libinput-1.31.3.tar.gz", |
| 56 | + }, |
| 57 | + sha256 = "b6749bf6f1890f6631c0a70a027c35fec9d2e096a39f720548896e41474a9854", |
| 58 | + }, |
| 59 | + }, |
| 60 | + }, |
| 61 | + |
| 62 | + mcpp = { |
| 63 | + language = "c++23", |
| 64 | + import_std = false, |
| 65 | + c_standard = "c11", |
| 66 | + |
| 67 | + include_dirs = { "*/src", "*/include", "mcpp_generated" }, |
| 68 | + |
| 69 | + generated_files = { |
| 70 | + ["mcpp_generated/config.h"] = [==[ |
| 71 | +#ifndef MCPP_LIBINPUT_CONFIG_H |
| 72 | +#define MCPP_LIBINPUT_CONFIG_H |
| 73 | +/* meson's config.h, written out for Linux with a GCC-compatible toolchain. |
| 74 | +
|
| 75 | + LIBINPUT_QUIRKS_DIR is EMPTY on purpose. quirks.c reads model-specific |
| 76 | + `.quirks` files from it at runtime; upstream's default points into the |
| 77 | + build prefix, which after relocation is the HOST's dataset. Empty means a |
| 78 | + device gets libinput's built-in defaults instead of another machine's |
| 79 | + quirks — the same stance compat.libgbm takes with GBM_BACKENDS_PATH. |
| 80 | +
|
| 81 | + HAVE_LUA and HAVE_LIBWACOM are absent: both are optional upstream and both |
| 82 | + would add a dependency this package does not need to do its job. */ |
| 83 | +#define LIBINPUT_QUIRKS_DIR "" |
| 84 | +#define LIBINPUT_QUIRKS_SRCDIR "" |
| 85 | +#define HAVE_LIBEVDEV_DISABLE_PROPERTY 1 |
| 86 | +#define HAVE_MEMFD_CREATE 1 |
| 87 | +#define HAVE_LOCALE_H 1 |
| 88 | +#define HAVE_STRERRORNAME_NP 1 |
| 89 | +#endif |
| 90 | +]==], |
| 91 | + }, |
| 92 | + |
| 93 | + sources = { |
| 94 | + "*/src/util-files.c", |
| 95 | + "*/src/util-list.c", |
| 96 | + "*/src/util-ratelimit.c", |
| 97 | + "*/src/util-strings.c", |
| 98 | + "*/src/util-prop-parsers.c", |
| 99 | + "*/src/filter.c", |
| 100 | + "*/src/filter-custom.c", |
| 101 | + "*/src/filter-flat.c", |
| 102 | + "*/src/filter-low-dpi.c", |
| 103 | + "*/src/filter-mouse.c", |
| 104 | + "*/src/filter-touchpad.c", |
| 105 | + "*/src/filter-touchpad-flat.c", |
| 106 | + "*/src/filter-touchpad-x230.c", |
| 107 | + "*/src/filter-tablet.c", |
| 108 | + "*/src/filter-trackpoint.c", |
| 109 | + "*/src/filter-trackpoint-flat.c", |
| 110 | + "*/src/quirks.c", |
| 111 | + "*/src/libinput.c", |
| 112 | + "*/src/libinput-plugin.c", |
| 113 | + "*/src/libinput-plugin-button-debounce.c", |
| 114 | + "*/src/libinput-plugin-mouse-wheel.c", |
| 115 | + "*/src/libinput-plugin-mouse-wheel-lowres.c", |
| 116 | + "*/src/libinput-plugin-tablet-double-tool.c", |
| 117 | + "*/src/libinput-plugin-tablet-eraser-button.c", |
| 118 | + "*/src/libinput-plugin-tablet-forced-tool.c", |
| 119 | + "*/src/libinput-plugin-tablet-proximity-timer.c", |
| 120 | + "*/src/libinput-private-config.c", |
| 121 | + "*/src/evdev.c", |
| 122 | + "*/src/evdev-fallback.c", |
| 123 | + "*/src/evdev-plugin.c", |
| 124 | + "*/src/evdev-totem.c", |
| 125 | + "*/src/evdev-middle-button.c", |
| 126 | + "*/src/evdev-mt-touchpad.c", |
| 127 | + "*/src/evdev-mt-touchpad-tap.c", |
| 128 | + "*/src/evdev-mt-touchpad-thumb.c", |
| 129 | + "*/src/evdev-mt-touchpad-buttons.c", |
| 130 | + "*/src/evdev-mt-touchpad-edge-scroll.c", |
| 131 | + "*/src/evdev-mt-touchpad-gestures.c", |
| 132 | + "*/src/evdev-tablet.c", |
| 133 | + "*/src/evdev-tablet-pad.c", |
| 134 | + "*/src/evdev-tablet-pad-leds.c", |
| 135 | + "*/src/path-seat.c", |
| 136 | + "*/src/udev-seat.c", |
| 137 | + "*/src/timer.c", |
| 138 | + "*/src/util-libinput.c", |
| 139 | + -- gated on have_mtdev upstream; mtdev is a declared dependency |
| 140 | + -- here, so the plugin is unconditional. |
| 141 | + "*/src/libinput-plugin-mtdev.c", |
| 142 | + }, |
| 143 | + |
| 144 | + cflags = { |
| 145 | + "-D_GNU_SOURCE", |
| 146 | + "-DHAVE_CONFIG_H", |
| 147 | + "-fPIC", |
| 148 | + }, |
| 149 | + |
| 150 | + ldflags = { "-lm", "-lrt" }, |
| 151 | + |
| 152 | + deps = { |
| 153 | + ["freedesktop.libevdev"] = "1.13.7", |
| 154 | + ["compat.libudev"] = "1.0.5", |
| 155 | + ["compat.mtdev"] = "1.1.7", |
| 156 | + }, |
| 157 | + |
| 158 | + targets = { ["input"] = { kind = "lib" } }, |
| 159 | + }, |
| 160 | +} |
0 commit comments