| 1 |
From: Matthias Geiger <[email protected]> |
| 2 |
Date: Thu, 7 May 2026 14:40:45 +0200 |
| 3 |
Subject: Patch meson.build to allow building with Debian tooling |
| 4 |
|
| 5 |
Forwarded: not-needed |
| 6 |
--- |
| 7 |
meson.build | 4 +--- |
| 8 |
meson_options.txt | 5 ++++- |
| 9 |
2 files changed, 5 insertions(+), 4 deletions(-) |
| 10 |
|
| 11 |
diff --git a/meson.build b/meson.build |
| 12 |
index 568264a..57b6c1f 100644 |
| 13 |
--- a/meson.build |
| 14 |
+++ b/meson.build |
| 15 |
@@ -20,13 +20,11 @@ bindir = get_option('prefix') / get_option('bindir') |
| 16 |
datadir = get_option('prefix') / get_option('datadir') |
| 17 |
|
| 18 |
cargo_target_dir = meson.project_build_root() / 'cargo-target' |
| 19 |
-cargo_home = meson.project_build_root() / 'cargo-home' |
| 20 |
cargo_manifest = meson.project_source_root() / 'Cargo.toml' |
| 21 |
|
| 22 |
cargo_bin = find_program('cargo') |
| 23 |
|
| 24 |
cargo_env = environment() |
| 25 |
-cargo_env.set('CARGO_HOME', cargo_home) |
| 26 |
|
| 27 |
cargo_options = ['--manifest-path', cargo_manifest] |
| 28 |
cargo_options += ['--target-dir', cargo_target_dir] |
| 29 |
@@ -193,7 +191,7 @@ foreach binary_name : binaries |
| 30 |
output: binary_name, |
| 31 |
command: [ |
| 32 |
'cp', |
| 33 |
- cargo_target_dir / rust_target / binary_name, |
| 34 |
+ cargo_target_dir / get_option('host_arch') / 'release' / binary_name, |
| 35 |
'@OUTPUT@', |
| 36 |
], |
| 37 |
) |
| 38 |
diff --git a/meson_options.txt b/meson_options.txt |
| 39 |
index a3a3bb3..1fffe2a 100644 |
| 40 |
--- a/meson_options.txt |
| 41 |
+++ b/meson_options.txt |
| 42 |
@@ -4,4 +4,7 @@ option( |
| 43 |
choices: ['release', 'dev'], |
| 44 |
value: 'release', |
| 45 |
) |
| 46 |
- |
| 47 |
+option( |
| 48 |
+ 'host_arch', |
| 49 |
+ type: 'string', |
| 50 |
+) |