Commit Graph

119 Commits (c6ff79d5c148c5e3f3e4735b683c330fc4546f67)

Author SHA1 Message Date
Ran Benita cecaa01df1 Bump version to 1.5.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
2023-01-02 21:23:30 +02:00
Ran Benita 233617d086 build: fix wayland-scanner deprecation code -> private-code
Signed-off-by: Ran Benita <ran@unusedvar.com>
2023-01-02 21:10:45 +02:00
Ran Benita e5444f4195 build: require meson >= 0.51, fix meson deprecations
Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-12-16 21:37:06 +02:00
Ran Benita 9d1043dcb5 build: remove -fsanitize-undefined-trap-on-error
Meson complains; it's probably not that important anymore when using the
`-Db_sanitize` options.

meson.build:36: WARNING: Consider using the built-in option for sanitizers instead of using "-fsanitize-undefined-trap-on-error".

Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-12-14 18:58:11 +02:00
Ran Benita 2530f6444b build: reenable test-context in MSVC
Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-09-24 12:31:53 +03:00
Ran Benita f9858bf5b9 test: move mkdir & mkdtemp calls to common place and fix them on MSVC
Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-09-24 12:31:53 +03:00
Ran Benita 57af9cb71f Bump version to 1.4.1
Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-05-21 22:55:22 +03:00
Ran Benita ea6580cc39 Bump version to 1.4.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-02-04 12:41:50 +02:00
Alex Xu (Hello71) 8531ea723f build: add enable-tools option
this is mainly useful for multilib, but may be useful for other users as well

Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
2021-12-05 12:55:51 +02:00
Ran Benita 88222c8d40 Bump version to 1.3.1
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-09-10 22:51:34 +03:00
Ran Benita b6aadd57d9 tools: add compose tool for Compose debugging
Not very useful so not exposed in xkbcli.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-08 21:37:28 +03:00
Ran Benita 13ba9135c0 Bump version to 1.3.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-01 23:51:23 +03:00
Ran Benita baf5522649 bench: add atom benchmark
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-04-27 16:41:32 +03:00
Ran Benita 9d87f84915 build: fix missing includes
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-04-27 10:57:42 +03:00
Ran Benita de1b6943d2 Move include files to include/ subdirectory
This way we don't specify `include_directorories('.')` which brings in
more than needed.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-04-27 10:10:26 +03:00
Ran Benita 8ff0232bda build: move the subproject variables to a common section at the end
As suggested in:
https://github.com/xkbcommon/libxkbcommon/pull/240#discussion_r620784021

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-04-27 10:02:54 +03:00
Adrian Perez de Castro 4238417ba0 Meson: Allow building as subproject
Specify where to find the headers for libxkbcommon_dep,
libxkbcommon_x11_dep, and libxkbregistry_dep,  which allows other
projects to correctly locate the headers when libxkbcommon is being
built as a Meson subproject.

The dep_libxkbregistry variable is renamed to libxkbregistry_dep,
to follow the usual convention for variables which hold declared
dependencies to be used from subproject builds.
2021-04-27 09:54:58 +03:00
Adrian Perez de Castro 5cd76a8d93 Windows: Pass list of symbols to export to MSVC
Arrange for passing .def files with the lists of symbols to export from
DLLs when building on Windows with MSVC. Without this no symbols were
being exported at all.

The .def files are generated from the .map files at build time using
scripts/map-to-def, which avoids needing to maintain two different sets
of files.
2021-04-27 09:54:00 +03:00
Ran Benita 097a0ca7d6 Bump version to 1.2.1
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-04-07 19:27:30 +03:00
Ran Benita 086353b380 Bump version to 1.2.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-04-03 14:11:38 +03:00
Ran Benita 90e2d5ee76 build: require C11
I'd really like to use anonymous unions/structs. Supposedly even MSVC
supports it now. Let's try and see.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-03-30 20:42:31 +03:00
Ran Benita 82a5bdc43c Bump version to 1.1.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-02-27 22:48:35 +02:00
Ran Benita 83e3a53ddc doc: add keymap-format-text-v1.md to the HTML documentation
It's incomplete but might be helpful for someone.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-02-27 22:38:21 +02:00
Peter Hutterer d1ba81c4dd meson.build: replace the remaining join_paths() with the nicer / syntax
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-22 13:43:16 +02:00
Peter Hutterer 0abd430e85 test: add a keysym tester
A simple script that creates a new layout with the given keysym replacing TLDE.
Then we compile a keymap and search for the keysym being assigned to TLDE and
bail if that fails.

The list of keysyms is manually maintained but we only need to add one or two to
spot-check whenever the xorgproto is updated.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-22 13:43:16 +02:00
Ran Benita c60b77ea51 Bump version to 1.0.3
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-11-23 20:30:13 +02:00
Ran Benita 13e6543ed4 Bump version to 1.0.2
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-11-20 21:02:44 +02:00
Ran Benita 1bd3b3c7cb x11: cache X11 atoms
On every keymap notify event, the keymap should be refreshed, which
fetches the required X11 atoms. A big keymap might have a few hundred of
atoms.

A profile by a user has shown this *might* be slow when some intensive
amount of keymap activity is occurring. It might also be slow on a
remote X server.

While I'm not really sure this is the actual bottleneck, caching the
atoms is easy enough and only needs a couple kb of memory, so do that.

On the added bench-x11:

