From: vsr Date: Thu, 16 Nov 2006 09:05:36 +0000 (+0000) Subject: Fix pb of previous integration X-Git-Tag: V_3_2_4~35 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=babd4c4d9911e305678d0d7a998a7ddb158e7c82;p=tools%2Finstall.git Fix pb of previous integration --- diff --git a/config_files/GHS3DPLUGIN_BIN.sh b/config_files/GHS3DPLUGIN_BIN.sh index e69de29..f52e6cb 100755 --- a/config_files/GHS3DPLUGIN_BIN.sh +++ b/config_files/GHS3DPLUGIN_BIN.sh @@ -0,0 +1,112 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : GHS3DPLUGIN_BIN.sh +# Created : Thu Dec 18 12:01:00 2002 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2006 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +check_version(){ +if [ -n "${GHS3DPLUGIN_ROOT_DIR}" ]; then + check_lib_version VERSION ${GHS3DPLUGIN_ROOT_DIR}/bin/salome + if [ "$?" -eq "0" ]; then + ver=`cat ${GHS3DPLUGIN_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` + if [ "$ver" = "3.2.3" ]; then + return 0 + fi + fi + return 0 +fi +return 1 +} + +print_env(){ + +if test `uname -m` = "x86_64" ; then +export LIB_PREFIX=64 +else +export LIB_PREFIX="" +fi + +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh </dev/null` +if [ "$ver" == "22.0" ]; then + return 0 +fi +return 1 +} + +print_env(){ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh </dev/null` +if [ -n "${numpath}" ] ; then + numpath=`dirname ${numpath}` + ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null | awk -F. '{v=0;for(i=1;i<=NF;i++)v=v*100+$i;print v}'` + if [ $ver -ge 2200 ] ; then + tmp="${numpath} ${numpath} \${PYTHONPATH} ${PYTHONPATH}"; + pythonpath=`sort_path ${tmp}` + cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} +print_env +} + +install_binary() +{ +check_jb tar xfz ${SOURCE_DIR}/Numeric-22.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="numeric" ; fi +export PRODUCT="Numeric-22.0" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +source ./common.sh +$PROCEDURE diff --git a/config_files/Numeric-23.7.sh b/config_files/Numeric-23.7.sh index e69de29..25393cc 100755 --- a/config_files/Numeric-23.7.sh +++ b/config_files/Numeric-23.7.sh @@ -0,0 +1,152 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : Numeric-23.7.sh +# Created : Thu Dec 18 12:01:00 2002 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2006 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +check_version(){ +ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null` +if [ "$ver" == "23.7" ]; then + return 0 +fi +return 1 +} + +print_env(){ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh </dev/null` +if [ -n "${numpath}" ] ; then + numpath=`dirname ${numpath}` + ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null | awk -F. '{v=0;for(i=1;i<=NF;i++)v=v*100+$i;print v}'` + if [ $ver -ge 2307 ] ; then + tmp="${numpath} ${numpath} \${PYTHONPATH} ${PYTHONPATH}"; + pythonpath=`sort_path ${tmp}` + cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < _setup.py + mv _setup.py setup.py + fi + if [ "$f77blas_nf" -eq "1" ] ; then + sed -e "s%\(^libraries_list = \[.*\)\('f77blas', \)\(.*\)$%\1\3%g" setup.py > _setup.py + mv _setup.py setup.py + fi + if [ "$cblas_nf" -eq "1" ] ; then + sed -e "s%\(^libraries_list = \[.*\)\('cblas', \)\(.*\)$%\1\3%g" setup.py > _setup.py + mv _setup.py setup.py + fi + if [ "$atlas_nf" -eq "1" ] ; then + sed -e "s%\(^libraries_list = \[.*\)\('atlas', \)\(.*\)$%\1\3%g" setup.py > _setup.py + mv _setup.py setup.py + fi + if [ "$g2c_nf" -eq "1" ] ; then + sed -e "s%\(^libraries_list = \[.*\)\('g2c'\)\(.*\)$%\1\3%g" setup.py > _setup.py + mv _setup.py setup.py + fi + sed -e "s%^use_dotblas = 1%use_dotblas = 0%g" setup.py > _setup.py + mv _setup.py setup.py + sed -e "s%#\(os.path.join('Src', 'blas_lite.c'),\)%\1%g" setup.py > _setup.py + mv _setup.py setup.py + sed -e "s%#\(os.path.join('Src', 'f2c_lite.c'),\)%\1%g" setup.py > _setup.py + mv _setup.py setup.py + sed -e "s%#\(os.path.join('Src', 'zlapack_lite.c'),\)%\1%g" setup.py > _setup.py + mv _setup.py setup.py + sed -e "s%#\(os.path.join('Src', 'dlapack_lite.c')\)%\1%g" setup.py > _setup.py + mv _setup.py setup.py + chmod a+x setup.py +fi + +check_job ${PRODUCT_DIR}/INSTALL.LOG python setup.py install --prefix=${PRODUCT_DIR} + + if test `uname -m` = "x86_64" ; then + cd ${PRODUCT_DIR}; ln -sf lib64 lib + fi + +#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} +print_env +} + +install_binary() +{ +check_jb tar xfz ${SOURCE_DIR}/Numeric-23.7.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="numeric" ; fi +export PRODUCT="Numeric-23.7" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +source ./common.sh +$PROCEDURE diff --git a/config_files/VISU_SRC.sh b/config_files/VISU_SRC.sh index e69de29..9aca5bf 100755 --- a/config_files/VISU_SRC.sh +++ b/config_files/VISU_SRC.sh @@ -0,0 +1,83 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : VISU_SRC.sh +# Created : Thu Dec 18 12:01:00 2002 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2006 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +check_version(){ +if [ -n "${VISU_SRC_DIR}" ]; then + check_lib_version VERSION ${VISU_SRC_DIR}/bin + if [ "$?" -eq "0" ]; then + ver=`cat ${VISU_SRC_DIR}/bin/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` + if [ "$ver" = "3.2.3" ]; then + return 0 + fi + fi +fi +return 1 +} + +print_env(){ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${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 < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < /dev/null) + +# apply patch: to make compilable with CASCADE-6.1.1 +(cd ${PRODUCT_WORK}/libsrc; sed -e "s%\(.*\)-DHAVE_LIMITS\'%\1-DHAVE_LIMITS_H%g" makefile.inc > makefile.inc.new; mv makefile.inc.new makefile.inc) + +# set platform type variable +if test `uname -m` = "x86_64" ; then + export MACHINE=LINUX64 +else + export MACHINE=LINUX +fi + +# compile +for directory in csg general geom2d gprim interface linalg occ meshing opti stlgeom ; do + cd ${PRODUCT_WORK}/libsrc/${directory} + check_job ${PRODUCT_DIR}/MAKE.LOG make +done + +# install +mkdir -p ${PRODUCT_DIR}/lib +cp -f ${PRODUCT_WORK}/lib/${MACHINE}/* ${PRODUCT_DIR}/lib +mkdir -p ${PRODUCT_DIR}/include +cp -f ${PRODUCT_WORK}/libsrc/interface/nglib.h ${PRODUCT_DIR}/include +for directory in csg general geom2d gprim linalg occ meshing opti stlgeom ; do + cp -f ${PRODUCT_WORK}/libsrc/${directory}/*.hpp ${PRODUCT_DIR}/include +done +cp -f ${PRODUCT_WORK}/libsrc/include/mystdlib.h ${PRODUCT_WORK}/libsrc/include/mydefs.hpp ${PRODUCT_DIR}/include + +#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}/netgen-4.5.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="netgen" ; fi +export PRODUCT="netgen-4.5" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +source ./common.sh +$PROCEDURE diff --git a/config_files/tcltk-8.3.3.sh b/config_files/tcltk-8.3.3.sh index e69de29..566fd6c 100755 --- a/config_files/tcltk-8.3.3.sh +++ b/config_files/tcltk-8.3.3.sh @@ -0,0 +1,231 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : tcltk-8.3.3.sh +# Created : Thu Dec 18 12:01:00 2002 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2006 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +VERSION="8.3" + +check_version() +{ +if [ -z "$TCLHOME" ]; then + echo "TCLHOME doesn't set" + return 1 +fi + +# check tcl version +tcl_cfg=${TCLHOME}/lib/tclConfig.sh +if [ ! -f ${tcl_cfg} ]; then tcl_cfg=${TCLHOME}/tcl${VERSION}/lib/tclConfig.sh; fi +if [ ! -f ${tcl_cfg} ]; then tcl_cfg=${TCLHOME}/lib/tcl${VERSION}/tclConfig.sh; fi +if [ ! -f ${tcl_cfg} ]; then tcl_cfg=${TCLHOME}/lib/tcl${VERSION}/lib/tclConfig.sh; fi +if [ -f ${tcl_cfg} ]; then + tcl_ver=`awk '/^TCL_VERSION=.*/ {gsub("TCL_VERSION=","",$1);print $1}' ${tcl_cfg} | cut -d "'" -f 2` + if [ "$tcl_ver" != ${VERSION} ] ; then + return 1 + fi +else + return 1 +fi + +# check tk version +tk_cfg=${TCLHOME}/lib/tkConfig.sh +if [ ! -f ${tk_cfg} ]; then tk_cfg=${TCLHOME}/tk${VERSION}/tkConfig.sh; fi +if [ ! -f ${tk_cfg} ]; then tk_cfg=${TCLHOME}/lib/tk${VERSION}/tkConfig.sh; fi +if [ ! -f ${tk_cfg} ]; then tk_cfg=${TCLHOME}/lib/tk${VERSION}/lib/tkConfig.sh; fi +if [ -f ${tk_cfg} ]; then + tk_ver=`awk '/^TK_VERSION=.*/ {gsub("TK_VERSION=","",$1);print $1}' ${tk_cfg} | cut -d "'" -f 2` + if [ "$tk_ver" != ${VERSION} ] ; then + return 1 + fi +else + return 1 +fi + +return 0 +} + +print_env() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/MAKEINSTALL.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/MAKEINSTALL.LOG <> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/MAKEINSTALLEXEC.LOG < ${PRODUCT_DIR}/size.log +#du -sk ${INSTALL_WORK}/tk8.3.3 >> ${PRODUCT_DIR}/size.log +#du -sk ${INSTALL_WORK}/tclx8.3 >> ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR} +rm -fr ${INSTALL_WORK}/tcl8.3.3 ${INSTALL_WORK}/tk8.3.3 ${INSTALL_WORK}/tclx8.3 +print_env +} + +install_binary() +{ +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +source ${INSTALL_WORK}/$SHRC + +check_jb tar xfz ${SOURCE_DIR}/tcltk-8.3.3.tar.gz -C ${INSTALL_ROOT} + +# overriding installation path +cd ${PRODUCT_DIR}/lib +old_prefix=`grep -e "^TCL_PREFIX='.*'" tclConfig.sh | sed -e "s%^TCL_PREFIX='\(.*\)'%\1%g"` +sed -e "s%${old_prefix}%${PRODUCT_DIR}%g" tclConfig.sh > _tclConfig.sh +mv -f _tclConfig.sh tclConfig.sh +sed -e "s%${old_prefix}%${PRODUCT_DIR}%g" tkConfig.sh > _tkConfig.sh +mv -f _tkConfig.sh tkConfig.sh + +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="tcl" ; fi +export PRODUCT="tcltk-8.3.3" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +source ./common.sh +$PROCEDURE