[Bug 256581] CARGO_GIT_SUBDIR doesn't work with unpacked [dependencies.<crate>]
Date: Wed, 16 Jun 2021 17:57:49 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256581
--- Comment #1 from Tobias Kortkamp <tobik@freebsd.org> ---
Created attachment 225862
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=225862&action=edit
cargo-git-update.diff
Ok, to get away from the sed hackery we need to let cargo do the
replacement with [patch] sections. This can maybe work like this:
1. Patch cargo to add an option to not force fetch Git sources when
using cargo update (we abuse cargo update to trivially bump crate
versions to avoid patching Cargo.lock ourselves; would be a shame to
loose it); hack for that attached (against rust-1.52.0 branch in cargo
upstream).
2. Put appropriate [patch] sections into ${WRKDIR}/.cargo/config so
that cargo can do the replacement itself. That currently requires
the -Zpatch-in-config unstable feature [1].
For dns/dog (much less complicated for experimentation than
games/veloren) the [patch] section would look like:
GH_TUPLE= llogiq:mutagen:c7abc956a10e8a3e2cc71f21279ea0a42f7b7c10:mutagen
CARGO_GIT_SUBDIR= mutagen:mutagen:mutagen
=>
[patch.'https://github.com/llogiq/mutagen']
mutagen = { path = "${WRKSRC_mutagen}/mutagen" }
[1] https://github.com/rust-lang/cargo/issues/9269
--
You are receiving this mail because:
You are on the CC list for the bug.