Changeset View
Changeset View
Standalone View
Standalone View
lang/rust/Makefile
# Created by: Jyun-Yan You <jyyou@cs.nctu.edu.tw> | # Created by: Jyun-Yan You <jyyou@cs.nctu.edu.tw> | ||||
PORTNAME= rust | PORTNAME= rust | ||||
PORTVERSION?= 1.59.0 | PORTVERSION?= 1.60.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/tobik/rust:bootstrap \ | LOCAL/rust:bootstrap \ | ||||
tobik: Just `LOCAL/rust` | |||||
LOCAL/mikael/rust:bootstrap \ | |||||
https://static.rust-lang.org/dist/:bootstrap | https://static.rust-lang.org/dist/:bootstrap | ||||
Not Done Inline ActionsWe should only have one of those. Remove mine. I'm going to ask clusteradm if we can have a /home/rust on freefall. Other groups also have one. tobik: We should only have one of those. Remove mine. I'm going to ask clusteradm if we can have a… | |||||
DISTNAME?= ${PORTNAME}c-${PORTVERSION}-src | DISTNAME?= ${PORTNAME}c-${PORTVERSION}-src | ||||
DISTFILES?= ${NIGHTLY_DATE:D${NIGHTLY_DATE}/}${DISTNAME}${EXTRACT_SUFX}:src \ | DISTFILES?= ${NIGHTLY_DATE:D${NIGHTLY_DATE}/}${DISTNAME}${EXTRACT_SUFX}:src \ | ||||
Context not available. | |||||
BUILD_DEPENDS= cmake:devel/cmake | BUILD_DEPENDS= cmake:devel/cmake | ||||
LIB_DEPENDS= libcurl.so:ftp/curl | LIB_DEPENDS= libcurl.so:ftp/curl | ||||
USES= cpe ninja:build pkgconfig python:3.6+,build ssl tar:xz | USES= cpe ninja:build pkgconfig python:3.7+,build shebangfix ssl tar:xz | ||||
CPE_VENDOR= rust-lang | CPE_VENDOR= rust-lang | ||||
Context not available. | |||||
OPTIONS_DEFINE= DOCS GDB SOURCES WASM | OPTIONS_DEFINE= DOCS GDB SOURCES WASM | ||||
OPTIONS_DEFAULT= SOURCES WASM | OPTIONS_DEFAULT= SOURCES WASM | ||||
OPTIONS_EXCLUDE_armv6= DOCS | OPTIONS_EXCLUDE= DOCS # https://github.com/rust-lang/rust/issues/76526 | ||||
GDB_DESC= Install ports gdb (necessary for debugging rust programs) | GDB_DESC= Install ports gdb (necessary for debugging rust programs) | ||||
SOURCES_DESC= Install source files | SOURCES_DESC= Install source files | ||||
Context not available. | |||||
DOCS_VARS= _RUST_BUILD_DOCS=true | DOCS_VARS= _RUST_BUILD_DOCS=true | ||||
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= _COMPONENTS+=rust-src-${_PACKAGE_VERS} \ | ||||
WASM_VARS= _RUST_BUILD_WASM=true \ | _RUST_TOOLS+=src | ||||
WASM_VARS= _COMPONENTS+="rust-analysis-${_PACKAGE_VERS}-wasm32-unknown-unknown rust-std-${_PACKAGE_VERS}-wasm32-unknown-unknown" \ | |||||
_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.json for the date and version values | # See WRKSRC/src/stage0.json for the date and version values | ||||
BOOTSTRAPS_DATE?= 2022-01-20 | BOOTSTRAPS_DATE?= 2022-02-24 | ||||
RUST_BOOTSTRAP_VERSION?= 1.58.1 | RUST_BOOTSTRAP_VERSION?= 1.59.0 | ||||
BOOTSTRAPS_SUFFIX?= ${BOOTSTRAPS_SUFFIX_${ARCH}} | BOOTSTRAPS_SUFFIX?= ${BOOTSTRAPS_SUFFIX_${ARCH}} | ||||
BOOTSTRAPS_SUFFIX_powerpc64?= -${PPC_ABI:tl} | BOOTSTRAPS_SUFFIX_powerpc64?= -${PPC_ABI:tl} | ||||
Context not available. | |||||
_RUST_STD_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rust-std-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${_RUST_TARGET} | _RUST_STD_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rust-std-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${_RUST_TARGET} | ||||
_CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${_RUST_TARGET} | _CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${_RUST_TARGET} | ||||
_PACKAGE_VERS= ${NIGHTLY_DATE:?nightly:${PORTVERSION}} | |||||
_COMPONENTS+= cargo-${_PACKAGE_VERS}-${_RUST_TARGET} \ | |||||
clippy-${_PACKAGE_VERS}-${_RUST_TARGET} \ | |||||
rustc-${_PACKAGE_VERS}-${_RUST_TARGET} \ | |||||
rustfmt-${_PACKAGE_VERS}-${_RUST_TARGET} \ | |||||
rust-analysis-${_PACKAGE_VERS}-${_RUST_TARGET} \ | |||||
rust-std-${_PACKAGE_VERS}-${_RUST_TARGET} | |||||
# https://github.com/bjorn3/rustc_codegen_cranelift/commit/83d470d91c15d0cb5890705291e6ee9e5be8a842 | |||||
# https://github.com/rust-lang/rustc_codegen_gcc/pull/160 | |||||
SHEBANG_FILES= compiler/rustc_codegen_cranelift/scripts/* \ | |||||
compiler/rustc_codegen_gcc/*.sh compiler/rustc_codegen_gcc/build_sysroot/*.sh | |||||
.include <bsd.port.pre.mk> | .include <bsd.port.pre.mk> | ||||
.if ${OPSYS} != FreeBSD | .if ${OPSYS} != FreeBSD | ||||
Context not available. | |||||
BUILD_DEPENDS+= ld.bfd:devel/binutils | BUILD_DEPENDS+= ld.bfd:devel/binutils | ||||
.else | .else | ||||
MAKE_ENV+= RUST_BACKTRACE=1 | MAKE_ENV+= RUST_BACKTRACE=1 | ||||
# rls needs 64-bit atomics | .endif | ||||
# rls doesn't build on rust nightly | |||||
# rls needs 64-bit atomics: it doesn't build on powerpc | |||||
.if !defined(NIGHTLY_DATE) && ${ARCH} != powerpc | |||||
_RUST_TOOLS+= rls | _RUST_TOOLS+= rls | ||||
_COMPONENTS+= rls-${_PACKAGE_VERS}-${_RUST_TARGET} | |||||
.endif | |||||
# per https://rust-lang.github.io/rustup/concepts/components.html | |||||
# rustc-dev is only usefull on nightly | |||||
Not Done Inline ActionsThis reenables rls on powerpc but it's excluded just above. tobik: This reenables rls on powerpc but it's excluded just above. | |||||
.if defined(NIGHTLY_DATE) | |||||
_COMPONENTS+= rustc-dev-${_PACKAGE_VERS}-${_RUST_TARGET} | |||||
Not Done Inline ActionsShould it use ${_PACKAGE_VERS} too? tobik: Should it use `${_PACKAGE_VERS}` too? | |||||
.endif | .endif | ||||
.if exists(${PATCHDIR}/${ARCH}${BOOTSTRAPS_SUFFIX}) | .if exists(${PATCHDIR}/${ARCH}${BOOTSTRAPS_SUFFIX}) | ||||
Not Done Inline ActionsOptions helpers? WASM_VARS= _COMPONENTS+="rust-analysis-${_PACKAGE_VERS}-wasm32-unknown-unknown rust-std-${_PACKAGE_VERS}-wasm32-unknown-unknown" tobik: Options helpers?
```
WASM_VARS= _COMPONENTS+="rust-analysis-${_PACKAGE_VERS}-wasm32… | |||||
Context not available. | |||||
do-build: | do-build: | ||||
@cd ${WRKSRC} && \ | @cd ${WRKSRC} && \ | ||||
${SETENV} ${MAKE_ENV} ${PYTHON_CMD} x.py build --jobs=${MAKE_JOBS_NUMBER} | ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} x.py dist --jobs=${MAKE_JOBS_NUMBER} | ||||
do-install: | do-install: | ||||
@cd ${WRKSRC} && \ | ${RM} -r ${WRKDIR}/_extractdist | ||||
${SETENV} ${MAKE_ENV} ${PYTHON_CMD} x.py install --jobs=${MAKE_JOBS_NUMBER} | .for _c in ${_COMPONENTS} | ||||
${MKDIR} ${WRKDIR}/_extractdist | |||||
${TAR} xf ${WRKDIR}/_build/dist/${_c}.tar.xz -C ${WRKDIR}/_extractdist | |||||
cd ${WRKDIR}/_extractdist/${_c} && \ | |||||
${SH} install.sh \ | |||||
--docdir="${STAGEDIR}${DOCSDIR}" \ | |||||
--mandir="${STAGEDIR}${PREFIX}/share/man" \ | |||||
--prefix="${STAGEDIR}${PREFIX}" | |||||
${RM} -r ${WRKDIR}/_extractdist | |||||
.endfor | |||||
# We autogenerate the plist file. We do that, instead of the | # We autogenerate the plist file. We do that, instead of the | ||||
# regular pkg-plist, because several libraries have a computed | # regular pkg-plist, because several libraries have a computed | ||||
# filename based on the absolute path of the source files. As it | # filename based on the absolute path of the source files. As it | ||||
# is user-specific, we cannot know their filename in advance. | # is user-specific, we cannot know their filename in advance. | ||||
@${RM} -r ${STAGEDIR}${DOCSDIR}/*.old \ | @${RM} ${STAGEDIR}${DOCSDIR}/*.old \ | ||||
${STAGEDIR}${DOCSDIR}/html/.lock \ | ${STAGEDIR}${PREFIX}/lib/rustlib/components \ | ||||
${STAGEDIR}${DOCSDIR}/html/.stamp \ | |||||
${STAGEDIR}${PREFIX}/lib/rustlib/install.log \ | ${STAGEDIR}${PREFIX}/lib/rustlib/install.log \ | ||||
${STAGEDIR}${PREFIX}/lib/rustlib/manifest-* \ | ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-* \ | ||||
${STAGEDIR}${PREFIX}/lib/rustlib/rust-installer-version \ | |||||
${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh | ${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh | ||||
@${FIND} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/lib \ | @${FIND} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/lib \ | ||||
${STAGEDIR}${PREFIX}/libexec -exec ${FILE} -i {} + | \ | ${STAGEDIR}${PREFIX}/libexec -exec ${FILE} -i {} + | \ | ||||
Context not available. |
Just LOCAL/rust