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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
From: Matthias Geiger <werdahias@riseup.net>
Date: Mon, 18 Dec 2023 21:50:04 +0100
Subject: Patch meson.build to allow building in debian
This patch allow build under debian by using a workaround to pass DEB_RUST_HOST
to meson to get the correct installation location.
Forwarded: not-needed
Last-Update: 2024-09-17
---
meson_options.txt | 4 ++++
src/meson.build | 10 +---------
2 files changed, 5 insertions(+), 9 deletions(-)
--- a/aperture/meson.build
+++ b/aperture/meson.build
@@ -1,16 +1,3 @@
aperture_cargo_options = [ '--manifest-path', meson.project_source_root() / 'aperture' / 'Cargo.toml' ]
aperture_cargo_options += [ '--target-dir', meson.project_build_root() / 'aperture' / 'src' ]
-test (
- 'Cargo clippy - aperture',
- cargo,
- args: [
- 'clippy',
- '--no-deps',
- aperture_cargo_options,
- ],
- env: [
- cargo_env,
- ],
- timeout: 400, # cargo might take a bit of time sometimes
-)
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -21,3 +21,7 @@
type: 'feature',
description: 'Enable X11 specific features.'
)
+option(
+ 'host_arch',
+ type: 'string',
+)
--- a/src/meson.build
+++ b/src/meson.build
@@ -44,7 +44,6 @@
cargo_options += [ '--features', 'portal' ]
endif
-cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
cargo_build = custom_target(
'cargo-build',
@@ -57,29 +56,14 @@
depends: resources,
command: [
'env',
- cargo_env,
cargo, 'build',
cargo_options,
'&&',
- 'cp', 'src' / rust_target / meson.project_name(), '@OUTPUT@',
+ 'cp', 'src' / get_option('host_arch') / 'release' / meson.project_name(), '@OUTPUT@',
]
)
test (
- 'Cargo clippy',
- cargo,
- args: [
- 'clippy',
- '--no-deps',
- cargo_options,
- ],
- env: [
- cargo_env,
- ],
- timeout: 400, # cargo might take a bit of time sometimes
-)
-
-test (
'Cargo tests',
cargo,
args: [
@@ -87,7 +71,5 @@
cargo_options,
],
timeout: 400, # cargo might take a bit of time sometimes
- env: [
- cargo_env,
- ],
+
)
|