summaryrefslogtreecommitdiff
path: root/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* Add support for stable doc URLs (#342)Wismill2023-05-141-2/+21
| | | | | | | | | | | | | | | | | | | | | | Doc URLs may change with time because they depend on Doxygen machinery. This is unfortunate because it is good practice to keep valid URLs (see: https://www.w3.org/Provider/Style/URI.html). I could not find a built-in solution in Doxygen, so the solution proposed here is to maintain a registry of all URLs and manage legacy URLs as redirections to their canonical page. This commit adds a registry of URLs that has three functions: - Check no previous URL is now invalid. - Add aliases for moved pages. - Generate redirection pages for aliases. The redirection works with a simple <meta http-equiv="refresh"> HTML tag. See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#http-equiv This commit also initialize the URLs registry with current pages and some redirections needed after recent documentation refactoring. Finally, the CI is updated to catch any change that invalidate previous URLs.
* Improve documentationPierre Le Marre2023-05-131-1/+3
| | | | | | - Add introduction to XKB - Embrace Doxygen features - More cross links
* build: show a summaryRan Benita2023-05-051-0/+34
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: require bison >= 2.3aRan Benita2023-05-051-1/+1
| | | | | | | | At least 2.3 (released 2006) which is the version shipped with macos doesn't work. Reading the changelog I think 2.3a *should* work, so require that. Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: bump required meson to 0.52.0Ran Benita2023-05-051-1/+1
| | | | | | Support for version checks in `find_program()`. Signed-off-by: Ran Benita <ran@unusedvar.com>
* meson.build: register libxkbcommon.dylib linkKen Cunningham2023-05-041-0/+1
| | | | | | | meson needs to know that the executable tools link against libxkbcommon.dylib so that the @rpath references used during the build/test phases can be rewritten to full path names on install
* Add support for modmap None (#291)Wismill2023-05-011-0/+5
| | | | | | | | | | | | | | | | | | | Unlike current xkbcommon, X11’s xkbcomp allows to remove entries in the modifiers’ map using “modifier_map None { … }”. “None” is translated to the special value “XkbNoModifier” defined in “X11/extensions/XKB.h”. Then it relies on the fact that in "CopyModMapDef", the following code: 1U << entry->modifier ends up being zero when “entry->modifier” is “XkbNoModifier” (i.e. 0xFF). Indeed, it relies on the overflow behaviour of the left shift, which in practice resolves to use only the 5 low bits of the shift amount, i.e. 0x1F here. Then the result of “1U << 0xFF” is cast to “char”, i.e. 0. This is a good trick but too magical, so in libxkbcommon we will use an explicit test against our new constant XKB_MOD_NONE.
* Improve the doc of the XKB keymap text format, V1 (#321)Wismill2023-04-301-1/+2
| | | | | | | | | | | - Add table of contents - Add terminology section - (WIP) Add Introduction to the format - Improve the keycode section - Improve the interpret section - Add guide to create and use modifiers - (WIP) Add actions documentation - Add cross-references - Add keysyms header to documentation
* build: override dependency for use as subprojectSimon Ser2023-02-191-0/+9
| | | | | | This allows xkbcommon to be used as a subproject. Signed-off-by: Simon Ser <contact@emersion.fr>
* Bump version to 1.5.0xkbcommon-1.5.0Ran Benita2023-01-021-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: fix wayland-scanner deprecation code -> private-codeRan Benita2023-01-021-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: require meson >= 0.51, fix meson deprecationsRan Benita2022-12-161-16/+16
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: remove -fsanitize-undefined-trap-on-errorRan Benita2022-12-141-1/+0
| | | | | | | | | 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>
* build: reenable test-context in MSVCRan Benita2022-09-241-8/+5
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* test: move mkdir & mkdtemp calls to common place and fix them on MSVCRan Benita2022-09-241-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* Bump version to 1.4.1xkbcommon-1.4.1Ran Benita2022-05-211-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* Bump version to 1.4.0xkbcommon-1.4.0Ran Benita2022-02-041-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: add enable-tools optionAlex Xu (Hello71)2021-12-051-3/+1
| | | | | | 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>
* Bump version to 1.3.1xkbcommon-1.3.1Ran Benita2021-09-101-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* tools: add compose tool for Compose debuggingRan Benita2021-05-081-0/+5
| | | | | | Not very useful so not exposed in xkbcli. Signed-off-by: Ran Benita <ran@unusedvar.com>
* Bump version to 1.3.0xkbcommon-1.3.0Ran Benita2021-05-011-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* bench: add atom benchmarkRan Benita2021-04-271-0/+5
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: fix missing includesRan Benita2021-04-271-8/+8
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* Move include files to include/ subdirectoryRan Benita2021-04-271-20/+20
| | | | | | | This way we don't specify `include_directorories('.')` which brings in more than needed. Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: move the subproject variables to a common section at the endRan Benita2021-04-271-9/+17
| | | | | | | As suggested in: https://github.com/xkbcommon/libxkbcommon/pull/240#discussion_r620784021 Signed-off-by: Ran Benita <ran@unusedvar.com>
* Meson: Allow building as subprojectAdrian Perez de Castro2021-04-271-4/+10
| | | | | | | | | | | 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.
* Windows: Pass list of symbols to export to MSVCAdrian Perez de Castro2021-04-271-3/+34
| | | | | | | | | | 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.
* Bump version to 1.2.1xkbcommon-1.2.1Ran Benita2021-04-071-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* Bump version to 1.2.0xkbcommon-1.2.0Ran Benita2021-04-031-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: require C11Ran Benita2021-03-301-1/+1
| | | | | | | 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>
* Bump version to 1.1.0xkbcommon-1.1.0Ran Benita2021-02-271-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* doc: add keymap-format-text-v1.md to the HTML documentationRan Benita2021-02-271-0/+1
| | | | | | It's incomplete but might be helpful for someone. Signed-off-by: Ran Benita <ran@unusedvar.com>
* meson.build: replace the remaining join_paths() with the nicer / syntaxPeter Hutterer2021-02-221-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: add a keysym testerPeter Hutterer2021-02-221-5/+21
| | | | | | | | | | | 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>
* Bump version to 1.0.3xkbcommon-1.0.3Ran Benita2020-11-231-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* Bump version to 1.0.2xkbcommon-1.0.2Ran Benita2020-11-201-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* x11: cache X11 atomsRan Benita2020-11-201-0/+7
| | | | | | | | | | | | | | | | | | | | 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>
* build: combine test & bench internal depsRan Benita2020-11-191-14/+6
| | | | | | No need to duplicate this really. Signed-off-by: Ran Benita <ran@unusedvar.com>
* Bump version to 1.0.1xkbcommon-1.0.1Ran Benita2020-09-111-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* test/tool-option-parsing: skip testing of disabled toolsRan Benita2020-09-081-0/+4
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: move tests to after toolsRan Benita2020-09-071-129/+130
| | | | | | So tests can refer to stuff set by the tools section. Signed-off-by: Ran Benita <ran@unusedvar.com>
* test: include unstd.h in the registry test to cut down the MacOS warningsPeter Hutterer2020-09-071-0/+3
| | | | | | | 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>
* Bump version to 1.0.0xkbcommon-1.0.0Ran Benita2020-09-061-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* Revert: tools: add xkbcli-scaffold-new-layout as helper toolPeter Hutterer2020-09-031-7/+0
| | | | | | | | | | | | | | | 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 d00cf64dbc586a1052e1f0d0e7f1a48bbff293ec
* meson.build: define PATH_MAX where it's missingPeter Hutterer2020-09-011-0/+8
| | | | | | | | | | | 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>
* build: fix meson "uses features which were added in newer versions" warningRan Benita2020-08-301-2/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* tools: add xkbcli-scaffold-new-layout as helper toolPeter Hutterer2020-08-301-0/+8
| | | | | | | | | | | | | | | 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>
* Add /etc/xkb as extra lookup path for system data filesPeter Hutterer2020-08-301-0/+5
| | | | | | | | | | | | | | | 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>
* build: fix byacc invocationRan Benita2020-08-081-2/+2
| | | | | | Fixes: https://github.com/xkbcommon/libxkbcommon/issues/133#issuecomment-670902025 Reported-by: Edward-0 Signed-off-by: Ran Benita <ran@unusedvar.com>
* tools: run test-tool-option-parsing.py like a regular testRan Benita2020-07-251-10/+3
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>