[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 6/8] meson: fix keymaps without qemu-keymap
From: |
Thomas Huth |
Subject: |
[PULL 6/8] meson: fix keymaps without qemu-keymap |
Date: |
Tue, 1 Sep 2020 17:20:48 +0200 |
From: Gerd Hoffmann <kraxel@redhat.com>
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>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
pc-bios/keymaps/meson.build | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/pc-bios/keymaps/meson.build b/pc-bios/keymaps/meson.build
index b737c82230..e102dd56b4 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: config_host['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: config_host['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: config_host['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: config_host['qemu_datadir'] /
'keymaps')
endif
install_data(['sl', 'sv'], install_dir: config_host['qemu_datadir'] /
'keymaps')
--
2.18.2
- [PULL 0/8] Cirrus-CI improvements, and other CI-related fixes, m68k, Thomas Huth, 2020/09/01
- [PULL 3/8] cirrus.yml: Compile macOS with -Werror, Thomas Huth, 2020/09/01
- [PULL 2/8] cirrus.yml: Compile FreeBSD with -Werror, Thomas Huth, 2020/09/01
- [PULL 6/8] meson: fix keymaps without qemu-keymap,
Thomas Huth <=
- [PULL 5/8] cirrus.yml: Split FreeBSD job into two parts, Thomas Huth, 2020/09/01
- [PULL 8/8] hw/m68k: QOMify the mcf5206 system integration module, Thomas Huth, 2020/09/01
- [PULL 1/8] configure: Fix atomic64 test for --enable-werror on macOS, Thomas Huth, 2020/09/01
- [PULL 7/8] configure: Add system = 'linux' for meson when cross-compiling, Thomas Huth, 2020/09/01
- [PULL 4/8] cirrus.yml: Update the macOS jobs to Catalina, Thomas Huth, 2020/09/01
- Re: [PULL 0/8] Cirrus-CI improvements, and other CI-related fixes, m68k, Peter Maydell, 2020/09/02