commit: c753b4d621ece5641bc308dd40922fafd11ea2c1 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Mon Oct 6 21:45:28 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Oct 6 21:45:28 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c753b4d6
x11-misc/xkeyboard-config: fix tests Signed-off-by: Sam James <sam <AT> gentoo.org> ...board-config-2.46-libxkbcommon-2.11-tests.patch | 46 ++++++++++++++++++++++ .../xkeyboard-config/xkeyboard-config-2.46.ebuild | 6 ++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/x11-misc/xkeyboard-config/files/xkeyboard-config-2.46-libxkbcommon-2.11-tests.patch b/x11-misc/xkeyboard-config/files/xkeyboard-config-2.46-libxkbcommon-2.11-tests.patch new file mode 100644 index 000000000000..85218504a72f --- /dev/null +++ b/x11-misc/xkeyboard-config/files/xkeyboard-config-2.46-libxkbcommon-2.11-tests.patch @@ -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 <[email protected]> +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 diff --git a/x11-misc/xkeyboard-config/xkeyboard-config-2.46.ebuild b/x11-misc/xkeyboard-config/xkeyboard-config-2.46.ebuild index 434760a2bd1c..553a2059bd28 100644 --- a/x11-misc/xkeyboard-config/xkeyboard-config-2.46.ebuild +++ b/x11-misc/xkeyboard-config/xkeyboard-config-2.46.ebuild @@ -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
