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 0000000000000..85218504a72f4 --- /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 +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: +--- + 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( ++ " = ", " = " ++ ) ++ alias_string = alias_string.replace( ++ " = ", " = " ++ ) ++ # libxkbcommon ≥ 1.12 + alias_string = alias_string.replace(" = ", " = ") + alias_string = alias_string.replace(" = ", " = ") +- 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 434760a2bd1c1..553a2059bd283 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