Changeset View
Changeset View
Standalone View
Standalone View
head/Mk/Uses/cargo.mk
Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | |||||
.endif | .endif | ||||
.if ${CARGO_CONFIGURE:tl} == "yes" | .if ${CARGO_CONFIGURE:tl} == "yes" | ||||
_USES_configure+= 250:cargo-configure | _USES_configure+= 250:cargo-configure | ||||
# configure hook. Place a config file for overriding crates-io index | # configure hook. Place a config file for overriding crates-io index | ||||
# by local source directory. | # by local source directory. | ||||
cargo-configure: | cargo-configure: | ||||
# Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64 | |||||
@${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ | |||||
${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh | |||||
@${MKDIR} ${WRKDIR}/.cargo | @${MKDIR} ${WRKDIR}/.cargo | ||||
@${ECHO_CMD} "[source.cargo]" > ${WRKDIR}/.cargo/config | @${ECHO_CMD} "[source.cargo]" > ${WRKDIR}/.cargo/config | ||||
@${ECHO_CMD} "directory = '${CARGO_VENDOR_DIR}'" >> ${WRKDIR}/.cargo/config | @${ECHO_CMD} "directory = '${CARGO_VENDOR_DIR}'" >> ${WRKDIR}/.cargo/config | ||||
@${ECHO_CMD} "[source.crates-io]" >> ${WRKDIR}/.cargo/config | @${ECHO_CMD} "[source.crates-io]" >> ${WRKDIR}/.cargo/config | ||||
@${ECHO_CMD} "replace-with = 'cargo'" >> ${WRKDIR}/.cargo/config | @${ECHO_CMD} "replace-with = 'cargo'" >> ${WRKDIR}/.cargo/config | ||||
@if ! ${GREP} -qF '[profile.release]' ${CARGO_CARGOTOML}; then \ | @if ! ${GREP} -qF '[profile.release]' ${CARGO_CARGOTOML}; then \ | ||||
${ECHO_CMD} "" >> ${CARGO_CARGOTOML}; \ | ${ECHO_CMD} "" >> ${CARGO_CARGOTOML}; \ | ||||
${ECHO_CMD} "[profile.release]" >> ${CARGO_CARGOTOML}; \ | ${ECHO_CMD} "[profile.release]" >> ${CARGO_CARGOTOML}; \ | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |