* [PATCH] meson: fix keymaps witout qemu-keymap
@ 2020-08-27 10:26 Gerd Hoffmann
2020-08-31 11:15 ` Thomas Huth
0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2020-08-27 10:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Thomas Huth, Gerd Hoffmann
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>
---
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 b737c8223031..e102dd56b454 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.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] meson: fix keymaps witout qemu-keymap
2020-08-27 10:26 [PATCH] meson: fix keymaps witout qemu-keymap Gerd Hoffmann
@ 2020-08-31 11:15 ` Thomas Huth
2020-08-31 15:28 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2020-08-31 11:15 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
On 27/08/2020 12.26, Gerd Hoffmann wrote:
> 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>
> ---
> pc-bios/keymaps/meson.build | 28 +++++++++++++++++++---------
> 1 file changed, 19 insertions(+), 9 deletions(-)
Thanks, this fixes the acceptance tests on gitlab-CI for me!
Tested-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] meson: fix keymaps witout qemu-keymap
2020-08-31 11:15 ` Thomas Huth
@ 2020-08-31 15:28 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-08-31 15:28 UTC (permalink / raw)
To: Thomas Huth; +Cc: Gerd Hoffmann, qemu-devel@nongnu.org Developers
[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]
Typo "without" in subject.
Le lun. 31 août 2020 13:15, Thomas Huth <thuth@redhat.com> a écrit :
> On 27/08/2020 12.26, Gerd Hoffmann wrote:
> > 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>
> > ---
> > pc-bios/keymaps/meson.build | 28 +++++++++++++++++++---------
> > 1 file changed, 19 insertions(+), 9 deletions(-)
>
> Thanks, this fixes the acceptance tests on gitlab-CI for me!
>
> Tested-by: Thomas Huth <thuth@redhat.com>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1692 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-31 15:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 10:26 [PATCH] meson: fix keymaps witout qemu-keymap Gerd Hoffmann
2020-08-31 11:15 ` Thomas Huth
2020-08-31 15:28 ` Philippe Mathieu-Daudé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.