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.39.0 | PORTVERSION?= 1.39.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://static.rust-lang.org/dist/:rust_bootstrap \ | https://static.rust-lang.org/dist/:rust_bootstrap \ | ||||
LOCAL/tobik/rust:rust_bootstrap \ | LOCAL/tobik/rust:rust_bootstrap \ | ||||
https://static.rust-lang.org/dist/:cargo_bootstrap \ | https://static.rust-lang.org/dist/:cargo_bootstrap \ | ||||
LOCAL/tobik/rust:cargo_bootstrap \ | LOCAL/tobik/rust:cargo_bootstrap \ | ||||
https://releases.llvm.org/${COMPILER_RT_VERSION}/:compiler_rt \ | https://releases.llvm.org/${COMPILER_RT_VERSION}/:compiler_rt \ | ||||
https://github.com/llvm/llvm-project/releases/download/llvmorg-${COMPILER_RT_VERSION}/:compiler_rt | https://github.com/llvm/llvm-project/releases/download/llvmorg-${COMPILER_RT_VERSION}/:compiler_rt | ||||
DISTNAME?= ${PORTNAME}c-${PORTVERSION}-src | DISTNAME?= ${PORTNAME}c-${PORTVERSION}-src | ||||
DISTFILES?= ${NIGHTLY_SUBDIR}${DISTNAME}${EXTRACT_SUFX}:src \ | DISTFILES?= ${NIGHTLY_SUBDIR}${DISTNAME}${EXTRACT_SUFX}:src \ | ||||
${_RUSTC_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}.tar.gz:rust_bootstrap \ | ${_RUSTC_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:rust_bootstrap \ | ||||
${_RUST_STD_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}.tar.gz:rust_bootstrap \ | ${_RUST_STD_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:rust_bootstrap \ | ||||
${_CARGO_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}.tar.gz:cargo_bootstrap \ | ${_CARGO_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:cargo_bootstrap \ | ||||
${DISTFILES_${ARCH}} | ${DISTFILES_${ARCH}} | ||||
DISTFILES_armv6= compiler-rt-${COMPILER_RT_VERSION}.src.tar.xz:compiler_rt | DISTFILES_armv6= compiler-rt-${COMPILER_RT_VERSION}.src.tar.xz:compiler_rt | ||||
DISTFILES_armv7= compiler-rt-${COMPILER_RT_VERSION}.src.tar.xz:compiler_rt | DISTFILES_armv7= compiler-rt-${COMPILER_RT_VERSION}.src.tar.xz:compiler_rt | ||||
DIST_SUBDIR?= rust | DIST_SUBDIR?= rust | ||||
EXTRACT_ONLY?= ${DISTFILES:N*\:*bootstrap:C/:.*//} | EXTRACT_ONLY?= ${DISTFILES:N*\:*bootstrap:C/:.*//} | ||||
MAINTAINER= rust@FreeBSD.org | MAINTAINER= rust@FreeBSD.org | ||||
COMMENT= Language with a focus on memory safety and concurrency | COMMENT= Language with a focus on memory safety and concurrency | ||||
LICENSE= APACHE20 MIT | LICENSE= APACHE20 MIT | ||||
LICENSE_COMB= dual | LICENSE_COMB= dual | ||||
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 | ONLY_FOR_ARCHS?= aarch64 amd64 armv6 armv7 i386 powerpc64 | ||||
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 \ | ||||
gmake:devel/gmake | gmake:devel/gmake | ||||
LIB_DEPENDS= libcurl.so:ftp/curl \ | LIB_DEPENDS= libcurl.so:ftp/curl \ | ||||
libgit2.so:devel/libgit2 \ | libgit2.so:devel/libgit2 \ | ||||
libssh2.so:security/libssh2 | libssh2.so:security/libssh2 | ||||
USES= pkgconfig python:build ssl tar:xz | USES= pkgconfig python:3.3+,build ssl tar:xz | ||||
CONFLICTS_INSTALL?= rust-nightly | CONFLICTS_INSTALL?= rust-nightly | ||||
PLIST_FILES= lib/rustlib/components \ | PLIST_FILES= lib/rustlib/components \ | ||||
lib/rustlib/rust-installer-version | lib/rustlib/rust-installer-version | ||||
OPTIONS_DEFINE= DOCS GDB SOURCES | OPTIONS_DEFINE= DOCS GDB SOURCES | ||||
GDB_DESC= Install ports gdb (necessary for debugging rust programs) | GDB_DESC= Install ports gdb (necessary for debugging rust programs) | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
X_PY_ENV= HOME="${WRKDIR}" \ | X_PY_ENV= HOME="${WRKDIR}" \ | ||||
LIBGIT2_SYS_USE_PKG_CONFIG=1 \ | LIBGIT2_SYS_USE_PKG_CONFIG=1 \ | ||||
LIBSSH2_SYS_USE_PKG_CONFIG=1 \ | LIBSSH2_SYS_USE_PKG_CONFIG=1 \ | ||||
OPENSSL_DIR="${OPENSSLBASE}" | OPENSSL_DIR="${OPENSSLBASE}" | ||||
X_PY_CMD= ${PYTHON_CMD} ${WRKSRC}/x.py | X_PY_CMD= ${PYTHON_CMD} ${WRKSRC}/x.py | ||||
post-extract: | post-extract: | ||||
@${MKDIR} ${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}} | @${MKDIR} ${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}} | ||||
${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${_RUSTC_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}.tar.gz \ | ${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${_RUSTC_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX} \ | ||||
${WRKSRC}/build/cache/${_RUSTC_BOOTSTRAP}.tar.gz | ${WRKSRC}/build/cache/${_RUSTC_BOOTSTRAP}${EXTRACT_SUFX} | ||||
${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${_RUST_STD_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}.tar.gz \ | ${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${_RUST_STD_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX} \ | ||||
${WRKSRC}/build/cache/${_RUST_STD_BOOTSTRAP}.tar.gz | ${WRKSRC}/build/cache/${_RUST_STD_BOOTSTRAP}${EXTRACT_SUFX} | ||||
${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${_CARGO_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}.tar.gz \ | ${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${_CARGO_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX} \ | ||||
${WRKSRC}/build/cache/${_CARGO_BOOTSTRAP}.tar.gz | ${WRKSRC}/build/cache/${_CARGO_BOOTSTRAP}${EXTRACT_SUFX} | ||||
.if ${ARCH} == armv6 || ${ARCH} == armv7 | .if ${ARCH} == armv6 || ${ARCH} == armv7 | ||||
${LN} -sf ${WRKDIR}/compiler-rt-${COMPILER_RT_VERSION}.src ${WRKSRC}/src/llvm-project/compiler-rt | ${LN} -sf ${WRKDIR}/compiler-rt-${COMPILER_RT_VERSION}.src ${WRKSRC}/src/llvm-project/compiler-rt | ||||
.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 | ||||
@${ECHO_MSG} "Canonical bootstrap date and version before patching:" | @${ECHO_MSG} "Canonical bootstrap date and version before patching:" | ||||
@${GREP} -E '^(date|rustc|cargo)' ${WRKSRC}/src/stage0.txt | @${GREP} -E '^(date|rustc|cargo)' ${WRKSRC}/src/stage0.txt | ||||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |