diff options
author | don bright <hugh.m.bright@gmail.com> | 2012-07-04 02:34:00 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2012-07-04 02:34:00 (GMT) |
commit | 491caa15ada3e51fd252aaa74de31178f01ff5ad (patch) | |
tree | af7d47e8bd3d4644ace58ec92796931ec9e7c554 /scripts | |
parent | b6b018e768e017880e9d582963c7685c24a4b6f6 (diff) |
auto-detect curl + cmake. link libs properly. use 'openscad_deps' subdir
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/linux-build-dependencies.sh | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/scripts/linux-build-dependencies.sh b/scripts/linux-build-dependencies.sh index 9097850..7727c4e 100755 --- a/scripts/linux-build-dependencies.sh +++ b/scripts/linux-build-dependencies.sh @@ -15,11 +15,11 @@ # -- you can uncomment 'build_cmake' at the bottom # -BASEDIR=$HOME +BASEDIR=$HOME/openscad_deps OPENSCADDIR=$PWD SRCDIR=$BASEDIR/src DEPLOYDIR=$BASEDIR -NUMCPU=2 # paralell builds for some libraries +NUMCPU=4 # paralell builds for some libraries printUsage() { @@ -87,12 +87,10 @@ build_mpfr() cd $BASEDIR/src rm -rf mpfr-$version if [ ! -f mpfr-$version.tar.bz2 ]; then - curl -O http://www.mpfr.org/mpfr-current/mpfr-$version.tar.bz2 + curl -O http://www.mpfr.org/mpfr-$version/mpfr-$version.tar.bz2 fi tar xjf mpfr-$version.tar.bz2 cd mpfr-$version - curl -O http://www.mpfr.org/mpfr-current/allpatches - patch -N -Z -p1 < allpatches mkdir build cd build ../configure --prefix=$DEPLOYDIR --with-gmp=$DEPLOYDIR @@ -208,19 +206,33 @@ echo "Using srcdir:" $SRCDIR echo "Number of CPUs for parallel builds:" $NUMCPU mkdir -p $SRCDIR $DEPLOYDIR -#build_curl 7.26.0 +export PATH=$BASEDIR/bin:$PATH +export LD_LIBRARY_PATH=$DEPLOYDIR/lib:$DEPLOYDIR/lib64:$LD_LIBRARY_PATH +export LD_RUN_PATH=$DEPLOYDIR/lib:$DEPLOYDIR/lib64:$LD_RUN_PATH +echo "PATH modified" +echo "LD_LIBRARY_PATH modified" +echo "LD_RUN_PATH modified" + +if [ ! "`command -v curl`" ]; then + build_curl 7.26.0 +fi + # NB! For cmake, also update the actual download URL in the function -#build_cmake 2.8.8 +if [ ! "`command -v cmake`" ]; then + build_cmake 2.8.8 +fi + build_eigen 2.0.17 build_gmp 5.0.5 -build_mpfr 3.1.0 +build_mpfr 3.1.1 build_boost 1.47.0 # NB! For CGAL, also update the actual download URL in the function build_cgal 4.0 build_glew 1.7.0 build_opencsg 1.3.2 -echo "Now do this:" +echo "OpenSCAD dependencies built in " $BASEDIR +echo "To build OpenSCAD, copy/paste these lines to your shell prompt: " echo "export LD_LIBRARY_PATH=$DEPLOYDIR/lib:$DEPLOYDIR/lib64" echo "GLEWDIR=$DEPLOYDIR OPENSCAD_LIBRARIES=$DEPLOYDIR qmake-qt4" echo "make -j$NUMCPU" |