void-packages/srcpkgs/fwupd/patches/fix-cross.patch
maxice8 13ae42e8a0 fwupd: update to 1.2.5.
Co-authored-by: Rasmus Thomsen <rasmus.thomsen@protonmail.com>
2019-02-25 19:52:49 -03:00

54 lines
1.5 KiB
Diff

diff --git a/meson.build b/meson.build
index d7c21fa..fcf8dae 100644
--- meson.build
+++ meson.build
@@ -237,9 +237,15 @@ if get_option('plugin_uefi')
gnu_efi_arch = ''
endif
conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME)
- r = run_command([python3, 'po/test-deps'])
+ if meson.is_cross_build()
+ qemu = '/usr/bin/qemu-' + gnu_efi_arch + '-static'
+ qemu_python3_cmd = qemu + ' -L @XBPS_CROSS_BASE@ @XBPS_CROSS_BASE@/bin/python3'
+ r = run_command('sh', '-c', qemu_python3_cmd + ' po/test-deps')
+ else
+ r = run_command([python3, 'po/test-deps'])
+ endif
if r.returncode() != 0
- error(r.stdout())
+ error(r.stderr())
endif
endif
diff --git a/po/meson.build b/po/meson.build
index 6e78d2e..36d9989 100644
--- po/meson.build
+++ po/meson.build
@@ -5,6 +5,12 @@ i18n.gettext(meson.project_name(),
]
)
+if meson.is_cross_build()
+ python3_cmd = qemu_python3_cmd
+else
+ python3_cmd = python3.path()
+endif
+
if get_option('plugin_uefi')
-meson.add_install_script('make-images.sh', localedir, python3.path())
+meson.add_install_script('make-images.sh', localedir, python3_cmd)
endif
diff --git po/make-images.sh po/make-images.sh
index b5b95ba..04999bf 100755
--- po/make-images.sh
+++ po/make-images.sh
@@ -7,7 +7,7 @@
#
LOCALEDIR=${DESTDIR}$1
-PYTHON3=$2
+PYTHON3="$2"
install -m 0755 -d $LOCALEDIR
${PYTHON3} ${MESON_SOURCE_ROOT}/po/make-images "Installing firmware update…" $LOCALEDIR ${MESON_SOURCE_ROOT}/po/LINGUAS