From: vsr Date: Tue, 3 Apr 2012 20:33:58 +0000 (+0000) Subject: SALOME 6.5.0 preparation: update script for tcl/tk (8.5.8) X-Git-Tag: V6_5_0b1~43 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=deaba20e5cc269d64df11b1b2e4109b5bdaa5902;p=tools%2Finstall.git SALOME 6.5.0 preparation: update script for tcl/tk (8.5.8) --- diff --git a/config_CentOS_5.5_64bit.xml b/config_CentOS_5.5_64bit.xml index a406404..b873d47 100755 --- a/config_CentOS_5.5_64bit.xml +++ b/config_CentOS_5.5_64bit.xml @@ -372,7 +372,7 @@ version="8.5.8" disable="false" installdiskspace="10765,28789,50385" - script="tcltk-8.5.8.sh"/> + script="tcltk.sh"/> + script="tcltk.sh"/> + script="tcltk.sh"/> + script="tcltk.sh"/> + script="tcltk.sh"/> + script="tcltk.sh"/> + script="tcltk.sh"/> + script="tcltk.sh"/> + script="tcltk.sh"/> + script="tcltk.sh"/> + script="tcltk.sh"/> ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.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 < Common.mk.in -#cd ${PRODUCT_SRC_DIR}/tclx8.4.0_SRC/tcl/unix -#mv tclxConfig.sh.in tclxConfig.sh.in.orig -#sed -e 's/@DEFS@/ -DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void /g' tclxConfig.sh.in.orig > tclxConfig.sh.in -#cd ${PRODUCT_SRC_DIR}/tclx8.4.0_SRC/tk/unix -#mv tkxConfig.sh.in tkxConfig.sh.in.orig -#sed -e 's/@DEFS@/ -DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void /g' tkxConfig.sh.in.orig > tkxConfig.sh.in - -#cd ${PRODUCT_SRC_DIR}/tclx8.4.0_SRC/unix -#VRV - bug in a tclx configure -#chmod +w ./configure -#echo -e '/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 1\ns/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 1/test "$no_create" = yes || ${CONFIG_SHELL-\/bin\/sh} $CONFIG_STATUS || exit 0\nwq' | ed - configure -#INV - bug in a tclx configure - -cd ${PRODUCT_SRC_DIR}/tclx8.4.0_SRC -#INV - bug in a tclx configure -cp configure configure.orig && sed "s/relid'/relid/" configure.orig > configure -chmod 755 ./configure - -cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/MAKEINSTALLEXEC.LOG < _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 - -cd ${PRODUCT_DIR} - if test `uname -m` = "x86_64" ; then - if [ ! -h lib64 ]; then ln -s lib lib64; fi - fi - -# to generate environment scripts -try_preinstalled -} - -export PROCEDURE=$1; -export INSTALL_WORK=$2; -export SOURCE_DIR=$3; -export INST_ROOT=$4; -export PRODUCT_SEQUENCE=$5; -export PRODUCT_TYPE=$6; -export INSTALL_PRODUCTS=$7; -shift -REMOVE_SRC_TMP=$8; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="tcltk-8.5.8" -export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}} -export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC -source ./common.sh -$PROCEDURE diff --git a/config_files/tcltk.sh b/config_files/tcltk.sh new file mode 100755 index 0000000..bde8412 --- /dev/null +++ b/config_files/tcltk.sh @@ -0,0 +1,244 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : tcltk.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-2012 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +# +# tcl, tk and tclX versions +# +TCL_VERSION=8.5.8 +TK_VERSION=8.5.8 +TCLX_VERSION=8.4.0 +# +TCL_LIBVERSION=`echo $TCL_VERSION | awk -F. '{printf("%d.%d", $1, $2)}'` +TK_LIBVERSION=`echo $TK_VERSION | awk -F. '{printf("%d.%d", $1, $2)}'` +TCLX_LIBVERSION=`echo $TCLX_VERSION | awk -F. '{printf("%d.%d", $1, $2)}'` + +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${TCL_LIBVERSION}/lib/tclConfig.sh; fi +if [ ! -f ${tcl_cfg} ]; then tcl_cfg=${TCLHOME}/lib/tcl${TCL_LIBVERSION}/tclConfig.sh; fi +if [ ! -f ${tcl_cfg} ]; then tcl_cfg=${TCLHOME}/lib/tcl${TCL_LIBVERSION}/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" != ${TCL_LIBVERSION} ] ; 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${TK_LIBVERSION}/tkConfig.sh; fi +if [ ! -f ${tk_cfg} ]; then tk_cfg=${TCLHOME}/lib/tk${TK_LIBVERSION}/tkConfig.sh; fi +if [ ! -f ${tk_cfg} ]; then tk_cfg=${TCLHOME}/lib/tk${TK_LIBVERSION}/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" != ${TK_LIBVERSION} ] ; then + return 1 + fi +else + return 1 +fi + +return 0 +} + +print_env_bin() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.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}/MAKEINSTALL.LOG <