summaryrefslogtreecommitdiff
path: root/development/rust
diff options
context:
space:
mode:
authorAndrew Clemons <andrew.clemons@gmail.com>2017-09-01 13:31:42 +0100
committerDavid Spencer <idlemoor@slackbuilds.org>2017-09-02 10:19:47 +0100
commit6e771869295035e19f4368ddeadaed6eff131713 (patch)
treef118257163c1b2af3df2902e9fdf1b81d1159696 /development/rust
parent839c9e5b89f979c703664a8c20056f2b1ba86081 (diff)
downloadslackbuilds-6e771869295035e19f4368ddeadaed6eff131713.tar.gz
development/rust: Updated for version 1.20.0.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development/rust')
-rw-r--r--development/rust/README21
-rw-r--r--development/rust/rust.SlackBuild82
-rw-r--r--development/rust/rust.info34
-rw-r--r--development/rust/slack-desc6
4 files changed, 99 insertions, 44 deletions
diff --git a/development/rust/README b/development/rust/README
index 2179a55991..4e3aec3c9a 100644
--- a/development/rust/README
+++ b/development/rust/README
@@ -14,3 +14,24 @@ You can also force either behaviour through the LOCAL_BOOTSTRAP=yes|no
parameter.
LOCAL_BOOTSTRAP=no ./rust.SlackBuild
+
+ARM builds
+==========
+
+soft-float:
+https://static.rust-lang.org/dist/2017-07-20/cargo-0.20.0-arm-unknown-linux-gnueabi.tar.gz
+https://static.rust-lang.org/dist/2017-07-20/rust-std-1.19.0-arm-unknown-linux-gnueabi.tar.gz
+https://static.rust-lang.org/dist/2017-07-20/rustc-1.19.0-arm-unknown-linux-gnueabi.tar.gz
+
+5082e86858fd2b14ba7fd04fe715e85a cargo-0.20.0-arm-unknown-linux-gnueabi.tar.gz
+44d3fde5459d939c999f9be58a024b41 rust-std-1.19.0-arm-unknown-linux-gnueabi.tar.gz
+5d2ec83e731ea4fc05ca14a53e349109 rustc-1.19.0-arm-unknown-linux-gnueabi.tar.gz
+
+hard-float:
+https://static.rust-lang.org/dist/2017-07-20/cargo-0.20.0-armv7-unknown-linux-gnueabihf.tar.gz
+https://static.rust-lang.org/dist/2017-07-20/rust-std-1.19.0-armv7-unknown-linux-gnueabihf.tar.gz
+https://static.rust-lang.org/dist/2017-07-20/rustc-1.19.0-armv7-unknown-linux-gnueabihf.tar.gz
+
+0991c64273b49b3b8488d4f61d827295 cargo-0.20.0-armv7-unknown-linux-gnueabihf.tar.gz
+5e5940b8cbc0bf00f8e4051472d5776e rust-std-1.19.0-armv7-unknown-linux-gnueabihf.tar.gz
+5498f62495c309dbdc6c70b7ed4d4f24 rustc-1.19.0-armv7-unknown-linux-gnueabihf.tar.gz
diff --git a/development/rust/rust.SlackBuild b/development/rust/rust.SlackBuild
index 7c3cd7a311..27c29bbd90 100644
--- a/development/rust/rust.SlackBuild
+++ b/development/rust/rust.SlackBuild
@@ -2,7 +2,8 @@
# Slackware build script for rust
-# Copyright 2017 Andrew Clemons, Wellington New Zealand
+# Copyright 2017 Andrew Clemons, Wellington, New Zealand
+# Copyright 2017 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,39 +25,64 @@
PRGNAM=rust
SRCNAM="${PRGNAM}c"
-VERSION=${VERSION:-1.19.0}
+VERSION=${VERSION:-1.20.0}
# src/stage0.txt
-RSTAGE0_VERSION=${RSTAGE0_VERSION:-1.18.0}
-RSTAGE0_DIR=${RSTAGE0_DIR:-2017-06-08}
-CSTAGE0_VERSION=${CSTAGE0_VERSION:-0.19.0}
+RSTAGE0_VERSION=${RSTAGE0_VERSION:-1.19.0}
+RSTAGE0_DIR=${RSTAGE0_DIR:-2017-07-20}
+CSTAGE0_VERSION=${CSTAGE0_VERSION:-0.20.0}
CSTAGE0_DIR=${CSTAGE0_DIR:-$RSTAGE0_DIR}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i686) ARCH=i686 ;;
+ i?86) ARCH=i686 ;;
+ armv7*) ARCH=$( uname -m ) ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
+# Bootstrapping ARCH:
+if [ "$ARCH" = "i586" ]; then
+ BARCH="i686"
+elif case $ARCH in armv7*) true;; *) false;; esac; then
+ BARCH="armv7"
+else
+ BARCH="$ARCH"
+fi
+
+# Bootstrapping ABI:
+if case $ARCH in armv7*) true;; *) false;; esac; then
+ BABI="gnueabihf"
+elif [ "$ARCH" = "arm" ]; then
+ BABI="gnueabi"
+else
+ BABI="gnu"
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i686" ]; then
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+elif case $ARCH in armv7*) true;; *) false;; esac; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
else
- echo "$ARCH is unsupported"
- exit 1
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
@@ -78,12 +104,12 @@ if [ "$LOCAL_BOOTSTRAP" != "yes" ] ; then
# rust requires bootstrapping with the previous rust version.
# versions are defined in src/stage0.txt
mkdir -p build/cache/$RSTAGE0_DIR
- cp $CWD/$PRGNAM-std-$RSTAGE0_VERSION-$ARCH-unknown-linux-gnu.tar.gz \
- $CWD/$SRCNAM-$RSTAGE0_VERSION-$ARCH-unknown-linux-gnu.tar.gz \
+ cp $CWD/$PRGNAM-std-$RSTAGE0_VERSION-$BARCH-unknown-linux-$BABI.tar.gz \
+ $CWD/$SRCNAM-$RSTAGE0_VERSION-$BARCH-unknown-linux-$BABI.tar.gz \
build/cache/$RSTAGE0_DIR
mkdir -p build/cache/$CSTAGE0_DIR
- cp $CWD/cargo-$CSTAGE0_VERSION-$ARCH-unknown-linux-gnu.tar.gz build/cache/$CSTAGE0_DIR
+ cp $CWD/cargo-$CSTAGE0_VERSION-$BARCH-unknown-linux-$BABI.tar.gz build/cache/$CSTAGE0_DIR
fi
# src/bootstrap/config.toml.example
@@ -94,7 +120,7 @@ extended = true
[install]
prefix = "/usr"
-docdir = "doc/rust"
+docdir = "doc/rust-$VERSION"
libdir = "lib$LIBDIRSUFFIX"
mandir = "man"
@@ -105,10 +131,8 @@ channel = "stable"
rpath = false
codegen-tests = false
-[target.$ARCH-unknown-linux-gnu]
+[target.$BARCH-unknown-linux-$BABI]
llvm-config = "/usr/bin/llvm-config"
-# build fails using the system jemalloc
-# jemalloc = "/usr/lib$LIBDIRSUFFIX/libjemalloc_pic.a"
EOF
if [ "$LOCAL_BOOTSTRAP" = "yes" ] ; then
@@ -131,14 +155,19 @@ CXX=clang++ \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
python x.py build
-
DESTDIR=$PKG python x.py install
-rm -rf $PKG/usr/lib$LIBDIRSUFFIX/rustlib/components
-rm -rf $PKG/usr/lib$LIBDIRSUFFIX/rustlib/install.log
-rm -rf $PKG/usr/lib$LIBDIRSUFFIX/rustlib/manifest-*
-rm -rf $PKG/usr/lib$LIBDIRSUFFIX/rustlib/rust-installer-version
-rm -rf $PKG/usr/lib$LIBDIRSUFFIX/rustlib/uninstall.sh
+# Eh, none of this is all that big. Might as well leave it around as a
+# reference.
+#rm -f $PKG/usr/lib$LIBDIRSUFFIX/rustlib/components
+#rm -f $PKG/usr/lib$LIBDIRSUFFIX/rustlib/install.log
+#rm -f $PKG/usr/lib$LIBDIRSUFFIX/rustlib/manifest-*
+#rm -f $PKG/usr/lib$LIBDIRSUFFIX/rustlib/rust-installer-version
+#rm -f $PKG/usr/lib$LIBDIRSUFFIX/rustlib/uninstall.sh
+# Make sure the paths are correct, though:
+sed -i "s,/tmp/package-rust/,/,g" $PKG/usr/lib$LIBDIRSUFFIX/rustlib/install.log $PKG/usr/lib$LIBDIRSUFFIX/rustlib/manifest-*
+# And a little compression doesn't hurt either:
+gzip -9 $PKG/usr/lib$LIBDIRSUFFIX/rustlib/manifest-*
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -147,7 +176,12 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a *.md COPYRIGHT LICENSE-APACHE LICENSE-MIT $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a *.md COPYRIGHT* LICENSE* $PKG/usr/doc/$PRGNAM-$VERSION
+# Include licenses from third party vendors:
+mkdir $PKG/usr/doc/$PRGNAM-$VERSION/vendor
+( cd src/vendor
+ tar cf - $(find . -maxdepth 2 | grep -e README -e LICENSE -e COPYING -e CHANGELOG -e PERFORMANCE -e UPGRADE ) | ( cd $PKG/usr/doc/$PRGNAM-$VERSION/vendor ; tar xf - )
+)
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/development/rust/rust.info b/development/rust/rust.info
index 0a8dd11d52..e534c1e549 100644
--- a/development/rust/rust.info
+++ b/development/rust/rust.info
@@ -1,22 +1,22 @@
PRGNAM="rust"
-VERSION="1.19.0"
+VERSION="1.20.0"
HOMEPAGE="https://www.rust-lang.org"
-DOWNLOAD="https://static.rust-lang.org/dist/rustc-1.19.0-src.tar.gz \
- https://static.rust-lang.org/dist/2017-06-08/cargo-0.19.0-i686-unknown-linux-gnu.tar.gz \
- https://static.rust-lang.org/dist/2017-06-08/rust-std-1.18.0-i686-unknown-linux-gnu.tar.gz \
- https://static.rust-lang.org/dist/2017-06-08/rustc-1.18.0-i686-unknown-linux-gnu.tar.gz"
-MD5SUM="75e779670ac79edf023497a9c37eb35d \
- 44572d0a4e941cd10aa9b7bcec190696 \
- 3e6bcb51f37317523fa8cb6ce6652b85 \
- b50fa0e08a8bf22de5213cf252d34896"
-DOWNLOAD_x86_64="https://static.rust-lang.org/dist/rustc-1.19.0-src.tar.gz \
- https://static.rust-lang.org/dist/2017-06-08/cargo-0.19.0-x86_64-unknown-linux-gnu.tar.gz \
- https://static.rust-lang.org/dist/2017-06-08/rust-std-1.18.0-x86_64-unknown-linux-gnu.tar.gz \
- https://static.rust-lang.org/dist/2017-06-08/rustc-1.18.0-x86_64-unknown-linux-gnu.tar.gz"
-MD5SUM_x86_64="75e779670ac79edf023497a9c37eb35d \
- e3cbae9515cb770454e661d8847f685d \
- 79ecc0a63383459da84f10ba90db5dd6\
- fc959a1a2891cb9154460cf00f8deade"
+DOWNLOAD="https://static.rust-lang.org/dist/rustc-1.20.0-src.tar.gz \
+ https://static.rust-lang.org/dist/2017-07-20/cargo-0.20.0-i686-unknown-linux-gnu.tar.gz \
+ https://static.rust-lang.org/dist/2017-07-20/rust-std-1.19.0-i686-unknown-linux-gnu.tar.gz \
+ https://static.rust-lang.org/dist/2017-07-20/rustc-1.19.0-i686-unknown-linux-gnu.tar.gz"
+MD5SUM="1d3c5d25d8e6215e7d0b6d4d4c9835b9 \
+ 1de2d0fb8e09d3c976ac8d874f158f57 \
+ 7e7d4a768fe05264fc23cb2afef75740 \
+ 9711f634011658b451f315916234c88e"
+DOWNLOAD_x86_64="https://static.rust-lang.org/dist/rustc-1.20.0-src.tar.gz \
+ https://static.rust-lang.org/dist/2017-07-20/cargo-0.20.0-x86_64-unknown-linux-gnu.tar.gz \
+ https://static.rust-lang.org/dist/2017-07-20/rust-std-1.19.0-x86_64-unknown-linux-gnu.tar.gz \
+ https://static.rust-lang.org/dist/2017-07-20/rustc-1.19.0-x86_64-unknown-linux-gnu.tar.gz"
+MD5SUM_x86_64="1d3c5d25d8e6215e7d0b6d4d4c9835b9 \
+ 63aa861b029eec9f559f4fb5a10c287d \
+ 2bff47764df01c99f349908601c10478 \
+ e5077b80cc953a1fb9c767aa039d5984"
REQUIRES=""
MAINTAINER="Andrew Clemons"
EMAIL="andrew.clemons@gmail.com"
diff --git a/development/rust/slack-desc b/development/rust/slack-desc
index 8616379e41..d831a4d017 100644
--- a/development/rust/slack-desc
+++ b/development/rust/slack-desc
@@ -10,9 +10,9 @@ rust: rust (a safe, concurrent, practical language)
rust:
rust: Rust is a curly-brace, block-structured expression language.
rust: Its design is oriented toward concerns of "programming in the large",
-rust: that is, of creating and maintaining boundaries - both abstract and
-rust: operational - that preserve large-system integrity, availability and
-rust: concurrency.
+rust: that is, of creating and maintaining boundaries -- both abstract and
+rust: operational -- that preserve large-system integrity, availability,
+rust: and concurrency.
rust:
rust: Homepage: https://rust-lang.org
rust: