summaryrefslogtreecommitdiff
path: root/scripts/uni-build-dependencies.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/uni-build-dependencies.sh')
-rwxr-xr-xscripts/uni-build-dependencies.sh56
1 files changed, 34 insertions, 22 deletions
diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh
index 09b6b79..dc61f74 100755
--- a/scripts/uni-build-dependencies.sh
+++ b/scripts/uni-build-dependencies.sh
@@ -1,4 +1,4 @@
- #!/bin/sh -e
+#!/bin/sh -e
# uni-build-dependencies by don bright 2012. copyright assigned to
# Marius Kintel and Clifford Wolf, 2012. released under the GPL 2, or
@@ -184,6 +184,7 @@ build_gmp()
mkdir build
cd build
../configure --prefix=$DEPLOYDIR --enable-cxx
+ make -j$NUMCPU
make install
}
@@ -205,6 +206,7 @@ build_mpfr()
mkdir build
cd build
../configure --prefix=$DEPLOYDIR --with-gmp=$DEPLOYDIR
+ make -j$NUMCPU
make install
cd ..
}
@@ -223,6 +225,10 @@ build_boost()
if [ ! -f boost_$bversion.tar.bz2 ]; then
curl --insecure -LO http://downloads.sourceforge.net/project/boost/boost/$version/boost_$bversion.tar.bz2
fi
+ if [ ! $? -eq 0 ]; then
+ echo download failed.
+ exit 1
+ fi
tar xjf boost_$bversion.tar.bz2
cd boost_$bversion
if [ "`gcc --version|grep 4.7`" ]; then
@@ -247,17 +253,16 @@ build_boost()
fi
if [ $CXX ]; then
if [ $CXX = "clang++" ]; then
- $BJAMBIN -j$NUMCPU toolset=clang install
- # ./b2 -j$NUMCPU toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" install
+ $BJAMBIN -j$NUMCPU toolset=clang
fi
else
$BJAMBIN -j$NUMCPU
- if [ $? = 0 ]; then
- $BJAMBIN install
- else
- echo boost build failed
- exit 1
- fi
+ fi
+ if [ $? = 0 ]; then
+ $BJAMBIN install
+ else
+ echo boost build failed
+ exit 1
fi
}
@@ -293,7 +298,7 @@ build_cgal()
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 ..
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 -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_ROOT=$DEPLOYDIR -DBoost_USE_MULTITHREADED=false -DCMAKE_BUILD_TYPE=$CGAL_BUILD_TYPE ..
fi
make -j$NUMCPU
make install
@@ -301,7 +306,14 @@ build_cgal()
build_glew()
{
- if [ -e $DEPLOYDIR/include/GL/glew.h ]; then
+ GLEW_INSTALLED=
+ if [ -e $DEPLOYDIR/lib64/libGLEW.so ]; then
+ GLEW_INSTALLED=1
+ fi
+ if [ -e $DEPLOYDIR/lib/libGLEW.so ]; then
+ GLEW_INSTALLED=1
+ fi
+ if [ $GLEW_INSTALLED ]; then
echo "glew already installed. not building"
return
fi
@@ -494,29 +506,29 @@ if [ "`cmake --version | grep 'version 2.[1-6][^0-9]'`" ]; then
build_cmake 2.8.8
fi
-# build_git 1.7.10.3
-
-# Singly build CGAL or OpenCSG
-# (Most systems have all libraries available as packages except CGAL/OpenCSG)
-# (They can be built singly here by passing a command line arg to the script)
+# Singly build certain tools or libraries
if [ $1 ]; then
+ if [ $1 = "git" ]; then
+ build_git 1.7.10.3
+ exit $?
+ fi
if [ $1 = "cgal" ]; then
build_cgal 4.0.2 use-sys-libs
- exit
+ exit $?
fi
if [ $1 = "opencsg" ]; then
build_opencsg 1.3.2
- exit
+ exit $?
fi
- if [ $1 == "qt4" ]; then
+ if [ $1 = "qt4" ]; then
# such a huge build, put here by itself
build_qt4 4.8.4
- exit
+ exit $?
fi
- if [ $1 == "glu" ]; then
+ if [ $1 = "glu" ]; then
# Mesa and GLU split in late 2012, so it's not on some systems
build_glu 9.0.0
- exit
+ exit $?
fi
fi
contact: Jan Huwald // Impressum