diff options
author | Andrew Clemons <andrew.clemons@gmail.com> | 2017-11-24 00:05:57 +0000 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2017-11-24 00:05:57 +0000 |
commit | 5795adba8739781ab71510a7263ea30cfca67f3b (patch) | |
tree | 6c573e0a27fc1d977976c913deecb3f9beff9475 /development | |
parent | 32e93ba244c8bb2a5fada48f955af0954eee0833 (diff) |
development/rust: Updated for version 1.22.1.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/rust/link_libffi.diff | 12 | ||||
-rw-r--r-- | development/rust/link_libffi.diff.gz | bin | 0 -> 300 bytes | |||
-rw-r--r-- | development/rust/rust.SlackBuild | 44 | ||||
-rw-r--r-- | development/rust/rust.info | 48 |
4 files changed, 49 insertions, 55 deletions
diff --git a/development/rust/link_libffi.diff b/development/rust/link_libffi.diff deleted file mode 100644 index 38e0113e9cf53..0000000000000 --- a/development/rust/link_libffi.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur rustc-1.21.0-src.bak/src/librustc_llvm/build.rs rustc-1.21.0-src/src/librustc_llvm/build.rs ---- rustc-1.21.0-src.bak/src/librustc_llvm/build.rs 2017-10-10 09:04:51.000000000 +1300 -+++ rustc-1.21.0-src/src/librustc_llvm/build.rs 2017-10-14 15:28:56.761081727 +1300 -@@ -221,6 +221,8 @@ - println!("cargo:rustc-link-lib={}={}", kind, name); - } - -+ println!("cargo:rustc-link-lib=dylib=ffi"); -+ - // LLVM ldflags - // - // If we're a cross-compile of LLVM then unfortunately we can't trust these diff --git a/development/rust/link_libffi.diff.gz b/development/rust/link_libffi.diff.gz Binary files differnew file mode 100644 index 0000000000000..0469634292166 --- /dev/null +++ b/development/rust/link_libffi.diff.gz diff --git a/development/rust/rust.SlackBuild b/development/rust/rust.SlackBuild index 3c3a733b0566e..b5ebce4d8162f 100644 --- a/development/rust/rust.SlackBuild +++ b/development/rust/rust.SlackBuild @@ -26,12 +26,12 @@ PRGNAM=rust SRCNAM="${PRGNAM}c" -VERSION=${VERSION:-1.21.0} +VERSION=${VERSION:-1.22.1} # src/stage0.txt -RSTAGE0_VERSION=${RSTAGE0_VERSION:-1.20.0} -RSTAGE0_DIR=${RSTAGE0_DIR:-2017-08-31} -CSTAGE0_VERSION=${CSTAGE0_VERSION:-0.21.0} +RSTAGE0_VERSION=${RSTAGE0_VERSION:-1.21.0} +RSTAGE0_DIR=${RSTAGE0_DIR:-2017-10-12} +CSTAGE0_VERSION=${CSTAGE0_VERSION:-0.22.0} CSTAGE0_DIR=${CSTAGE0_DIR:-$RSTAGE0_DIR} BUILD=${BUILD:-1} @@ -128,24 +128,27 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $SRCNAM-$VERSION-src -tar xvf $CWD/$SRCNAM-$VERSION-src.tar.gz +tar xvf $CWD/$SRCNAM-$VERSION-src.tar.xz cd $SRCNAM-$VERSION-src -patch -p1 < $CWD/link_libffi.diff + +# Link with -lffi in case of using system LLVM: +zcat $CWD/link_libffi.diff.gz | patch -p1 --verbose if [ "$LOCAL_BOOTSTRAP" != "yes" ] ; then # rust requires bootstrapping with the previous rust version. - # versions are defined in src/stage0.txt + # versions are defined in src/stage0.txt. mkdir -p build/cache/$RSTAGE0_DIR 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-$BARCH-unknown-linux-$BABI.tar.gz \ - build/cache/$CSTAGE0_DIR + cp $CWD/cargo-$CSTAGE0_VERSION-$BARCH-unknown-linux-$BABI.tar.gz build/cache/$CSTAGE0_DIR fi -# config.toml.example +# Build configuration. We'll go ahead and build with rpath because it may be +# needed during the build, and then we'll strip the rpaths out of the +# binaries later. cat << EOF > config.toml [build] build = "$BARCH-unknown-linux-$BABI" @@ -164,7 +167,7 @@ mandir = "man" [rust] codegen-units = 0 channel = "stable" -rpath = false +rpath = true codegen-tests = false ignore-git = true @@ -196,16 +199,9 @@ export PKG_CONFIG_ALLOW_CROSS=1 if [ "$BARCH" = "i586" ] ; then # when bootstrapping from i586 (rust already installed), also build a i686 - # rustlib - + # rustlib: sed -i 's/^target =.*$/target = ["i686-unknown-linux-gnu"]/' config.toml elif [ "$BARCH" = "i686" ] ; then - # sigh, full bootstrapping fails on i686 with - # /tmp/SBo/rustc-1.21.0-src/build/i686-unknown-linux-gnu/stage2/bin/rustdoc: error while loading shared libraries: librustc_driver-f8bd7e4f77e9a650.so: cannot open shared object file: No such file or directory - # maybe this issue: - # https://github.com/rust-lang/rust/issues/43289 - sed -i 's/rpath = false/rpath = true/' config.toml - if [ "$TARCH" = "i586" ] ; then # this will cause some messages like: # warning: redundant linker flag specified for library `m` @@ -244,12 +240,22 @@ sed -i "s,$PKG/,/,g" $PKG/usr/lib$LIBDIRSUFFIX/rustlib/install.log $PKG/usr/lib$ # And a little compression doesn't hurt either: gzip -9 $PKG/usr/lib$LIBDIRSUFFIX/rustlib/manifest-* +# Correct permissions on shared libraries: +find $PKG/usr/lib$LIBDIRSUFFIX -name "*.so" -exec chmod 755 "{}" \; + +# Strip ELF objects: 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 +# Remove any compiled-in RPATHs: +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs patchelf --remove-rpath 2> /dev/null || true + +# Compress man pages: 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 +# Add some documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a *.md COPYRIGHT* LICENSE* $PKG/usr/doc/$PRGNAM-$VERSION # Include licenses from third party vendors: diff --git a/development/rust/rust.info b/development/rust/rust.info index b912f81653927..38e72d0508405 100644 --- a/development/rust/rust.info +++ b/development/rust/rust.info @@ -1,28 +1,28 @@ PRGNAM="rust" -VERSION="1.21.0" +VERSION="1.22.1" HOMEPAGE="https://www.rust-lang.org" -DOWNLOAD="https://static.rust-lang.org/dist/rustc-1.21.0-src.tar.gz \ - https://static.rust-lang.org/dist/2017-08-31/cargo-0.21.0-i686-unknown-linux-gnu.tar.gz \ - https://static.rust-lang.org/dist/2017-08-31/rust-std-1.20.0-i686-unknown-linux-gnu.tar.gz \ - https://static.rust-lang.org/dist/2017-08-31/rustc-1.20.0-i686-unknown-linux-gnu.tar.gz \ - https://static.rust-lang.org/dist/2017-08-31/cargo-0.21.0-arm-unknown-linux-gnueabi.tar.gz \ - https://static.rust-lang.org/dist/2017-08-31/rust-std-1.20.0-arm-unknown-linux-gnueabi.tar.gz \ - https://static.rust-lang.org/dist/2017-08-31/rustc-1.20.0-arm-unknown-linux-gnueabi.tar.gz" -MD5SUM="bc494706b764276613064aad52922f53 \ - 9e7ceebdd7cd2454b0d0e07dce796905 \ - 0e17001c04289930733b8d4545f238d4 \ - c54da2f135f9f64a7c0cf314e9d30976 \ - 5163845019f29d1847583cc72257b22a \ - dfb6ca951e7e92ececfb477da9b0527d \ - 92ab4e04e311ac1c01b015adb0216976" -DOWNLOAD_x86_64="https://static.rust-lang.org/dist/rustc-1.21.0-src.tar.gz \ - https://static.rust-lang.org/dist/2017-08-31/cargo-0.21.0-x86_64-unknown-linux-gnu.tar.gz \ - https://static.rust-lang.org/dist/2017-08-31/rust-std-1.20.0-x86_64-unknown-linux-gnu.tar.gz \ - https://static.rust-lang.org/dist/2017-08-31/rustc-1.20.0-x86_64-unknown-linux-gnu.tar.gz" -MD5SUM_x86_64="bc494706b764276613064aad52922f53 \ - 0e5389d2e38a14933dda77db8172cb1f \ - 8c0f7355b66830517a51a2bd6f530327 \ - c6276176ec6061b61ae73617a64bceb0" -REQUIRES="" +DOWNLOAD="https://static.rust-lang.org/dist/rustc-1.22.1-src.tar.xz \ + https://static.rust-lang.org/dist/2017-10-12/cargo-0.22.0-i686-unknown-linux-gnu.tar.gz \ + https://static.rust-lang.org/dist/2017-10-12/rust-std-1.21.0-i686-unknown-linux-gnu.tar.gz \ + https://static.rust-lang.org/dist/2017-10-12/rustc-1.21.0-i686-unknown-linux-gnu.tar.gz \ + https://static.rust-lang.org/dist/2017-10-12/cargo-0.22.0-arm-unknown-linux-gnueabi.tar.gz \ + https://static.rust-lang.org/dist/2017-10-12/rust-std-1.21.0-arm-unknown-linux-gnueabi.tar.gz \ + https://static.rust-lang.org/dist/2017-10-12/rustc-1.21.0-arm-unknown-linux-gnueabi.tar.gz" +MD5SUM="210472cdde0d83962ba06419f2a7ce54 \ + 5d9f7b60e2e2b7c1aa29d84ea7ebb64d \ + d97d2b6720c9a06ac369668d9c2f496f \ + c3d3d0147c720c51b0bf54d7984e4fa7 \ + b481b8d8cc29d5ceeda6be2acad1cce5 \ + e55cf673cb5dc76c099fd4a80377bc77 \ + b017d543b9ec539d7df7383c97cc6522" +DOWNLOAD_x86_64="https://static.rust-lang.org/dist/rustc-1.22.1-src.tar.xz \ + https://static.rust-lang.org/dist/2017-10-12/cargo-0.22.0-x86_64-unknown-linux-gnu.tar.gz \ + https://static.rust-lang.org/dist/2017-10-12/rust-std-1.21.0-x86_64-unknown-linux-gnu.tar.gz \ + https://static.rust-lang.org/dist/2017-10-12/rustc-1.21.0-x86_64-unknown-linux-gnu.tar.gz" +MD5SUM_x86_64="210472cdde0d83962ba06419f2a7ce54 \ + b870d85feb8958727dbdad476007d65c \ + b6e348e588a789eca369b5404e7d7656 \ + 6b5b084cb997d20d11b7b2b566ffccdd" +REQUIRES="patchelf" MAINTAINER="Andrew Clemons" EMAIL="andrew.clemons@gmail.com" |