From 2ae49393f4b9b0c9a0c425196fcae66ce7b702ab Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 17 May 2006 09:01:48 +0000 Subject: [PATCH] Merge from SALOME_3_DS branch --- config_Debian_3.1.xml | 562 +++++++++++++++++++++++++++++++++++ config_Mandriva_2006.0.xml | 562 +++++++++++++++++++++++++++++++++++ config_files/BOOST-1.32.0.sh | 141 +++++++++ config_files/Python-2.3.5.sh | 159 ++++++++++ config_files/Python-2.4.1.sh | 159 ++++++++++ config_files/VTK-4.2.2.sh | 172 ----------- config_files/gcc-3.3.5.sh | 95 ++++++ config_files/gcc-4.0.1.sh | 95 ++++++ config_files/graphviz-1.9.sh | 105 ------- 9 files changed, 1773 insertions(+), 277 deletions(-) create mode 100755 config_Debian_3.1.xml create mode 100755 config_Mandriva_2006.0.xml create mode 100755 config_files/BOOST-1.32.0.sh create mode 100755 config_files/Python-2.3.5.sh create mode 100755 config_files/Python-2.4.1.sh delete mode 100755 config_files/VTK-4.2.2.sh create mode 100755 config_files/gcc-3.3.5.sh create mode 100755 config_files/gcc-4.0.1.sh delete mode 100755 config_files/graphviz-1.9.sh diff --git a/config_Debian_3.1.xml b/config_Debian_3.1.xml new file mode 100755 index 0000000..4c8dc05 --- /dev/null +++ b/config_Debian_3.1.xml @@ -0,0 +1,562 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config_Mandriva_2006.0.xml b/config_Mandriva_2006.0.xml new file mode 100755 index 0000000..f47ce29 --- /dev/null +++ b/config_Mandriva_2006.0.xml @@ -0,0 +1,562 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config_files/BOOST-1.32.0.sh b/config_files/BOOST-1.32.0.sh new file mode 100755 index 0000000..72c8fff --- /dev/null +++ b/config_files/BOOST-1.32.0.sh @@ -0,0 +1,141 @@ +#!/bin/sh + +check_version(){ +if [ -n "${BOOSTDIR}" ] && [ -f ${BOOSTDIR}/include/boost/version.hpp ] ; then + ver=`egrep 'BOOST_VERSION [0-9]+' ${BOOSTDIR}/include/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'` + if [ "$ver" = "103200" ]; then + return 0 + fi +fi +return 1; +} + +print_env() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < /dev/null + if [ "$?" -ne "0" ] ; then + return 1 + fi + ver=`egrep 'BOOST_VERSION [0-9]+' ${boostdir}/include/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'` + if [ $ver -ge 103200 ] ; then + cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <> ${PRODUCT_DIR}/BUILD.LOG < 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 dynamic 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_32/boost boost +rm -rf boost-1_32 + +# 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_32.so ] ; then + ln -s libboost_${aLib}-gcc-mt-1_32.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() +{ +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +source ${INSTALL_WORK}/$SHRC + +check_jb tar xfz ${SOURCE_DIR}/boost-1.32.0.tar.gz -C ${INSTALL_ROOT} + +print_env +} + +export PROCEDURE=$1; +export INSTALL_WORK=$2; +export SOURCE_DIR=$3; +export INSTALL_ROOT=$4; +export PRODUCT_SEQUENCE=$5; +if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="boost" ; fi +export PRODUCT="boost-1.32.0" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +source ./common.sh +$PROCEDURE diff --git a/config_files/Python-2.3.5.sh b/config_files/Python-2.3.5.sh new file mode 100755 index 0000000..48392f5 --- /dev/null +++ b/config_files/Python-2.3.5.sh @@ -0,0 +1,159 @@ +#!/bin/sh + +check_version() +{ +if [ -z "$PYTHONHOME" ]; then + return 1 +fi +isPython=`which python 2>/dev/null` +if [ -n "$isPython" ]; then + # version number is calculated as: *10000+*100+ + # e.g. for Python 2.3.5 it is equal to 20305 + ver=`python -V 2>&1` + ver=`echo $ver | awk '{print $2}' | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'` + if [ $ver -eq 20305 ] ; then + return 0 + fi +fi +return 1 +} + +print_env() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <, and + # and numbers are checked strickly, but number can be larger than required one + # version number is calculated as: *10000+*100+ + # e.g. for Python 2.3.5 it is equal to 20305 + ver=`python -V 2>&1` + maj_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>0) print $1; else print 0}'` + min_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>1) print $2; else print 0}'` + rel_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>2) print $3; else print 0}'` + let ver=$maj_ver*10000+$min_ver*100+$rel_ver + if [ $ver -ge 20305 ] ; then + tmp="\${PYTHONHOME}/bin ${pythonhome}/bin \${PATH} ${PATH}"; + path=`sort_path ${tmp}` + tmp="\${PYTHONHOME}/lib/python\${PYTHON_VERSION} ${pythonhome}/lib/python${maj_ver}.${min_ver} \${PYTHONPATH} ${PYTHONPATH}"; + pythonpath=`sort_path ${tmp}` + tmp="\${PYTHONHOME}/lib ${pythonhome}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; + ld_library_path=`sort_path ${tmp}` + cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < _Makefile +mv -f _Makefile Makefile +GCC=`which gcc` +cat >> ${PRODUCT_DIR}/MAKE.LOG < _"$sc" + mv -f _"$sc" "$sc" + chmod a+x "$sc" + fi +done + +#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} +print_env +} + +install_binary() +{ +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +source ${INSTALL_WORK}/$SHRC + +check_jb tar xfz ${SOURCE_DIR}/Python-2.3.5.tar.gz -C ${INSTALL_ROOT} + +(cd ${PRODUCT_DIR}/lib/python2.3/config; ln -fs ../../libpython2.3.so.1.0 libpython2.3.so) + +cd ${PRODUCT_DIR}/bin +for sc in idle pydoc smtpd.py ; do + if [ -e $sc ] ; then + sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc" + mv -f _"$sc" "$sc" + chmod a+x "$sc" + fi +done + +print_env +} + +export PROCEDURE=$1; +export INSTALL_WORK=$2; +export SOURCE_DIR=$3; +export INSTALL_ROOT=$4; +export PRODUCT_SEQUENCE=$5; +if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="python" ; fi +export PRODUCT="Python-2.3.5" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +source ./common.sh +${PROCEDURE} diff --git a/config_files/Python-2.4.1.sh b/config_files/Python-2.4.1.sh new file mode 100755 index 0000000..cd183ec --- /dev/null +++ b/config_files/Python-2.4.1.sh @@ -0,0 +1,159 @@ +#!/bin/sh + +check_version() +{ +if [ -z "$PYTHONHOME" ]; then + return 1 +fi +isPython=`which python 2>/dev/null` +if [ -n "$isPython" ]; then + # version number is calculated as: *10000+*100+ + # for Python 2.4.1 it is equal to 20401 + ver=`python -V 2>&1` + ver=`echo $ver | awk '{print $2}' | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'` + if [ $ver -eq 20401 ] ; then + return 0 + fi +fi +return 1 +} + +print_env() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <, and + # and numbers are checked strickly, but number can be larger than required one + # version number is calculated as: *10000+*100+ + # for Python 2.4.1 it is equal to 20401 + ver=`python -V 2>&1` + maj_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>0) print $1; else print 0}'` + min_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>1) print $2; else print 0}'` + rel_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>2) print $3; else print 0}'` + let ver=$maj_ver*10000+$min_ver*100+$rel_ver + if [ $ver -ge 20401 ] ; then + tmp="\${PYTHONHOME}/bin ${pythonhome}/bin \${PATH} ${PATH}"; + path=`sort_path ${tmp}` + tmp="\${PYTHONHOME}/lib/python\${PYTHON_VERSION} ${pythonhome}/lib/python${maj_ver}.${min_ver} \${PYTHONPATH} ${PYTHONPATH}"; + pythonpath=`sort_path ${tmp}` + tmp="\${PYTHONHOME}/lib ${pythonhome}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; + ld_library_path=`sort_path ${tmp}` + cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < _Makefile +mv -f _Makefile Makefile +GCC=`which gcc` +cat >> ${PRODUCT_DIR}/MAKE.LOG < _"$sc" + mv -f _"$sc" "$sc" + chmod a+x "$sc" + fi +done + +#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} +print_env +} + +install_binary() +{ +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +source ${INSTALL_WORK}/$SHRC + +check_jb tar xfz ${SOURCE_DIR}/Python-2.4.1.tar.gz -C ${INSTALL_ROOT} + +(cd ${PRODUCT_DIR}/lib/python2.4/config; ln -fs ../../libpython2.4.so.1.0 libpython2.4.so) + +cd ${PRODUCT_DIR}/bin +for sc in idle pydoc smtpd.py ; do + if [ -e $sc ] ; then + sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc" + mv -f _"$sc" "$sc" + chmod a+x "$sc" + fi +done + +print_env +} + +export PROCEDURE=$1; +export INSTALL_WORK=$2; +export SOURCE_DIR=$3; +export INSTALL_ROOT=$4; +export PRODUCT_SEQUENCE=$5; +if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="python" ; fi +export PRODUCT="Python-2.4.1" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +source ./common.sh +${PROCEDURE} diff --git a/config_files/VTK-4.2.2.sh b/config_files/VTK-4.2.2.sh deleted file mode 100755 index 1c1404d..0000000 --- a/config_files/VTK-4.2.2.sh +++ /dev/null @@ -1,172 +0,0 @@ -#!/bin/sh - -check_version() -{ -if [ -z "$VTKHOME" ]; then - return 1 -fi -check_lib_version libvtkCommon.so ${VTKHOME}/lib/vtk -if [ "$?" -eq "0" ]; then - return 0 -fi -return 1 -} - -print_env() -{ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <> ${PRODUCT_DIR}/MAKEcmake.LOG < ${PRODUCT_DIR}/CONFIGURE.LOG < ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log -#du -sk ${INSTALL_WORK}/cmake-1.6.6 >> ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} ${INSTALL_WORK}/cmake-1.6.6 - -# set correct symbolic links - bug of python wrappings installation -cd ${PRODUCT_DIR}/lib/python${python_version}/site-packages/vtk_python -ln -sf ../../../vtk/*Python*.so . - -print_env -} - -install_binary() -{ -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC - -check_jb tar xfz ${SOURCE_DIR}/VTK-4.2.2.tar.gz -C ${INSTALL_ROOT} - -print_env -} - -export PROCEDURE=$1; -export INSTALL_WORK=$2; -export SOURCE_DIR=$3; -export INSTALL_ROOT=$4; -export PRODUCT_SEQUENCE=$5; -if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="vtk" ; fi -export PRODUCT="VTK-4.2.2" -export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} -export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh -$PROCEDURE diff --git a/config_files/gcc-3.3.5.sh b/config_files/gcc-3.3.5.sh new file mode 100755 index 0000000..23fbcc8 --- /dev/null +++ b/config_files/gcc-3.3.5.sh @@ -0,0 +1,95 @@ +#!/bin/sh + +check_version(){ +# version number is calculated as: *10000+*100+ +# e.g. for gcc 3.2 it is equal to 30200, for gcc 3.4.1 - 30401, for gcc 3.3.5 - 30305 +gcc_ver=`gcc -dumpversion | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'` +if [ $gcc_ver -eq 30305 ] ; then + return 0 +fi +return 1 +} + +print_env(){ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <, and + # and numbers are checked strickly, but number can be larger than required one + # version number is calculated as: *10000+*100+ + # e.g. for gcc 3.2 it is equal to 30200, for gcc 3.4.1 - 30401, for gcc 3.3.5 - 30305 + 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}'` + rel_ver=`${gcc_root}/bin/gcc -dumpversion | awk -F. '{if(NF>2) print $3; else print 0}'` + let gcc_ver=$maj_ver*10000+$min_ver*100+$rel_ver + if [ $gcc_ver -ge 30305 ] ; then + tmp="\${GCC_ROOT}/bin ${gcc_root}/bin \${PATH} ${PATH}"; + path=`sort_path ${tmp}` + tmp="\${GCC_ROOT}/lib ${gcc_root}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; + ld_library_path=`sort_path ${tmp}` + cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <*10000+*100+ +# e.g. for gcc 3.2 it is equal to 30200, for gcc 3.4.1 - 30401, for gcc 4.0.1 - 40001 +gcc_ver=`gcc -dumpversion | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'` +if [ $gcc_ver -eq 40001 ] ; then + return 0 +fi +return 1 +} + +print_env(){ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <, and + # and numbers are checked strickly, but number can be larger than required one + # version number is calculated as: *10000+*100+ + # e.g. for gcc 3.2 it is equal to 30200, for gcc 3.4.1 - 30401, for gcc 4.0.1 - 40001 + 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}'` + rel_ver=`${gcc_root}/bin/gcc -dumpversion | awk -F. '{if(NF>2) print $3; else print 0}'` + let gcc_ver=$maj_ver*10000+$min_ver*100+$rel_ver + if [ $gcc_ver -ge 40001 ] ; then + tmp="\${GCC_ROOT}/bin ${gcc_root}/bin \${PATH} ${PATH}"; + path=`sort_path ${tmp}` + tmp="\${GCC_ROOT}/lib ${gcc_root}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; + ld_library_path=`sort_path ${tmp}` + cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh </dev/null` -if [ -n "$isdot" ]; then - ver=`dot -V 2>&1 | awk '{print $3}'` - if [ "$ver" == "1.9" ]; then - return 0 - fi -fi -return 1 -} - -print_env() -{ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} -print_env -} - -install_binary() -{ -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC - -check_jb tar xfz ${SOURCE_DIR}/graphviz-1.9.tar.gz -C ${INSTALL_ROOT} -cd ${PRODUCT_DIR}/lib/graphviz -for l in `ls *.la`; do - libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"` - sed -e "s%${libdir}%${PRODUCT_DIR}/lib/graphviz%g" $l > _$l - libdir=`dirname $libdir` - sed -e "s%${libdir}%${PRODUCT_DIR}/lib/graphviz%g" _$l > $l - rm -f _$l - chmod a+x $l -done - -print_env -} - -export PROCEDURE=$1; -export INSTALL_WORK=$2; -export SOURCE_DIR=$3; -export INSTALL_ROOT=$4; -export PRODUCT_SEQUENCE=$5; -if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="graphviz" ; fi -export PRODUCT="graphviz-1.9" -export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} -export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh -$PROCEDURE -- 2.39.2