From 3989e496cb7ea57c426d82debf8fe43e0a14dba1 Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Sat, 2 May 2026 02:38:57 +0200 Subject: [PATCH] [libxkbcommon] update to 1.13.1. (#51475) Signed-off-by: Vitalii Koshura --- ports/libxkbcommon/build.patch | 33 ++++---- ports/libxkbcommon/disable-test.patch | 16 +++- ports/libxkbcommon/portfile.cmake | 116 +++++++++++++------------- ports/libxkbcommon/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/l-/libxkbcommon.json | 5 ++ 6 files changed, 98 insertions(+), 76 deletions(-) diff --git a/ports/libxkbcommon/build.patch b/ports/libxkbcommon/build.patch index fc51387fc1..aa30c5b844 100644 --- a/ports/libxkbcommon/build.patch +++ b/ports/libxkbcommon/build.patch @@ -1,9 +1,24 @@ +diff --git a/src/x11/keymap.c b/src/x11/keymap.c +index 541ed217..c090ce2b 100644 +--- a/src/x11/keymap.c ++++ b/src/x11/keymap.c +@@ -8,8 +8,10 @@ + #include + + #include "xkbcommon/xkbcommon.h" ++#ifndef _WIN32 + #include "atom.h" + #include "keymap.h" ++#endif + #include "x11-priv.h" + + /* diff --git a/tools/how-to-type.c b/tools/how-to-type.c -index 72aea1b..783373a 100644 +index de170ace..9e5194ba 100644 --- a/tools/how-to-type.c +++ b/tools/how-to-type.c -@@ -26,7 +26,9 @@ - #include +@@ -9,7 +9,9 @@ + #include #include #include +#ifdef HAVE_UNISTD_H @@ -12,15 +27,3 @@ index 72aea1b..783373a 100644 #include #include "xkbcommon/xkbcommon.h" -diff --git a/tools/tools-common.c b/tools/tools-common.c -index 8eb3f4b..8b22307 100644 ---- a/tools/tools-common.c -+++ b/tools/tools-common.c -@@ -42,6 +42,7 @@ - #ifdef _WIN32 - #include - #include -+#include - #else - #include - #include diff --git a/ports/libxkbcommon/disable-test.patch b/ports/libxkbcommon/disable-test.patch index eceb06be4d..2624ce43b3 100644 --- a/ports/libxkbcommon/disable-test.patch +++ b/ports/libxkbcommon/disable-test.patch @@ -1,8 +1,8 @@ diff --git a/meson.build b/meson.build -index 2de4ee9..bb53561 100644 +index 92483c54..26230102 100644 --- a/meson.build +++ b/meson.build -@@ -601,6 +601,7 @@ configure_file(input: 'test/xkeyboard-config-test.py.in', +@@ -853,6 +853,7 @@ configure_file(input: 'test/xkeyboard-config-test.py.in', configuration: xkct_config) # Tests @@ -10,7 +10,7 @@ index 2de4ee9..bb53561 100644 test_env = environment() test_env.set('XKB_LOG_LEVEL', 'debug') test_env.set('XKB_LOG_VERBOSITY', '10') -@@ -873,6 +874,7 @@ if get_option('enable-x11') +@@ -1372,6 +1373,7 @@ if get_option('enable-x11') env: bench_env, ) endif @@ -18,3 +18,13 @@ index 2de4ee9..bb53561 100644 # Documentation. +@@ -1505,7 +1507,9 @@ if meson.version().version_compare('>=0.62.0') + 'rules': get_option('default-rules'), + 'variant': get_option('default-variant'), + }, section: 'Defaults') ++if false + summary({ + 'merge-modes': has_merge_modes_tests, + }, section: 'Tests') + endif ++endif diff --git a/ports/libxkbcommon/portfile.cmake b/ports/libxkbcommon/portfile.cmake index b425748674..8426ef2217 100644 --- a/ports/libxkbcommon/portfile.cmake +++ b/ports/libxkbcommon/portfile.cmake @@ -1,56 +1,60 @@ -if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS) - message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet!") - set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -else() - -set(PATCHES "") -if(VCPKG_TARGET_IS_WINDOWS) - #vcpkg_check_linkage(ONLY_STATIC_LIBRARY) # Meson is not able to automatically export symbols for DLLs - set(PATCHES build.patch) -endif() - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO xkbcommon/libxkbcommon - REF "xkbcommon-${VERSION}" - SHA512 454fbb2861405ca957d64035e924c1bbb7d43db7867903963fc053b7ecb64a8fba89a21cc8ac18ebeec9b61ae0789fb88c52521a850dc371857f28b08e80167b - HEAD_REF master - PATCHES - disable-test.patch - ${PATCHES} -) - -vcpkg_find_acquire_program(FLEX) -get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY ) -vcpkg_add_to_path(PREPEND "${FLEX_DIR}") - -vcpkg_find_acquire_program(BISON) -get_filename_component(BISON_DIR "${BISON}" DIRECTORY ) -vcpkg_add_to_path(PREPEND "${BISON_DIR}") - -set(OPTIONS "") -if(VCPKG_TARGET_IS_WINDOWS) - set(OPTIONS -Denable-xkbregistry=false) -endif() - -vcpkg_configure_meson( - SOURCE_PATH "${SOURCE_PATH}" - OPTIONS ${OPTIONS} - -Denable-wayland=false - -Denable-docs=false - -Denable-tools=false -) -vcpkg_install_meson() -vcpkg_fixup_pkgconfig() -vcpkg_copy_pdbs() - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") -endif() - -# Handle copyright -vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") -endif() +if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet!") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +else() + +set(PATCHES "") +if(VCPKG_TARGET_IS_WINDOWS) + #vcpkg_check_linkage(ONLY_STATIC_LIBRARY) # Meson is not able to automatically export symbols for DLLs + set(PATCHES build.patch) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xkbcommon/libxkbcommon + REF "xkbcommon-${VERSION}" + SHA512 450c33fe26af6b847cf7516685d0df63c2ba0126887e27595c40fe80e4d0487009aa6cdf38ff1270d595c7900cbf3c11e7aa4f9cff80fa361742b5ebb10d83bd + HEAD_REF master + PATCHES + disable-test.patch + ${PATCHES} +) + +vcpkg_find_acquire_program(FLEX) +get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY ) +vcpkg_add_to_path(PREPEND "${FLEX_DIR}") + +vcpkg_find_acquire_program(BISON) +get_filename_component(BISON_DIR "${BISON}" DIRECTORY ) +vcpkg_add_to_path(PREPEND "${BISON_DIR}") + +set(OPTIONS "") +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND OPTIONS -Denable-xkbregistry=false) +endif() +if(VCPKG_TARGET_IS_LINUX) + list(APPEND OPTIONS -Dxkb-config-root=/usr/share/X11/xkb) + list(APPEND OPTIONS -Dx-locale-root=/usr/share/X11/locale) +endif() + +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${OPTIONS} + -Denable-wayland=false + -Denable-docs=false + -Denable-tools=false +) +vcpkg_install_meson() +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +# Handle copyright +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +endif() diff --git a/ports/libxkbcommon/vcpkg.json b/ports/libxkbcommon/vcpkg.json index 30e85a783f..06da3412d4 100644 --- a/ports/libxkbcommon/vcpkg.json +++ b/ports/libxkbcommon/vcpkg.json @@ -1,6 +1,6 @@ { "name": "libxkbcommon", - "version": "1.7.0", + "version": "1.13.1", "description": "keymap handling library for toolkits and window systems", "homepage": "https://xkbcommon.org/", "license": null, diff --git a/versions/baseline.json b/versions/baseline.json index ca29999437..d92dcfbad1 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5913,7 +5913,7 @@ "port-version": 1 }, "libxkbcommon": { - "baseline": "1.7.0", + "baseline": "1.13.1", "port-version": 0 }, "libxkbfile": { diff --git a/versions/l-/libxkbcommon.json b/versions/l-/libxkbcommon.json index 8242acf7fe..78ae7bc318 100644 --- a/versions/l-/libxkbcommon.json +++ b/versions/l-/libxkbcommon.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "7937d36f72b0182c49099433076be11d6e9962fd", + "version": "1.13.1", + "port-version": 0 + }, { "git-tree": "ee2872eae95b010c793020412c24e55036421d7b", "version": "1.7.0",