1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
From: Arnaud Ferraris <aferraris@debian.org>
Date: Thu, 7 Nov 2024 13:51:41 +0100
Subject: meson.build: fix build for Debian
We don't call `cargo` directly, but use a wrapper script instead, which
breaks some of the expectations. Make the needed changes to ensure the
package still builds.
We also need to override CARGO_HOME, so don't set this env var in
meson.build.
Forwarded: not-needed
---
meson_options.txt | 2 ++
shell/src/meson.build | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/meson_options.txt b/meson_options.txt
index 46730ef..9b32c6f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -18,3 +18,5 @@ option('sysprof', type: 'feature', value: 'auto', description : 'whether sysprof
option('keyring', type: 'feature', value: 'enabled', description: 'whether keyring support is requested')
option('gtk_unix_print', type: 'feature', value: 'auto', description: 'whether gtk+-unix-print support is requested')
option('spell_check', type: 'feature', value: 'auto', description: 'whether spell check support is requested')
+
+option('host_arch', type: 'string')
diff --git a/shell/src/meson.build b/shell/src/meson.build
index 55c9361..a47479f 100644
--- a/shell/src/meson.build
+++ b/shell/src/meson.build
@@ -34,7 +34,6 @@ endif
cargo_env = environment()
# it seems that flatpak can't access network during install stage.
-cargo_env.set('CARGO_HOME', build_root / 'cargo-home')
cargo_env.set('CODEGEN_BUILD_DIR', meson.current_build_dir())
# override library lookup, we should not use the system library.
cargo_env.set('SYSTEM_DEPS_PAPERS_VIEW_4_0_NO_PKG_CONFIG', '1')
@@ -75,7 +74,7 @@ custom_target(
output: meson.project_name(),
command: [
'cp',
- meson.current_build_dir() / rust_target / meson.project_name(),
+ meson.current_build_dir() / get_option('host_arch') / rust_target / meson.project_name(),
'@OUTPUT@',
],
)
|