Skip to content

Commit 4776df5

Browse files
committed
Try to support legacy versions of rust
1 parent 80b4bc8 commit 4776df5

File tree

3 files changed

+436
-1
lines changed

3 files changed

+436
-1
lines changed

configure

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1+
#!/bin/sh
12
# mimics: source ~/.cargo/env
23
export PATH="$HOME/.cargo/bin:$PATH"
34

45
# Write 'cargo' to Makevars
5-
cargo --version
6+
VERSION=$(cargo --version)
67
if [ $? -eq 0 ]; then
78
echo "Using `which cargo`"
9+
echo "$VERSION"
10+
11+
# Check for old version of rustc (edition:2021 requires rust 1.56)
12+
if [ "$(uname)" = "Linux" ]; then
13+
VERNUM=$(echo $VERSION | cut -d' ' -f2) || true
14+
MAJOR=$(echo $VERNUM | cut -d'.' -f1) || true
15+
MINOR=$(echo $VERNUM | cut -d'.' -f2) || true
16+
if [ "$MAJOR" -eq "1" ] && [ "$MINOR" -lt "56" ]; then
17+
echo "Found old rust. Using legacy gifski 1.4.3 build."
18+
cp -f src/legacy/* src/myrustlib/
19+
fi
20+
fi
821
exit 0
922
fi
1023

0 commit comments

Comments
 (0)