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:   tnn
Date:           Fri Aug 14 21:12:04 UTC 2020

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

Log Message:
cargo.mk: some improvements

- rename show-cargo-depends to print-cargo-depends (but keep a compat alias)
- make it print an RCS id preamble with a comment

This allows one to do "make print-cargo-depends > cargo-depends.mk"
and reference cargo-depends.mk from the packages main Makefile.
Makes updating packages easier.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 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.20 pkgsrc/lang/rust/cargo.mk:1.21
--- pkgsrc/lang/rust/cargo.mk:1.20      Fri Aug 14 20:44:16 2020
+++ pkgsrc/lang/rust/cargo.mk   Fri Aug 14 21:12:03 2020
@@ -1,4 +1,4 @@
-# $NetBSD: cargo.mk,v 1.20 2020/08/14 20:44:16 tnn Exp $
+# $NetBSD: cargo.mk,v 1.21 2020/08/14 21:12:03 tnn 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
@@ -51,12 +51,17 @@ cargo-vendor-crates:
          > ${CARGO_VENDOR_DIR}/${crate}/.cargo-checksum.json
 .endfor
 
+# Legacy name
 .PHONY: show-cargo-depends
-show-cargo-depends:
-       ${RUN}${AWK} '/^name = / { split($$3, a, "\""); name=a[2]; } \
-               /^version = / { split($$3, a, "\""); vers=a[2]; } \
-               /^source = / { \
-                       print "CARGO_CRATE_DEPENDS+=\t" name "-" vers; \
+show-cargo-depends: print-cargo-depends
+
+.PHONY: print-cargo-depends
+print-cargo-depends:
+       ${RUN}${AWK} 'BEGIN {print "# $$Net" "BSD$$"; print;}           \
+               /^name = / { split($$3, a, "\""); name=a[2]; }          \
+               /^version = / { split($$3, a, "\""); vers=a[2]; }       \
+               /^source = / {                                          \
+                       print "CARGO_CRATE_DEPENDS+=\t" name "-" vers;  \
                        }' ${WRKSRC}/Cargo.lock
 
 DEFAULT_CARGO_ARGS=    build --offline --release -j${_MAKE_JOBS_N}



Home | Main Index | Thread Index | Old Index