Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/cargo.mk
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
MASTER_SITES+= ${MASTER_SITE_CRATESIO:S,%SUBDIR%,${_crate:C/^([-_a-zA-Z0-9]+)-[0-9].*/\1/}/${_crate:C/^[-_a-zA-Z0-9]+-([0-9].*)/\1/},:S,$,:cargo_${_crate:C/[^a-zA-Z0-9_]//g},} | MASTER_SITES+= ${MASTER_SITE_CRATESIO:S,%SUBDIR%,${_crate:C/^([-_a-zA-Z0-9]+)-[0-9].*/\1/}/${_crate:C/^[-_a-zA-Z0-9]+-([0-9].*)/\1/},:S,$,:cargo_${_crate:C/[^a-zA-Z0-9_]//g},} | ||||
DISTFILES+= ${CARGO_DIST_SUBDIR}/${_crate}${CARGO_CRATE_EXT}:cargo_${_crate:C/[^a-zA-Z0-9_]//g} | DISTFILES+= ${CARGO_DIST_SUBDIR}/${_crate}${CARGO_CRATE_EXT}:cargo_${_crate:C/[^a-zA-Z0-9_]//g} | ||||
.endfor | .endfor | ||||
# Build dependencies. | # Build dependencies. | ||||
CARGO_BUILDDEP?= yes | CARGO_BUILDDEP?= yes | ||||
.if ${CARGO_BUILDDEP:tl} == "yes" | .if ${CARGO_BUILDDEP:tl} == "yes" | ||||
BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.51.0:lang/${RUST_DEFAULT} | BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.52.1:lang/${RUST_DEFAULT} | ||||
.endif | .endif | ||||
# Location of cargo binary (default to lang/rust's Cargo binary) | # Location of cargo binary (default to lang/rust's Cargo binary) | ||||
CARGO_CARGO_BIN?= ${LOCALBASE}/bin/cargo | CARGO_CARGO_BIN?= ${LOCALBASE}/bin/cargo | ||||
# Location of the cargo output directory. | # Location of the cargo output directory. | ||||
CARGO_TARGET_DIR?= ${WRKDIR}/target | CARGO_TARGET_DIR?= ${WRKDIR}/target | ||||
Show All 20 Lines | |||||
.elif ${ARCH:Mpowerpc64*} | .elif ${ARCH:Mpowerpc64*} | ||||
RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} | RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} | ||||
.else | .else | ||||
RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} | RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} | ||||
.endif | .endif | ||||
.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 | .if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 | ||||
USE_GCC?= yes | USE_GCC?= yes | ||||
STRIP_CMD= ${LOCALBASE}/bin/strip # unsupported e_type with base strip | |||||
.endif | .endif | ||||
# Helper to shorten cargo calls. | # Helper to shorten cargo calls. | ||||
CARGO_CARGO_RUN= \ | CARGO_CARGO_RUN= \ | ||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} \ | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} \ | ||||
${CARGO_CARGO_BIN} | ${CARGO_CARGO_BIN} | ||||
# User arguments for cargo targets. | # User arguments for cargo targets. | ||||
▲ Show 20 Lines • Show All 250 Lines • Show Last 20 Lines |