2017-07-25 12:57:42 -06:00
|
|
|
project(
|
|
|
|
'libxkbcommon',
|
|
|
|
'c',
|
2023-10-08 14:46:48 -06:00
|
|
|
version: '1.6.0',
|
2017-07-25 12:57:42 -06:00
|
|
|
default_options: [
|
2021-03-30 11:08:42 -06:00
|
|
|
'c_std=c11',
|
2017-07-25 12:57:42 -06:00
|
|
|
'warning_level=2',
|
|
|
|
'b_lundef=true',
|
|
|
|
],
|
2023-05-05 01:11:00 -06:00
|
|
|
meson_version : '>= 0.52.0',
|
2017-07-25 12:57:42 -06:00
|
|
|
)
|
|
|
|
pkgconfig = import('pkgconfig')
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
|
2020-07-25 07:01:00 -06:00
|
|
|
dir_libexec = get_option('prefix')/get_option('libexecdir')/'xkbcommon'
|
2017-07-25 12:57:42 -06:00
|
|
|
|
|
|
|
# Compiler flags.
|
2020-07-25 06:24:40 -06:00
|
|
|
cflags = [
|
2018-08-18 06:12:15 -06:00
|
|
|
'-fno-strict-aliasing',
|
2017-07-25 12:57:42 -06:00
|
|
|
'-Wno-unused-parameter',
|
|
|
|
'-Wno-missing-field-initializers',
|
|
|
|
'-Wpointer-arith',
|
|
|
|
'-Wmissing-declarations',
|
|
|
|
'-Wformat=2',
|
|
|
|
'-Wstrict-prototypes',
|
|
|
|
'-Wmissing-prototypes',
|
|
|
|
'-Wnested-externs',
|
|
|
|
'-Wbad-function-cast',
|
|
|
|
'-Wshadow',
|
|
|
|
'-Wlogical-op',
|
|
|
|
'-Wdate-time',
|
|
|
|
'-Wwrite-strings',
|
2017-12-14 08:12:52 -07:00
|
|
|
'-Wno-documentation-deprecated-sync',
|
2017-07-25 12:57:42 -06:00
|
|
|
]
|
2020-07-25 06:24:40 -06:00
|
|
|
add_project_arguments(cc.get_supported_arguments(cflags), language: 'c')
|
2017-07-25 12:57:42 -06:00
|
|
|
|
|
|
|
|
|
|
|
# The XKB config root.
|
|
|
|
XKBCONFIGROOT = get_option('xkb-config-root')
|
|
|
|
if XKBCONFIGROOT == ''
|
|
|
|
xkeyboard_config_dep = dependency('xkeyboard-config', required: false)
|
|
|
|
if xkeyboard_config_dep.found()
|
2022-12-16 12:24:57 -07:00
|
|
|
XKBCONFIGROOT = xkeyboard_config_dep.get_variable(pkgconfig: 'xkb_base')
|
2017-07-25 12:57:42 -06:00
|
|
|
else
|
2020-07-25 07:01:00 -06:00
|
|
|
XKBCONFIGROOT = get_option('prefix')/get_option('datadir')/'X11'/'xkb'
|
2017-07-25 12:57:42 -06:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-07-09 16:50:02 -06:00
|
|
|
XKBCONFIGEXTRAPATH = get_option('xkb-config-extra-path')
|
|
|
|
if XKBCONFIGEXTRAPATH == ''
|
2021-02-22 03:07:45 -07:00
|
|
|
XKBCONFIGEXTRAPATH = get_option('prefix')/get_option('sysconfdir')/'xkb'
|
2020-07-09 16:50:02 -06:00
|
|
|
endif
|
2017-07-25 12:57:42 -06:00
|
|
|
|
|
|
|
# The X locale directory for compose.
|
|
|
|
XLOCALEDIR = get_option('x-locale-root')
|
|
|
|
if XLOCALEDIR == ''
|
2020-07-25 07:01:00 -06:00
|
|
|
XLOCALEDIR = get_option('prefix')/get_option('datadir')/'X11'/'locale'
|
2017-07-25 12:57:42 -06:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
# config.h.
|
|
|
|
configh_data = configuration_data()
|
2020-07-07 20:51:54 -06:00
|
|
|
configh_data.set('EXIT_INVALID_USAGE', '2')
|
|
|
|
configh_data.set_quoted('LIBXKBCOMMON_VERSION', meson.project_version())
|
|
|
|
configh_data.set_quoted('LIBXKBCOMMON_TOOL_PATH', dir_libexec)
|
2019-09-09 18:56:42 -06:00
|
|
|
# Like AC_USE_SYSTEM_EXTENSIONS, what #define to use to get extensions
|
|
|
|
# beyond the base POSIX function set.
|
|
|
|
if host_machine.system() == 'sunos'
|
|
|
|
system_extensions = '__EXTENSIONS__'
|
|
|
|
else
|
|
|
|
system_extensions = '_GNU_SOURCE'
|
|
|
|
endif
|
|
|
|
configh_data.set(system_extensions, 1)
|
|
|
|
system_ext_define = '#define ' + system_extensions
|
2017-07-25 12:57:42 -06:00
|
|
|
configh_data.set_quoted('DFLT_XKB_CONFIG_ROOT', XKBCONFIGROOT)
|
2020-07-09 16:50:02 -06:00
|
|
|
configh_data.set_quoted('DFLT_XKB_CONFIG_EXTRA_PATH', XKBCONFIGEXTRAPATH)
|
2017-07-25 12:57:42 -06:00
|
|
|
configh_data.set_quoted('XLOCALEDIR', XLOCALEDIR)
|
|
|
|
configh_data.set_quoted('DEFAULT_XKB_RULES', get_option('default-rules'))
|
|
|
|
configh_data.set_quoted('DEFAULT_XKB_MODEL', get_option('default-model'))
|
|
|
|
configh_data.set_quoted('DEFAULT_XKB_LAYOUT', get_option('default-layout'))
|
|
|
|
if get_option('default-variant') != ''
|
|
|
|
configh_data.set_quoted('DEFAULT_XKB_VARIANT', get_option('default-variant'))
|
2020-07-07 17:12:23 -06:00
|
|
|
else
|
|
|
|
configh_data.set('DEFAULT_XKB_VARIANT', 'NULL')
|
2017-07-25 12:57:42 -06:00
|
|
|
endif
|
|
|
|
if get_option('default-options') != ''
|
|
|
|
configh_data.set_quoted('DEFAULT_XKB_OPTIONS', get_option('default-options'))
|
2020-07-07 17:12:23 -06:00
|
|
|
else
|
|
|
|
configh_data.set('DEFAULT_XKB_OPTIONS', 'NULL')
|
2017-07-25 12:57:42 -06:00
|
|
|
endif
|
2020-09-07 03:24:12 -06:00
|
|
|
if cc.has_header('unistd.h')
|
|
|
|
configh_data.set('HAVE_UNISTD_H', 1)
|
|
|
|
endif
|
2017-07-25 12:57:42 -06:00
|
|
|
if cc.links('int main(){if(__builtin_expect(1<0,0)){}}', name: '__builtin_expect')
|
|
|
|
configh_data.set('HAVE___BUILTIN_EXPECT', 1)
|
|
|
|
endif
|
2019-09-09 18:56:42 -06:00
|
|
|
if cc.has_header_symbol('unistd.h', 'eaccess', prefix: system_ext_define)
|
2017-07-25 12:57:42 -06:00
|
|
|
configh_data.set('HAVE_EACCESS', 1)
|
|
|
|
endif
|
2019-09-09 18:56:42 -06:00
|
|
|
if cc.has_header_symbol('unistd.h', 'euidaccess', prefix: system_ext_define)
|
2017-07-25 12:57:42 -06:00
|
|
|
configh_data.set('HAVE_EUIDACCESS', 1)
|
|
|
|
endif
|
|
|
|
if cc.has_header_symbol('sys/mman.h', 'mmap')
|
|
|
|
configh_data.set('HAVE_MMAP', 1)
|
|
|
|
endif
|
2019-09-09 18:56:42 -06:00
|
|
|
if cc.has_header_symbol('stdlib.h', 'mkostemp', prefix: system_ext_define)
|
2017-08-16 11:23:54 -06:00
|
|
|
configh_data.set('HAVE_MKOSTEMP', 1)
|
|
|
|
endif
|
2019-09-09 18:56:42 -06:00
|
|
|
if cc.has_header_symbol('fcntl.h', 'posix_fallocate', prefix: system_ext_define)
|
2017-08-16 11:23:54 -06:00
|
|
|
configh_data.set('HAVE_POSIX_FALLOCATE', 1)
|
|
|
|
endif
|
2019-08-05 07:07:57 -06:00
|
|
|
if cc.has_header_symbol('string.h', 'strndup', prefix: system_ext_define)
|
|
|
|
configh_data.set('HAVE_STRNDUP', 1)
|
|
|
|
endif
|
2019-08-05 07:18:05 -06:00
|
|
|
if cc.has_header_symbol('stdio.h', 'asprintf', prefix: system_ext_define)
|
|
|
|
configh_data.set('HAVE_ASPRINTF', 1)
|
|
|
|
elif cc.has_header_symbol('stdio.h', 'vasprintf', prefix: system_ext_define)
|
|
|
|
configh_data.set('HAVE_VASPRINTF', 1)
|
|
|
|
endif
|
2019-09-09 18:56:42 -06:00
|
|
|
if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix: system_ext_define)
|
2017-07-25 12:57:42 -06:00
|
|
|
configh_data.set('HAVE_SECURE_GETENV', 1)
|
2019-09-09 18:56:42 -06:00
|
|
|
elif cc.has_header_symbol('stdlib.h', '__secure_getenv', prefix: system_ext_define)
|
2017-07-25 12:57:42 -06:00
|
|
|
configh_data.set('HAVE___SECURE_GETENV', 1)
|
|
|
|
else
|
|
|
|
message('C library does not support secure_getenv, using getenv instead')
|
|
|
|
endif
|
2020-08-30 16:36:38 -06:00
|
|
|
if not cc.has_header_symbol('limits.h', 'PATH_MAX', prefix: system_ext_define)
|
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
# see https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation
|
|
|
|
configh_data.set('PATH_MAX', 260)
|
|
|
|
else
|
|
|
|
configh_data.set('PATH_MAX', 4096)
|
|
|
|
endif
|
|
|
|
endif
|
2020-07-08 19:06:23 -06:00
|
|
|
|
2019-08-05 04:37:23 -06:00
|
|
|
# Silence some security & deprecation warnings on MSVC
|
|
|
|
# for some unix/C functions we use.
|
|
|
|
# https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996?view=vs-2019
|
|
|
|
configh_data.set('_CRT_SECURE_NO_WARNINGS', 1)
|
|
|
|
configh_data.set('_CRT_NONSTDC_NO_WARNINGS', 1)
|
|
|
|
configh_data.set('_CRT_NONSTDC_NO_DEPRECATE', 1)
|
|
|
|
# Reduce unnecessary includes on MSVC.
|
|
|
|
configh_data.set('WIN32_LEAN_AND_MEAN', 1)
|
2017-07-25 12:57:42 -06:00
|
|
|
|
|
|
|
# Supports -Wl,--version-script?
|
|
|
|
have_version_script = cc.links(
|
|
|
|
'int main(){}',
|
2022-12-16 12:24:57 -07:00
|
|
|
args: '-Wl,--version-script=' + meson.current_source_dir()/'xkbcommon.map',
|
2017-07-25 12:57:42 -06:00
|
|
|
name: '-Wl,--version-script',
|
|
|
|
)
|
|
|
|
|
2021-04-26 08:38:48 -06:00
|
|
|
map_to_def = find_program('scripts/map-to-def')
|
2017-07-25 12:57:42 -06:00
|
|
|
|
|
|
|
# libxkbcommon.
|
|
|
|
# Note: we use some yacc extensions, which work with either GNU bison
|
2020-02-18 05:12:20 -07:00
|
|
|
# (preferred) or byacc (with backtracking enabled).
|
2023-05-05 01:16:30 -06:00
|
|
|
bison = find_program('bison', 'win_bison', required: false, version: '>= 2.3a')
|
2020-02-18 05:12:20 -07:00
|
|
|
if bison.found()
|
2023-05-05 01:52:07 -06:00
|
|
|
yacc = bison
|
2020-02-18 05:12:20 -07:00
|
|
|
yacc_gen = generator(
|
|
|
|
bison,
|
|
|
|
output: ['@BASENAME@.c', '@BASENAME@.h'],
|
2020-08-08 05:35:36 -06:00
|
|
|
arguments: ['--defines=@OUTPUT1@', '-o', '@OUTPUT0@', '-p', '_xkbcommon_', '@INPUT@'],
|
2020-02-18 05:12:20 -07:00
|
|
|
)
|
|
|
|
else
|
|
|
|
byacc = find_program('byacc', required: false)
|
|
|
|
if byacc.found()
|
2023-05-05 01:52:07 -06:00
|
|
|
yacc = byacc
|
2020-02-18 05:12:20 -07:00
|
|
|
yacc_gen = generator(
|
|
|
|
byacc,
|
|
|
|
output: ['@BASENAME@.c', '@BASENAME@.h'],
|
2020-08-08 05:35:36 -06:00
|
|
|
arguments: ['-H', '@OUTPUT1@', '-o', '@OUTPUT0@', '-p', '_xkbcommon_', '@INPUT@'],
|
2020-02-18 05:12:20 -07:00
|
|
|
)
|
|
|
|
else
|
|
|
|
error('Could not find a compatible YACC program (bison or byacc)')
|
|
|
|
endif
|
|
|
|
endif
|
2019-02-07 19:15:48 -07:00
|
|
|
libxkbcommon_sources = [
|
2017-07-25 12:57:42 -06:00
|
|
|
'src/compose/parser.c',
|
|
|
|
'src/compose/parser.h',
|
|
|
|
'src/compose/paths.c',
|
|
|
|
'src/compose/paths.h',
|
|
|
|
'src/compose/state.c',
|
|
|
|
'src/compose/table.c',
|
|
|
|
'src/compose/table.h',
|
|
|
|
'src/xkbcomp/action.c',
|
|
|
|
'src/xkbcomp/action.h',
|
|
|
|
'src/xkbcomp/ast.h',
|
|
|
|
'src/xkbcomp/ast-build.c',
|
|
|
|
'src/xkbcomp/ast-build.h',
|
|
|
|
'src/xkbcomp/compat.c',
|
|
|
|
'src/xkbcomp/expr.c',
|
|
|
|
'src/xkbcomp/expr.h',
|
|
|
|
'src/xkbcomp/include.c',
|
|
|
|
'src/xkbcomp/include.h',
|
|
|
|
'src/xkbcomp/keycodes.c',
|
|
|
|
'src/xkbcomp/keymap.c',
|
|
|
|
'src/xkbcomp/keymap-dump.c',
|
|
|
|
'src/xkbcomp/keywords.c',
|
|
|
|
yacc_gen.process('src/xkbcomp/parser.y'),
|
|
|
|
'src/xkbcomp/parser-priv.h',
|
|
|
|
'src/xkbcomp/rules.c',
|
|
|
|
'src/xkbcomp/rules.h',
|
|
|
|
'src/xkbcomp/scanner.c',
|
|
|
|
'src/xkbcomp/symbols.c',
|
|
|
|
'src/xkbcomp/types.c',
|
|
|
|
'src/xkbcomp/vmod.c',
|
|
|
|
'src/xkbcomp/vmod.h',
|
|
|
|
'src/xkbcomp/xkbcomp.c',
|
|
|
|
'src/xkbcomp/xkbcomp-priv.h',
|
|
|
|
'src/atom.c',
|
|
|
|
'src/atom.h',
|
|
|
|
'src/context.c',
|
|
|
|
'src/context.h',
|
|
|
|
'src/context-priv.c',
|
|
|
|
'src/darray.h',
|
|
|
|
'src/keysym.c',
|
|
|
|
'src/keysym.h',
|
|
|
|
'src/keysym-utf.c',
|
|
|
|
'src/ks_tables.h',
|
|
|
|
'src/keymap.c',
|
|
|
|
'src/keymap.h',
|
|
|
|
'src/keymap-priv.c',
|
Structured log messages with a message registry
Currently there is little structure in the log messages, making
difficult to use them for the following use cases:
- A user looking for help about a log message: the user probably
uses a search engine, thus the results will depend on the proper
indexing of our documentation and the various forums. It relies
only on the wording of the message, which may change with time.
- A user wants to filter the logs resulting of the use of one of the
components of xkbcommon. A typical example would be testing
xkeyboard-config against libxkbcommon. It requires the use of a
pattern (simple words detection or regex). The issue is that the
pattern may become silently out-of-sync with xkbcommon.
A common practice (e.g. in compilers) is to assign unique error codes
to reference theses messages, along with an error index for
documentation.
Thus this commit implements the following features:
- Create a message registry (message-registry.yaml) that defines the
log messages produced by xkbcommon. This is a simple YAML file that
provides, for each message:
- A unique numeric code as a short identifier. It is used in the
output message and thus can be easily be filtered to spot errors
or searched in the internet. It must not change: if the
semantics of message changes, it is better to introduce a new
message for clarity.
- A unique text identifier, meant for two uses:
1. Generate constants dealing with log information in our code
base.
2. Generate human-friendly names for the documentation.
- A type: currently warning or error. Used to prefix the constants
(see hereinabove) and for basic classification in documentation.
- A short description, used as concise and mandatory documentation.
- An optionnal detailed description.
- Optional examples, intended to help the user to fix issues
themself.
- Version of xkbcommon it was added. For old entries this often
unknown, so they will default to 1.0.0.
- Version of xkbcommon it was removed (optional)
No entry should ever be deleted from this index, even if the message
is not used anymore: it ensures we have unique identifiers along the
history of xkbcommon, and that users can refer to the documentation
even for older versions.
- Add the script update-message-registry.py to generate the following
files:
- messages.h: message code enumeration for the messages currently
used in the code base. Currently a private API.
- message.registry.md: the error index documentation page.
- Modify the logging functions to use structured messages. This is a
work in progress.
2023-09-18 10:17:34 -06:00
|
|
|
'src/messages-codes.h',
|
2017-07-25 12:57:42 -06:00
|
|
|
'src/scanner-utils.h',
|
|
|
|
'src/state.c',
|
|
|
|
'src/text.c',
|
|
|
|
'src/text.h',
|
|
|
|
'src/utf8.c',
|
|
|
|
'src/utf8.h',
|
2023-11-23 01:30:57 -07:00
|
|
|
'src/util-mem.h',
|
2017-07-25 12:57:42 -06:00
|
|
|
'src/utils.c',
|
|
|
|
'src/utils.h',
|
2019-02-07 19:15:48 -07:00
|
|
|
]
|
2017-07-25 12:57:42 -06:00
|
|
|
libxkbcommon_link_args = []
|
2021-04-26 08:38:48 -06:00
|
|
|
libxkbcommon_link_deps = []
|
2017-07-25 12:57:42 -06:00
|
|
|
if have_version_script
|
2022-12-16 12:24:57 -07:00
|
|
|
libxkbcommon_link_args += '-Wl,--version-script=' + meson.current_source_dir()/'xkbcommon.map'
|
2021-04-26 08:38:48 -06:00
|
|
|
libxkbcommon_link_deps += 'xkbcommon.map'
|
|
|
|
elif cc.get_argument_syntax() == 'msvc'
|
|
|
|
libxkbcommon_def = custom_target('xkbcommon.def',
|
|
|
|
command: [map_to_def, '@INPUT@', '@OUTPUT@'],
|
|
|
|
input: 'xkbcommon.map',
|
|
|
|
output: 'kxbcommon.def',
|
|
|
|
)
|
|
|
|
libxkbcommon_link_deps += libxkbcommon_def
|
|
|
|
libxkbcommon_link_args += '/DEF:' + libxkbcommon_def.full_path()
|
2017-07-25 12:57:42 -06:00
|
|
|
endif
|
|
|
|
libxkbcommon = library(
|
|
|
|
'xkbcommon',
|
2021-04-27 01:10:26 -06:00
|
|
|
'include/xkbcommon/xkbcommon.h',
|
2019-02-07 19:15:48 -07:00
|
|
|
libxkbcommon_sources,
|
2017-07-25 12:57:42 -06:00
|
|
|
link_args: libxkbcommon_link_args,
|
2021-04-26 08:38:48 -06:00
|
|
|
link_depends: libxkbcommon_link_deps,
|
2020-07-25 07:06:40 -06:00
|
|
|
gnu_symbol_visibility: 'hidden',
|
2017-07-25 12:57:42 -06:00
|
|
|
version: '0.0.0',
|
|
|
|
install: true,
|
2021-04-27 01:53:36 -06:00
|
|
|
include_directories: include_directories('src', 'include'),
|
2017-07-25 12:57:42 -06:00
|
|
|
)
|
|
|
|
install_headers(
|
2021-04-27 01:10:26 -06:00
|
|
|
'include/xkbcommon/xkbcommon.h',
|
|
|
|
'include/xkbcommon/xkbcommon-compat.h',
|
|
|
|
'include/xkbcommon/xkbcommon-compose.h',
|
|
|
|
'include/xkbcommon/xkbcommon-keysyms.h',
|
|
|
|
'include/xkbcommon/xkbcommon-names.h',
|
2017-07-25 12:57:42 -06:00
|
|
|
subdir: 'xkbcommon',
|
|
|
|
)
|
2021-04-26 08:27:01 -06:00
|
|
|
|
2021-04-27 01:02:00 -06:00
|
|
|
dep_libxkbcommon = declare_dependency(
|
2020-07-23 21:31:03 -06:00
|
|
|
link_with: libxkbcommon,
|
2021-04-27 01:10:26 -06:00
|
|
|
include_directories: include_directories('include'),
|
2020-07-23 21:31:03 -06:00
|
|
|
)
|
2023-02-18 03:01:30 -07:00
|
|
|
if meson.version().version_compare('>= 0.54.0')
|
|
|
|
meson.override_dependency('xkbcommon', dep_libxkbcommon)
|
|
|
|
endif
|
2017-07-25 12:57:42 -06:00
|
|
|
pkgconfig.generate(
|
2020-07-22 17:22:51 -06:00
|
|
|
libxkbcommon,
|
2017-07-25 12:57:42 -06:00
|
|
|
name: 'xkbcommon',
|
|
|
|
filebase: 'xkbcommon',
|
|
|
|
version: meson.project_version(),
|
|
|
|
description: 'XKB API common to servers and clients',
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# libxkbcommon-x11.
|
|
|
|
if get_option('enable-x11')
|
|
|
|
xcb_dep = dependency('xcb', version: '>=1.10', required: false)
|
|
|
|
xcb_xkb_dep = dependency('xcb-xkb', version: '>=1.10', required: false)
|
|
|
|
if not xcb_dep.found() or not xcb_xkb_dep.found()
|
|
|
|
error('''X11 support requires xcb-xkb >= 1.10 which was not found.
|
|
|
|
You can disable X11 support with -Denable-x11=false.''')
|
|
|
|
endif
|
|
|
|
|
2019-02-10 16:19:28 -07:00
|
|
|
libxkbcommon_x11_sources = [
|
2017-07-25 12:57:42 -06:00
|
|
|
'src/x11/keymap.c',
|
|
|
|
'src/x11/state.c',
|
|
|
|
'src/x11/util.c',
|
|
|
|
'src/x11/x11-priv.h',
|
|
|
|
'src/context.h',
|
|
|
|
'src/context-priv.c',
|
|
|
|
'src/keymap.h',
|
|
|
|
'src/keymap-priv.c',
|
|
|
|
'src/atom.h',
|
|
|
|
'src/atom.c',
|
2019-02-10 16:19:28 -07:00
|
|
|
]
|
2017-07-25 12:57:42 -06:00
|
|
|
libxkbcommon_x11_link_args = []
|
2021-04-26 08:38:48 -06:00
|
|
|
libxkbcommon_x11_link_deps = []
|
2017-07-25 12:57:42 -06:00
|
|
|
if have_version_script
|
2022-12-16 12:24:57 -07:00
|
|
|
libxkbcommon_x11_link_args += '-Wl,--version-script=' + meson.current_source_dir()/'xkbcommon-x11.map'
|
2021-04-26 08:38:48 -06:00
|
|
|
libxkbcommon_x11_link_deps += 'xkbcommon-x11.map'
|
|
|
|
elif cc.get_argument_syntax() == 'msvc'
|
|
|
|
libxkbcommon_x11_def = custom_target('xkbcommon-x11.def',
|
|
|
|
command: [map_to_def, '@INPUT@', '@OUTPUT@'],
|
|
|
|
input: 'xkbcommon-x11.map',
|
|
|
|
output: 'xkbcommon-x11.def',
|
|
|
|
)
|
|
|
|
libxkbcommon_x11_link_deps += libxkbcommon_x11_def
|
|
|
|
libxkbcommon_x11_link_args += '/DEF:' + libxkbcommon_x11_def.full_path()
|
2017-07-25 12:57:42 -06:00
|
|
|
endif
|
|
|
|
libxkbcommon_x11 = library(
|
|
|
|
'xkbcommon-x11',
|
2021-04-27 01:10:26 -06:00
|
|
|
'include/xkbcommon/xkbcommon-x11.h',
|
2019-02-10 16:19:28 -07:00
|
|
|
libxkbcommon_x11_sources,
|
2017-07-25 12:57:42 -06:00
|
|
|
link_args: libxkbcommon_x11_link_args,
|
2021-04-26 08:38:48 -06:00
|
|
|
link_depends: libxkbcommon_x11_link_deps,
|
2020-07-25 07:06:40 -06:00
|
|
|
gnu_symbol_visibility: 'hidden',
|
2017-07-25 12:57:42 -06:00
|
|
|
version: '0.0.0',
|
|
|
|
install: true,
|
2021-04-27 01:53:36 -06:00
|
|
|
include_directories: include_directories('src', 'include'),
|
2019-02-10 16:19:28 -07:00
|
|
|
link_with: libxkbcommon,
|
|
|
|
dependencies: [
|
|
|
|
xcb_dep,
|
|
|
|
xcb_xkb_dep,
|
|
|
|
],
|
2017-07-25 12:57:42 -06:00
|
|
|
)
|
|
|
|
install_headers(
|
2021-04-27 01:10:26 -06:00
|
|
|
'include/xkbcommon/xkbcommon-x11.h',
|
2017-07-25 12:57:42 -06:00
|
|
|
subdir: 'xkbcommon',
|
|
|
|
)
|
2021-04-27 01:02:00 -06:00
|
|
|
dep_libxkbcommon_x11 = declare_dependency(
|
2020-07-25 02:17:11 -06:00
|
|
|
link_with: libxkbcommon_x11,
|
2021-04-27 01:10:26 -06:00
|
|
|
include_directories: include_directories('include'),
|
2020-07-25 02:17:11 -06:00
|
|
|
)
|
2023-02-18 03:01:30 -07:00
|
|
|
if meson.version().version_compare('>= 0.54.0')
|
|
|
|
meson.override_dependency('xkbcommon-x11', dep_libxkbcommon_x11)
|
|
|
|
endif
|
2017-07-25 12:57:42 -06:00
|
|
|
pkgconfig.generate(
|
2020-07-22 17:22:51 -06:00
|
|
|
libxkbcommon_x11,
|
2017-07-25 12:57:42 -06:00
|
|
|
name: 'xkbcommon-x11',
|
|
|
|
filebase: 'xkbcommon-x11',
|
|
|
|
version: meson.project_version(),
|
|
|
|
description: 'XKB API common to servers and clients - X11 support',
|
2018-07-17 09:21:02 -06:00
|
|
|
requires: ['xkbcommon'],
|
|
|
|
requires_private: ['xcb>=1.10', 'xcb-xkb>=1.10'],
|
2017-07-25 12:57:42 -06:00
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
2020-05-11 22:09:50 -06:00
|
|
|
# libxkbregistry
|
|
|
|
if get_option('enable-xkbregistry')
|
|
|
|
dep_libxml = dependency('libxml-2.0')
|
|
|
|
deps_libxkbregistry = [dep_libxml]
|
|
|
|
libxkbregistry_sources = [
|
|
|
|
'src/registry.c',
|
|
|
|
'src/utils.h',
|
|
|
|
'src/utils.c',
|
|
|
|
'src/util-list.h',
|
|
|
|
'src/util-list.c',
|
2023-11-21 00:50:38 -07:00
|
|
|
'src/util-mem.h',
|
2020-05-11 22:09:50 -06:00
|
|
|
]
|
|
|
|
libxkbregistry_link_args = []
|
2021-04-26 08:38:48 -06:00
|
|
|
libxkbregistry_link_deps = []
|
2020-05-11 22:09:50 -06:00
|
|
|
if have_version_script
|
2022-12-16 12:24:57 -07:00
|
|
|
libxkbregistry_link_args += '-Wl,--version-script=' + meson.current_source_dir()/'xkbregistry.map'
|
2021-04-26 08:38:48 -06:00
|
|
|
libxkbregistry_link_deps += 'xkbregistry.map'
|
|
|
|
elif cc.get_argument_syntax() == 'msvc'
|
|
|
|
libxkbregistry_def = custom_target('xkbregistry.def',
|
|
|
|
command: [map_to_def, '@INPUT@', '@OUTPUT@'],
|
|
|
|
input: 'xkbregistry.map',
|
|
|
|
output: 'xkbregistry.def',
|
|
|
|
)
|
|
|
|
libxkbregistry_link_deps += libxkbregistry_def
|
|
|
|
libxkbregistry_link_args += '/DEF:' + libxkbregistry_def.full_path()
|
2020-05-11 22:09:50 -06:00
|
|
|
endif
|
|
|
|
libxkbregistry = library(
|
|
|
|
'xkbregistry',
|
2021-04-27 01:10:26 -06:00
|
|
|
'include/xkbcommon/xkbregistry.h',
|
2020-05-11 22:09:50 -06:00
|
|
|
libxkbregistry_sources,
|
|
|
|
link_args: libxkbregistry_link_args,
|
2021-04-26 08:38:48 -06:00
|
|
|
link_depends: libxkbregistry_link_deps,
|
2020-07-25 07:06:40 -06:00
|
|
|
gnu_symbol_visibility: 'hidden',
|
2020-05-11 22:09:50 -06:00
|
|
|
dependencies: deps_libxkbregistry,
|
|
|
|
version: '0.0.0',
|
|
|
|
install: true,
|
2021-04-27 01:53:36 -06:00
|
|
|
include_directories: include_directories('src', 'include'),
|
2020-05-11 22:09:50 -06:00
|
|
|
)
|
|
|
|
install_headers(
|
2021-04-27 01:10:26 -06:00
|
|
|
'include/xkbcommon/xkbregistry.h',
|
2020-05-11 22:09:50 -06:00
|
|
|
subdir: 'xkbcommon',
|
|
|
|
)
|
|
|
|
pkgconfig.generate(
|
2020-07-22 17:22:51 -06:00
|
|
|
libxkbregistry,
|
2020-05-11 22:09:50 -06:00
|
|
|
name: 'xkbregistry',
|
|
|
|
filebase: 'xkbregistry',
|
|
|
|
version: meson.project_version(),
|
|
|
|
description: 'XKB API to query available rules, models, layouts, variants and options',
|
|
|
|
)
|
|
|
|
|
2021-04-27 01:02:00 -06:00
|
|
|
dep_libxkbregistry = declare_dependency(
|
2021-04-27 01:10:26 -06:00
|
|
|
link_with: libxkbregistry,
|
|
|
|
include_directories: include_directories('include'),
|
|
|
|
)
|
2023-02-18 03:01:30 -07:00
|
|
|
if meson.version().version_compare('>= 0.54.0')
|
|
|
|
meson.override_dependency('xkbregistry', dep_libxkbregistry)
|
|
|
|
endif
|
2020-05-11 22:09:50 -06:00
|
|
|
endif
|
2017-07-25 12:57:42 -06:00
|
|
|
|
2020-09-07 03:19:17 -06:00
|
|
|
man_pages = []
|
|
|
|
|
|
|
|
# Tools
|
2021-10-08 07:51:10 -06:00
|
|
|
build_tools = get_option('enable-tools') and cc.has_header_symbol('getopt.h', 'getopt_long', prefix: '#define _GNU_SOURCE')
|
2020-09-07 03:19:17 -06:00
|
|
|
if build_tools
|
2023-09-29 12:44:06 -06:00
|
|
|
# Common resources
|
2023-09-18 04:17:11 -06:00
|
|
|
libxkbcommon_tools_internal_sources = [
|
2020-09-07 03:19:17 -06:00
|
|
|
'tools/tools-common.h',
|
|
|
|
'tools/tools-common.c',
|
2023-09-18 04:17:11 -06:00
|
|
|
]
|
|
|
|
libxkbcommon_tools_internal = static_library(
|
|
|
|
'tools-internal',
|
|
|
|
libxkbcommon_tools_internal_sources,
|
2021-04-27 01:02:00 -06:00
|
|
|
dependencies: dep_libxkbcommon,
|
2020-09-07 03:19:17 -06:00
|
|
|
)
|
|
|
|
tools_dep = declare_dependency(
|
2021-04-27 01:53:36 -06:00
|
|
|
include_directories: [include_directories('tools', 'include')],
|
2020-09-07 03:19:17 -06:00
|
|
|
link_with: libxkbcommon_tools_internal,
|
2023-05-03 00:47:56 -06:00
|
|
|
dependencies: dep_libxkbcommon,
|
2020-09-07 03:19:17 -06:00
|
|
|
)
|
|
|
|
|
2023-09-29 12:44:06 -06:00
|
|
|
# Tool: xkbcli
|
2020-09-07 03:19:17 -06:00
|
|
|
executable('xkbcli', 'tools/xkbcli.c',
|
|
|
|
dependencies: tools_dep, install: true)
|
|
|
|
install_man('tools/xkbcli.1')
|
|
|
|
|
2023-09-29 12:44:06 -06:00
|
|
|
if get_option('enable-bash-completion')
|
|
|
|
bash_completion_path = get_option('bash-completion-path')
|
|
|
|
if bash_completion_path == ''
|
|
|
|
bash_completion = dependency('bash-completion', required: false)
|
|
|
|
if bash_completion.found()
|
|
|
|
bash_completion_path = bash_completion.get_variable(pkgconfig: 'completionsdir')
|
|
|
|
else
|
|
|
|
bash_completion_path = get_option('datadir') / 'bash-completion/completions'
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
install_data('tools/xkbcli-bash-completion.sh',
|
|
|
|
rename: 'xkbcli',
|
|
|
|
install_dir: bash_completion_path)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Tool: compile-keymap
|
2021-02-21 19:54:15 -07:00
|
|
|
xkbcli_compile_keymap = executable('xkbcli-compile-keymap',
|
|
|
|
'tools/compile-keymap.c',
|
|
|
|
dependencies: tools_dep,
|
|
|
|
install: true,
|
|
|
|
install_dir: dir_libexec)
|
2020-09-07 03:19:17 -06:00
|
|
|
install_man('tools/xkbcli-compile-keymap.1')
|
2023-11-07 04:58:20 -07:00
|
|
|
configh_data.set10('HAVE_XKBCLI_COMPILE_KEYMAP', true)
|
2020-09-07 03:19:17 -06:00
|
|
|
# The same tool again, but with access to some private APIs.
|
|
|
|
executable('compile-keymap',
|
|
|
|
'tools/compile-keymap.c',
|
|
|
|
libxkbcommon_sources,
|
|
|
|
dependencies: [tools_dep],
|
|
|
|
c_args: ['-DENABLE_PRIVATE_APIS'],
|
2021-04-27 01:53:36 -06:00
|
|
|
include_directories: [include_directories('src', 'include')],
|
2020-09-07 03:19:17 -06:00
|
|
|
install: false)
|
2023-09-29 12:44:06 -06:00
|
|
|
|
|
|
|
# Tool: compose
|
2023-11-07 04:58:20 -07:00
|
|
|
executable('xkbcli-compile-compose',
|
|
|
|
'tools/compile-compose.c',
|
2021-05-08 12:30:52 -06:00
|
|
|
dependencies: tools_dep,
|
2023-11-07 04:58:20 -07:00
|
|
|
install: true,
|
|
|
|
install_dir: dir_libexec)
|
|
|
|
install_man('tools/xkbcli-compile-compose.1')
|
|
|
|
configh_data.set10('HAVE_XKBCLI_COMPILE_COMPOSE', true)
|
2023-09-29 12:44:06 -06:00
|
|
|
|
|
|
|
# Tool: how-to-type
|
2020-09-07 03:19:17 -06:00
|
|
|
executable('xkbcli-how-to-type',
|
|
|
|
'tools/how-to-type.c',
|
|
|
|
dependencies: tools_dep,
|
|
|
|
install: true,
|
|
|
|
install_dir: dir_libexec)
|
|
|
|
install_man('tools/xkbcli-how-to-type.1')
|
|
|
|
configh_data.set10('HAVE_XKBCLI_HOW_TO_TYPE', true)
|
2023-09-29 12:44:06 -06:00
|
|
|
|
|
|
|
# Tool: interactive-evdev
|
2020-09-07 03:19:17 -06:00
|
|
|
if cc.has_header('linux/input.h')
|
|
|
|
executable('xkbcli-interactive-evdev',
|
|
|
|
'tools/interactive-evdev.c',
|
|
|
|
dependencies: tools_dep,
|
|
|
|
install: true,
|
|
|
|
install_dir: dir_libexec)
|
|
|
|
configh_data.set10('HAVE_XKBCLI_INTERACTIVE_EVDEV', true)
|
|
|
|
install_man('tools/xkbcli-interactive-evdev.1')
|
2023-09-18 04:17:11 -06:00
|
|
|
# The same tool again, but with access to some private APIs.
|
|
|
|
executable('interactive-evdev',
|
|
|
|
'tools/interactive-evdev.c',
|
|
|
|
libxkbcommon_sources,
|
|
|
|
libxkbcommon_tools_internal_sources,
|
|
|
|
dependencies: [tools_dep],
|
|
|
|
c_args: ['-DENABLE_PRIVATE_APIS'],
|
|
|
|
include_directories: [include_directories('src', 'include')],
|
|
|
|
install: false)
|
2020-09-07 03:19:17 -06:00
|
|
|
endif
|
2023-09-29 12:44:06 -06:00
|
|
|
|
|
|
|
# Tool: interactive-x11
|
2020-09-07 03:19:17 -06:00
|
|
|
if get_option('enable-x11')
|
|
|
|
x11_tools_dep = declare_dependency(
|
|
|
|
link_with: libxkbcommon_x11,
|
|
|
|
dependencies: [
|
|
|
|
tools_dep,
|
|
|
|
xcb_dep,
|
|
|
|
xcb_xkb_dep,
|
|
|
|
],
|
|
|
|
)
|
|
|
|
executable('xkbcli-interactive-x11',
|
|
|
|
'tools/interactive-x11.c',
|
|
|
|
dependencies: x11_tools_dep,
|
|
|
|
install: true,
|
|
|
|
install_dir: dir_libexec)
|
|
|
|
install_man('tools/xkbcli-interactive-x11.1')
|
|
|
|
configh_data.set10('HAVE_XKBCLI_INTERACTIVE_X11', true)
|
|
|
|
endif
|
2023-09-29 12:44:06 -06:00
|
|
|
|
|
|
|
# Tool: interactive-wayland
|
2020-09-07 03:19:17 -06:00
|
|
|
if get_option('enable-wayland')
|
|
|
|
wayland_client_dep = dependency('wayland-client', version: '>=1.2.0', required: false)
|
|
|
|
wayland_protocols_dep = dependency('wayland-protocols', version: '>=1.12', required: false)
|
|
|
|
wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)
|
|
|
|
if not wayland_client_dep.found() or not wayland_protocols_dep.found() or not wayland_scanner_dep.found()
|
2023-12-13 17:44:00 -07:00
|
|
|
error('''The Wayland xkbcli programs require wayland-client and wayland-protocols which were not found.
|
2020-09-07 03:19:17 -06:00
|
|
|
You can disable the Wayland xkbcli programs with -Denable-wayland=false.''')
|
|
|
|
endif
|
|
|
|
|
2022-12-16 12:24:57 -07:00
|
|
|
wayland_scanner = find_program(wayland_scanner_dep.get_variable(pkgconfig: 'wayland_scanner'))
|
2020-09-07 03:19:17 -06:00
|
|
|
wayland_scanner_code_gen = generator(
|
|
|
|
wayland_scanner,
|
|
|
|
output: '@BASENAME@-protocol.c',
|
2023-01-02 12:10:45 -07:00
|
|
|
arguments: ['private-code', '@INPUT@', '@OUTPUT@'],
|
2020-09-07 03:19:17 -06:00
|
|
|
)
|
|
|
|
wayland_scanner_client_header_gen = generator(
|
|
|
|
wayland_scanner,
|
|
|
|
output: '@BASENAME@-client-protocol.h',
|
|
|
|
arguments: ['client-header', '@INPUT@', '@OUTPUT@'],
|
|
|
|
)
|
2022-12-16 12:24:57 -07:00
|
|
|
wayland_protocols_datadir = wayland_protocols_dep.get_variable(pkgconfig: 'pkgdatadir')
|
2020-09-07 03:19:17 -06:00
|
|
|
xdg_shell_xml = wayland_protocols_datadir/'stable/xdg-shell/xdg-shell.xml'
|
|
|
|
xdg_shell_sources = [
|
|
|
|
wayland_scanner_code_gen.process(xdg_shell_xml),
|
|
|
|
wayland_scanner_client_header_gen.process(xdg_shell_xml),
|
|
|
|
]
|
|
|
|
executable('xkbcli-interactive-wayland',
|
|
|
|
'tools/interactive-wayland.c',
|
|
|
|
xdg_shell_sources,
|
|
|
|
dependencies: [tools_dep, wayland_client_dep],
|
|
|
|
install: true,
|
|
|
|
install_dir: dir_libexec)
|
|
|
|
install_man('tools/xkbcli-interactive-wayland.1')
|
|
|
|
configh_data.set10('HAVE_XKBCLI_INTERACTIVE_WAYLAND', true)
|
|
|
|
endif
|
|
|
|
|
2023-09-29 12:44:06 -06:00
|
|
|
# Tool: list
|
2020-09-07 03:19:17 -06:00
|
|
|
if get_option('enable-xkbregistry')
|
|
|
|
configh_data.set10('HAVE_XKBCLI_LIST', true)
|
|
|
|
executable('xkbcli-list',
|
|
|
|
'tools/registry-list.c',
|
2021-04-27 01:02:00 -06:00
|
|
|
dependencies: dep_libxkbregistry,
|
2020-09-07 03:19:17 -06:00
|
|
|
install: true,
|
|
|
|
install_dir: dir_libexec)
|
|
|
|
install_man('tools/xkbcli-list.1')
|
|
|
|
endif
|
2023-09-18 10:17:39 -06:00
|
|
|
|
2023-09-29 12:44:06 -06:00
|
|
|
# Tool: check-messages
|
2023-09-18 10:17:39 -06:00
|
|
|
executable('xkb-check-messages',
|
|
|
|
'tools/check-messages.c',
|
|
|
|
'tools/messages.c',
|
|
|
|
'tools/messages.h',
|
|
|
|
'src/messages-codes.h',
|
|
|
|
dependencies: [tools_dep],
|
|
|
|
include_directories: [include_directories('src', 'include', 'tools')],
|
|
|
|
install: false)
|
2020-09-07 03:19:17 -06:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
# xkeyboard-config "verifier"
|
|
|
|
xkct_config = configuration_data()
|
2022-12-16 12:24:57 -07:00
|
|
|
xkct_config.set('MESON_BUILD_ROOT', meson.current_build_dir())
|
2020-09-07 03:19:17 -06:00
|
|
|
xkct_config.set('XKB_CONFIG_ROOT', XKBCONFIGROOT)
|
|
|
|
configure_file(input: 'test/xkeyboard-config-test.py.in',
|
|
|
|
output: 'xkeyboard-config-test',
|
|
|
|
configuration: xkct_config)
|
|
|
|
|
2017-07-25 12:57:42 -06:00
|
|
|
# Tests
|
|
|
|
test_env = environment()
|
|
|
|
test_env.set('XKB_LOG_LEVEL', 'debug')
|
|
|
|
test_env.set('XKB_LOG_VERBOSITY', '10')
|
2022-12-16 12:24:57 -07:00
|
|
|
test_env.set('top_srcdir', meson.current_source_dir())
|
|
|
|
test_env.set('top_builddir', meson.current_build_dir())
|
2020-09-07 03:27:26 -06:00
|
|
|
test_env.set('HAVE_XKBCLI_INTERACTIVE_EVDEV', configh_data.get('HAVE_XKBCLI_INTERACTIVE_EVDEV', 0).to_string())
|
|
|
|
test_env.set('HAVE_XKBCLI_INTERACTIVE_WAYLAND', configh_data.get('HAVE_XKBCLI_INTERACTIVE_WAYLAND', 0).to_string())
|
|
|
|
test_env.set('HAVE_XKBCLI_INTERACTIVE_X11', configh_data.get('HAVE_XKBCLI_INTERACTIVE_X11', 0).to_string())
|
|
|
|
test_env.set('HAVE_XKBCLI_LIST', configh_data.get('HAVE_XKBCLI_LIST', 0).to_string())
|
rules: add include statements to rules files
The majority use-case for extending XKB on a machine is to override one or a
few keys with custom keycodes, not to define whole layouts.
Previously, we relied on the rules file to be a single file, making it hard to
extend. libxkbcommon parses $XDG_CONFIG_HOME/xkb/ but that only works as long
as there is a rule that matches the user-specified RMLVO. This works for MLV
but not for options which don't have a wildcard defined. Users have to copy
the whole rules file and then work from there - not something easy to extend
and maintain.
This patch adds a new ! include directive to rules files that allows including
another file. The file path must be without quotes and may not start with the
literal "include". Two directives are supported, %H to $HOME and %S for the
system-installed rules directory (usually /usr/share/X11/xkb/rules).
A user would typically use a custom rules file like this:
! option = symbols
custom:foo = +custom(foo)
custom:bar = +custom(baz)
! include %S/evdev
Where the above defines the two options and then includes the system-installed
evdev rule. Since most current implementations default to loading the "evdev"
ruleset, it's best to name this $XDG_CONFIG_HOME/xkb/rules/evdev, but any
valid name is allowed.
The include functionally replaces the line with the content of the included
file which means the behavior of rules files is maintained. Specifically,
custom options must be defined before including another file because the first
match usually wins. In other words, the following ruleset will not assign
my_model as one would expect:
! include %S/evdev
! model = symbols
my_model = +custom(foo)
The default evdev ruleset has wildcards for model and those match before the
my_model is hit.
The actual resolved components need only be in one of the XKB lookup
directories, e.g. for the example above:
$ cat $XDG_CONFIG_HOME/xkb/symbols/custom
partial alphanumeric_keys
xkb_symbols "foo" {
key <TLDE> { [ VoidSymbol ] };
};
partial alphanumeric_keys
xkb_symbols "baz" {
key <AB01> { [ k, K ] };
};
This can then be loaded with the XKB option "custom:foo,custom:bar".
The use of "custom" is just as an example, there are no naming requirements
beyond avoiding already-used ones. Also note the bar/baz above - the option
names don't have to match the component names.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-02 19:23:14 -06:00
|
|
|
|
|
|
|
test_configh_data = configuration_data()
|
2022-12-16 12:24:57 -07:00
|
|
|
test_configh_data.set_quoted('TEST_XKB_CONFIG_ROOT', meson.current_source_dir()/'test'/'data')
|
rules: add include statements to rules files
The majority use-case for extending XKB on a machine is to override one or a
few keys with custom keycodes, not to define whole layouts.
Previously, we relied on the rules file to be a single file, making it hard to
extend. libxkbcommon parses $XDG_CONFIG_HOME/xkb/ but that only works as long
as there is a rule that matches the user-specified RMLVO. This works for MLV
but not for options which don't have a wildcard defined. Users have to copy
the whole rules file and then work from there - not something easy to extend
and maintain.
This patch adds a new ! include directive to rules files that allows including
another file. The file path must be without quotes and may not start with the
literal "include". Two directives are supported, %H to $HOME and %S for the
system-installed rules directory (usually /usr/share/X11/xkb/rules).
A user would typically use a custom rules file like this:
! option = symbols
custom:foo = +custom(foo)
custom:bar = +custom(baz)
! include %S/evdev
Where the above defines the two options and then includes the system-installed
evdev rule. Since most current implementations default to loading the "evdev"
ruleset, it's best to name this $XDG_CONFIG_HOME/xkb/rules/evdev, but any
valid name is allowed.
The include functionally replaces the line with the content of the included
file which means the behavior of rules files is maintained. Specifically,
custom options must be defined before including another file because the first
match usually wins. In other words, the following ruleset will not assign
my_model as one would expect:
! include %S/evdev
! model = symbols
my_model = +custom(foo)
The default evdev ruleset has wildcards for model and those match before the
my_model is hit.
The actual resolved components need only be in one of the XKB lookup
directories, e.g. for the example above:
$ cat $XDG_CONFIG_HOME/xkb/symbols/custom
partial alphanumeric_keys
xkb_symbols "foo" {
key <TLDE> { [ VoidSymbol ] };
};
partial alphanumeric_keys
xkb_symbols "baz" {
key <AB01> { [ k, K ] };
};
This can then be loaded with the XKB option "custom:foo,custom:bar".
The use of "custom" is just as an example, there are no naming requirements
beyond avoiding already-used ones. Also note the bar/baz above - the option
names don't have to match the component names.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-02 19:23:14 -06:00
|
|
|
configure_file(output: 'test-config.h', configuration: test_configh_data)
|
|
|
|
|
2017-07-25 12:57:42 -06:00
|
|
|
# Some tests need to use unexported symbols, so we link them against
|
2019-02-08 03:29:27 -07:00
|
|
|
# an internal copy of libxkbcommon with all symbols exposed.
|
2017-07-25 12:57:42 -06:00
|
|
|
libxkbcommon_test_internal = static_library(
|
|
|
|
'xkbcommon-test-internal',
|
|
|
|
'test/common.c',
|
|
|
|
'test/test.h',
|
|
|
|
'test/evdev-scancodes.h',
|
2020-11-19 07:15:42 -07:00
|
|
|
'bench/bench.c',
|
|
|
|
'bench/bench.h',
|
2019-02-07 19:15:48 -07:00
|
|
|
libxkbcommon_sources,
|
2021-04-27 01:53:36 -06:00
|
|
|
include_directories: include_directories('src', 'include'),
|
2017-07-25 12:57:42 -06:00
|
|
|
)
|
|
|
|
test_dep = declare_dependency(
|
2021-04-27 01:53:36 -06:00
|
|
|
include_directories: include_directories('src', 'include'),
|
2017-07-25 12:57:42 -06:00
|
|
|
link_with: libxkbcommon_test_internal,
|
|
|
|
)
|
2018-02-25 02:51:05 -07:00
|
|
|
if get_option('enable-x11')
|
2023-09-18 05:17:17 -06:00
|
|
|
libxkbcommon_x11_test_internal = static_library(
|
2020-04-10 09:32:13 -06:00
|
|
|
'xkbcommon-x11-internal',
|
|
|
|
libxkbcommon_x11_sources,
|
2023-09-18 05:17:17 -06:00
|
|
|
'test/xvfb-wrapper.c',
|
|
|
|
'test/xvfb-wrapper.h',
|
2021-04-27 01:53:36 -06:00
|
|
|
include_directories: include_directories('src', 'include'),
|
2020-04-10 09:32:13 -06:00
|
|
|
link_with: libxkbcommon_test_internal,
|
|
|
|
dependencies: [
|
|
|
|
xcb_dep,
|
|
|
|
xcb_xkb_dep,
|
|
|
|
],
|
|
|
|
)
|
2018-02-25 02:51:05 -07:00
|
|
|
x11_test_dep = declare_dependency(
|
2023-09-18 05:17:17 -06:00
|
|
|
link_with: libxkbcommon_x11_test_internal,
|
2018-02-25 02:51:05 -07:00
|
|
|
dependencies: [
|
|
|
|
test_dep,
|
|
|
|
xcb_dep,
|
|
|
|
xcb_xkb_dep,
|
|
|
|
],
|
|
|
|
)
|
|
|
|
endif
|
2017-07-25 12:57:42 -06:00
|
|
|
test(
|
|
|
|
'keysym',
|
|
|
|
executable('test-keysym', 'test/keysym.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
|
|
|
test(
|
|
|
|
'keymap',
|
|
|
|
executable('test-keymap', 'test/keymap.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
|
|
|
test(
|
|
|
|
'filecomp',
|
|
|
|
executable('test-filecomp', 'test/filecomp.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
2022-09-24 01:30:00 -06:00
|
|
|
test(
|
|
|
|
'context',
|
|
|
|
executable('test-context', 'test/context.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
2017-07-25 12:57:42 -06:00
|
|
|
test(
|
|
|
|
'rules-file',
|
|
|
|
executable('test-rules-file', 'test/rules-file.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
rules: add include statements to rules files
The majority use-case for extending XKB on a machine is to override one or a
few keys with custom keycodes, not to define whole layouts.
Previously, we relied on the rules file to be a single file, making it hard to
extend. libxkbcommon parses $XDG_CONFIG_HOME/xkb/ but that only works as long
as there is a rule that matches the user-specified RMLVO. This works for MLV
but not for options which don't have a wildcard defined. Users have to copy
the whole rules file and then work from there - not something easy to extend
and maintain.
This patch adds a new ! include directive to rules files that allows including
another file. The file path must be without quotes and may not start with the
literal "include". Two directives are supported, %H to $HOME and %S for the
system-installed rules directory (usually /usr/share/X11/xkb/rules).
A user would typically use a custom rules file like this:
! option = symbols
custom:foo = +custom(foo)
custom:bar = +custom(baz)
! include %S/evdev
Where the above defines the two options and then includes the system-installed
evdev rule. Since most current implementations default to loading the "evdev"
ruleset, it's best to name this $XDG_CONFIG_HOME/xkb/rules/evdev, but any
valid name is allowed.
The include functionally replaces the line with the content of the included
file which means the behavior of rules files is maintained. Specifically,
custom options must be defined before including another file because the first
match usually wins. In other words, the following ruleset will not assign
my_model as one would expect:
! include %S/evdev
! model = symbols
my_model = +custom(foo)
The default evdev ruleset has wildcards for model and those match before the
my_model is hit.
The actual resolved components need only be in one of the XKB lookup
directories, e.g. for the example above:
$ cat $XDG_CONFIG_HOME/xkb/symbols/custom
partial alphanumeric_keys
xkb_symbols "foo" {
key <TLDE> { [ VoidSymbol ] };
};
partial alphanumeric_keys
xkb_symbols "baz" {
key <AB01> { [ k, K ] };
};
This can then be loaded with the XKB option "custom:foo,custom:bar".
The use of "custom" is just as an example, there are no naming requirements
beyond avoiding already-used ones. Also note the bar/baz above - the option
names don't have to match the component names.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-02 19:23:14 -06:00
|
|
|
test(
|
|
|
|
'rules-file-includes',
|
|
|
|
executable('test-rules-file-includes', 'test/rules-file-includes.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
2017-07-25 12:57:42 -06:00
|
|
|
test(
|
|
|
|
'stringcomp',
|
|
|
|
executable('test-stringcomp', 'test/stringcomp.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
|
|
|
test(
|
|
|
|
'buffercomp',
|
|
|
|
executable('test-buffercomp', 'test/buffercomp.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
|
|
|
test(
|
|
|
|
'log',
|
|
|
|
executable('test-log', 'test/log.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
|
|
|
test(
|
|
|
|
'atom',
|
|
|
|
executable('test-atom', 'test/atom.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
|
|
|
test(
|
|
|
|
'utf8',
|
|
|
|
executable('test-utf8', 'test/utf8.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
|
|
|
test(
|
|
|
|
'state',
|
|
|
|
executable('test-state', 'test/state.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
|
|
|
test(
|
|
|
|
'keyseq',
|
|
|
|
executable('test-keyseq', 'test/keyseq.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
|
|
|
test(
|
|
|
|
'rulescomp',
|
|
|
|
executable('test-rulescomp', 'test/rulescomp.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
|
|
|
test(
|
|
|
|
'compose',
|
|
|
|
executable('test-compose', 'test/compose.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
2020-06-15 18:34:07 -06:00
|
|
|
test(
|
|
|
|
'utils',
|
|
|
|
executable('test-utils', 'test/utils.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
2017-07-25 12:57:42 -06:00
|
|
|
test(
|
|
|
|
'symbols-leak-test',
|
2020-07-22 02:47:15 -06:00
|
|
|
find_program('test/symbols-leak-test.py'),
|
2017-07-25 12:57:42 -06:00
|
|
|
env: test_env,
|
2020-07-22 17:04:10 -06:00
|
|
|
suite: ['python-tests'],
|
2017-07-25 12:57:42 -06:00
|
|
|
)
|
2023-05-01 14:30:41 -06:00
|
|
|
test(
|
|
|
|
'modifiers',
|
|
|
|
executable('test-modifiers', 'test/modifiers.c', dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
2023-09-18 10:17:39 -06:00
|
|
|
test(
|
|
|
|
'messages',
|
|
|
|
executable(
|
|
|
|
'test-messages',
|
|
|
|
'test/messages.c',
|
|
|
|
'tools/messages.c',
|
|
|
|
'tools/messages.h',
|
|
|
|
include_directories: include_directories('src', 'include', 'tools'),
|
|
|
|
dependencies: test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
2017-07-25 12:57:42 -06:00
|
|
|
if get_option('enable-x11')
|
|
|
|
test(
|
|
|
|
'x11',
|
2018-02-25 02:51:05 -07:00
|
|
|
executable('test-x11', 'test/x11.c', dependencies: x11_test_dep),
|
2017-07-25 12:57:42 -06:00
|
|
|
env: test_env,
|
|
|
|
)
|
2023-09-18 05:17:30 -06:00
|
|
|
test(
|
|
|
|
'x11comp',
|
|
|
|
executable('test-x11comp', 'test/x11comp.c', dependencies: x11_test_dep),
|
|
|
|
env: test_env,
|
|
|
|
)
|
2017-07-25 12:57:42 -06:00
|
|
|
endif
|
2020-05-11 22:09:50 -06:00
|
|
|
if get_option('enable-xkbregistry')
|
|
|
|
test(
|
|
|
|
'registry',
|
|
|
|
executable('test-registry', 'test/registry.c',
|
|
|
|
include_directories: include_directories('src'),
|
2022-09-24 01:27:51 -06:00
|
|
|
dependencies: [dep_libxkbregistry, test_dep]),
|
2020-05-11 22:09:50 -06:00
|
|
|
env: test_env,
|
|
|
|
)
|
|
|
|
endif
|
2020-09-07 03:19:17 -06:00
|
|
|
if build_tools
|
|
|
|
test('tool-option-parsing',
|
|
|
|
find_program('test/tool-option-parsing.py'),
|
|
|
|
env: test_env,
|
|
|
|
suite: ['python-tests'])
|
2021-02-21 19:54:15 -07:00
|
|
|
|
|
|
|
# A set of keysyms to test for. Add one or two symbols to this array
|
|
|
|
# whenever the xorgproto gets updated to make sure we resolve them.
|
|
|
|
keysyms_to_test = [
|
|
|
|
'XF86Macro23',
|
|
|
|
]
|
|
|
|
|
|
|
|
env = environment()
|
2022-12-16 12:24:57 -07:00
|
|
|
env.set('XKB_CONFIG_ROOT', meson.current_source_dir()/'test'/'data')
|
2021-02-21 19:54:15 -07:00
|
|
|
foreach keysym: keysyms_to_test
|
|
|
|
test('keysym-test-@0@'.format(keysym),
|
|
|
|
find_program('test/test-keysym.py'),
|
|
|
|
env: env,
|
|
|
|
args: [keysym, '--tool', xkbcli_compile_keymap],
|
|
|
|
suite: ['python-tests'])
|
|
|
|
endforeach
|
2020-09-07 03:19:17 -06:00
|
|
|
endif
|
2017-07-25 12:57:42 -06:00
|
|
|
|
2020-07-22 17:04:10 -06:00
|
|
|
valgrind = find_program('valgrind', required: false)
|
|
|
|
if valgrind.found()
|
|
|
|
add_test_setup('valgrind',
|
|
|
|
exe_wrapper: [valgrind,
|
|
|
|
'--leak-check=full',
|
|
|
|
'--track-origins=yes',
|
|
|
|
'--gen-suppressions=all',
|
|
|
|
'--error-exitcode=99'],
|
|
|
|
timeout_multiplier : 10)
|
|
|
|
else
|
|
|
|
message('valgrind not found, disabling valgrind test setup')
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2018-03-10 15:04:05 -07:00
|
|
|
# Fuzzing target programs.
|
|
|
|
executable('fuzz-keymap', 'fuzz/keymap/target.c', dependencies: test_dep)
|
|
|
|
executable('fuzz-compose', 'fuzz/compose/target.c', dependencies: test_dep)
|
|
|
|
|
2017-07-25 12:57:42 -06:00
|
|
|
|
|
|
|
# Benchmarks.
|
|
|
|
bench_env = environment()
|
2022-12-16 12:24:57 -07:00
|
|
|
bench_env.set('top_srcdir', meson.current_source_dir())
|
2017-07-25 12:57:42 -06:00
|
|
|
benchmark(
|
|
|
|
'key-proc',
|
2020-11-19 07:15:42 -07:00
|
|
|
executable('bench-key-proc', 'bench/key-proc.c', dependencies: test_dep),
|
2017-07-25 12:57:42 -06:00
|
|
|
env: bench_env,
|
|
|
|
)
|
|
|
|
benchmark(
|
|
|
|
'rules',
|
2020-11-19 07:15:42 -07:00
|
|
|
executable('bench-rules', 'bench/rules.c', dependencies: test_dep),
|
2017-07-25 12:57:42 -06:00
|
|
|
env: bench_env,
|
|
|
|
)
|
|
|
|
benchmark(
|
|
|
|
'rulescomp',
|
2020-11-19 07:15:42 -07:00
|
|
|
executable('bench-rulescomp', 'bench/rulescomp.c', dependencies: test_dep),
|
2017-07-25 12:57:42 -06:00
|
|
|
env: bench_env,
|
|
|
|
)
|
|
|
|
benchmark(
|
|
|
|
'compose',
|
2020-11-19 07:15:42 -07:00
|
|
|
executable('bench-compose', 'bench/compose.c', dependencies: test_dep),
|
2017-07-25 12:57:42 -06:00
|
|
|
env: bench_env,
|
|
|
|
)
|
2023-09-25 03:41:48 -06:00
|
|
|
benchmark(
|
|
|
|
'compose-traversal',
|
|
|
|
executable('bench-compose-traversal', 'bench/compose-traversal.c', dependencies: test_dep),
|
|
|
|
env: bench_env,
|
|
|
|
)
|
2021-04-08 01:51:07 -06:00
|
|
|
benchmark(
|
|
|
|
'atom',
|
|
|
|
executable('bench-atom', 'bench/atom.c', dependencies: test_dep),
|
|
|
|
env: bench_env,
|
|
|
|
)
|
2020-11-18 15:28:37 -07:00
|
|
|
if get_option('enable-x11')
|
|
|
|
benchmark(
|
|
|
|
'x11',
|
|
|
|
executable('bench-x11', 'bench/x11.c', dependencies: x11_test_dep),
|
|
|
|
env: bench_env,
|
|
|
|
)
|
|
|
|
endif
|
2017-07-25 12:57:42 -06:00
|
|
|
|
|
|
|
|
|
|
|
# Documentation.
|
|
|
|
if get_option('enable-docs')
|
|
|
|
doxygen = find_program('doxygen', required: false)
|
|
|
|
if not doxygen.found()
|
|
|
|
error('''Documentation requires doxygen which was not found.
|
|
|
|
You can disable the documentation with -Denable-docs=false.''')
|
|
|
|
endif
|
2017-08-01 13:19:48 -06:00
|
|
|
doxygen_wrapper = find_program('scripts/doxygen-wrapper')
|
2017-07-25 12:57:42 -06:00
|
|
|
|
|
|
|
doxygen_input = [
|
2017-08-01 13:19:48 -06:00
|
|
|
'README.md',
|
2023-05-12 21:30:11 -06:00
|
|
|
'doc/diagrams/xkb-configuration.dot',
|
2017-08-01 13:19:48 -06:00
|
|
|
'doc/doxygen-extra.css',
|
2023-05-12 21:30:11 -06:00
|
|
|
'doc/introduction-to-xkb.md',
|
2017-08-01 13:19:48 -06:00
|
|
|
'doc/quick-guide.md',
|
2023-05-12 21:30:11 -06:00
|
|
|
'doc/compatibility.md',
|
2020-06-02 00:18:47 -06:00
|
|
|
'doc/user-configuration.md',
|
2020-06-02 00:11:33 -06:00
|
|
|
'doc/rules-format.md',
|
2021-02-27 13:38:21 -07:00
|
|
|
'doc/keymap-format-text-v1.md',
|
Structured log messages with a message registry
Currently there is little structure in the log messages, making
difficult to use them for the following use cases:
- A user looking for help about a log message: the user probably
uses a search engine, thus the results will depend on the proper
indexing of our documentation and the various forums. It relies
only on the wording of the message, which may change with time.
- A user wants to filter the logs resulting of the use of one of the
components of xkbcommon. A typical example would be testing
xkeyboard-config against libxkbcommon. It requires the use of a
pattern (simple words detection or regex). The issue is that the
pattern may become silently out-of-sync with xkbcommon.
A common practice (e.g. in compilers) is to assign unique error codes
to reference theses messages, along with an error index for
documentation.
Thus this commit implements the following features:
- Create a message registry (message-registry.yaml) that defines the
log messages produced by xkbcommon. This is a simple YAML file that
provides, for each message:
- A unique numeric code as a short identifier. It is used in the
output message and thus can be easily be filtered to spot errors
or searched in the internet. It must not change: if the
semantics of message changes, it is better to introduce a new
message for clarity.
- A unique text identifier, meant for two uses:
1. Generate constants dealing with log information in our code
base.
2. Generate human-friendly names for the documentation.
- A type: currently warning or error. Used to prefix the constants
(see hereinabove) and for basic classification in documentation.
- A short description, used as concise and mandatory documentation.
- An optionnal detailed description.
- Optional examples, intended to help the user to fix issues
themself.
- Version of xkbcommon it was added. For old entries this often
unknown, so they will default to 1.0.0.
- Version of xkbcommon it was removed (optional)
No entry should ever be deleted from this index, even if the message
is not used anymore: it ensures we have unique identifiers along the
history of xkbcommon, and that users can refer to the documentation
even for older versions.
- Add the script update-message-registry.py to generate the following
files:
- messages.h: message code enumeration for the messages currently
used in the code base. Currently a private API.
- message.registry.md: the error index documentation page.
- Modify the logging functions to use structured messages. This is a
work in progress.
2023-09-18 10:17:34 -06:00
|
|
|
'doc/message-registry.md',
|
2021-04-27 01:10:26 -06:00
|
|
|
'include/xkbcommon/xkbcommon.h',
|
2023-04-30 13:30:36 -06:00
|
|
|
'include/xkbcommon/xkbcommon-compose.h',
|
|
|
|
'include/xkbcommon/xkbcommon-keysyms.h',
|
2021-04-27 01:10:26 -06:00
|
|
|
'include/xkbcommon/xkbcommon-names.h',
|
|
|
|
'include/xkbcommon/xkbcommon-x11.h',
|
|
|
|
'include/xkbcommon/xkbregistry.h',
|
2017-07-25 12:57:42 -06:00
|
|
|
]
|
|
|
|
doxygen_data = configuration_data()
|
|
|
|
doxygen_data.set('PACKAGE_NAME', meson.project_name())
|
|
|
|
doxygen_data.set('PACKAGE_VERSION', meson.project_version())
|
|
|
|
doxygen_data.set('INPUT', ' '.join(doxygen_input))
|
2022-12-16 12:24:57 -07:00
|
|
|
doxygen_data.set('OUTPUT_DIRECTORY', meson.current_build_dir())
|
2017-07-25 12:57:42 -06:00
|
|
|
doxyfile = configure_file(
|
|
|
|
input: 'doc/Doxyfile.in',
|
|
|
|
output: 'Doxyfile',
|
|
|
|
configuration: doxygen_data,
|
|
|
|
)
|
|
|
|
# TODO: Meson should provide this.
|
2020-07-25 07:01:00 -06:00
|
|
|
docdir = get_option('datadir')/'doc'/meson.project_name()
|
2023-05-14 07:11:15 -06:00
|
|
|
doc_gen = custom_target(
|
2017-07-25 12:57:42 -06:00
|
|
|
'doc',
|
|
|
|
input: [doxyfile] + doxygen_input,
|
|
|
|
output: 'html',
|
2023-05-14 07:11:15 -06:00
|
|
|
command: [
|
|
|
|
doxygen_wrapper,
|
|
|
|
doxygen,
|
|
|
|
meson.current_build_dir()/'Doxyfile',
|
|
|
|
meson.current_source_dir(),
|
|
|
|
],
|
2017-07-25 12:57:42 -06:00
|
|
|
install: true,
|
|
|
|
install_dir: docdir,
|
|
|
|
build_by_default: true,
|
|
|
|
)
|
2023-06-27 12:31:01 -06:00
|
|
|
if get_option('enable-cool-uris')
|
|
|
|
ensure_stable_urls = find_program('scripts'/'ensure-stable-doc-urls.py')
|
|
|
|
custom_target(
|
|
|
|
'doc-cool-uris',
|
|
|
|
input: [doc_gen, 'doc'/'cool-uris.yaml'],
|
|
|
|
output: 'html-xtra',
|
|
|
|
command: [
|
|
|
|
ensure_stable_urls,
|
|
|
|
'generate-redirections',
|
|
|
|
meson.current_source_dir()/'doc'/'cool-uris.yaml',
|
|
|
|
meson.current_build_dir()/'html'
|
|
|
|
],
|
|
|
|
install: false,
|
|
|
|
build_by_default: true,
|
|
|
|
)
|
|
|
|
endif
|
2017-07-25 12:57:42 -06:00
|
|
|
endif
|
2020-07-07 20:35:23 -06:00
|
|
|
|
|
|
|
configure_file(output: 'config.h', configuration: configh_data)
|
2021-04-27 01:02:00 -06:00
|
|
|
|
|
|
|
|
|
|
|
# Stable variables for projects using xkbcommon as a subproject.
|
|
|
|
# These variables should not be renamed.
|
|
|
|
libxkbcommon_dep = dep_libxkbcommon
|
|
|
|
if get_option('enable-x11')
|
|
|
|
libxkbcommon_x11_dep = dep_libxkbcommon_x11
|
|
|
|
endif
|
|
|
|
if get_option('enable-xkbregistry')
|
|
|
|
libxkbregistry_dep = dep_libxkbregistry
|
|
|
|
endif
|
2023-05-05 01:52:07 -06:00
|
|
|
|
|
|
|
if meson.version().version_compare('>=0.62.0')
|
|
|
|
summary({
|
|
|
|
'backend': meson.backend(),
|
|
|
|
'buildtype': get_option('buildtype'),
|
|
|
|
'c_args': get_option('c_args'),
|
|
|
|
'c_link_args': get_option('c_link_args'),
|
|
|
|
'yacc': yacc.full_path() + ' ' + yacc.version(),
|
|
|
|
}, section: 'Compiler')
|
|
|
|
summary({
|
|
|
|
'prefix': get_option('prefix'),
|
|
|
|
'bindir': get_option('bindir'),
|
|
|
|
'libdir': get_option('libdir'),
|
|
|
|
'datadir': get_option('datadir'),
|
|
|
|
'xkb-config-root': XKBCONFIGROOT,
|
|
|
|
'xkb-config-extra-path': XKBCONFIGEXTRAPATH,
|
|
|
|
'xlocaledir': XLOCALEDIR,
|
|
|
|
}, section: 'Directories')
|
|
|
|
summary({
|
|
|
|
'docs': get_option('enable-docs'),
|
|
|
|
'tools': get_option('enable-tools'),
|
|
|
|
'wayland': get_option('enable-wayland'),
|
|
|
|
'x11': get_option('enable-x11'),
|
|
|
|
}, section: 'Features')
|
|
|
|
summary({
|
|
|
|
'layout': get_option('default-layout'),
|
|
|
|
'model': get_option('default-model'),
|
|
|
|
'options': get_option('default-options'),
|
|
|
|
'rules': get_option('default-rules'),
|
|
|
|
'variant': get_option('default-variant'),
|
|
|
|
}, section: 'Defaults')
|
|
|
|
endif
|