From e77ee9ecebd2fffc331f1fbec1d70453008375b9 Mon Sep 17 00:00:00 2001 From: its-pointless Date: Fri, 20 Dec 2019 09:12:16 +1100 Subject: [PATCH] rust update --- packages/rust/build.sh | 19 ++++++++++++------- packages/rust/config.toml | 2 +- packages/rust/rust-std-wasm32.subpackage.sh | 1 - packages/rust/rustc-dev.subpackage.sh | 3 +++ 4 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 packages/rust/rustc-dev.subpackage.sh diff --git a/packages/rust/build.sh b/packages/rust/build.sh index 13b637bd7..a431cc7d0 100644 --- a/packages/rust/build.sh +++ b/packages/rust/build.sh @@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.rust-lang.org/ TERMUX_PKG_DESCRIPTION="Systems programming language focused on safety, speed and concurrency" TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_MAINTAINER="Kevin Cotugno @kcotugno" -TERMUX_PKG_VERSION=1.39.0 +TERMUX_PKG_VERSION=1.40.0 TERMUX_PKG_SRCURL=https://static.rust-lang.org/dist/rustc-$TERMUX_PKG_VERSION-src.tar.xz -TERMUX_PKG_SHA256=4b0dbb356070687a606034f71dc032b783bbf8b5d3f9fff39f2c1fbc4f171c29 +TERMUX_PKG_SHA256=6e2aa3a91697f4b225c6b394cbae6b97666f061dba491f666a5281698fe2aace TERMUX_PKG_DEPENDS="libc++, clang, openssl, lld, zlib, libllvm" termux_step_configure() { @@ -18,8 +18,9 @@ termux_step_configure() { # like 30 to 40 + minutes ... so lets get it right # upstream only tests build ver one version behind $TERMUX_PKG_VERSION - rustup install 1.38.0 - export PATH=$HOME/.rustup/toolchains/1.38.0-x86_64-unknown-linux-gnu/bin:$PATH + rustup install 1.39.0 + rustup default 1.39.0-x86_64-unknown-linux-gnu + export PATH=$HOME/.rustup/toolchains/1.39.0-x86_64-unknown-linux-gnu/bin:$PATH local RUSTC=$(which rustc) local CARGO=$(which cargo) @@ -53,13 +54,17 @@ termux_step_make() { return 0; } termux_step_make_install() { - $TERMUX_PKG_SRCDIR/x.py dist --stage 2 --host $CARGO_TARGET_NAME --target $CARGO_TARGET_NAME --target wasm32-unknown-unknown || true - $TERMUX_PKG_SRCDIR/x.py install --stage 2 --host $CARGO_TARGET_NAME --target $CARGO_TARGET_NAME --target wasm32-unknown-unknown + $TERMUX_PKG_SRCDIR/x.py dist librustc --host $CARGO_TARGET_NAME --target $CARGO_TARGET_NAME --target wasm32-unknown-unknown + $TERMUX_PKG_SRCDIR/x.py dist rustc-dev --host $CARGO_TARGET_NAME --target $CARGO_TARGET_NAME --target wasm32-unknown-unknown + $TERMUX_PKG_SRCDIR/x.py install --stage 2 --host $CARGO_TARGET_NAME --target $CARGO_TARGET_NAME --target wasm32-unknown-unknown + tar xvf build/dist/rustc-dev-$TERMUX_PKG_VERSION-$CARGO_TARGET_NAME.tar.gz + ./rustc-dev-$TERMUX_PKG_VERSION-$CARGO_TARGET_NAME/install.sh --prefix=$TERMUX_PREFIX + cd "$TERMUX_PREFIX/lib" rm -f libc.so libdl.so ln -sf rustlib/$CARGO_TARGET_NAME/lib/*.so . ln -sf $TERMUX_PREFIX/bin/lld $TERMUX_PREFIX/bin/rust-lld - + cd "$TERMUX_PREFIX/lib/rustlib" rm -rf components \ install.log \ diff --git a/packages/rust/config.toml b/packages/rust/config.toml index a94ea7330..717d3d38e 100644 --- a/packages/rust/config.toml +++ b/packages/rust/config.toml @@ -14,7 +14,7 @@ python = "python2.7" extended = true sanitizers = false -tools = ["cargo", "analysis", "clippy-driver" ] +#tools = ["cargo", "analysis", "clippy-driver" ] [install] prefix = "@TERMUX_PREFIX@" diff --git a/packages/rust/rust-std-wasm32.subpackage.sh b/packages/rust/rust-std-wasm32.subpackage.sh index a4a908f58..4f316d528 100644 --- a/packages/rust/rust-std-wasm32.subpackage.sh +++ b/packages/rust/rust-std-wasm32.subpackage.sh @@ -1,4 +1,3 @@ TERMUX_SUBPKG_DESCRIPTION="rust std for wasm32-unknown-unknown target" TERMUX_SUBPKG_PLATFORM_INDEPENDENT=true TERMUX_SUBPKG_INCLUDE="lib/rustlib/wasm32-unknown-unknown" -TERMUX_SUBPKG_REVISION=$TERMUX_PKG_REVISION diff --git a/packages/rust/rustc-dev.subpackage.sh b/packages/rust/rustc-dev.subpackage.sh new file mode 100644 index 000000000..542bd3708 --- /dev/null +++ b/packages/rust/rustc-dev.subpackage.sh @@ -0,0 +1,3 @@ +TERMUX_SUBPKG_DESCRIPTION="developer compiler libs" +INCLUDED=$(sed 's/^.....//' $TERMUX_PKG_BUILDDIR/rustc-dev-$TERMUX_PKG_VERSION-$CARGO_TARGET_NAME/rustc-dev-$CARGO_TARGET_NAME/manifest.in | grep -v '\.so$' ) +TERMUX_SUBPKG_INCLUDE="$INCLUDED"