aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2017-07-28 18:18:54 +0800
committerdumbbell <dumbbell@FreeBSD.org>2017-07-28 18:18:54 +0800
commitad7923b7198593b7e9af947a0cf942f6524bbfd6 (patch)
tree834ac84ad6ef9984deb2409ee2e084e635cc31e2 /lang
parent3cfff4a6add61f772477b798c408ee404d62a50a (diff)
downloadfreebsd-ports-gnome-ad7923b7198593b7e9af947a0cf942f6524bbfd6.tar.gz
freebsd-ports-gnome-ad7923b7198593b7e9af947a0cf942f6524bbfd6.tar.zst
freebsd-ports-gnome-ad7923b7198593b7e9af947a0cf942f6524bbfd6.zip
lang/rust: Update to 1.19.0
The main change in the port is the switch from configure+make to the `x.py` build script. This is the recommended way of building Rust. It takes a configuration file, `config.toml`, which, in the port case, indicates: * where to install things; * which release channel to use; * where to find Python and llvm-config; * if documentation should be also built. The build process should now honor ${MAKE_JOBS_NUMBER} instead of always using all available CPU cores. The Cargo registry archive is significantly larger. It includes the whole registry index (not only the crates needed by Rust). If the index is missing, Cargo wants to download it from crates.io and I couldn't find a way to convince it skip it. New bootstraps for FreeBSD/aarch64 were prepared for this update. Those are based on Rust 1.18.0 and Cargo 0.19.0. CONFLICTS_BUILD with installed lang/rust and lang/rust-nightly is commented out for now. I couldn't see any build failure with an installed lang/rust so it looks promising. But I couldn't test with an installed lang/rust-nightly because the latter is marked BROKEN for now. Once it's restored, I'll do more testing and hopefully completely remove this CONFLICTS_BUILD variables.
Diffstat (limited to 'lang')
-rw-r--r--lang/rust/Makefile126
-rw-r--r--lang/rust/distinfo46
-rw-r--r--lang/rust/files/config.toml22
-rw-r--r--lang/rust/files/patch-configure10
-rw-r--r--lang/rust/files/patch-src_compiler-rt_cmake_base-config-ix.cmake26
5 files changed, 125 insertions, 105 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index 7b78614e89dc..95ef996d71a9 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= rust
-PORTVERSION?= 1.18.0
+PORTVERSION?= 1.19.0
CATEGORIES= lang
MASTER_SITES= http://static.rust-lang.org/dist/:src \
https://static.rust-lang.org/dist/:rust_bootstrap \
@@ -42,22 +42,21 @@ ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap compiler
# FIXME: The bootstrapped rustc adds -L/usr/local/lib in front of
# the LDFLAGS. When stage0's rustc is linked, it picks the installed
# librust*so and fails.
-CONFLICTS_BUILD?= rust-nightly
-CONFLICTS_BUILD+= ${PKGBASE}
+#CONFLICTS_BUILD?= rust-nightly
+#CONFLICTS_BUILD+= ${PKGBASE}
CONFLICTS_INSTALL?= rust-nightly
-RUST_BOOTSTRAP_DIR?= 2017-04-27
-RUST_BOOTSTRAP_DIR_aarch64?= 2017-04-24
-RUST_BOOTSTRAP_VERSION?= 1.17.0
-RUST_BOOTSTRAP_VERSION_aarch64?=1.17.0
-RUSTC_BOOTSTRAP= ${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}}/rustc-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz
-RUST_STD_BOOTSTRAP= ${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}}/rust-std-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz
-
-CARGO_BOOTSTRAP_DIR?= ${RUST_BOOTSTRAP_DIR}
-CARGO_BOOTSTRAP_DIR_aarch64?= ${RUST_BOOTSTRAP_DIR_aarch64}
-CARGO_BOOTSTRAP_VERSION?= 0.18.0
-CARGO_BOOTSTRAP_VERSION_aarch64?=0.18.0
-CARGO_BOOTSTRAP= ${CARGO_BOOTSTRAP_DIR_${ARCH}:U${CARGO_BOOTSTRAP_DIR}}/cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${RUST_TARGET}${EXTRACT_SUFX}
+BOOTSTRAPS_DATE?= 2017-06-08
+BOOTSTRAPS_DATE_aarch64?= 2017-06-08
+
+RUST_BOOTSTRAP_VERSION?= 1.18.0
+RUST_BOOTSTRAP_VERSION_aarch64?=1.18.0
+RUSTC_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rustc-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz
+RUST_STD_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rust-std-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz
+
+CARGO_BOOTSTRAP_VERSION?= 0.19.0
+CARGO_BOOTSTRAP_VERSION_aarch64?=0.19.0
+CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${RUST_TARGET}${EXTRACT_SUFX}
CARGO_REGISTRY= ${PORTNAME}-registry-${DISTVERSIONFULL}.tar.xz
RUST_CHANNEL= ${PKGNAMESUFFIX:Ustable:S/^-//}
@@ -71,36 +70,19 @@ RUST_TARGET= ${RUST_ARCH_${ARCH}}-unknown-${OPSYS:tl}
PLIST_SUB+= RUST_TARGET=${RUST_TARGET}
USES= compiler gmake libedit python:2.7,build
-HAS_CONFIGURE= yes
-CONFIGURE_ARGS= --disable-valgrind \
- ${CHOSEN_COMPILER_TYPE:Mclang:C/.+/--enable-&/} \
- --prefix=${PREFIX} \
- --musl-root=${PREFIX} \
- --local-rust-root=${PREFIX} \
- --mandir=${MANPREFIX}/man \
- --release-channel=${RUST_CHANNEL} \
- --python="${PYTHON_CMD}"
-
-MAKE_ARGS+= VERBOSE=1
OPTIONS_DEFINE= DOCS GDB LLNEXTGEN PORT_LLVM
GDB_DESC= Install ports gdb (necessary for debugging rust programs)
LLNEXTGEN_DESC= Build with grammar verification
-DOCS_CONFIGURE_ENABLE= docs
GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb
LLNEXTGEN_BUILD_DEPENDS= LLnextgen:devel/llnextgen
# Rust may pass more regression tests with bundled LLVM
PORT_LLVM_DESC= Build against devel/llvm${LLVM_VER} instead of bundled version
PORT_LLVM_BUILD_DEPENDS= ${LLVM_PREFIX}/bin/FileCheck:devel/llvm${LLVM_VER}
-PORT_LLVM_CONFIGURE_ON= --llvm-root=${LLVM_PREFIX}
LLVM_VER?= 40
-LLVM_PREFIX= ${LOCALBASE}/llvm${LLVM_VER}
-
-# Note that make test does not work when rust is already installed
-TEST_TARGET= check
-TEST_ENV+= ALLOW_NONZERO_RLIMIT_CORE=1
+LLVM_CONFIG= ${LOCALBASE}/bin/llvm-config${LLVM_VER}
# Rust manifests list all files and directories installed by rust-installer.
# We use them in:
@@ -119,6 +101,9 @@ PLIST_FILES= lib/rustlib/components \
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ino64
.endif
+X_PY_ENV = HOME=${WRKDIR}
+X_PY_CMD = ${PYTHON_CMD} ${WRKSRC}/x.py
+
pre-fetch:
# FIXME: This is the same check for CONFLICTS as the standard
# one, except port origins are not compared. This allows
@@ -151,16 +136,16 @@ STDF= ${LIBSTD:T:R:S/lib//}.0.o
post-extract:
@${MKDIR} \
- ${WRKSRC}/build/cache/${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}} \
- ${WRKSRC}/build/cache/${CARGO_BOOTSTRAP_DIR_${ARCH}:U${CARGO_BOOTSTRAP_DIR}}
+ ${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}} \
+ ${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}
${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${RUSTC_BOOTSTRAP} \
- ${WRKSRC}/build/cache/${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}}
+ ${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}
.if ${OPSYS} != FreeBSD || ${OSVERSION} < 1200031
${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${RUST_STD_BOOTSTRAP} \
- ${WRKSRC}/build/cache/${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}}
+ ${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}
.endif
${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${CARGO_BOOTSTRAP} \
- ${WRKSRC}/build/cache/${CARGO_BOOTSTRAP_DIR_${ARCH}:U${CARGO_BOOTSTRAP_DIR}}
+ ${WRKSRC}/build/cache/${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200031
${TAR} -x -C ${WRKSRC} -f ${DISTDIR}/${DIST_SUBDIR}/${RUST_STD_BOOTSTRAP}
${CC} ${CFLAGS} -fPIC -c -o ${WRKSRC}/old_fstat.o ${FILESDIR}/old_fstat.c
@@ -173,27 +158,58 @@ post-extract:
.endif
post-patch:
- @test ! -f ${WRKSRC}/mk/main.mk || \
- ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
- ${WRKSRC}/mk/main.mk
@${REINPLACE_CMD} -e 's|gdb|${LOCALBASE}/bin/gdb|' \
${WRKSRC}/src/etc/rust-gdb
- @if test "${RUST_BOOTSTRAP_DIR_${ARCH}}" -o "${RUST_BOOTSTRAP_VERSION_${ARCH}}"; then \
+ @if test "${BOOTSTRAPS_DATE_${ARCH}}"; then \
${REINPLACE_CMD} -e \
- 's|^rustc:.*|rustc: ${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}}|' \
+ 's|^date:.*|date: ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}|' \
${WRKSRC}/src/stage0.txt; \
fi
- @if test "${CARGO_BOOTSTRAP_DIR_${ARCH}}"; then \
+ @if test "${RUST_BOOTSTRAP_VERSION_${ARCH}}"; then \
${REINPLACE_CMD} -e \
- 's|^cargo:.*|cargo: ${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}}|' \
+ 's|^rustc:.*|rustc: ${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}|' \
${WRKSRC}/src/stage0.txt; \
fi
@if test "${CARGO_BOOTSTRAP_VERSION_${ARCH}}"; then \
${REINPLACE_CMD} -e \
+ 's|^cargo:.*|cargo: ${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}|' \
+ ${WRKSRC}/src/stage0.txt; \
+ ${REINPLACE_CMD} -e \
's|cargo-nightly-|cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-|' \
${WRKSRC}/src/bootstrap/bootstrap.py; \
fi
+do-configure:
+ ${SED} -E \
+ -e 's,%PREFIX%,${PREFIX},' \
+ -e 's,%SYSCONFDIR%,${PREFIX}/etc,' \
+ -e 's,%MANDIR%,${MANPREFIX}/man,' \
+ -e 's,%PYTHON_CMD%,${PYTHON_CMD},' \
+ -e 's,%CHANNEL%,${RUST_CHANNEL},' \
+ -e 's,%TARGET%,${RUST_TARGET},' \
+ < ${FILESDIR}/config.toml \
+ > ${WRKSRC}/config.toml
+
+post-configure-DOCS-on:
+ ${REINPLACE_CMD} -e 's,%DOCS%,true,' ${WRKSRC}/config.toml
+
+post-configure-DOCS-off:
+ ${REINPLACE_CMD} -e 's,%DOCS%,false,' ${WRKSRC}/config.toml
+
+post-configure-PORT_LLVM-on:
+ ${REINPLACE_CMD} -e 's,%LLVM_CONFIG%,${LLVM_PREFIX},' ${WRKSRC}/config.toml
+
+post-configure-PORT_LLVM-off:
+ ${REINPLACE_CMD} -e '/%LLVM_CONFIG%/d' ${WRKSRC}/config.toml
+
+do-build:
+ cd ${WRKSRC} && \
+ ${SETENV} ${X_PY_ENV} \
+ ${X_PY_CMD} build \
+ --verbose \
+ --config ./config.toml \
+ --jobs ${MAKE_JOBS_NUMBER}
+
# In case the previous "make stage" failed, this ensures rust's
# install.sh won't backup previously staged files before reinstalling
# new ones. Otherwise, the staging directory is polluted with unneeded
@@ -211,6 +227,15 @@ pre-install:
${RM} "${STAGEDIR}${PREFIX}/$$f"; \
done
+do-install:
+ cd ${WRKSRC} && \
+ ${SETENV} ${X_PY_ENV} \
+ DESTDIR=${STAGEDIR} \
+ ${X_PY_CMD} install \
+ --verbose \
+ --config ./config.toml \
+ --jobs ${MAKE_JOBS_NUMBER}
+
# In post-install, we use the manifests generated during Rust install
# to in turn generate the PLIST. We do that, instead of the regular
# `pkg-plist`, because several libraries have a computed filename based
@@ -251,6 +276,16 @@ post-install:
${STAGEDIR}${PREFIX}/lib/*.so \
${STAGEDIR}${PREFIX}/lib/rustlib/*/lib/*.so
+# Note that make test does not work when rust is already installed.
+do-test:
+ cd ${WRKSRC} && \
+ ${SETENV} ${X_PY_ENV} \
+ ALLOW_NONZERO_RLIMIT_CORE=1 \
+ ${X_PY_CMD} test \
+ --verbose \
+ --config ./config.toml \
+ --jobs ${MAKE_JOBS_NUMBER}
+
.include <bsd.port.post.mk>
# "make gen-registry" is a special target to ease this port update.
@@ -268,7 +303,6 @@ gen-registry:
--exclude 'src/*/benches/' \
--exclude 'src/*/ci/' \
--exclude 'src/*/examples/' \
- --exclude 'src/*/tests/' \
--exclude 'index/github.com-*/.git/' \
.cargo
${MAKE} -C${.CURDIR} makesum
diff --git a/lang/rust/distinfo b/lang/rust/distinfo
index f4b1c17cb5f1..dfd5ff90e525 100644
--- a/lang/rust/distinfo
+++ b/lang/rust/distinfo
@@ -1,23 +1,23 @@
-TIMESTAMP = 1497099586
-SHA256 (rust/2017-04-27/rustc-1.17.0-x86_64-unknown-freebsd.tar.gz) = 7eb40cae153251596668a76ff8d4852a6d40249d8d0bc11dc8e15f58379c63e7
-SIZE (rust/2017-04-27/rustc-1.17.0-x86_64-unknown-freebsd.tar.gz) = 41907092
-SHA256 (rust/2017-04-27/rust-std-1.17.0-x86_64-unknown-freebsd.tar.gz) = 2ddbd37c51b9d6496448393ccf1940f3dd8f44720205f869cf98e151b4faeafe
-SIZE (rust/2017-04-27/rust-std-1.17.0-x86_64-unknown-freebsd.tar.gz) = 56083145
-SHA256 (rust/2017-04-27/cargo-0.18.0-x86_64-unknown-freebsd.tar.gz) = 171147f876c08cf82a6da60fabf737fd580df90e2fec9c57368642beaea67450
-SIZE (rust/2017-04-27/cargo-0.18.0-x86_64-unknown-freebsd.tar.gz) = 5039329
-SHA256 (rust/rustc-1.18.0-src.tar.gz) = d2dc36e99b9e2269488b2bcddde43c234e6bde03edf70cba82a027ff49c36111
-SIZE (rust/rustc-1.18.0-src.tar.gz) = 33111774
-SHA256 (rust/2017-04-27/rustc-1.17.0-i686-unknown-freebsd.tar.gz) = c6d9685862ad8c539698e8d2a936598bb5d57c8cd074e03c66aa4367453ddf50
-SIZE (rust/2017-04-27/rustc-1.17.0-i686-unknown-freebsd.tar.gz) = 43636047
-SHA256 (rust/2017-04-27/rust-std-1.17.0-i686-unknown-freebsd.tar.gz) = 51304792a00ce0009be97f802511df0bd18abae3892ddc3f3828fa60e94996ff
-SIZE (rust/2017-04-27/rust-std-1.17.0-i686-unknown-freebsd.tar.gz) = 57341618
-SHA256 (rust/2017-04-27/cargo-0.18.0-i686-unknown-freebsd.tar.gz) = 30ec4cfc667e3a8fca3cb0377b6a6f5dbcd19ad7143046db24e37432646e60a2
-SIZE (rust/2017-04-27/cargo-0.18.0-i686-unknown-freebsd.tar.gz) = 4914461
-SHA256 (rust/2017-04-24/rustc-1.17.0-aarch64-unknown-freebsd.tar.gz) = 85c234018cfc7548051d6f726a379ba2c37b80c393a74a96e7212a0c4e15e92e
-SIZE (rust/2017-04-24/rustc-1.17.0-aarch64-unknown-freebsd.tar.gz) = 33612511
-SHA256 (rust/2017-04-24/rust-std-1.17.0-aarch64-unknown-freebsd.tar.gz) = a86d963998cce1f357cbb748c0cd45307255eac964181f3879348e44faf6772c
-SIZE (rust/2017-04-24/rust-std-1.17.0-aarch64-unknown-freebsd.tar.gz) = 43207694
-SHA256 (rust/2017-04-24/cargo-0.18.0-aarch64-unknown-freebsd.tar.gz) = 8cdbf046bfc98e1cb92b89c306e4389b92a8df9db44b8f7c784aaac25ad52877
-SIZE (rust/2017-04-24/cargo-0.18.0-aarch64-unknown-freebsd.tar.gz) = 2935624
-SHA256 (rust/rust-registry-1.18.0.tar.xz) = 86c74c61aec5b94c9db9f569e6aa5cfeab2dde2a4ba73ea1da4c7320b31f5b36
-SIZE (rust/rust-registry-1.18.0.tar.xz) = 7714840
+TIMESTAMP = 1501024073
+SHA256 (rust/rustc-1.19.0-src.tar.gz) = 15231f5053fb72ad82be91f5abfd6aa60cb7898c5089e4f1ac5910a731090c51
+SIZE (rust/rustc-1.19.0-src.tar.gz) = 50108626
+SHA256 (rust/2017-06-08/rustc-1.18.0-aarch64-unknown-freebsd.tar.gz) = 96725ef360259d5726136b9c82c22283b5ee41ab62e261717580b77cccd915c6
+SIZE (rust/2017-06-08/rustc-1.18.0-aarch64-unknown-freebsd.tar.gz) = 38409516
+SHA256 (rust/2017-06-08/rust-std-1.18.0-aarch64-unknown-freebsd.tar.gz) = dae0984ed497d7feb36d93767f45d7e0be120d875f8009eb4e3163f0fc7f4d71
+SIZE (rust/2017-06-08/rust-std-1.18.0-aarch64-unknown-freebsd.tar.gz) = 52571812
+SHA256 (rust/2017-06-08/cargo-0.19.0-aarch64-unknown-freebsd.tar.gz) = 2a59c386889941f11addfb0823d6345a48e1319a2a76a91d315919444c3747e9
+SIZE (rust/2017-06-08/cargo-0.19.0-aarch64-unknown-freebsd.tar.gz) = 2853548
+SHA256 (rust/2017-06-08/rustc-1.18.0-i686-unknown-freebsd.tar.gz) = d0dfb43b3d0329c2ff48e38c44e81bdd3fbc6b3cb916de5aa5a3f1e27801ade9
+SIZE (rust/2017-06-08/rustc-1.18.0-i686-unknown-freebsd.tar.gz) = 49269996
+SHA256 (rust/2017-06-08/rust-std-1.18.0-i686-unknown-freebsd.tar.gz) = 6f36fc3583c1b2f7d28216c70c5d77ce929460ba5443f1b40f668c38ac28702a
+SIZE (rust/2017-06-08/rust-std-1.18.0-i686-unknown-freebsd.tar.gz) = 67898201
+SHA256 (rust/2017-06-08/cargo-0.19.0-i686-unknown-freebsd.tar.gz) = 18a124f9d08eb51bc126908f7c77c7384924f74d09310261d03ab53d82707cb2
+SIZE (rust/2017-06-08/cargo-0.19.0-i686-unknown-freebsd.tar.gz) = 5057154
+SHA256 (rust/2017-06-08/rustc-1.18.0-x86_64-unknown-freebsd.tar.gz) = d019bb674b7656de42b5c2562e1cc391ab5d93137254e160c0def1ad6df2a04a
+SIZE (rust/2017-06-08/rustc-1.18.0-x86_64-unknown-freebsd.tar.gz) = 47361127
+SHA256 (rust/2017-06-08/rust-std-1.18.0-x86_64-unknown-freebsd.tar.gz) = de7f3bc0c0ea1f21e4809945c891cd82c91eb016af6b9d3d9e171d024a21c66c
+SIZE (rust/2017-06-08/rust-std-1.18.0-x86_64-unknown-freebsd.tar.gz) = 66585539
+SHA256 (rust/2017-06-08/cargo-0.19.0-x86_64-unknown-freebsd.tar.gz) = a8d45ad508ecbe9ec9e19fddabda4476466486f97cfb1b59d0a43a1012acb788
+SIZE (rust/2017-06-08/cargo-0.19.0-x86_64-unknown-freebsd.tar.gz) = 5176510
+SHA256 (rust/rust-registry-1.19.0.tar.xz) = 7f1d5b33ba11bbb05e468317680b54a61557e087e0d0deb0d69c2535f1b61146
+SIZE (rust/rust-registry-1.19.0.tar.xz) = 28571276
diff --git a/lang/rust/files/config.toml b/lang/rust/files/config.toml
new file mode 100644
index 000000000000..00fb73b7c908
--- /dev/null
+++ b/lang/rust/files/config.toml
@@ -0,0 +1,22 @@
+[build]
+
+# python(1) location.
+python = "%PYTHON_CMD%"
+
+# Do we want to build docs?
+docs = %DOCS%
+
+[install]
+
+# Install location.
+prefix = "%PREFIX%"
+sysconfdir = "%SYSCONFDIR%"
+mandir = "%MANDIR%"
+
+[rust]
+
+# Rust release channel.
+channel = "%CHANNEL%"
+
+[target.%TARGET%]
+llvm-config = "%LLVM_CONFIG%"
diff --git a/lang/rust/files/patch-configure b/lang/rust/files/patch-configure
deleted file mode 100644
index 4cac88fac1e2..000000000000
--- a/lang/rust/files/patch-configure
+++ /dev/null
@@ -1,10 +0,0 @@
---- configure.orig 2016-08-16 01:54:35 UTC
-+++ configure
-@@ -726,7 +726,6 @@ if [ -n "$CFG_ENABLE_ORBIT" ]; then putv
-
- step_msg "looking for build programs"
-
--probe_need CFG_CURL curl
- if [ -z "$CFG_PYTHON_PROVIDED" ]; then
- probe_need CFG_PYTHON python2.7 python2 python
- fi
diff --git a/lang/rust/files/patch-src_compiler-rt_cmake_base-config-ix.cmake b/lang/rust/files/patch-src_compiler-rt_cmake_base-config-ix.cmake
deleted file mode 100644
index 9e7bc2fdea7b..000000000000
--- a/lang/rust/files/patch-src_compiler-rt_cmake_base-config-ix.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
---- src/compiler-rt/cmake/base-config-ix.cmake.orig 2016-09-27 07:17:10 UTC
-+++ src/compiler-rt/cmake/base-config-ix.cmake
-@@ -118,20 +118,9 @@ macro(test_targets)
- set(COMPILER_RT_OS_SUFFIX "-android")
- elseif(NOT APPLE) # Supported archs for Apple platforms are generated later
- if("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "i[2-6]86|x86|amd64")
-- if(NOT MSVC)
-- test_target_arch(x86_64 "" "-m64")
-- # FIXME: We build runtimes for both i686 and i386, as "clang -m32" may
-- # target different variant than "$CMAKE_C_COMPILER -m32". This part should
-- # be gone after we resolve PR14109.
-- test_target_arch(i686 __i686__ "-m32")
-- test_target_arch(i386 __i386__ "-m32")
-- else()
-- if (CMAKE_SIZEOF_VOID_P EQUAL 4)
-- test_target_arch(i386 "" "")
-- else()
-- test_target_arch(x86_64 "" "")
-- endif()
-- endif()
-+ test_target_arch(x86_64 "" "")
-+ test_target_arch(i686 "" "")
-+ test_target_arch(i386 "" "")
- elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc")
- TEST_BIG_ENDIAN(HOST_IS_BIG_ENDIAN)
- if(HOST_IS_BIG_ENDIAN)