summaryrefslogtreecommitdiffstats
path: root/source/d/rust/rust.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/rust/rust.SlackBuild')
-rwxr-xr-xsource/d/rust/rust.SlackBuild17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/d/rust/rust.SlackBuild b/source/d/rust/rust.SlackBuild
index c8424b37b..8d7f32b15 100755
--- a/source/d/rust/rust.SlackBuild
+++ b/source/d/rust/rust.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 2017 Andrew Clemons, Wellington, New Zealand
-# Copyright 2017, 2018, 2019, 2020, 2021, 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2017, 2018, 2019, 2020, 2021, 2022, 2023 Patrick J. Volkerding, Sebeka, Minnesota, USA
# Copyright 2017 Stuart Winter
# All rights reserved.
#
@@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=rust
SRCNAM="${PKGNAM}c"
VERSION=${VERSION:-1.70.0}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
# Set this to YES to build with the system LLVM, or NO to use the bundled LLVM.
# YES is probably better (when it works...)
@@ -164,7 +164,7 @@ link-shared = true
build = "$BARCH-unknown-linux-$BABI"
host = ["$TARCH-unknown-linux-$BABI"]
target = ["$TARCH-unknown-linux-$BABI"]
-tools = ["analysis", "cargo", "clippy", "rls", "rustfmt", "src"]
+tools = ["analysis", "cargo", "clippy", "rls", "rustfmt", "src", "rust-analyzer", "rust-demangler"]
submodules = false
vendor = true
extended = true
@@ -234,6 +234,11 @@ fi
python3 ./x.py build || exit 1
DESTDIR=$PKG python3 x.py install || exit 1
+# In case the rls stub doesn't get installed by the 'install' target:
+if [ ! -x $PKG/usr/bin/rls ]; then
+ install -m755 build/*-linux-gnu/stage1-tools-bin/rls $PKG/usr/bin/rls
+fi
+
# Fix path to lldb_commands:
if [ -x $PKG/usr/bin/rust-lldb ]; then
if [ ! "$LIBDIRSUFFIX" = "" ]; then
@@ -271,9 +276,9 @@ find $PKG/usr/lib$LIBDIRSUFFIX -name "*.so" -exec chmod 755 "{}" \+
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
-# Get rid of a possible duplicated libLLVM. Not only is it large, but it also
-# throws an error at boot with ldconfig:
-rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libLLVM-*.so.old
+# Get rid of possible .old files in these locations:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.old
+rm -f $PKG/usr/bin/*.old
# Commented out (for now) since we disable rpaths in config.toml:
## Remove any compiled-in RPATHs: