void-packages/srcpkgs/NetworkManager/patches/fix-cross-gir.patch

32 lines
1009 B
Diff

Reason: Fix crossbuilding GIR
Upstream: No, not upstreamable since this is very specific to the Void setup
Index: b/libnm/meson.build
===================================================================
--- a/libnm/meson.build
+++ b/libnm/meson.build
@@ -274,13 +274,23 @@ if enable_introspection
'LD_LIBRARY_PATH=' + ld_library_path,
]
+ if meson.is_cross_build()
+ qemu_python3_cmd = [
+ '/usr/bin/qemu-@XBPS_TARGET_QEMU_MACHINE@-static',
+ '-L', '@XBPS_CROSS_BASE@',
+ '@XBPS_CROSS_BASE@/usr/bin/python3'
+ ]
+ else
+ qemu_python3_cmd = python.path()
+ endif
+
nm_settings_docs_xml_gir = custom_target(
'nm-settings-docs-gir.xml',
input: libnm_gir[0],
output: 'nm-settings-docs-gir.xml',
command: [
generate_setting_docs_env,
- python.path(),
+ qemu_python3_cmd,
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py'),
'--lib-path', meson.current_build_dir(),
'--gir', '@INPUT@',