package=libxkbcommon
-$(package)_version=0.8.4
+$(package)_version=1.5.0
$(package)_download_path=https://xkbcommon.org/download/
$(package)_file_name=libxkbcommon-$($(package)_version).tar.xz
-$(package)_sha256_hash=60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b
+$(package)_sha256_hash=560f11c4bbbca10f495f3ef7d3a6aa4ca62b4f8fb0b52e7d459d18a26e46e017
$(package)_dependencies=libxcb
-
-# This package explicitly enables -Werror=array-bounds, which causes build failures
-# with GCC 12.1+. Work around that by turning errors back into warnings.
-# This workaround would be dropped if the package was updated, as that would require
-# a different build system (Meson)
-define $(package)_set_vars
-$(package)_config_opts = --enable-option-checking --disable-dependency-tracking
-$(package)_config_opts += --disable-shared --disable-docs
-$(package)_cflags += -Wno-error=array-bounds
-endef
+$(package)_patches=no-test-x11.patch toolchain.txt
define $(package)_preprocess_cmds
- cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux
+ patch -p1 < $($(package)_patch_dir)/no-test-x11.patch && \
+ cp $($(package)_patch_dir)/toolchain.txt toolchain.txt && \
+ sed -i -e 's|@host_prefix@|$(host_prefix)|' \
+ -e 's|@cc@|$($(package)_cc)|' \
+ -e 's|@cxx@|$($(package)_cxx)|' \
+ -e 's|@ar@|$($(package)_ar)|' \
+ -e 's|@strip@|$(host_STRIP)|' \
+ -e 's|@arch@|$(host_arch)|' \
+ toolchain.txt
endef
define $(package)_config_cmds
- $($(package)_autoconf)
+ meson setup --cross-file toolchain.txt build
endef
define $(package)_build_cmds
- $(MAKE)
+ ninja -C build
endef
define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds
- rm lib/*.la
-endef
+ DESTDIR=$($(package)_staging_dir) ninja -C build install
+endef
\ No newline at end of file
--- /dev/null
+diff --git a/meson.build b/meson.build
+index 245e7b1..a80d050 100644
+--- a/meson.build
++++ b/meson.build
+@@ -666,16 +666,6 @@ test(
+ env: test_env,
+ suite: ['python-tests'],
+ )
+-if get_option('enable-x11')
+- test(
+- 'x11',
+- executable('test-x11', 'test/x11.c', dependencies: x11_test_dep),
+- env: test_env,
+- )
+- # test/x11comp is meant to be run, but it is (temporarily?) disabled.
+- # See: https://github.com/xkbcommon/libxkbcommon/issues/30
+- executable('test-x11comp', 'test/x11comp.c', dependencies: x11_test_dep)
+-endif
+ if get_option('enable-xkbregistry')
+ test(
+ 'registry',
+@@ -755,13 +745,6 @@ benchmark(
+ executable('bench-atom', 'bench/atom.c', dependencies: test_dep),
+ env: bench_env,
+ )
+-if get_option('enable-x11')
+- benchmark(
+- 'x11',
+- executable('bench-x11', 'bench/x11.c', dependencies: x11_test_dep),
+- env: bench_env,
+- )
+-endif
+
+
+ # Documentation.