build-style/cargo: use env var to select sparse index mode
This commit is contained in:
parent
2bcb66a617
commit
3641d47af7
2 changed files with 5 additions and 3 deletions
|
@ -5,13 +5,13 @@
|
||||||
do_build() {
|
do_build() {
|
||||||
: ${make_cmd:=cargo auditable}
|
: ${make_cmd:=cargo auditable}
|
||||||
|
|
||||||
${make_cmd} --config 'registries.crates-io.protocol="sparse"' build --release --target ${RUST_TARGET} ${configure_args}
|
${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_check() {
|
do_check() {
|
||||||
: ${make_cmd:=cargo auditable}
|
: ${make_cmd:=cargo auditable}
|
||||||
|
|
||||||
${make_check_pre} ${make_cmd} --config 'registries.crates-io.protocol="sparse"' test --release --target ${RUST_TARGET} ${configure_args} \
|
${make_check_pre} ${make_cmd} test --release --target ${RUST_TARGET} ${configure_args} \
|
||||||
${make_check_args}
|
${make_check_args}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ do_install() {
|
||||||
: ${make_cmd:=cargo auditable}
|
: ${make_cmd:=cargo auditable}
|
||||||
: ${make_install_args:=--path .}
|
: ${make_install_args:=--path .}
|
||||||
|
|
||||||
${make_cmd} --config 'registries.crates-io.protocol="sparse"' install --target ${RUST_TARGET} --root="${DESTDIR}/usr" \
|
${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" \
|
||||||
--offline --locked ${configure_args} ${make_install_args}
|
--offline --locked ${configure_args} ${make_install_args}
|
||||||
|
|
||||||
rm -f "${DESTDIR}"/usr/.crates.toml
|
rm -f "${DESTDIR}"/usr/.crates.toml
|
||||||
|
|
|
@ -8,4 +8,6 @@ if [ "$CROSS_BUILD" ]; then
|
||||||
makedepends+=" rust-std"
|
makedepends+=" rust-std"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
||||||
|
|
||||||
build_helper+=" rust"
|
build_helper+=" rust"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue