Skip to content

Commit 62a5e3a

Browse files
smcveli-schwartz
authored andcommitted
env2mfile: Use a cross vapigen on Debian if available
As with many compilers and other tools relevant to cross-compiling, an executable prefixed with the host architecture's GNU architecture tuple might or might not exist, but if it does exist, we can be quite confident that it's the appropriate executable to use for that host architecture. Vala's vapigen tool reads GIR XML files that can vary between architectures (for example GLib-2.0.gir and GstAudio-1.0.gir contain constants that take architecture-specific values), so on Debian it needs to search an architecture-specific location. Accordingly, the valac (>= 0.56.18-3) package provides a `${DEB_HOST_GNU_TYPE}-vapigen` script which wraps the vapigen binary and sets appropriate search paths. Bug-Debian: https://bugs.debian.org/1116552 Signed-off-by: Simon McVittie <smcv@debian.org>
1 parent cab3b67 commit 62a5e3a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

mesonbuild/scripts/env2mfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ def dpkg_architecture_to_machine_info(output: str, options: T.Any) -> MachineInf
234234
'g-ir-inspect',
235235
'g-ir-scanner',
236236
'pkg-config',
237+
'vapigen',
237238
]:
238239
try:
239240
infos.binaries[tool] = locate_path("%s-%s" % (host_arch, tool))

unittests/internaltests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,7 @@ def expected_binaries(gnu_tuple: str) -> T.Dict[str, T.List[str]]:
17821782
'g-ir-generate': [f'/usr/bin/{gnu_tuple}-g-ir-generate'],
17831783
'g-ir-inspect': [f'/usr/bin/{gnu_tuple}-g-ir-inspect'],
17841784
'g-ir-scanner': [f'/usr/bin/{gnu_tuple}-g-ir-scanner'],
1785+
'vapigen': [f'/usr/bin/{gnu_tuple}-vapigen'],
17851786
}
17861787

17871788
for title, dpkg_arch, gccsuffix, env, expected in [

0 commit comments

Comments
 (0)