diff options
author | Marius Kintel <marius@kintel.net> | 2013-04-18 22:42:51 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-04-18 22:42:51 (GMT) |
commit | b06b4f32f8c0fb616ebba6ddbf3a2297bf185436 (patch) | |
tree | 3ee23c2bdf95cde59f5ca05a312645cdb3a1bab3 /scripts | |
parent | 442ab618a7eebc871195a764b23fb152950b181a (diff) | |
parent | 5cee6b58dd1589848518a628a79c582a7320a92e (diff) |
Merge branch 'master' into issue116
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/uni-build-dependencies.sh | 46 | ||||
-rwxr-xr-x | scripts/uni-get-dependencies.sh | 13 |
2 files changed, 41 insertions, 18 deletions
diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index 784a191..bfc830f 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -264,6 +264,12 @@ build_boost() echo boost build failed exit 1 fi + if [ "`ls $DEPLOYDIR/include/ | grep boost.[0-9]`" ]; then + if [ ! -e $DEPLOYDIR/include/boost ]; then + echo "boost is old, make a symlink to $DEPLOYDIR/include/boost & rerun" + exit 1 + fi + fi } build_cgal() @@ -276,17 +282,26 @@ build_cgal() echo "Building CGAL" $version "..." cd $BASEDIR/src rm -rf CGAL-$version - if [ ! -f CGAL-$version.tar.* ]; then - # 4.1 - curl --insecure -O https://gforge.inria.fr/frs/download.php/31640/CGAL-$version.tar.bz2 - # 4.0.2 curl --insecure -O https://gforge.inria.fr/frs/download.php/31174/CGAL-$version.tar.bz2 - # 4.0 curl --insecure -O https://gforge.inria.fr/frs/download.php/30387/CGAL-$version.tar.gz #4.0 - # 3.9 curl --insecure -O https://gforge.inria.fr/frs/download.php/29125/CGAL-$version.tar.gz #3.9 - # 3.8 curl --insecure -O https://gforge.inria.fr/frs/download.php/28500/CGAL-$version.tar.gz - # 3.7 curl --insecure -O https://gforge.inria.fr/frs/download.php/27641/CGAL-$version.tar.gz - fi - tar xf CGAL-$version.tar.bz2 + ver4_1="curl --insecure -O https://gforge.inria.fr/frs/download.php/31640/CGAL-4.1.tar.bz2" + ver4_0_2="curl --insecure -O https://gforge.inria.fr/frs/download.php/31174/CGAL-4.0.2.tar.bz2" + ver4_0="curl --insecure -O https://gforge.inria.fr/frs/download.php/30387/CGAL-4.0.tar.gz" + ver3_9="curl --insecure -O https://gforge.inria.fr/frs/download.php/29125/CGAL-3.9.tar.gz" + ver3_8="curl --insecure -O https://gforge.inria.fr/frs/download.php/28500/CGAL-3.8.tar.gz" + ver3_7="curl --insecure -O https://gforge.inria.fr/frs/download.php/27641/CGAL-3.7.tar.gz" + vernull="echo already downloaded..skipping" + download_cmd=ver`echo $version | sed s/"\."/"_"/` + if [ -e CGAL-$version.tar.gz ]; then download_cmd=vernull; fi + if [ -e CGAL-$version.tar.bz2 ]; then download_cmd=vernull; fi + `eval echo "$"$download_cmd` + if [ -e CGAL-$version.tar.gz ]; then tar xf CGAL-$version.tar.gz; fi + if [ -e CGAL-$version.tar.bz2 ]; then tar xf CGAL-$version.tar.bz2; fi cd CGAL-$version + + # older cmakes have buggy FindBoost that can result in + # finding the system libraries but OPENSCAD_LIBRARIES include paths + FINDBOOST_CMAKE=$OPENSCAD_SCRIPTDIR/../tests/FindBoost.cmake + cp $FINDBOOST_CMAKE ./cmake/modules/ + mkdir bin cd bin rm -rf ./* @@ -295,10 +310,13 @@ build_cgal() else CGAL_BUILDTYPE="Debug" fi + + DEBUGBOOSTFIND=0 # for debugging FindBoost.cmake (not for debugging boost) + Boost_NO_SYSTEM_PATHS=1 if [ "`echo $2 | grep use-sys-libs`" ]; then - cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DCMAKE_BUILD_TYPE=$CGAL_BUILDTYPE .. + cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DCMAKE_BUILD_TYPE=$CGAL_BUILDTYPE -DBoost_DEBUG=$DEBUGBOOSTFIND .. else - cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DGMP_INCLUDE_DIR=$DEPLOYDIR/include -DGMP_LIBRARIES=$DEPLOYDIR/lib/libgmp.so -DGMPXX_LIBRARIES=$DEPLOYDIR/lib/libgmpxx.so -DGMPXX_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_LIBRARIES=$DEPLOYDIR/lib/libmpfr.so -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DBOOST_ROOT=$DEPLOYDIR -DBoost_USE_MULTITHREADED=false -DCMAKE_BUILD_TYPE=$CGAL_BUILD_TYPE .. + cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DGMP_INCLUDE_DIR=$DEPLOYDIR/include -DGMP_LIBRARIES=$DEPLOYDIR/lib/libgmp.so -DGMPXX_LIBRARIES=$DEPLOYDIR/lib/libgmpxx.so -DGMPXX_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_LIBRARIES=$DEPLOYDIR/lib/libmpfr.so -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DBOOST_LIBRARYDIR=$DEPLOYDIR/lib -DBOOST_INCLUDEDIR=$DEPLOYDIR/include -DCMAKE_BUILD_TYPE=$CGAL_BUILD_TYPE -DBoost_DEBUG=$DEBUGBOOSTFIND -DBoost_NO_SYSTEM_PATHS=1 .. fi make -j$NUMCPU make install @@ -459,7 +477,11 @@ build_eigen() # the 'dirname' command installed if [ "`command -v dirname`" ]; then + RUNDIR=$PWD OPENSCAD_SCRIPTDIR=`dirname $0` + cd $OPENSCAD_SCRIPTDIR + OPENSCAD_SCRIPTDIR=$PWD + cd $RUNDIR else if [ ! -f openscad.pro ]; then echo "Must be run from the OpenSCAD source root directory (dont have 'dirname')" diff --git a/scripts/uni-get-dependencies.sh b/scripts/uni-get-dependencies.sh index 98170de..e2fdaa7 100755 --- a/scripts/uni-get-dependencies.sh +++ b/scripts/uni-get-dependencies.sh @@ -7,7 +7,8 @@ get_fedora_deps() { sudo yum install qt-devel bison flex eigen2-devel python-paramiko \ - boost-devel mpfr-devel gmp-devel glew-devel CGAL-devel gcc pkgconfig git libXmu-devel + boost-devel mpfr-devel gmp-devel glew-devel CGAL-devel gcc pkgconfig \ + git libXmu-devel curl imagemagick } get_qomo_deps() @@ -19,7 +20,7 @@ get_altlinux_deps() { for i in boost-devel boost-filesystem-devel gcc4.5 gcc4.5-c++ boost-program_options-devel \ boost-thread-devel boost-system-devel boost-regex-devel eigen2 libmpfr libgmp libgmp_cxx-devel qt4-devel libcgal-devel git-core \ - libglew-devel flex bison; do sudo apt-get install $i; done + libglew-devel flex bison curl imagemagick; do sudo apt-get install $i; done } get_freebsd_deps() @@ -27,19 +28,19 @@ get_freebsd_deps() pkg_add -r bison boost-libs cmake git bash eigen2 flex gmake gmp mpfr \ xorg libGLU libXmu libXi xorg-vfbserver glew \ qt4-corelib qt4-gui qt4-moc qt4-opengl qt4-qmake qt4-rcc qt4-uic \ - opencsg cgal + opencsg cgal curl imagemagick } get_netbsd_deps() { sudo pkgin install bison boost cmake git bash eigen flex gmake gmp mpfr \ - qt4 glew cgal opencsg modular-xorg python27 py27-paramiko + qt4 glew cgal opencsg modular-xorg python27 py27-paramiko curl imagemagick } get_opensuse_deps() { sudo zypper install libeigen2-devel mpfr-devel gmp-devel boost-devel \ - libqt4-devel glew-devel cmake git bison flex cgal-devel opencsg-devel + libqt4-devel glew-devel cmake git bison flex cgal-devel opencsg-devel curl } get_mageia_deps() @@ -56,7 +57,7 @@ get_debian_deps() libxmu-dev cmake bison flex git-core libboost-all-dev \ libXi-dev libmpfr-dev libboost-dev libglew-dev libeigen2-dev \ libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev libgmp-dev \ - python-paramiko ; do + python-paramiko curl imagemagick; do sudo apt-get -y install $pkg; done } |