3 ####################################################################################
4 # File : BOOST-1.31.0.sh
5 # Created : Thu Dec 18 12:01:00 2002
6 # Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
8 # Module : Installation Wizard
9 # Copyright : 2002-2007 CEA
11 # This script is the part of the SALOME installation procedure.
13 ####################################################################################
16 if [ -n "${BOOSTDIR}" ] && [ -f ${BOOSTDIR}/include/boost/version.hpp ] ; then
17 ver=`egrep 'BOOST_VERSION [0-9]+' ${BOOSTDIR}/include/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
18 if [ "$ver" = "103100" ]; then
27 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
28 #$DELIM ${PRODUCT_TYPE} $DELIM
29 export BOOSTDIR=\${INSTALL_ROOT}/${PRODUCT}
30 export LD_LIBRARY_PATH=\${BOOSTDIR}/lib:\${LD_LIBRARY_PATH}
33 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
34 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
39 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
40 #$DELIM ${PRODUCT_TYPE}_src $DELIM
44 (test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
45 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
49 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
50 try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
56 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
57 source ${INSTALL_WORK}/$SHRC
60 check_jb tar xzf ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
62 # to generate environment scripts
66 install_source_and_build()
72 makedir ${PRODUCT_DIR}
75 cat >> ${PRODUCT_DIR}/BUILD.LOG <<EOF
78 cd ${PRODUCT_DIR}_SRC/tools/build/jam_src
79 check_job ${PRODUCT_DIR}/BUILD.LOG ./build.sh
81 # apply patch to avoid conflicts with Qt signals
82 # VSR 07/03/06 : this is no more needed
83 #cd ${PRODUCT_DIR}_SRC/boost/signals/detail
84 #sed -e "s%# define BOOST_SIGNALS_NAMESPACE signals%# define BOOST_SIGNALS_NAMESPACE bsignals%g" \
85 # signals_common.hpp > signals_common.hpp.orig
86 #mv -f signals_common.hpp.orig signals_common.hpp
90 python_root=`find_in_path python $PATH`;
91 python_root=`cd ${python_root}/..; pwd`
92 python_version=`python -c "import sys; print sys.version[:3]"`
94 echo "`pwd` -> ./tools/build/jam_src/bin.linuxx86/bjam >> ${PRODUCT_DIR}/INSTALL.LOG"
95 ./tools/build/jam_src/bin.linuxx86/bjam "-sBOOST_ALL_DYN_LINK=1" \
96 "-sBUILD=release <runtime-link>dynamic <threading>multi" \
97 --prefix=${PRODUCT_DIR} --builddir=${PRODUCT_DIR}_SRC \
98 "-sPYTHON_VERSION=$python_version" --with-python-root=${python_root} \
99 install >> ${PRODUCT_DIR}/INSTALL.LOG 2> $INSTALL_WORK/errlog
101 if [ "$?" -ne "0" ] ; then
102 cat ${PRODUCT_DIR}/INSTALL.LOG
103 cat $INSTALL_WORK/errlog >&2
104 cat $INSTALL_WORK/errlog >> ${PRODUCT_DIR}/INSTALL.LOG
108 cd ${PRODUCT_DIR}/include
109 mv -f boost-1_31/boost boost
112 # create additional links for libraries
113 cd ${PRODUCT_DIR}/lib
114 for aLib in date_time filesystem prg_exec_monitor python regex signals test_exec_monitor thread unit_test_framework ; do
115 if [ -f libboost_${aLib}-gcc-mt-1_31.so ] ; then
116 ln -s libboost_${aLib}-gcc-mt-1_31.so libboost_${aLib}-mt.so
120 #du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
123 # remove sources and temporary files after building
124 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
125 test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
128 # to generate environment scripts
134 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
135 source ${INSTALL_WORK}/$SHRC
137 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
139 # to generate environment scripts
144 export INSTALL_WORK=$2;
145 export SOURCE_DIR=$3;
146 export INSTALL_ROOT=$4;
147 export PRODUCT_SEQUENCE=$5;
148 export PRODUCT_TYPE=$6;
149 export INSTALL_PRODUCTS=$7;
152 export PRODUCT="boost-1.31.0"
153 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
154 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}