summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bison.pri12
-rwxr-xr-xscripts/uni-build-dependencies.sh20
2 files changed, 30 insertions, 2 deletions
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
contact: Jan Huwald // Impressum