]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: install libxkbcommon and x11 keymaps
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 14 Jun 2022 00:12:00 +0000 (09:12 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 14 Jun 2022 11:59:36 +0000 (20:59 +0900)
test/test-functions

index f81afbe021c268b09823f15e5205a4a744817d8a..65d14df8c8ec1ef3f8df35e03b7aa7cbc09894fc 100644 (file)
@@ -703,6 +703,7 @@ setup_basic_environment() {
     install_dbus
     install_fonts
     install_keymaps
+    install_x11_keymaps
     install_terminfo
     install_execs
     install_fs_tools
@@ -1249,7 +1250,7 @@ install_missing_libraries() {
     local lib path
     # A number of dependencies is now optional via dlopen, so the install
     # script will not pick them up, since it looks at linkage.
-    for lib in libcryptsetup libidn libidn2 pwquality libqrencode tss2-esys tss2-rc tss2-mu tss2-tcti-device libfido2 libbpf libelf libdw; do
+    for lib in libcryptsetup libidn libidn2 pwquality libqrencode tss2-esys tss2-rc tss2-mu tss2-tcti-device libfido2 libbpf libelf libdw xkbcommon; do
         ddebug "Searching for $lib via pkg-config"
         if pkg-config --exists "$lib"; then
                 path="$(pkg-config --variable=libdir "$lib")"
@@ -1265,6 +1266,10 @@ install_missing_libraries() {
                 # (eg: libcryptsetup), so just ignore them
                 inst_libs "${path}/${lib}.so" || true
                 inst_library "${path}/${lib}.so" || true
+
+                if [[ "$lib" == "libxkbcommon" ]]; then
+                    install_x11_keymaps full
+                fi
         else
             ddebug "$lib.pc not found, skipping"
             continue
@@ -1958,6 +1963,18 @@ install_keymaps() {
     fi
 }
 
+install_x11_keymaps() {
+    dinfo "Install x11 keymaps"
+
+    if (( $# == 0 )); then
+        # Install only keymap list.
+        inst /usr/share/X11/xkb/rules/base.lst
+    else
+        # When it takes any argument, then install all keymaps.
+        inst_recursive /usr/share/X11/xkb
+    fi
+}
+
 install_zoneinfo() {
     dinfo "Install time zones"
     inst_any /usr/share/zoneinfo/Asia/Seoul