HomeFreeBSD

Mk/Uses/cargo.mk: Refactor MASTER_SITES and DISTFILES construction (D30099)

Description

Mk/Uses/cargo.mk: Refactor MASTER_SITES and DISTFILES construction (D30099)

Split CARGO_CRATES into (index, crate, name, version) 4-tuples and
use them to construct MASTER_SITES and DISTFILES. We can also match
crate name and versions more directly below.

As a bonus this is slightly faster and will flag a malformed
CARGO_CRATES earlier with a "wrong number of words" error.

Runtime of the following command was noticeably faster

$ <rust-ports /usr/bin/time xe -F make -C {} -V DISTFILES -V MASTER_SITES >/dev/null

Before: 56.99 real 50.05 user 6.44 sys
Now: 38.89 real 31.63 user 6.86 sys

PR: 255608
Exp-run by: antoine

Details

Provenance
tobikAuthored on Apr 29 2021, 9:48 AM
Parents
R11:d8837418ea74: lang/rust: Update to 1.52.1
Branches
Unknown
Tags
Unknown