4 if [ -n "${BOOSTDIR}" ] && [ -f ${BOOSTDIR}/include/boost/version.hpp ] ; then
5 ver=`egrep 'BOOST_VERSION [0-9]+' ${BOOSTDIR}/include/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
6 if [ "$ver" = "103100" ]; then
15 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
16 #$DELIM ${PRODUCT_TYPE} $DELIM
17 export BOOSTDIR=\${INSTALL_ROOT}/${PRODUCT}
18 export LD_LIBRARY_PATH=\${BOOSTDIR}/lib:\${LD_LIBRARY_PATH}
21 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
22 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
25 # looks for the native product and collects it's environment (used by make_env())
27 boostdir="`find_in_path version.hpp /usr/include/boost:/usr/share/include/boost`"
28 if [ -n "${boostdir}" ] ; then
29 boostdir=`cd ${boostdir}/../..; pwd`
30 ls ${boostdir}/lib/libboost_thread* &> /dev/null
31 if [ "$?" -ne "0" ] ; then
34 ver=`egrep 'BOOST_VERSION [0-9]+' ${boostdir}/include/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
35 if [ $ver -ge 103100 ] ; then
36 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
37 #$DELIM ${PRODUCT_TYPE} $DELIM
38 export BOOSTDIR=${boostdir}
39 export LD_LIBRARY_PATH=\${BOOSTDIR}/lib:\${LD_LIBRARY_PATH}
42 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
43 if [ $ver -eq 103100 ] ; then
54 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
60 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
61 source ${INSTALL_WORK}/$SHRC
63 makedir ${PRODUCT_DIR}
66 check_jb tar xzf ${SOURCE_DIR}/boost-1.31.0.tar.gz -C ${INSTALL_WORK}
70 cat >> ${PRODUCT_DIR}/BUILD.LOG <<EOF
73 cd ${PRODUCT_WORK}/tools/build/jam_src
74 check_job ${PRODUCT_DIR}/BUILD.LOG ./build.sh
76 # apply patch to avoid conflicts with Qt signals
77 # VSR 07/03/06 : this is no more needed
78 #cd ${PRODUCT_WORK}/boost/signals/detail
79 #sed -e "s%# define BOOST_SIGNALS_NAMESPACE signals%# define BOOST_SIGNALS_NAMESPACE bsignals%g" \
80 # signals_common.hpp > signals_common.hpp.orig
81 #mv -f signals_common.hpp.orig signals_common.hpp
85 python_root=`find_in_path python $PATH`;
86 python_root=`cd ${python_root}/..; pwd`
87 python_version=`python -c "import sys; print sys.version[:3]"`
89 echo "`pwd` -> ./tools/build/jam_src/bin.linuxx86/bjam >> ${PRODUCT_DIR}/INSTALL.LOG"
90 ./tools/build/jam_src/bin.linuxx86/bjam "-sBOOST_ALL_DYN_LINK=1" \
91 "-sBUILD=release <runtime-link>dynamic <threading>multi" \
92 --prefix=${PRODUCT_DIR} --builddir=${PRODUCT_WORK} \
93 "-sPYTHON_VERSION=$python_version" --with-python-root=${python_root} \
94 install >> ${PRODUCT_DIR}/INSTALL.LOG 2> $INSTALL_WORK/errlog
96 if [ "$?" -ne "0" ] ; then
97 cat ${PRODUCT_DIR}/INSTALL.LOG
98 cat $INSTALL_WORK/errlog >&2
99 cat $INSTALL_WORK/errlog >> ${PRODUCT_DIR}/INSTALL.LOG
103 cd ${PRODUCT_DIR}/include
104 mv -f boost-1_31/boost boost
107 # create additional links for libraries
108 cd ${PRODUCT_DIR}/lib
109 for aLib in date_time filesystem prg_exec_monitor python regex signals test_exec_monitor thread unit_test_framework ; do
110 if [ -f libboost_${aLib}-gcc-mt-1_31.so ] ; then
111 ln -s libboost_${aLib}-gcc-mt-1_31.so libboost_${aLib}-mt.so
115 du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
116 cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
123 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
124 source ${INSTALL_WORK}/$SHRC
126 check_jb tar xfz ${SOURCE_DIR}/boost-1.31.0.tar.gz -C ${INSTALL_ROOT}
132 export INSTALL_WORK=$2;
133 export SOURCE_DIR=$3;
134 export INSTALL_ROOT=$4;
135 export PRODUCT_SEQUENCE=$5;
136 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="boost" ; fi
137 export PRODUCT="boost-1.31.0"
138 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
139 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}