diff options
author | he <he@pkgsrc.org> | 2020-06-08 17:13:39 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2020-06-08 17:13:39 +0000 |
commit | 7c84f8af156b6e94c1cf5371330286f7eee8d27c (patch) | |
tree | c5e4f5bbce973914cd76bce7c631a3d5853ddfd9 /lang/rust | |
parent | 370f23e4d4c5eb137a9c9b2d08adf87b545cb2ca (diff) | |
download | pkgsrc-7c84f8af156b6e94c1cf5371330286f7eee8d27c.tar.gz |
Provide a new show-cargo-depends script which works with the coming
version of www/zola where the Cargo.lock file has no [metadata] section.
Diffstat (limited to 'lang/rust')
-rw-r--r-- | lang/rust/cargo.mk | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lang/rust/cargo.mk b/lang/rust/cargo.mk index b532c8c6883..e31885dac81 100644 --- a/lang/rust/cargo.mk +++ b/lang/rust/cargo.mk @@ -1,4 +1,4 @@ -# $NetBSD: cargo.mk,v 1.13 2020/05/21 21:03:44 nia Exp $ +# $NetBSD: cargo.mk,v 1.14 2020/06/08 17:13:39 he Exp $ # # Common logic that can be used by packages that depend on cargo crates # from crates.io. This lets existing pkgsrc infrastructure fetch and verify @@ -62,4 +62,8 @@ cargo-vendor-crates: .PHONY: show-cargo-depends show-cargo-depends: - ${RUN}${AWK} '/^\"checksum/ { print "CARGO_CRATE_DEPENDS+=\t" $$2 "-" $$3""; next } ' ${WRKSRC}/Cargo.lock + ${RUN}${AWK} '/^name = / { split($$3, a, "\""); name=a[2]; } \ + /^version = / { split($$3, a, "\""); vers=a[2]; } \ + /^checksum = / { \ + print "CARGO_CRATE_DEPENDS+=\t" name "-" vers; \ + }' ${WRKSRC}/Cargo.lock |