summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-07-13 02:31:28 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-07-13 02:31:28 (GMT)
commita2a31e76315da1290deac91c7c34900378b836d2 (patch)
tree3f68f0ccb08490ebdb22113562c956405fc90fcb
parenta872691ab50bb1c62fa357d59e0e3dd2ae586f08 (diff)
detect cmake version. enable build_git
-rwxr-xr-xscripts/linux-build-dependencies.sh27
1 files changed, 25 insertions, 2 deletions
diff --git a/scripts/linux-build-dependencies.sh b/scripts/linux-build-dependencies.sh
index aef58b9..6647d07 100755
--- a/scripts/linux-build-dependencies.sh
+++ b/scripts/linux-build-dependencies.sh
@@ -16,7 +16,9 @@ BASEDIR=$HOME/openscad_deps
OPENSCADDIR=$PWD
SRCDIR=$BASEDIR/src
DEPLOYDIR=$BASEDIR
-NUMCPU=2 # paralell builds for some libraries
+if [ ! $NUMCPU ]; then
+ NUMCPU=1 # paralell builds for some libraries
+fi
printUsage()
{
@@ -24,6 +26,22 @@ printUsage()
echo
}
+build_git()
+{
+ version=$1
+ echo "Building git" $version "..."
+ cd $BASEDIR/src
+ rm -rf git-$version
+ if [ ! -f git-$version.tar.gz ]; then
+ curl -O http://git-core.googlecode.com/files/git-$version.tar.gz
+ fi
+ tar zxf git-$version.tar.gz
+ cd git-$version
+ ./configure --prefix=$DEPLOYDIR
+ make -j$NUMCPU
+ make install
+}
+
build_cmake()
{
version=$1
@@ -208,7 +226,7 @@ fi
echo "Using basedir:" $BASEDIR
echo "Using deploydir:" $DEPLOYDIR
echo "Using srcdir:" $SRCDIR
-echo "Number of CPUs for parallel builds:" $NUMCPU
+echo "Number of CPUs for parallel builds:" $NUMCPU "(use export NUMCPU=x)"
mkdir -p $SRCDIR $DEPLOYDIR
export PATH=$BASEDIR/bin:$PATH
@@ -226,6 +244,11 @@ fi
if [ ! "`command -v cmake`" ]; then
build_cmake 2.8.8
fi
+if [ "`cmake --version | grep 'version 2.[1-6][^0-9]'`" ]; then
+ build_cmake 2.8.8
+fi
+
+# build_git 1.7.10.3
build_eigen 2.0.17
build_gmp 5.0.5
contact: Jan Huwald // Impressum