summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2022-06-27 01:48:02 -0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2022-06-27 10:56:45 +0400
commitb3eb04485cf4553b0e588a7ca78f7377e1c4f35e (patch)
tree2b23db9dea8542acc4ecc2ebbe676fc6f756c4d7
parent5229a16a67b73a5c6b7065960e4784f209b3526c (diff)
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@redhat.com>
-rw-r--r--meson.build7
-rw-r--r--src/meson.build2
m---------subprojects/keycodemapdb0
3 files changed, 5 insertions, 4 deletions
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_@0@2xtkbd'.format(keymap)
target = 'vncdisplay@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
-Subproject df4e56f8fab65ba714ec18f4e7338a966a1620a
+Subproject e15649b83a78f89f57205927022115536d2c169