richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
594167
From 6bf4cd485735ecff5c0ccfb6b36bf1b2f310997a Mon Sep 17 00:00:00 2001
594167
From: Yu Watanabe <watanabe.yu+github@gmail.com>
594167
Date: Tue, 14 Jun 2022 09:12:00 +0900
594167
Subject: [PATCH] test: install libxkbcommon and x11 keymaps
594167
594167
(cherry picked from commit 1136175c7fd4898c6fdc59c1f729386cf994265c)
594167
594167
Related: #2087652
594167
---
594167
 test/test-functions | 19 ++++++++++++++++++-
594167
 1 file changed, 18 insertions(+), 1 deletion(-)
594167
594167
diff --git a/test/test-functions b/test/test-functions
594167
index 050fefaf1b..644c3a8613 100644
594167
--- a/test/test-functions
594167
+++ b/test/test-functions
594167
@@ -685,6 +685,7 @@ setup_basic_environment() {
594167
     install_dbus
594167
     install_fonts
594167
     install_keymaps
594167
+    install_x11_keymaps
594167
     install_terminfo
594167
     install_execs
594167
     install_fs_tools
594167
@@ -1198,7 +1199,7 @@ install_missing_libraries() {
594167
     local lib path
594167
     # A number of dependencies is now optional via dlopen, so the install
594167
     # script will not pick them up, since it looks at linkage.
594167
-    for lib in libcryptsetup libidn libidn2 pwquality libqrencode tss2-esys tss2-rc tss2-mu tss2-tcti-device libfido2 libbpf libelf libdw; do
594167
+    for lib in libcryptsetup libidn libidn2 pwquality libqrencode tss2-esys tss2-rc tss2-mu tss2-tcti-device libfido2 libbpf libelf libdw xkbcommon; do
594167
         ddebug "Searching for $lib via pkg-config"
594167
         if pkg-config --exists "$lib"; then
594167
                 path="$(pkg-config --variable=libdir "$lib")"
594167
@@ -1214,6 +1215,10 @@ install_missing_libraries() {
594167
                 # (eg: libcryptsetup), so just ignore them
594167
                 inst_libs "${path}/${lib}.so" || true
594167
                 inst_library "${path}/${lib}.so" || true
594167
+
594167
+                if [[ "$lib" == "libxkbcommon" ]]; then
594167
+                    install_x11_keymaps full
594167
+                fi
594167
         else
594167
             ddebug "$lib.pc not found, skipping"
594167
             continue
594167
@@ -1889,6 +1894,18 @@ install_keymaps() {
594167
     fi
594167
 }
594167
 
594167
+install_x11_keymaps() {
594167
+    dinfo "Install x11 keymaps"
594167
+
594167
+    if (( $# == 0 )); then
594167
+        # Install only keymap list.
594167
+        inst /usr/share/X11/xkb/rules/base.lst
594167
+    else
594167
+        # When it takes any argument, then install all keymaps.
594167
+        inst_recursive /usr/share/X11/xkb
594167
+    fi
594167
+}
594167
+
594167
 install_zoneinfo() {
594167
     dinfo "Install time zones"
594167
     inst_any /usr/share/zoneinfo/Asia/Seoul