]> SALOME platform Git repositories - tools/install.git/blob - config_files/BOOST-1.31.0.sh
Salome HOME
Update for version 3.0.0
[tools/install.git] / config_files / BOOST-1.31.0.sh
1 #!/bin/sh
2
3 check_version(){
4 if [ -n "${BOOSTDIR}" ]; then
5     ver=`egrep 'BOOST_VERSION [0-9]+' ${BOOSTDIR}/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
6     if [ "$ver" = "103100" ]; then
7         return 0
8     fi
9 fi
10 return 1;
11 }
12
13 print_env()
14 {
15 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
16 #$DELIM ${PRODUCT_TYPE} $DELIM 
17 export BOOSTDIR=\${INSTALL_ROOT}/${PRODUCT}
18 ##
19 EOF
20 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
21 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
22 }
23
24 # looks for the native product and collects it's environment (used by make_env())
25 try_native(){
26 echo "It is impossible to use native BOOST 1.31.0."
27 return 1
28 }
29
30 try_preinstalled(){
31 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
32 return $?
33 }
34
35 install_source()
36 {
37 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
38 source ${INSTALL_WORK}/$SHRC
39
40 check_jb tar xfz ${SOURCE_DIR}/boost-1.31.0.tar.gz -C ${INSTALL_ROOT}
41 rm -fr ${PRODUCT_WORK}
42 print_env
43 }
44
45 install_binary()
46 {
47 echo "It impossible to install BOOST 1.31.0 from binaries, try to install it from sources."
48 return 1
49 }
50
51 export PROCEDURE=$1;
52 export INSTALL_WORK=$2;
53 export SOURCE_DIR=$3;
54 export INSTALL_ROOT=$4;
55 export PRODUCT_SEQUENCE=$5;
56 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="boost" ; fi
57 export PRODUCT="boost-1.31.0"
58 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
59 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
60 source ./common.sh
61 $PROCEDURE