cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
export BOOSTDIR=\${INSTALL_ROOT}/${PRODUCT}
+export LD_LIBRARY_PATH=\${BOOSTDIR}/lib:\${LD_LIBRARY_PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
fi
if [ -n "${boostdir}" ] ; then
boostdir=`cd ${boostdir}/..; pwd`
+ ls ${boostdir}/lib/libboost_thread* &> /dev/null
+ if [ "$?" -ne "0" ] ; then
+ return 1
+ fi
ver=`egrep 'BOOST_VERSION [0-9]+' ${boostdir}/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
if [ $ver -ge 103100 ] ; then
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
export BOOSTDIR=${boostdir}
+export LD_LIBRARY_PATH=\${BOOSTDIR}/lib:\${LD_LIBRARY_PATH}
##
EOF
make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
source ${INSTALL_WORK}/$SHRC
-check_jb tar xfz ${SOURCE_DIR}/boost-1.31.0.tar.gz -C ${INSTALL_ROOT}
+makedir ${PRODUCT_DIR}
+
+# unpack
+check_jb tar xzf ${SOURCE_DIR}/boost-1.31.0.tar.gz -C ${INSTALL_WORK}
+
+# build
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/BUILD.LOG <<EOF
+used gcc=$GCC
+EOF
+cd ${PRODUCT_WORK}/tools/build/jam_src
+check_job ${PRODUCT_DIR}/BUILD.LOG ./build.sh
+
+# apply patch to avoid conflicts with Qt signals
+cd ${PRODUCT_WORK}/boost/signals/detail
+sed -e "s%# define BOOST_SIGNALS_NAMESPACE signals%# define BOOST_SIGNALS_NAMESPACE bsignals%g" \
+ signals_common.hpp > signals_common.hpp.orig
+mv -f signals_common.hpp.orig signals_common.hpp
+
+# install
+cd ${PRODUCT_WORK}
+python_root=`find_in_path python $PATH`;
+python_root=`cd ${python_root}/..; pwd`
+python_version=`python -c "import sys; print sys.version[:3]"`
+
+echo "`pwd` -> ./tools/build/jam_src/bin.linuxx86/bjam >> ${PRODUCT_DIR}/INSTALL.LOG"
+./tools/build/jam_src/bin.linuxx86/bjam "-sBOOST_ALL_DYN_LINK=1" \
+ "-sBUILD=release <runtime-link>dynamic <threading>multi" \
+ --prefix=${PRODUCT_DIR} --builddir=${PRODUCT_WORK} \
+ "-sPYTHON_VERSION=$python_version" --with-python-root=${python_root} \
+ install >> ${PRODUCT_DIR}/INSTALL.LOG 2> $INSTALL_WORK/errlog
+
+if [ "$?" -ne "0" ] ; then
+ cat ${PRODUCT_DIR}/INSTALL.LOG
+ cat $INSTALL_WORK/errlog >&2
+ cat $INSTALL_WORK/errlog >> ${PRODUCT_DIR}/INSTALL.LOG
+fi
+
+# move includes
+cd ${PRODUCT_DIR}/include
+mv -f boost-1_31/boost boost
+rm -rf boost-1_31
+
+# create additional links for libraries
+cd ${PRODUCT_DIR}/lib
+for aLib in date_time filesystem prg_exec_monitor python regex signals test_exec_monitor thread unit_test_framework ; do
+ if [ -f libboost_${aLib}-gcc-mt-1_31.so ] ; then
+ ln -s libboost_${aLib}-gcc-mt-1_31.so libboost_${aLib}-mt.so
+ fi
+done
+
+du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
+cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
print_env
}
install_binary()
{
-echo "It impossible to install BOOST 1.31.0 from binaries, try to install it from sources."
-return 1
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/boost-1.31.0.tar.gz -C ${INSTALL_ROOT}
+
+print_env
}
export PROCEDURE=$1;