[Bug 256581] CARGO_GIT_SUBDIR doesn't work with unpacked [dependencies.<crate>]
Date: Tue, 07 Sep 2021 11:45:53 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256581 --- Comment #2 from Tobias Kortkamp <tobik@freebsd.org> --- patch-in-config has been stabilized in Rust 1.56 (2021-10-21). To get slightly more concrete it might look like this: diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index 3d065a45ed3b..46a2ffd40d93 100644 --- a/Mk/Uses/cargo.mk +++ b/Mk/Uses/cargo.mk @@ -107,8 +107,8 @@ STRIP_CMD= ${LOCALBASE}/bin/strip # unsupported e_type with base strip # Helper to shorten cargo calls. CARGO_CARGO_RUN= \ - cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} \ - ${CARGO_CARGO_BIN} + cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} RUSTC_BOOTSTRAP=1 CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE=1 \ + ${CARGO_CARGO_BIN} -Zpatch-in-config # User arguments for cargo targets. CARGO_BUILD_ARGS?= @@ -296,6 +296,8 @@ cargo-configure: @${ECHO_CMD} "directory = '${CARGO_VENDOR_DIR}'" >> ${WRKDIR}/.cargo/config @${ECHO_CMD} "[source.crates-io]" >> ${WRKDIR}/.cargo/config @${ECHO_CMD} "replace-with = 'cargo'" >> ${WRKDIR}/.cargo/config + @${ECHO_CMD} "[patch.'https://github.com/llogiq/mutagen']" >> ${WRKDIR}/.cargo/config + @${ECHO_CMD} "mutagen = { path = '${WRKSRC_mutagen}/mutagen' }" >> ${WRKDIR}/.cargo/config @if ! ${GREP} -qF '[profile.release]' ${CARGO_CARGOTOML}; then \ ${ECHO_CMD} "" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "[profile.release]" >> ${CARGO_CARGOTOML}; \ diff --git a/dns/dog/Makefile b/dns/dog/Makefile index e7b9aa7039de..2cb66d1895fa 100644 --- a/dns/dog/Makefile +++ b/dns/dog/Makefile @@ -90,8 +90,15 @@ CARGO_CRATES= addr2line-0.14.0 \ winapi-i686-pc-windows-gnu-0.4.0 \ winapi-x86_64-pc-windows-gnu-0.4.0 \ winreg-0.6.2 -CARGO_USE_GITHUB= yes -CARGO_GIT_SUBDIR= mutagen:mutagen:mutagen +# [[package]] +# name = "mutagen" +# source = "git+https://github.com/llogiq/mutagen#c7abc956a10e8a3e2cc71f21279ea0a42f7b7c10" +# +# make cargo-crates to turn entries like the above into +# +# CARGO_CRATES+= git+https://github.com/llogiq/mutagen\#c7abc956a10e8a3e2cc71f21279ea0a42f7b7c10 +# +# which cargo.mk can then consume to create the appropriate [patch] sections and GH_TUPLE. PORTDOCS= README.md -- You are receiving this mail because: You are on the CC list for the bug.