x11-misc/xkeyboard-config: fix tests

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2025-10-06 22:45:28 +01:00
parent c94ebd468a
commit c753b4d621
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
2 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,46 @@
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/1eaadd20d69d2dd3744371c853aa68f6571b7a77
From 1eaadd20d69d2dd3744371c853aa68f6571b7a77 Mon Sep 17 00:00:00 2001
From: Pierre Le Marre <dev@wismill.eu>
Date: Sun, 5 Oct 2025 09:20:24 +0200
Subject: [PATCH] =?UTF-8?q?test:=20Fix=20test=5Fcompat=20for=20libxkbcommo?=
=?UTF-8?q?n=20=E2=89=A4=201.11?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Restore test support for libxkbcommon ≤ 1.11.
Follow-up of 5c94ff232d60e1d7e253549b2d3722fc719f76f6, which introduced
a fix for libxkbcommon-1.12 but mistakenly removed support for anterior
versions.
Part-of: <https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/857>
---
tests/test_compat_rules.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/test_compat_rules.py b/tests/test_compat_rules.py
index ebcc8bd18..edb649f62 100644
--- a/tests/test_compat_rules.py
+++ b/tests/test_compat_rules.py
@@ -174,9 +174,16 @@ def test_compat_layout(xkb_base: Path, rules: str, mapping: tuple[Layout, Layout
# [HACK] Fix keycodes aliases
if alias.layout == "de" and target.layout != "de":
+ # libxkbcommon ≤ 1.11
+ alias_string = alias_string.replace(
+ "<LatZ> = <AD06>", "<LatY> = <AD06>"
+ )
+ alias_string = alias_string.replace(
+ "<LatY> = <AB01>", "<LatZ> = <AB01>"
+ )
+ # libxkbcommon ≥ 1.12
alias_string = alias_string.replace("<LatZ> = <AD06>", "<LatZ> = <AB01>")
alias_string = alias_string.replace("<LatY> = <AB01>", "<LatY> = <AD06>")
- pass
# [HACK] Discard components names
alias_string = COMPONENT_NAME_PATTERN.sub(drop_component_name, alias_string)
--
GitLab

View File

@ -38,6 +38,10 @@ BDEPEND="
)
"
PATCHES=(
"${FILESDIR}"/${PN}-2.46-libxkbcommon-2.11-tests.patch
)
python_check_deps() {
use test || return 0
python_has_version \
@ -51,7 +55,7 @@ pkg_setup() {
}
src_prepare() {
eapply_user
default
# Remove pytest timeout
sed -i -e "/test('pytest'/,/)$/ { s/timeout: [0-9]*/timeout: 0/ }" meson.build || die