development/racer: Check for rust version with rustup.

Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Andrew Clemons 2022-02-08 22:05:08 +13:00 committed by Willy Sudiarto Raharjo
parent f5dde89f8e
commit 305a731772
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -146,10 +146,16 @@ find -L . \
ln -s /usr/bin/rustup rustc
)
RUST_NIGHTLY=${RUST_NIGHTLY:-nightly-2022-01-14}
if ! rustup toolchain list | grep "$RUST_NIGHTLY" > /dev/null 2>&1 ; then
rustup toolchain install --component rustc-dev --profile default "$RUST_NIGHTLY"
fi
PATH="$(pwd)/rustup-bin:$PATH" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
rustup run nightly-2022-01-14 cargo build --release $CARGOTARGET
rustup run "$RUST_NIGHTLY" cargo build --release $CARGOTARGET
mkdir -p $PKG/usr/bin/