Changeset View
Changeset View
Standalone View
Standalone View
head/lang/rust/Makefile
# Created by: Jyun-Yan You <jyyou@cs.nctu.edu.tw> | # Created by: Jyun-Yan You <jyyou@cs.nctu.edu.tw> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= rust | PORTNAME= rust | ||||
PORTVERSION?= 1.49.0 | PORTVERSION?= 1.50.0 | ||||
PORTREVISION?= 0 | PORTREVISION?= 0 | ||||
CATEGORIES= lang | CATEGORIES= lang | ||||
MASTER_SITES= https://static.rust-lang.org/dist/:src \ | MASTER_SITES= https://static.rust-lang.org/dist/:src \ | ||||
https://dev-static.rust-lang.org/dist/:src \ | https://dev-static.rust-lang.org/dist/:src \ | ||||
LOCAL/bdragon/rust:bootstrap \ | LOCAL/bdragon/rust:bootstrap \ | ||||
LOCAL/mikael/rust:bootstrap \ | LOCAL/mikael/rust:bootstrap \ | ||||
LOCAL/tobik/rust:bootstrap \ | LOCAL/tobik/rust:bootstrap \ | ||||
https://static.rust-lang.org/dist/:bootstrap | https://static.rust-lang.org/dist/:bootstrap | ||||
Show All 12 Lines | |||||
LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE | LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE | ||||
LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT | LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT | ||||
IGNORE_FreeBSD_11_powerpc64= is missing a bootstrap for FreeBSD 11.x powerpc64 | IGNORE_FreeBSD_11_powerpc64= is missing a bootstrap for FreeBSD 11.x powerpc64 | ||||
ONLY_FOR_ARCHS?= aarch64 amd64 armv6 armv7 i386 powerpc64 powerpc64le | ONLY_FOR_ARCHS?= aarch64 amd64 armv6 armv7 i386 powerpc64 powerpc64le | ||||
ONLY_FOR_ARCHS_REASON?= requires prebuilt bootstrap compiler | ONLY_FOR_ARCHS_REASON?= requires prebuilt bootstrap compiler | ||||
BUILD_DEPENDS= cmake:devel/cmake \ | BUILD_DEPENDS= cmake:devel/cmake \ | ||||
libgit2>=1.0.0:devel/libgit2 \ | |||||
ninja:devel/ninja | ninja:devel/ninja | ||||
LIB_DEPENDS= libcurl.so:ftp/curl \ | LIB_DEPENDS= libcurl.so:ftp/curl | ||||
libgit2.so:devel/libgit2 \ | |||||
libssh2.so:security/libssh2 | |||||
USES= pkgconfig python:3.6+,build ssl tar:xz | USES= pkgconfig python:3.6+,build ssl tar:xz | ||||
MAKE_ENV= DESTDIR=${STAGEDIR} \ | MAKE_ENV= DESTDIR=${STAGEDIR} \ | ||||
LIBGIT2_SYS_USE_PKG_CONFIG=1 \ | |||||
LIBSSH2_SYS_USE_PKG_CONFIG=1 \ | |||||
OPENSSL_DIR="${OPENSSLBASE}" \ | OPENSSL_DIR="${OPENSSLBASE}" \ | ||||
RUST_BACKTRACE=1 | RUST_BACKTRACE=1 | ||||
TEST_ENV= ${MAKE_ENV} \ | TEST_ENV= ${MAKE_ENV} \ | ||||
ALLOW_NONZERO_RLIMIT_CORE=1 | ALLOW_NONZERO_RLIMIT_CORE=1 | ||||
CONFLICTS_INSTALL?= rust-nightly | CONFLICTS_INSTALL?= rust-nightly | ||||
OPTIONS_DEFINE= DOCS GDB SOURCES WASM | OPTIONS_DEFINE= DOCS GDB SOURCES WASM | ||||
Show All 11 Lines | |||||
DOCS_VARS_OFF= _RUST_BUILD_DOCS=false | DOCS_VARS_OFF= _RUST_BUILD_DOCS=false | ||||
GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb | GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb | ||||
SOURCES_VARS= _RUST_TOOLS+=src | SOURCES_VARS= _RUST_TOOLS+=src | ||||
WASM_VARS= _RUST_BUILD_WASM=true \ | WASM_VARS= _RUST_BUILD_WASM=true \ | ||||
_RUST_TARGETS+=wasm32-unknown-unknown | _RUST_TARGETS+=wasm32-unknown-unknown | ||||
WASM_VARS_OFF= _RUST_BUILD_WASM=false | WASM_VARS_OFF= _RUST_BUILD_WASM=false | ||||
# See WRKSRC/src/stage0.txt for the date and version values. | # See WRKSRC/src/stage0.txt for the date and version values. | ||||
BOOTSTRAPS_DATE?= 2020-11-19 | BOOTSTRAPS_DATE?= 2020-12-31 | ||||
RUST_BOOTSTRAP_VERSION?= 1.48.0 | RUST_BOOTSTRAP_VERSION?= 1.49.0 | ||||
BOOTSTRAPS_SUFFIX?= ${BOOTSTRAPS_SUFFIX_${ARCH}} | BOOTSTRAPS_SUFFIX?= ${BOOTSTRAPS_SUFFIX_${ARCH}} | ||||
BOOTSTRAPS_SUFFIX_powerpc64?= -${PPC_ABI:tl} | BOOTSTRAPS_SUFFIX_powerpc64?= -${PPC_ABI:tl} | ||||
CARGO_VENDOR_DIR?= ${WRKSRC}/vendor | CARGO_VENDOR_DIR?= ${WRKSRC}/vendor | ||||
# Rust's target arch string might be different from *BSD arch strings | # Rust's target arch string might be different from *BSD arch strings | ||||
_RUST_ARCH_amd64= x86_64 | _RUST_ARCH_amd64= x86_64 | ||||
Show All 14 Lines | |||||
.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 | .if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 | ||||
# The bootstrap is hardcoded to use gcc9 | # The bootstrap is hardcoded to use gcc9 | ||||
# but we can build with a newer or older compiler as provided by USE_GCC=yes | # but we can build with a newer or older compiler as provided by USE_GCC=yes | ||||
BUILD_DEPENDS+= gcc9:lang/gcc9 | BUILD_DEPENDS+= gcc9:lang/gcc9 | ||||
USE_GCC= yes | USE_GCC= yes | ||||
.endif | .endif | ||||
.if ${ARCH} == aarch64 && ${OSVERSION} < 1200502 | # remove when 11.4 is EOL | ||||
IGNORE= fails to run due to a bug in rtld, update to 12-STABLE r342847 or 13-CURRENT r342113 | .if ${ARCH} == aarch64 && ${OSVERSION} < 1202000 | ||||
IGNORE= fails to run due to a bug in rtld, update to 12.2-RELEASE or newer | |||||
.endif | .endif | ||||
.ifdef QEMU_EMULATING | .ifdef QEMU_EMULATING | ||||
IGNORE= fails to build with qemu-user-static | IGNORE= fails to build with qemu-user-static | ||||
.endif | .endif | ||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} 's,gdb,${LOCALBASE}/bin/gdb,' ${WRKSRC}/src/etc/rust-gdb | @${REINPLACE_CMD} 's,gdb,${LOCALBASE}/bin/gdb,' ${WRKSRC}/src/etc/rust-gdb | ||||
.if defined(NIGHTLY_DATE) | .if defined(NIGHTLY_DATE) | ||||
@${REINPLACE_CMD} '/^rustfmt:/d' ${WRKSRC}/src/stage0.txt | @${REINPLACE_CMD} '/^rustfmt:/d' ${WRKSRC}/src/stage0.txt | ||||
.endif | .endif | ||||
# Disable vendor checksums | # Disable vendor checksums | ||||
@${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \ | @${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \ | ||||
${CARGO_VENDOR_DIR}/*/.cargo-checksum.json | ${CARGO_VENDOR_DIR}/*/.cargo-checksum.json | ||||
do-configure: | do-configure: | ||||
# Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64 | # Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64 | ||||
@${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ | @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ | ||||
${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh | ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh | ||||
.for _component in cargo rust-std rustc | .for _component in cargo rust-std rustc | ||||
@cd ${WRKDIR}/${_component}-*-${OPSYS:tl} && \ | @cd ${WRKDIR}/${_component}-*-${OPSYS:tl} && \ | ||||
${SH} install.sh --prefix=${WRKDIR}/bootstrap \ | ${SH} install.sh --prefix=${WRKDIR}/bootstrap --verbose | ||||
--verbose | |||||
.endfor | .endfor | ||||
@${ECHO_CMD} '[build]' > ${WRKSRC}/config.toml | @${ECHO_CMD} '[build]' > ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'vendor=true' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'vendor=true' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'extended=true' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'extended=true' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'python="${PYTHON_CMD}"' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'python="${PYTHON_CMD}"' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'docs=${_RUST_BUILD_DOCS}' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'docs=${_RUST_BUILD_DOCS}' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'verbose=2' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'verbose=2' >> ${WRKSRC}/config.toml | ||||
.if defined(NIGHTLY_DATE) | .if defined(NIGHTLY_DATE) | ||||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |