pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/rust



Module Name:    pkgsrc
Committed By:   maya
Date:           Sun May  6 01:59:36 UTC 2018

Modified Files:
        pkgsrc/lang/rust: cargo.mk

Log Message:
Add a show-cargo-depends target, sparing the effort of listing cargo
dependencies manually.

Document a bit and give some helpful tips.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/rust/cargo.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/rust/cargo.mk
diff -u pkgsrc/lang/rust/cargo.mk:1.1 pkgsrc/lang/rust/cargo.mk:1.2
--- pkgsrc/lang/rust/cargo.mk:1.1       Wed Nov  8 13:40:10 2017
+++ pkgsrc/lang/rust/cargo.mk   Sun May  6 01:59:36 2018
@@ -1,4 +1,4 @@
-# $NetBSD: cargo.mk,v 1.1 2017/11/08 13:40:10 tnn Exp $
+# $NetBSD: cargo.mk,v 1.2 2018/05/06 01:59:36 maya 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
@@ -12,6 +12,12 @@
 # do-build:
 #      cargo build --locked --frozen
 #
+#
+# If modifying the list of dependencies, re-run the build once without
+# --locked --frozen to generate a new valid Cargo.lock.
+#
+# a list of CARGO_CRATE_DEPENDS can be generated via "make show-cargo-depends".
+#
 # See also www/geckodriver for a full example.
 
 USE_TOOLS+=            bsdtar digest
@@ -36,3 +42,7 @@ cargo-vendor-crates:
          $$(${DIGEST} sha256 < ${WRKDIR}/${_crate}.crate) \
          > ${CARGO_VENDOR_DIR}/${_crate}/.cargo-checksum.json
 .endfor
+
+.PHONY: show-cargo-depends
+show-cargo-depends:
+       ${RUN}${AWK} '/^\"checksum/ { print "CARGO_CRATE_DEPENDS+=\t" $$2 "-" $$3""; next } ' ${WRKSRC}/Cargo.lock



Home | Main Index | Thread Index | Old Index