GPL-3+
2020-2024 Andrey Kutejko; 2003 - 2006 Callum McKenzie; 2004 Paolo Borelli; 2004 Richard Hoelscher; 2005 Caleb Moore; 2005 Dom Lachowicz; 2005 Red Hat, Inc.; 2007, 2009 Christian Persch; 2014-2016 Michael Catanzaro; Mark Rae
debian/copyright
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
| 1 |
config_rs = configure_file( |
| 2 |
input: 'config.rs.in', |
| 3 |
output: 'config.rs', |
| 4 |
configuration: config_rs |
| 5 |
) |
| 6 |
run_command( |
| 7 |
'cp', |
| 8 |
meson.project_build_root() / 'src' / 'config.rs', |
| 9 |
meson.project_source_root() / 'src' / 'config.rs', |
| 10 |
check: true |
| 11 |
) |
| 12 |
|
| 13 |
cargo_options = [ '--manifest-path', meson.project_source_root() / 'Cargo.toml' ] |
| 14 |
cargo_options += [ '--target-dir', meson.project_build_root() / 'src' ] |
| 15 |
|
| 16 |
if profile == 'debug' |
| 17 |
rust_target = 'debug' |
| 18 |
message('Building in debug mode') |
| 19 |
else |
| 20 |
cargo_options += [ '--release' ] |
| 21 |
rust_target = 'release' |
| 22 |
message('Building in release mode') |
| 23 |
endif |
| 24 |
|
| 25 |
cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ] |
| 26 |
|
| 27 |
robots = custom_target( |
| 28 |
'cargo-build', |
| 29 |
build_by_default: true, |
| 30 |
build_always_stale: true, |
| 31 |
input: [config_rs], |
| 32 |
output: meson.project_name(), |
| 33 |
console: true, |
| 34 |
install: true, |
| 35 |
install_dir: bindir, |
| 36 |
command: [ |
| 37 |
'env', |
| 38 |
cargo_env, |
| 39 |
cargo, 'build', cargo_options, |
| 40 |
'&&', |
| 41 |
'cp', 'src' / rust_target / meson.project_name(), '@OUTPUT@', |
| 42 |
] |
| 43 |
) |
| 44 |
|
| 45 |
test( |
| 46 |
'cargo-test', cargo, |
| 47 |
env: cargo_env, |
| 48 |
args: ['test', '--no-fail-fast'] + cargo_options, |
| 49 |
depends: [robots], |
| 50 |
timeout: 180 |
| 51 |
) |