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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
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 | 1 +
rust/meson.build | 1 -
shell/src/meson.build | 2 +-
thumbnailer/meson.build | 2 +-
4 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meson_options.txt b/meson_options.txt
index 0e0abd9..fed5a7a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -19,3 +19,4 @@ option('keyring', type: 'feature', value: 'enabled', description: 'whether keyri
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('file_tests', type: 'boolean', value: true, description: 'Enable tests for libview')
+option('host_arch', type: 'string')
diff --git a/rust/meson.build b/rust/meson.build
index 748e8ef..38ea303 100644
--- a/rust/meson.build
+++ b/rust/meson.build
@@ -23,7 +23,6 @@ configure_file(
# Common environment variables for all rust build targets
cargo_common_env = environment()
# it seems that flatpak can't access network during install stage.
-cargo_common_env.set('CARGO_HOME', build_root / 'cargo-home')
cargo_common_env.set('CODEGEN_BUILD_DIR', meson.current_build_dir())
# override library lookup, we should not use the system library.
cargo_common_env.set('SYSTEM_DEPS_PAPERS_VIEW_4_0_NO_PKG_CONFIG', '1')
diff --git a/shell/src/meson.build b/shell/src/meson.build
index db1bc7b..7887522 100644
--- a/shell/src/meson.build
+++ b/shell/src/meson.build
@@ -48,7 +48,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@',
],
)
diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build
index d2dccf2..b7afeb3 100644
--- a/thumbnailer/meson.build
+++ b/thumbnailer/meson.build
@@ -44,7 +44,7 @@ copy = custom_target(
output: meson.project_name() + '-thumbnailer',
command: [
'cp',
- meson.current_build_dir() / rust_target / meson.project_name()
+ meson.current_build_dir() / get_option('host_arch') / rust_target / meson.project_name()
+ '-thumbnailer',
'@OUTPUT@',
],
|