[Spice-commits] meson.build src/meson.build subprojects/keycodemapdb

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 27 07:33:50 UTC 2022


 meson.build              |    7 ++++---
 src/meson.build          |    2 +-
 subprojects/keycodemapdb |    2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit b3eb04485cf4553b0e588a7ca78f7377e1c4f35e
Author: Eli Schwartz <eschwartz93 at gmail.com>
Date:   Mon Jun 27 01:48:02 2022 -0400

    fix invalid use of subprojects
    
    The keycodemapdb Meson subproject provides a program and a source input.
    Since it is a subproject, Meson wants to sandbox that and requires it to
    be explicitly exported. But this never happened -- instead, we manually
    poked at files using the actual string path "subprojects/......"
    
    This was always a Meson sandbox violation, but Meson 0.63.0 started
    noticing it and erroring out.
    
    Instead, do the right thing. Update the subproject to a version that has
    a meson.build with actually meaningful contents -- namely, a files
    variable and a found program. Then use these in order to run the needed
    custom_target.
    
    In the process, it is also necessary to correct the argument ordering
    when running keymap-gen.
    
    Reviewed-by: Marc-André Lureau <marcandre.lureau at redhat.com>

diff --git a/meson.build b/meson.build
index dc7b427..00aff30 100644
--- a/meson.build
+++ b/meson.build
@@ -49,9 +49,10 @@ spice_gtk_config_data.merge_from(spice_common.get_variable('spice_common_config_
 spice_glib_deps += spice_common.get_variable('spice_common_client_dep')
 spice_protocol_version = spice_common.get_variable('spice_protocol_version')
 
-subproject('keycodemapdb')
-keymapgen = files('subprojects/keycodemapdb/tools/keymap-gen')
-keymapcsv = files('subprojects/keycodemapdb/data/keymaps.csv')
+keycodemapdb = subproject('keycodemapdb')
+
+keymapgen = find_program('keymap-gen')
+keymapcsv = keycodemapdb.get_variable('keymaps_csv')
 
 #
 # check for system headers
diff --git a/src/meson.build b/src/meson.build
index 961779f..32574e8 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -312,7 +312,7 @@ if spice_gtk_has_gtk
   foreach keymap : keymaps
     varname = 'keymap_ at 0@2xtkbd'.format(keymap)
     target = 'vncdisplay at 0@.h'.format(varname)
-    cmd = [python, keymapgen, '--lang', 'glib2', '--varname', varname, 'code-map', keymapcsv, keymap, 'xtkbd']
+    cmd = [python, keymapgen, 'code-map', '--lang', 'glib2', '--varname', varname, keymapcsv, keymap, 'xtkbd']
     spice_client_gtk_sources += custom_target(target,
                                               output : target,
                                               capture : true,
diff --git a/subprojects/keycodemapdb b/subprojects/keycodemapdb
index df4e56f..e15649b 160000
--- a/subprojects/keycodemapdb
+++ b/subprojects/keycodemapdb
@@ -1 +1 @@
-Subproject commit df4e56f8fab65ba714ec18f4e7338a966a1620ad
+Subproject commit e15649b83a78f89f57205927022115536d2c1698


More information about the Spice-commits mailing list