From 43e1d6150db62e35fd28aacbd805beaa6a903c70 Mon Sep 17 00:00:00 2001 From: don bright Date: Fri, 21 Dec 2012 02:18:21 +0100 Subject: download and build bison if needed. detect better on BSD diff --git a/bison.pri b/bison.pri index 9840c5a..fcfad6f 100644 --- a/bison.pri +++ b/bison.pri @@ -19,11 +19,19 @@ win32 { unix:freebsd-g++ { # on bsd /usr/bin/bison is outdated, dont use it - QMAKE_YACC = /usr/local/bin/bison + exists(/usr/local/bin/bison) { + QMAKE_YACC = /usr/local/bin/bison + } else { # look in $PATH + QMAKE_YACC = bison + } } unix:netbsd* { - QMAKE_YACC = /usr/pkg/bin/bison + exists(/usr/pkg/bin/bison) { + QMAKE_YACC = /usr/pkg/bin/bison + } else { # look in $PATH + QMAKE_YACC = bison + } } unix:linux* { diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index 0a16886..1b15e53 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -21,6 +21,22 @@ printUsage() echo } +build_bison() +{ + version=$1 + echo "Building bison" $version + cd $BASEDIR/src + rm -rf bison-$version + if [ ! -f bison-$version.tar.gz ]; then + curl --insecure -O http://ftp.gnu.org/gnu/bison/bison-$version.tar.gz + fi + tar zxf bison-$version.tar.gz + cd bison-$version + ./configure --prefix=$DEPLOYDIR + make -j$NUMCPU + make install +} + build_git() { version=$1 @@ -312,6 +328,10 @@ if [ ! "`command -v curl`" ]; then build_curl 7.26.0 fi +if [ ! "`command -v bison`" ]; then + build_bison 2.6.1 +fi + # NB! For cmake, also update the actual download URL in the function if [ ! "`command -v cmake`" ]; then build_cmake 2.8.8 -- cgit v0.10.1