This way stdin/stdout of the process are opened in text mode and we don't need
manually decode.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
In python multiprocessing, each process needs to handle (and ignore) the
KeyboardInterrupt to avoid exception logging. This is a separate patch for
easier reviewing, the first hunks merely re-indent all of the
xkbcommontool/xkbcomp functions into a try/except KeyboardInterrupt block.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This is a change in behavior and requires any automated callers to adjust
accordingly. Still, much easier to get the errors that way rather than it
being mixed into a thousands-of-lines output file.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Collect all options into a dictionary, then process that as async actions
through a process pool. This of course requires collecting the various print
statements to avoid mangled output.
This dropped the time to completion from around 14 min to 8 min on my local
machine (unscientific single run only for the original timing).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
All tests create a temporary directory, set up the environment for that
directory and then check the include paths for the presence of that directory,
ideally in the right position of the list.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Use $XDG_CONFIG_HOME/xkb as the primary lookup path for XKB rules. Same
motivation as in 3a91788d92, however the XDG directories are more standard
and recommended these days than application-specific dotfiles.
The XDG spec says to fall back to $HOME/.config where XDG_CONFIG_HOME is not
set so we implement that behavior as well.
Fixes#112
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
E.g. when Mutter has CAP_SYS_NICE and thus secure_getenv returns NULL.
Fixes https://bugs.archlinux.org/task/64191
[ran: changed to ignore error]
Signed-off-by: Ran Benita <ran@unusedvar.com>
xkbcomp only accepts the "Level" prefix for a level name for levels 1 to
8, but the keymap dumping code added it always, e.g. "Level15".
The plain integer, e.g. "8", "15" is always accepted, so just use that.
Fixes https://github.com/xkbcommon/libxkbcommon/issues/113
Signed-off-by: Ran Benita <ran@unusedvar.com>
Reported-by: progandy
Previously, the default include path was XKB_CONFIG_ROOT:~/.xkb.
The ~/.xkb include path is intended to allow the local user to customize
their keymaps without having to modify system paths.
But usually, the user only wants to customize specific parts. When
XKB_CONFIG_ROOT is first, the user can only customize through the "entry
point" (the RMLVO). When ~/.xkb is first, the user can drop in a file
and it will override the system one.
The impetus for this change is the rules file. "evdev" is hard-coded
everywhere, so it not often not possible to change to something else.
And the rules files determines how the rest of the RMLVO is interpreted.
So, to enable customization, we have these options:
A: System includes user.
B: User includes system.
C: Library goes over both in one or the other order.
Option A is problematic due to backward compatibility and is also
unnatural.
Option B gives the user control and is backward compatible, so that's
what we choose. This is also how Compose files are handled, and that
seems to work fine in the wild.
Option C is actually less flexible than B, and more complicated.
(The rules file format doesn't have an include statement yet, but it's
planned).
Signed-off-by: Ran Benita <ran@unusedvar.com>
Fix meson build on Solaris by using __EXTENSIONS__ where Linux & other
platforms use _GNU_SOURCE. Without this the build fails due to missing
prototypes for functions like strdup & getopt not defined in the C99
standard. (In autoconf, this was handled by AC_USE_SYSTEM_EXTENSIONS.)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This adds the missing graphviz dependency, from which Doxygen uses
"dot" to create diagrams for the documentation. Also, the meson
dependency is removed as it is installed using Pip, and ninja-build
added.
This splits the steps for installing dependencies into a new template
file, as well as the build steps for Autotools. Both gets used to define
two jobs which can run in parallel for both build systems.
This uploads the files saves to meson-build/meson-logs/ and associates
them to the pipeline task, which makes them availabl for download in the
Azure Pipelines web interface.
xdg_shell v6 was pretty close to the finalised stable version of
xdg-shell. We can now just use the stable version, which is supported
everywhere (Enlightenment, KWin, Mutter, Weston, wlroots).
This requires bumping the wayland-protocols dependency.
Signed-off-by: Daniel Stone <daniels@collabora.com>
We don't need to determine the total number of bits set to determine if
exactly one is set.
Additionally, on x86_64 without any -march=* flag, __builtin_popcount
will get compiled to a function call to the compiler runtime (on gcc),
or a long sequence of bit operations (on clang).
Signed-off-by: Michael Forney <mforney@mforney.org>
With older versions of autotools, one needs to add this line to
Makefile.am. From the autoconf docs: "Note that if you use aclocal from
Automake to generate aclocal.m4, you must also set ACLOCAL_AMFLAGS = -I dir
in your top-level Makefile.am". [1]
I couldn't build with autoconf 2.68 without this.
[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Input.html
Signed-off-by: milloni <milloni@preemptable.org>