pkgsrc-WIP-changes archive

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

rust185: merge change from lang/rust for crate downloads



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By:	wiz
Date:		Fri Apr 4 23:32:26 2025 +0200
Changeset:	e451dee7512bdb11e7b32e19fd7ce8a443325580

Modified Files:
	rust185/cargo.mk

Log Message:
rust185: merge change from lang/rust for crate downloads

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e451dee7512bdb11e7b32e19fd7ce8a443325580

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

diffstat:
 rust185/cargo.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diffs:
diff --git a/rust185/cargo.mk b/rust185/cargo.mk
index 5813c04321..987f534d22 100644
--- a/rust185/cargo.mk
+++ b/rust185/cargo.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cargo.mk,v 1.37 2024/05/04 20:06:55 tnn Exp $
+# $NetBSD: cargo.mk,v 1.41 2025/04/04 21:29:22 riastradh 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
@@ -33,7 +33,13 @@ CARGO_WRKSRC?=		${WRKSRC}
 DISTFILES?=			${DEFAULT_DISTFILES}
 .for crate in ${CARGO_CRATE_DEPENDS}
 DISTFILES+=			${crate}.crate
+.  if ${crate:M*+*}
+# E.g., for `curl-sys-0.4.75+curl-8.10.0', we use the URL:
+# https://crates.io/api/v1/crates/curl-sys/0.4.77+curl-8.10.1/download
+SITES.${crate}.crate+=		-${MASTER_SITE_CRATESIO}${crate:C/-[0-9]+\.[0-9.]+.*$//}/${crate:C/^.*-([0-9]+\.[0-9.]+.*\+.*-[0-9]+\.[0-9]+.*)$/\1/}/download
+.  else
 SITES.${crate}.crate+=		-${MASTER_SITE_CRATESIO}${crate:C/-[0-9]+\.[0-9.]+.*$//}/${crate:C/^.*-([0-9]+\.[0-9.]+.*)$/\1/}/download
+.  endif
 EXTRACT_DIR.${crate}.crate?=	${CARGO_VENDOR_DIR}
 .endfor
 


Home | Main Index | Thread Index | Old Index