Page MenuHomeFreeBSD

D24582.id.diff
No OneTemporary

D24582.id.diff

Index: head/lang/rust/Makefile
===================================================================
--- head/lang/rust/Makefile
+++ head/lang/rust/Makefile
@@ -14,7 +14,6 @@
${_RUST_STD_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap \
${_CARGO_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap
DIST_SUBDIR?= rust
-EXTRACT_ONLY?= ${DISTFILES:N*\:bootstrap:C/:.*//}
MAINTAINER= rust@FreeBSD.org
COMMENT= Language with a focus on memory safety and concurrency
@@ -100,29 +99,11 @@
IGNORE= fails to build with qemu-user-static
.endif
-post-extract:
- @${MKDIR} ${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}
- ${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${_RUSTC_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX} \
- ${WRKSRC}/build/cache/${_RUSTC_BOOTSTRAP}${EXTRACT_SUFX}
- ${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${_RUST_STD_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX} \
- ${WRKSRC}/build/cache/${_RUST_STD_BOOTSTRAP}${EXTRACT_SUFX}
- ${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${_CARGO_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX} \
- ${WRKSRC}/build/cache/${_CARGO_BOOTSTRAP}${EXTRACT_SUFX}
-
post-patch:
@${REINPLACE_CMD} 's,gdb,${LOCALBASE}/bin/gdb,' ${WRKSRC}/src/etc/rust-gdb
- @${ECHO_MSG} "Canonical bootstrap date and version before patching:"
- @${GREP} -E '^(date|rustc|cargo)' ${WRKSRC}/src/stage0.txt
-# If we override the versions and date of the bootstraps (for instance
-# on aarch64 where we provide our own bootstraps), we need to update
-# places where they are recorded.
- @${REINPLACE_CMD} -e 's,^date:.*,date: ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}},' \
- -e 's,^rustc:.*,rustc: ${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}},' \
- -e '/^rustfmt:/d' \
- -e 's,^cargo:.*,cargo: ${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}},' \
- ${WRKSRC}/src/stage0.txt
- @${ECHO_MSG} "Bootstrap date and version after patching:"
- @${GREP} -E '^(date|rustc|cargo)' ${WRKSRC}/src/stage0.txt
+.if defined(NIGHTLY_DATE)
+ @${REINPLACE_CMD} '/^rustfmt:/d' ${WRKSRC}/src/stage0.txt
+.endif
.if ${ARCH} == powerpc64
# Starting with 13.0 powerpc64 is ELFv2 while 12.0 is ELFv1. Pass the correct LLVM target triple.
@${REINPLACE_CMD} 's,powerpc64-unknown-freebsd,powerpc64-unknown-freebsd${OSREL},' \
@@ -141,6 +122,11 @@
# 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
+.for _component in cargo rust-std rustc
+ @cd ${WRKDIR}/${_component}-*-${OPSYS:tl} && \
+ ${SH} install.sh --disable-ldconfig --prefix=${WRKDIR}/bootstrap \
+ --verbose
+.endfor
@${ECHO_CMD} '[build]' > ${WRKSRC}/config.toml
@${ECHO_CMD} 'vendor=true' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'extended=true' >> ${WRKSRC}/config.toml
@@ -148,6 +134,8 @@
@${ECHO_CMD} 'docs=${_RUST_BUILD_DOCS}' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'verbose=2' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'target=[${_RUST_TARGETS:@.target.@"${.target.}"@:ts,}]' >> ${WRKSRC}/config.toml
+ @${ECHO_CMD} 'cargo="${WRKDIR}/bootstrap/bin/cargo"' >> ${WRKSRC}/config.toml
+ @${ECHO_CMD} 'rustc="${WRKDIR}/bootstrap/bin/rustc"' >> ${WRKSRC}/config.toml
@${ECHO_CMD} '[install]' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'prefix="${PREFIX}"' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'sysconfdir="${PREFIX}/etc"' >> ${WRKSRC}/config.toml

File Metadata

Mime Type
text/plain
Expires
Wed, Feb 25, 2:24 PM (7 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28989735
Default Alt Text
D24582.id.diff (3 KB)

Event Timeline