summaryrefslogtreecommitdiff
path: root/pc-bios/keymaps
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-08-27 12:26:17 +0200
committerThomas Huth <thuth@redhat.com>2020-09-03 12:46:56 +0200
commit09db9b9db38e82acbc1fd4fa4661ac19c387380c (patch)
tree27e1a80dbc143455f8dda4ce00218bcb7db468d2 /pc-bios/keymaps
parent45f7b7b9f38f5c4d1529a37c93dedfc26a231bba (diff)
downloadqemu-09db9b9db38e82acbc1fd4fa4661ac19c387380c.zip
meson: fix keymaps without qemu-keymap
In case the qemu-keymap tool generating them is neither installed on the system nor built from sources (due to xkbcommon not being available) qemu will not find the keymaps when started directly from the build tree, This happens because commit ddcf607fa3d6 ("meson: drop keymaps symlink") removed the symlink to the source tree, and the special handling for install doesn't help in case we do not install qemu. Lets fix that by simply copying over the file from the source tree as fallback. Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20200827102617.14448-1-kraxel@redhat.com> [thuth: Rebased, changed "config_host['qemu_datadir']" to "qemu_datadir", added Gerd's UNLINK fix to configure script] Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios/keymaps')
-rw-r--r--pc-bios/keymaps/meson.build28
1 files changed, 19 insertions, 9 deletions
diff --git a/pc-bios/keymaps/meson.build b/pc-bios/keymaps/meson.build
index bbac83ece3..2e2e0dfa3b 100644
--- a/pc-bios/keymaps/meson.build
+++ b/pc-bios/keymaps/meson.build
@@ -38,19 +38,29 @@ if meson.is_cross_build() or 'CONFIG_XKBCOMMON' not in config_host
else
native_qemu_keymap = qemu_keymap
endif
+
t = []
foreach km, args: keymaps
- t += custom_target(km,
- build_by_default: true,
- output: km,
- command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()],
- install_dir: qemu_datadir / 'keymaps')
+ if native_qemu_keymap.found()
+ # generate with qemu-kvm
+ t += custom_target(km,
+ build_by_default: true,
+ output: km,
+ command: [native_qemu_keymap, '-f', '@OUTPUT@', args.split()],
+ install_dir: qemu_datadir / 'keymaps')
+ else
+ # copy from source tree
+ t += custom_target(km,
+ build_by_default: true,
+ input: km,
+ output: km,
+ command: ['cp', '@INPUT@', '@OUTPUT@'],
+ install_dir: qemu_datadir / 'keymaps')
+ endif
endforeach
-if t.length() > 0
+
+if native_qemu_keymap.found()
alias_target('update-keymaps', t)
-else
- # install from the source tree
- install_data(keymaps.keys(), install_dir: qemu_datadir / 'keymaps')
endif
install_data(['sl', 'sv'], install_dir: qemu_datadir / 'keymaps')