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

42 lines
1.4 KiB
Diff

Reason: Fix crossbuilding GIR
Upstream: No, not upstreamable since this is very specific to the Void setup
Index: b/src/libnm-client-impl/meson.build
===================================================================
--- a/src/libnm-client-impl/meson.build
+++ b/src/libnm-client-impl/meson.build
@@ -177,6 +177,16 @@ if enable_introspection
endif
ld_library_path = meson.current_build_dir() + 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
+
gen_infos_cmd = files(source_root / 'tools' / 'generate-docs-nm-property-infos.py')
gen_gir_cmd = files(source_root / 'tools' / 'generate-docs-nm-settings-docs-gir.py')
@@ -190,7 +200,7 @@ if enable_introspection
input: [gen_infos_cmd, libnm_gir[0]] + libnm_core_settings_sources,
output: 'nm-property-infos-' + name + '.xml',
command: [
- python_path,
+ qemu_python3_cmd,
gen_infos_cmd,
name,
'@OUTPUT@',
@@ -206,7 +216,7 @@ if enable_introspection
'env',
'GI_TYPELIB_PATH=' + gi_typelib_path,
'LD_LIBRARY_PATH=' + ld_library_path,
- python_path,
+ qemu_python3_cmd,
gen_gir_cmd,
'--lib-path', meson.current_build_dir(),
'--gir', libnm_gir[0],