Update ANTLR script to 3.5.2

This is beneficial because 3.4 is broken under Java 8. It appears that
the C library didn't change in 3.5 so the 3.4 tarball is still used
for that part.
This commit is contained in:
James Le Cuirot 2015-10-05 23:20:28 +01:00
parent 7cf35d1e8b
commit 5fe4f67d20
No known key found for this signature in database
GPG Key ID: 21C632129C6D7DE4

View File

@ -1,7 +1,7 @@
#!/bin/sh
WORKDIR=~/antlr34.tmp
echo "This script will install antlr 3.4 (and matching libantlr) on your computer."
WORKDIR=~/antlr35.tmp
echo "This script will install antlr 3.5 (and matching libantlr) on your computer."
read -p "Should the script create $WORKDIR and use it for building? [Y/n] " yn
if [ "$yn" = "n" ]; then
exit
@ -27,7 +27,7 @@ read -p "Should the script build libantlr3c for 64 bit? [Y/n] " yn
if [ "$yn" != "n" ]; then
ENABLE64BIT="--enable-64bit"
fi
wget --no-check-certificate https://github.com/antlr/website-antlr3/raw/gh-pages/download/antlr-3.4-complete.jar
wget --no-check-certificate https://github.com/antlr/website-antlr3/raw/gh-pages/download/antlr-3.5.2-complete.jar
wget --no-check-certificate https://github.com/antlr/website-antlr3/raw/gh-pages/download/C/libantlr3c-3.4.tar.gz
tar xzf libantlr3c-3.4.tar.gz
cd libantlr3c-3.4
@ -35,10 +35,10 @@ cd libantlr3c-3.4
cd $WORKDIR
sudo mkdir -p "$PREFIX/share/java"
sudo install antlr-3.4-complete.jar "$PREFIX/share/java"
sudo install antlr-3.5.2-complete.jar "$PREFIX/share/java"
printf "#!/bin/sh
export CLASSPATH
CLASSPATH=\$CLASSPATH:$PREFIX/share/java/antlr-3.4-complete.jar:$PREFIX/share/java
CLASSPATH=\$CLASSPATH:$PREFIX/share/java/antlr-3.5.2-complete.jar:$PREFIX/share/java
/usr/bin/java org.antlr.Tool \$*
" > antlr3
sudo install --mode=755 antlr3 "$PREFIX/bin"