# build sources
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+# define python version
+python_root=`find_in_path python $PATH`;
+python_root=`cd ${python_root}/..; pwd`
+python_version=`python -c "import sys; print sys.version[:3]"`
+python_xversion=`echo $python_version | awk -F. '{print $1*100+$2}'`
+
cd ${PRODUCT_SRC_DIR}/tools/jam/src
chmod +w ./Jambase
-mv Jambase Jambase.orig
-sed -e 's/\/usr\/share\/boost-build/\$\(PRODUCT_SRC_DIR\)/g' Jambase.orig > Jambase
+sed -i 's/\/usr\/share\/boost-build/\$\(PRODUCT_SRC_DIR\)/g' ./Jambase
-#Adding 2.6 version of python
+# add python version to the build.jam
chmod +w ./build.jam
-mv build.jam build.jam.orig
-sed -e 's/2\.5 2\.4/2\.6 2\.5 2\.4/g' build.jam.orig > build.jam
+py_versions=`grep -E "for local v in ([0-9]\.[0-9])+" ./build.jam | sed -e"s%.*for local v in \(.*\)%\1%g"`
+added=0
+for v in XXX ${py_versions} ; do
+ if [ "${v}" == "XXX" ] ; then continue ; fi
+ vx=`echo ${v} | awk -F. '{print $1*100+$2}'`
+ if [ ${python_xversion} -gt ${vx} ] && [ ${added} -eq 0 ]; then
+ vv="${vv} ${python_version}" ; added=1
+ elif [ ${python_xversion} -eq ${vx} ] ; then
+ continue
+ fi
+ vv="${vv} ${v}"
+done
+if [ ${added} -eq 0 ]; then
+ vv="${vv} ${python_version}"
+fi
+sed -i "s%for local v in\( [0-9]\.[0-9]\)\+%for local v in${vv}%g" ./build.jam
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/BUILD.LOG <<EOF
used gcc=$GCC
EOF
-python_root=`find_in_path python $PATH`;
-python_root=`cd ${python_root}/..; pwd`
-python_version=`python -c "import sys; print sys.version[:3]"`
-
cd ${PRODUCT_SRC_DIR}/tools/jam/src
-check_job ${PRODUCT_DIR}/BUILD.LOG ./build.sh --debug --with-python=${python_root} --with-python-version=2.6
+check_job ${PRODUCT_DIR}/BUILD.LOG ./build.sh --debug --with-python=${python_root} --with-python-version=${python_version}
# install
cd ${PRODUCT_SRC_DIR}
+# patch for gcc 4.3
+sed -i 's%\(#.*include.*<limits>\)%\1\n#include <limits.h>%g' ./boost/limits.hpp
+sed -i 's%\(#.*include.*<string>\)%\1\n#include <string.h>%g' ./boost/wave/util/flex_string.hpp
+
if test `uname -m` = "x86_64" ; then
-export binfolder=bin.linuxx86_64.debug
+ export binfolder=bin.linuxx86_64.debug
else
-export binfolder=bin.linuxx86.debug
+ export binfolder=bin.linuxx86.debug
fi
OPTIONS="toolset=gcc variant=release"
# move includes
cd ${PRODUCT_DIR}/include
-mv -f boost-1_37/boost boost
-rm -rf boost-1_37
+mv -f boost-${BOOST_VVERSION}/boost boost
+rm -rf boost-${BOOST_VVERSION}
# create additional links for libraries
cd ${PRODUCT_DIR}/lib
-#gcc_root="`where_gcc $GCC_VERSION`"
-#gcc_root=`cd ${gcc_root}/..; pwd`
-#maj_ver=`${gcc_root}/bin/gcc -dumpversion | awk -F[.-] '{if(NF>0) print $1; else print 0}'`
-#min_ver=`${gcc_root}/bin/gcc -dumpversion | awk -F[.-] '{if(NF>1) print $2; else print 0}'`
maj_ver=`gcc -dumpversion | awk -F[.-] '{if(NF>0) print $1; else print 0}'`
min_ver=`gcc -dumpversion | awk -F[.-] '{if(NF>1) print $2; else print 0}'`
gcc_ver=$maj_ver$min_ver
listlib=`find . -name "libboost_*-gcc${gcc_ver}-mt-${BOOST_VVERSION}.so" -exec basename {} ";" | sed -e "s%libboost_\(.*\)-gcc${gcc_ver}-mt-${BOOST_VVERSION}.so%\1%g"`
-###"date_time filesystem prg_exec_monitor python regex signals test_exec_monitor thread unit_test_framework"
for aLib in XXX $listlib ; do
if [ "$aLib" == "XXX" ] ; then continue ; fi
aLibLink=libboost_${aLib}-mt.so
aLib=libboost_${aLib}-gcc${gcc_ver}-mt-${BOOST_VVERSION}.so
if [ -f ${aLib} ] && [ ! -e ${aLibLink} ] ; then
- echo "ln -sf ${aLib} ${aLibLink}"
+ ln -sf ${aLib} ${aLibLink}
fi
done