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

39 lines
1.5 KiB
Diff
Raw Normal View History

2019-03-16 15:17:29 +01:00
Reason: Fix crossbuilding GIR
Upstream: No, not upstreamable since this is very specific to the Void setup
--- clients/common/meson.build
+++ clients/common/meson.build
@@ -34,7 +34,7 @@ if enable_introspection
settings_docs,
input: nm_property_docs,
output: settings_docs,
- command: [xsltproc, '--output', '@OUTPUT@', join_paths(meson.current_source_dir(), 'settings-docs.xsl'), '@INPUT@'],
+ command: [xsltproc, '--output', '@OUTPUT@', join_paths(meson.current_source_dir(), 'settings-docs.xsl'), join_paths(meson.current_source_dir(), '..', '..', '@INPUT@')],
)
test(
--- libnm/meson.build
+++ libnm/meson.build
2019-04-30 15:59:25 +02:00
@@ -244,7 +244,21 @@ if enable_introspection
2019-03-16 15:17:29 +01:00
)
endif
- generate_setting_docs = join_paths(meson.current_source_dir(), 'generate-setting-docs.py')
+ if meson.is_cross_build()
+ arch = host_machine.cpu_family()
+ if arch == 'x86'
+ qemu_arch = 'i386'
+ elif arch == 'x86_64'
+ qemu_arch = 'x86_64'
2019-04-30 15:59:25 +02:00
+ else
+ qemu_arch = host_machine.cpu_family()
2019-03-16 15:17:29 +01:00
+ endif
+ qemu = '/usr/bin/qemu-' + qemu_arch + '-static'
+ qemu_python3_cmd = qemu + ' -L @XBPS_CROSS_BASE@ @XBPS_CROSS_BASE@/bin/python3'
+ generate_setting_docs = ['sh', '-c', qemu_python3_cmd, join_paths(meson.current_source_dir(), 'generate-setting-docs.py')]
+ else
+ generate_setting_docs = join_paths(meson.current_source_dir(), 'generate-setting-docs.py')
+ endif
gi_typelib_path = run_command('printenv', 'GI_TYPELIB_PATH').stdout()
if gi_typelib_path != ''