build: Replace missing crates.io dependency with Purism-hosted one

This commit is contained in:
Dorota Czaplejewicz
2022-04-04 16:56:28 +00:00
parent b5142ac765
commit d19050e06d
6 changed files with 18 additions and 7 deletions

View File

@ -96,19 +96,23 @@ cargo_toml_base = configure_file(
configuration: path_data,
)
cargo_deps = files('Cargo.deps')
cargo_patch = []
if get_option('newer') == true
cargo_build_flags += ['--features', 'glib_v0_14']
cargo_deps = files('Cargo.deps.newer')
else
cargo_deps = files('Cargo.deps')
if get_option('online') == true
cargo_patch = [files('Cargo.deps.online')]
endif
endif
cat = find_program('cat')
cargo_toml = custom_target(
'Cargo.toml',
output: 'Cargo.toml',
command: [cat, cargo_toml_base, cargo_deps],
command: [cat, cargo_toml_base, cargo_deps] + cargo_patch,
capture: true,
)