From: vsr Date: Tue, 20 Oct 2009 19:58:56 +0000 (+0000) Subject: Minor bug fixes X-Git-Tag: V5_1_3~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=88491400b786626479ce56058f702a640ae01c0f;p=tools%2Finstall.git Minor bug fixes Auto python version definition --- diff --git a/config_files/BOOST-1.40.0.sh b/config_files/BOOST-1.40.0.sh index 3afdf41..79296bc 100755 --- a/config_files/BOOST-1.40.0.sh +++ b/config_files/BOOST-1.40.0.sh @@ -79,36 +79,55 @@ install_source # 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 <\)%\1\n#include %g' ./boost/limits.hpp +sed -i 's%\(#.*include.*\)%\1\n#include %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" @@ -125,32 +144,21 @@ if [ "$?" -ne "0" ] ; then cat $INSTALL_WORK/errlog >> ${PRODUCT_DIR}/INSTALL.LOG fi -# move includes -#cd ${PRODUCT_DIR}/include -#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