Commit Graph

1915 Commits (1b796a7209b4962db69a9de2096464d117d9b0ef)

Author SHA1 Message Date
Jan Alexander Steffens (heftig) 4b3783987e context: Don't fail to create the context if HOME isn't available
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>
2019-10-20 23:00:30 +03:00
Ran Benita aa118b4b97 README: update my email address
Signed-off-by: Ran Benita <ran@unusedvar.com>
2019-10-19 00:55:21 +03:00
Ran Benita a88a0710f9 Bump version to 0.9.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
2019-10-19 00:41:36 +03:00
Ran Benita e41dc19a22 build: remove leftover autotools file
Signed-off-by: Ran Benita <ran@unusedvar.com>
2019-10-19 00:41:36 +03:00
Ran Benita 45496c33f1 test: fix printf("%s", NULL) in error path
../test/common.c: In function ‘test_get_path’:
    ../test/common.c:171:9: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
      171 |         fprintf(stderr, "Failed to allocate path (%d chars) for %s\n",
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      172 |                 (int) path_len, path);
          |                 ~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Ran Benita <ran@unusedvar.com>
2019-10-19 00:38:43 +03:00
Ran Benita 076047b21a keymap-dump: use consistent capitalization for "Group<N>"
It's used capitalized everywhere except a couple places.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2019-10-16 10:36:41 +03:00
Ran Benita a6ed0304f7 keymap-dump: fix invalid names used for levels above 8
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
2019-10-16 10:36:37 +03:00
Ran Benita 3a91788d92 context: move ~/.xkb to before XKB_CONFIG_ROOT in the default include path
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>
2019-10-03 17:27:00 +03:00
Alan Coopersmith 934d574172 build: Solaris needs __EXTENSIONS__ instead of _GNU_SOURCE
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>
2019-09-11 20:30:37 +03:00
Ran Benita 25cd67daf7 build: remove autotools build
We introduced meson 2 years ago, hopefully that's was enough time for
everyone to convert.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2019-08-10 20:20:36 +03:00
Ran Benita e7bb7045b8 ci: remove travis CI
We moved to Azure Pipelines.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2019-08-10 20:20:36 +03:00
Ran Benita d486b54288 Set up CI with Azure Pipelines
[skip ci]
2019-08-09 23:15:26 +03:00
Adrian Perez de Castro cc0e3617a9 CI: Install graphviz using APT
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.
2019-08-09 23:01:27 +03:00
Adrian Perez de Castro c408adc229 CI: Publish test results from Meson 2019-08-09 23:01:27 +03:00
Adrian Perez de Castro f796bbb8f7 CI: Try builds both with Clang and GCC 2019-08-09 23:01:27 +03:00
Adrian Perez de Castro 510cbdd243 CI: Enable a macOS job 2019-08-09 23:01:27 +03:00
Adrian Perez de Castro af22f9dc22 CI: Make Autotools and Meson builds parallel
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.
2019-08-09 23:01:27 +03:00
Adrian Perez de Castro 789bd05c35 CI: Always try to gather test results
Resulting test logs should be always attached to the task, regardless
of whether the test suite ran successfully or not.
2019-08-09 23:01:27 +03:00
Adrian Perez de Castro ef74ee1b76 CI: Split Meson build steps into a separate YAML file 2019-08-09 23:01:27 +03:00
Adrian Perez de Castro 7413c6f577 CI: Save the Meson logs as downloadable files
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.
2019-08-09 23:01:27 +03:00
Adrian Perez 69651bf77a CI: Initial set up to use Azure Pipelines
For the moment, configure only basic builds with Ubuntu 16.04, more to be added as follow-ups. [skip ci]
2019-08-09 23:01:27 +03:00
Ran Benita ab4b4b7f12 travis: improve configuration and add macOS
Signed-off-by: Ran Benita <ran234@gmail.com>
2019-07-25 14:34:17 +03:00
Ran Benita 7407d311bf test/symbols-leak-test: fix sed regex on macOS
Signed-off-by: Ran Benita <ran234@gmail.com>
2019-07-25 14:18:42 +03:00
Ran Benita c68a8e2998 build: fixup autotools build after 97f41fe
Signed-off-by: Ran Benita <ran234@gmail.com>
2019-07-25 13:34:49 +03:00
Ran Benita 97f41fe4ac test/symbols-leak-test: make it work with macOS diff
The <() stuff fails with an error:
    diff: extra operand `/dev/fd/61'

Signed-off-by: Ran Benita <ran234@gmail.com>
2019-07-25 13:24:00 +03:00
Ran Benita 6728ebca4a test/rmlvo-to-keymap: drop basename usage
It wants some libgen.h include which is POSIX only, let's just remove
it as it's hardly important.

Signed-off-by: Ran Benita <ran234@gmail.com>
2019-07-25 12:00:27 +03:00
worldofpeace 32d178b50f test/rmlvo-to-keymap.c: fix compilation on Darwin (#101)
program_invocation_short_name isn't portable.
2019-07-19 09:56:41 +03:00
Daniel Stone 909cc04d2c interactive-wayland: Port to stable xdg-shell (#100)
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>
2019-07-02 15:48:32 +03:00
Ran Benita 06a80beed8
Merge pull request #98 from michaelforney/popcount
Use bitwise test for power-of-2 instead of popcount
2019-06-11 19:59:25 +03:00
Michael Forney 9d58bbd4ff Use bitwise test instead of popcount to check if one bit is set
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>
2019-06-10 11:15:55 -07:00
Ran Benita db33ec0d61
Merge pull request #96 from Jjagg/patch-1
Fix a few doc typos
2019-06-05 09:49:04 +03:00
Jesse 8129f3b256
Fix some doc typos 2019-06-04 23:44:42 +02:00
Ran Benita db7e79e78d
Merge pull request #95 from Hi-Angel/fix-lgtm-warnings
Fix some of LGTM warnings
2019-03-24 14:05:17 +02:00
Konstantin Kharlamov 75d1110c22 symbols: add a comment to suppress warning from code analyzers
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2019-03-23 23:31:29 +03:00
Ran Benita 83cfbf8840
Merge pull request #94 from milloni/milloni/m4
Makefile.am: add include dir for AC_CONFIG_MACRO_DIR to work
2019-03-12 19:39:23 +02:00
milloni 10311c95ef Makefile.am: add include dir for AC_CONFIG_MACRO_DIR to work
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>
2019-03-12 16:22:15 +00:00
Ran Benita 255047f757 README: usage questions are alright
Signed-off-by: Ran Benita <ran234@gmail.com>
2019-02-26 18:32:32 +02:00
Ran Benita 6f0f9534b3 README: stop pointing at bugs.freedesktop.org
No-one filed bugs in there for a while, let's consolidate on the more
popular one.

Signed-off-by: Ran Benita <ran234@gmail.com>
2019-02-26 18:32:32 +02:00
maxice8 9badb4e4a2 meson.build: use program from build machine not host or target.
We can't always execute binaries from the host or target machine,
as is the case in cross compilation.

closes #89
2019-02-23 09:04:36 +00:00
Ran Benita d40b368b2f Bump version to 0.8.4
Signed-off-by: Ran Benita <ran234@gmail.com>
2019-02-22 22:26:49 +02:00
Ran Benita 2d9e1751d0 Update NEWS
Signed-off-by: Ran Benita <ran234@gmail.com>
2019-02-22 22:26:11 +02:00
Ran Benita df28d5e8e3 build: fix meson build from tarball generated by autotools
These files are used by the meson build only. Previously, trying to
build with meson using the tarball generated by distcheck would fail.

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

Reported-by: manesm52
Signed-off-by: Ran Benita <ran234@gmail.com>
2019-02-22 15:46:44 +02:00
Peter Hutterer 3f5095339f meson.build: link the sources directly into libxkbcommon-x11
Similar to 75ce741ab9, just for the -x11
sublibrary.

This works around meson bug 3937, 'link_whole' arguments don't get added into
the final static library and we end up with a virtually empty 8-byte
libxkbcommon-x11.a file, see https://github.com/mesonbuild/meson/issues/3937

The internal lib is still built for the one test case that requires it.

Fixes #86

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-02-11 11:35:34 +02:00
Ran Benita 9f93ebcf2b Bump version to 0.8.3
Signed-off-by: Ran Benita <ran234@gmail.com>
2019-02-08 12:39:01 +02:00
Ran Benita 53e7a315c3 Update NEWS
Signed-off-by: Ran Benita <ran234@gmail.com>
2019-02-08 12:38:02 +02:00
Ran Benita caddfdb0ad meson: make comment make sense now
Signed-off-by: Ran Benita <ran234@gmail.com>
2019-02-08 12:29:27 +02:00
Ran Benita 327fd9a1de
Merge pull request #85 from whot/wip/static-lib-sources
meson.build: manually link all sources into the library
2019-02-08 12:18:00 +02:00
Peter Hutterer 75ce741ab9 meson.build: manually link all sources into the library
This works around meson bug 3937, 'link_whole' arguments don't get added into
the final static library and we end up with a virtually empty 8-byte
libxkbcommon.a file, see https://github.com/mesonbuild/meson/issues/3937

Workaround is simply to add all sources to both libraries we need them in.
This obviously compiles them twice but this year's winter was cold and
bit of extra warmth will be appreciated.

Fixes #84

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-02-08 12:21:28 +10:00
Ran Benita 73794e1e54 docs: fix a doxygen reference warning 2019-01-28 16:29:09 +02:00
Ran Benita 828cec7b8b
Merge pull request #81 from whot/master
keysyms: fix comment for XKB_KEY_OCARON
2019-01-25 12:50:55 +02:00