From 01aaec33573a49705c9028966df2cbd15c9c4c61 Mon Sep 17 00:00:00 2001 From: don bright Date: Thu, 31 Jan 2013 18:37:08 -0800 Subject: [PATCH] copy qt4 building script from macosx-build-deps to linux --- scripts/setenv-unibuild.sh | 7 +++++++ scripts/uni-build-dependencies.sh | 32 +++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/scripts/setenv-unibuild.sh b/scripts/setenv-unibuild.sh index 881526e5..66fb7a9c 100644 --- a/scripts/setenv-unibuild.sh +++ b/scripts/setenv-unibuild.sh @@ -130,5 +130,12 @@ if [ "`echo $* | grep qt5`" ]; then setenv_qt5 fi +if [ -e $DEPLOYDIR/include/Qt ]; then + echo "Qt found under $DEPLOYDIR ... " + QTDIR=$DEPLOYDIR + export QTDIR + echo "QTDIR modified to $DEPLOYDIR" +fi + clean_note diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index 0c37605b..6550dccb 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -24,7 +24,6 @@ # # Prerequisites: # - wget or curl -# - Qt4 # - gcc # # Enable Clang (experimental, only works on linux): @@ -42,6 +41,31 @@ printUsage() echo } +build_qt4() +{ + version=$1 + if [ -e $DEPLOYDIR/include/Qt ]; then + echo "qt already installed. not building" + return + fi + echo "Building Qt" $version "..." + cd $BASEDIR/src + rm -rf qt-everywhere-opensource-src-$version + if [ ! -f qt-everywhere-opensource-src-$version.tar.gz ]; then + curl -O http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-$version.tar.gz + fi + tar xzf qt-everywhere-opensource-src-$version.tar.gz + cd qt-everywhere-opensource-src-$version + ./configure -prefix $DEPLOYDIR -opensource -confirm-license -fast -no-qt3support -no-svg -no-phonon -no-audio-backend -no-multimedia -no-javascript-jit -no-script -no-scripttools -no-declarative -no-xmlpatterns -nomake demos -nomake examples -nomake docs -nomake translations -no-webkit + make -j $NUMCPU + make install + QTDIR=$DEPLOYDIR + export QTDIR + echo "----------" + echo " Please set QTDIR to $DEPLOYDIR ( or run '. scripts/setenv-unibuild.sh' ) + echo "----------" +} + build_bison() { version=$1 @@ -426,6 +450,11 @@ if [ $1 ]; then build_opencsg 1.3.2 exit fi + if [ $1 == "qt4" ]; then + # such a huge build, put here by itself + build_qt4 4.8.4 + exit + fi fi @@ -433,7 +462,6 @@ fi # Main build of libraries # edit version numbers here as needed. # - build_eigen 3.1.1 build_gmp 5.0.5 build_mpfr 3.1.1