Before: retrieved 2500 keymaps from X in 11.233237s
After : retrieved 2500 keymaps from X in 1.592339s

Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-11-20 13:04:21 +02:00
Ran Benita 9caa4128c2 build: combine test & bench internal deps
No need to duplicate this really.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-11-19 16:19:56 +02:00
Ran Benita 2c295b10aa Bump version to 1.0.1
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-09-11 15:07:49 +03:00
Ran Benita 6178924f28 test/tool-option-parsing: skip testing of disabled tools
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-09-08 09:45:34 +03:00
Ran Benita 737030ad5b build: move tests to after tools
So tests can refer to stuff set by the tools section.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-09-07 22:03:30 +03:00
Peter Hutterer 13745014c3 test: include unstd.h in the registry test to cut down the MacOS warnings
mkdtmp, rmdir and unlink are in unstd.h on MacOS. Since including that it
doesn't hurt us on Linux, let's do it without ifdefs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-07 22:01:57 +03:00
Ran Benita 12f99d0dfe Bump version to 1.0.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-09-06 00:00:14 +03:00
Peter Hutterer 66e7f0da20 Revert: tools: add xkbcli-scaffold-new-layout as helper tool
While this tool is useful for users starting with a new keyboard layout, it is a
somewhat bad fit for libxkbcommon. It's the only python tool, we don't even
install it yet (because we're not sure yet what it's supposed to do) and there's
a potential for it to expand into more corner cases.

The only tie it has to libxkbcommon is that it templates the data files that
libxkbcommon reads, but those files are effectively public API.

Let's remove this tool from there and instead move it to a separate git
repository where it can go its own way.

This reverts commit d00cf64dbc
2020-09-03 18:14:16 +10:00
Peter Hutterer 4d0d509129 meson.build: define PATH_MAX where it's missing
PATH_MAX is not POSIX and can be missing on some systems, notably Windows (which
provides MAX_PATH instead tough) and Hurd. Let's define it to a sane value where
missing, i.e.  the one it's defined to in limits.h. Except on Windows where
we're limited to 260.

Fixes https://github.com/xkbcommon/libxkbcommon/issues/180

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-01 08:56:56 +10:00
Ran Benita e50c3e2cc7 build: fix meson "uses features which were added in newer versions" warning
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-08-30 21:54:21 +03:00
Peter Hutterer d00cf64dbc tools: add xkbcli-scaffold-new-layout as helper tool
This tool set ups the required directory structure and template files to add new
keyboard layouts or options. For example, run like this:

    xkbcli-scaffold-new-layout  --layout 'us(myvariant)' --option 'custom:foo'

This will up the evdev rules file, the evdev.xml file, the symbols/us file and
symbols/custom file in $XDG_CONFIG_HOME so that the user has everything in place
and can start filling in the actual key mappings.

This tool is currently uninstalled until we figure out whether it's useful.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-30 21:49:41 +03:00
Peter Hutterer d7b39f6ffb Add /etc/xkb as extra lookup path for system data files
This completes the usual triplet of configuration locations available for most
processes:
- vendor-provided data files in /usr/share/X11/xkb
- system-specific data files in /etc/xkb
- user-specific data files in $XDG_CONFIG_HOME/xkb

The default lookup order user, system, vendor, just like everything else that
uses these conventions.

For include directives in rules files, the '%E' resolves to that path.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-30 21:49:41 +03:00
Ran Benita a0c1c2f42d build: fix byacc invocation
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/133#issuecomment-670902025
Reported-by: Edward-0
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-08-08 14:43:09 +03:00
Ran Benita 608e9361e3 tools: run test-tool-option-parsing.py like a regular test
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-07-25 16:37:57 +03:00
Ran Benita 00530bea6b build: use gnu_symbol_visibility instead of explicit -fvisibility
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-07-25 16:06:40 +03:00
Ran Benita 61772c773e build: use nicer / syntax instead of join_paths()
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-07-25 16:01:00 +03:00
Ran Benita 0066e387bc tools: make independent from src/
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-07-25 15:59:23 +03:00
Ran Benita d67c9cfffb build: use cc.get_supported_arguments()
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-07-25 15:24:40 +03:00
Ran Benita 0615c91133 build: remove explicit -Wextra
Implied by `warning_level=2`.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-07-25 15:15:31 +03:00
Ran Benita f439ce1889 tools: some minor changes to xkbcli
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-07-25 15:06:12 +03:00
Peter Hutterer ce5eb1ac6d tools: link the tools against libxkbcommon.so only
The tools previously linked against a static version (by simply recompiling
everythiong). This isn't necessary, we can link them against libxkbcommon.so.

Only exception: The xbkcli-compile-keymap tool needs a private API for the
--kccgst flag. Avoid this by disabling this flag in the installed tool and
building the same tool, statically linked but not-installed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-25 11:05:14 +03:00
Peter Hutterer cd119a2824 Drop use of ronn, switch to raw roff instead
Drop the ronn source files, check in the generated files instead. This gets rid
of the ruby+gem+ronn toolchain requirement at the cost of having to edit raw man
pages.

ronn files are as-generated but with the preamble and generation date removed.
The latter isn't important enough to keep, it'll just go stale for manually
maintained files and it's not worth setting up a configure_file() just for that
date.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-25 11:05:14 +03:00
Peter Hutterer d480f053d2 tools: add a test program to parse the commandline options
A pytest wrapper around our xkbcli tool - copied from libinput.
This calls our various xkbcli tools with varying options and check that they
either succeed or return the right error code. The coverage is limited, it
does not (and cannot) test for all possible combinations but it should provide a
good red flag if we have inconsistent behavior or accidentally break some
combination of flags.

Meanwhile, we can at least assume that all our commandline arguments are parsed
without segfaulting or worse.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-25 11:05:14 +03:00