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: Sat May 4 20:06:55 UTC 2024
Modified Files:
pkgsrc/lang/rust: cargo.mk
Log Message:
rust: move pkgsrc's generated cargo config to $WRKDIR
Some setuptools-rust packages (at least py-bcrypt) won't find it in the
source directory, leading to the pkgsrc crate vendoring not having the
desired effect. Move it to ${WRKDIR}/.cargo/config.toml instead and
set CARGO_HOME in the environment such that cargo will find it regardless
of which directory it is started from.
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 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.36 pkgsrc/lang/rust/cargo.mk:1.37
--- pkgsrc/lang/rust/cargo.mk:1.36 Wed Dec 13 17:39:06 2023
+++ pkgsrc/lang/rust/cargo.mk Sat May 4 20:06:55 2024
@@ -1,4 +1,4 @@
-# $NetBSD: cargo.mk,v 1.36 2023/12/13 17:39:06 schmonz Exp $
+# $NetBSD: cargo.mk,v 1.37 2024/05/04 20:06:55 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
@@ -48,8 +48,8 @@ post-extract: cargo-vendor-crates
.PHONY: cargo-vendor-crates
cargo-vendor-crates:
@${STEP_MSG} "Extracting local cargo crates"
- ${RUN}${MKDIR} ${CARGO_WRKSRC}/.cargo
- ${RUN}${PRINTF} "[source.crates-io]\nreplace-with = \"vendored-sources\"\n[source.vendored-sources]\ndirectory = \"${CARGO_VENDOR_DIR}\"\n" > ${CARGO_WRKSRC}/.cargo/config
+ ${RUN}${MKDIR} ${WRKDIR}/.cargo
+ ${RUN}${PRINTF} "[source.crates-io]\nreplace-with = \"vendored-sources\"\n[source.vendored-sources]\ndirectory = \"${CARGO_VENDOR_DIR}\"\n" > ${WRKDIR}/.cargo/config.toml
${RUN}${MKDIR} ${CARGO_VENDOR_DIR}
.for crate in ${CARGO_CRATE_DEPENDS}
${RUN}${PRINTF} '{"package":"%s","files":{}}' \
@@ -78,6 +78,7 @@ CARGO_ARGS?= build --release ${DEFAULT_
CARGO_INSTALL_ARGS?= install --path . --root ${DESTDIR}${PREFIX} ${DEFAULT_CARGO_ARGS}
MAKE_ENV+= RUSTFLAGS=${RUSTFLAGS:Q}
+ALL_ENV+= CARGO_HOME=${WRKDIR}
.if !target(do-build)
do-build: do-cargo-build
Home |
Main Index |
Thread Index |
Old Index