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
|
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Date: Mon, 27 Nov 2023 14:01:37 +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.
Forwarded: not-needed, Debian-only change
---
meson.build | 1 -
meson_options.txt | 1 +
src/meson.build | 6 +-----
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/meson.build b/meson.build
index 22c62d1..26ab3ce 100644
--- a/meson.build
+++ b/meson.build
@@ -25,7 +25,6 @@ cargo = find_program('cargo', required: true)
cargo_sources = files(
'Cargo.toml',
- 'Cargo.lock',
)
if get_option('profile') == 'development'
diff --git a/meson_options.txt b/meson_options.txt
index 73c0e59..dd4297d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,3 +10,4 @@ option (
],
value: 'default',
)
+option('host_arch', type: 'string')
diff --git a/src/meson.build b/src/meson.build
index bf2da60..97b8510 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -44,8 +44,6 @@ else
message('Building in debug mode')
endif
-cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
-
cargo_release = custom_target(
'cargo-build',
build_by_default: true,
@@ -55,11 +53,9 @@ cargo_release = custom_target(
install: true,
install_dir: get_option('bindir'),
command: [
- 'env',
- cargo_env,
cargo, 'build',
cargo_options,
'&&',
- 'cp', 'src' / rust_target / meson.project_name(), '@OUTPUT@',
+ 'cp', 'src' / get_option('host_arch') / rust_target / meson.project_name(), '@OUTPUT@',
],
)
|