+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
+# VSR 07/03/06 : this is no more needed
+#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}
+