]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
SALOME 6.5.0 preparation: update script for tcl/tk (8.5.8)
authorvsr <vsr@opencascade.com>
Tue, 3 Apr 2012 20:33:58 +0000 (20:33 +0000)
committervsr <vsr@opencascade.com>
Tue, 3 Apr 2012 20:33:58 +0000 (20:33 +0000)
13 files changed:
config_CentOS_5.5_64bit.xml
config_Debian_4.0.xml
config_Debian_4.0_64bit.xml
config_Debian_5.0_64bit.xml
config_Debian_6.0_64bit.xml
config_Mandriva_2008.0.xml
config_Mandriva_2008.0_64bit.xml
config_Mandriva_2010.0.xml
config_Mandriva_2010.0_64bit.xml
config_Red_Hat_Enterprise_WS_4_64bit.xml
config_Scientific_SL_5.1_64bit.xml
config_files/tcltk-8.5.8.sh [deleted file]
config_files/tcltk.sh [new file with mode: 0755]

index a406404ca878e3130ec01f51647779aae0e0d973..b873d4755ea199acc032075484829ce2c50ff8e2 100755 (executable)
                    version="8.5.8" 
                    disable="false"
                    installdiskspace="10765,28789,50385"
-                   script="tcltk-8.5.8.sh"/>
+                   script="tcltk.sh"/>
     </product>
     <product name="Python" 
             type="prerequisite"
index 70b9a6695ef412664ddc4bd458b03df5841c0ac5..f7b5e0a7f16f4f224948c2527b5c05aa840eeed5 100755 (executable)
                    version="8.5.8" 
                    disable="false"
                    installdiskspace="10765,28789,50385"
-                   script="tcltk-8.5.8.sh"/>
+                   script="tcltk.sh"/>
     </product>
     <product name="Python" 
             type="prerequisite"
index 8fda2100986a102232e028db9c4cb41017c0019d..242bb6fbc5dc7caea3afa11ba785bbbfad4b5635 100755 (executable)
                    version="8.5.8" 
                    disable="false"
                    installdiskspace="10765,28789,50385"
-                   script="tcltk-8.5.8.sh"/>
+                   script="tcltk.sh"/>
     </product>
     <product name="Python" 
             type="prerequisite"
index ce5b588f19f3579323fa973b38f2cda90734cb69..1349f038c511d06bd9db4cce747ac2d684bec8cc 100755 (executable)
                    version="8.5.8" 
                    disable="false"
                    installdiskspace="10765,28789,50385"
-                   script="tcltk-8.5.8.sh"/>
+                   script="tcltk.sh"/>
     </product>
     <product name="Python" 
             type="prerequisite"
index 152dcf72a4e9246e2419c58af0df53f7b0c84975..9151750c245aa7973ee56d2c08e0df3823f2dd30 100755 (executable)
                    version="8.5.8" 
                    disable="false"
                    installdiskspace="10765,28789,50385"
-                   script="tcltk-8.5.8.sh"/>
+                   script="tcltk.sh"/>
     </product>
     <product name="Python" 
             type="prerequisite"
index 641b2f16e2182485ec8f4cc4fc62fb92d8c98ff8..9ce738e1faf74e5752a65ccd03059e58477aee10 100755 (executable)
                    version="8.5.8" 
                    disable="false"
                    installdiskspace="10765,28789,50385"
-                   script="tcltk-8.5.8.sh"/>
+                   script="tcltk.sh"/>
     </product>
     <product name="Python" 
             type="prerequisite"
index 3be808787de3f795f7d807d9da52b6fb9530d564..d884d0cf6bcfc2f6ecee5ad3e6ae91e312cd93d4 100755 (executable)
                    version="8.5.8" 
                    disable="false"
                    installdiskspace="10765,28789,50385"
-                   script="tcltk-8.5.8.sh"/>
+                   script="tcltk.sh"/>
     </product>
     <product name="Python" 
             type="prerequisite"
index b18973c83804305449bc0f643c83d47f1cf40c64..966338965017a60156044478102db5fa70278f80 100755 (executable)
                    version="8.5.8" 
                    disable="false"
                    installdiskspace="10765,28789,50385"
-                   script="tcltk-8.5.8.sh"/>
+                   script="tcltk.sh"/>
     </product>
     <product name="Python" 
             type="prerequisite"
index 0e0fda502ab2922171cbb5f5b437623778ad344f..70457513a003c22afd2a845b1d1d959cefe27e2c 100755 (executable)
                    version="8.5.8" 
                    disable="false"
                    installdiskspace="10765,28789,50385"
-                   script="tcltk-8.5.8.sh"/>
+                   script="tcltk.sh"/>
     </product>
     <product name="Python" 
             type="prerequisite"
index bb046548643ce7b0e87ebd1688c25c26173807fb..22a0f7fc7e47d7dacabbd549270c18cad3a498a1 100755 (executable)
                    version="8.5.8" 
                    disable="false"
                    installdiskspace="10765,28789,50385"
-                   script="tcltk-8.5.8.sh"/>
+                   script="tcltk.sh"/>
     </product>
     <product name="Python" 
             type="prerequisite"
index 1edb7746be5d8cb2cf17a9eaba9350efca7ead10..6eafa57538b515cee28fee78e05658d8498165e0 100755 (executable)
                    version="8.5.8" 
                    disable="false"
                    installdiskspace="10765,28789,50385"
-                   script="tcltk-8.5.8.sh"/>
+                   script="tcltk.sh"/>
     </product>
     <product name="Python" 
             type="prerequisite"
diff --git a/config_files/tcltk-8.5.8.sh b/config_files/tcltk-8.5.8.sh
deleted file mode 100755 (executable)
index 6949de4..0000000
+++ /dev/null
@@ -1,265 +0,0 @@
-#!/bin/bash -noprofile
-
-####################################################################################
-#  File      : tcltk-8.5.8.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-2008 CEA
-#
-#  This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-VERSION="8.5"
-
-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_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export TCLHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${TCLHOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${TCLHOME}/lib:\${LD_LIBRARY_PATH}
-export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl${VERSION} \${TCLHOME}/lib/tk${VERSION}"
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-print_env_src()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF 
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-mkdir -p ${PRODUCT_SRC_DIR}
-
-check_jb tar xfz ${SOURCE_DIR}/tcl8.5.8.tar.gz -C ${PRODUCT_SRC_DIR}
-check_jb tar xfz ${SOURCE_DIR}/tk8.5.8.tar.gz -C ${PRODUCT_SRC_DIR}
-check_jb tar xfz ${SOURCE_DIR}/tclx8.4.0.tar.gz -C ${PRODUCT_SRC_DIR}
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-
-cd ${PRODUCT_SRC_DIR}/tcl8.5.8_SRC/unix
-cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
--------------------
-Configuring tcl...
--------------------
-EOF
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --enable-gcc --enable-shared --enable-threads \
-    --prefix=${PRODUCT_DIR}
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
--------------------
-Making tcl...
--------------------
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-cat >> ${PRODUCT_DIR}/MAKEINSTALL.LOG <<EOF
--------------------
-Installing tcl...
--------------------
-EOF
-check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
-
-(cd ${PRODUCT_DIR}/bin; ln -fs tclsh8.5 tclsh)
-(cd ${PRODUCT_DIR}/lib; ln -fs libtcl8.5.so libtcl.so)
-(cd ${PRODUCT_DIR}/lib; ln -fs libtclstub8.5.a libtclstub.a)
-
-cd ${PRODUCT_SRC_DIR}/tk8.5.8_SRC/unix
-cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
--------------------
-Configuring tk...
--------------------
-EOF
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --enable-gcc --enable-shared --enable-threads \
-    --prefix=${PRODUCT_DIR} --with-tcl=${PRODUCT_DIR}/lib
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
--------------------
-Making tk...
--------------------
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-cat >> ${PRODUCT_DIR}/MAKEINSTALL.LOG <<EOF
--------------------
-Installing tk...
--------------------
-EOF
-check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
-
-(cd ${PRODUCT_DIR}/bin; ln -fs wish8.5 wish)
-(cd ${PRODUCT_DIR}/lib; ln -fs libtk8.5.so libtk.so)
-(cd ${PRODUCT_DIR}/lib; ln -fs libtkstub8.5.a libtkstub.a)
-
-#vsr: patch tclx 8.4.0 to make it compiliable on Mandriva 2006.0
-#mv Common.mk.in Common.mk.in.orig
-#sed -e 's/@DEFS@/-DSTDC_HEADERS=1 -DNDEBUG=1 -DRETSIGTYPE=void/g' Common.mk.in.orig > 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 <<EOF
--------------------
-Configuring tclx...
--------------------
-EOF
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
-    ./configure --enable-gcc --enable-shared --enable-threads \
-    --prefix=${PRODUCT_DIR}  --with-tcl=${PRODUCT_DIR}/lib  --with-tk=${PRODUCT_DIR}/lib
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
--------------------
-Making tclx...
--------------------
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-cat >> ${PRODUCT_DIR}/MAKEINSTALLEXEC.LOG <<EOF
--------------------
-Installing tclx...
--------------------
-EOF
-check_job ${PRODUCT_DIR}/MAKEINSTALLEXEC.LOG make install
-
-(cd ${PRODUCT_DIR}/lib; ln -fs tclx8.4/libtclx8.4.so libtclx.so)
-#(cd ${PRODUCT_DIR}/lib; ln -fs tclx8.4/libtclx8.4.a  libtclx.a)
-#(cd ${PRODUCT_DIR}/lib; ln -fs tclx8.4/libtkx8.4.so  libtkx.so)
-#(cd ${PRODUCT_DIR}/lib; ln -fs tclx8.4/libtkx8.4.a   libtkx.a)
-
-cd ${PRODUCT_DIR}
-
-  if test `uname -m` = "x86_64" ; then
-  if [ ! -h lib64 ]; then ln -s lib lib64; fi
-      fi
-
-# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
-    test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
-fi
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_binary()
-{
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-# create a product directory
-test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
-
-# 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
-
-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 (executable)
index 0000000..bde8412
--- /dev/null
@@ -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 <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export TCLHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${TCLHOME}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${TCLHOME}/lib:\${LD_LIBRARY_PATH}
+export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl${TCL_LIBVERSION} \${TCLHOME}/lib/tk${TK_LIBVERSION}"
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+print_env_src()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE}_src $DELIM
+# nothing to do
+##
+EOF
+(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+mkdir -p ${PRODUCT_SRC_DIR}
+
+check_jb tar xfz ${SOURCE_DIR}/tcl-${TCL_VERSION}.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/tk-${TK_VERSION}.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/tclx-${TCLX_VERSION}.tar.gz -C ${PRODUCT_SRC_DIR}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+cd ${PRODUCT_SRC_DIR}/tcl-${TCL_VERSION}_SRC/unix
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Configuring tcl...
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --enable-gcc --enable-shared --enable-threads --prefix=${PRODUCT_DIR}
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+-------------------
+Making tcl...
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+cat >> ${PRODUCT_DIR}/MAKEINSTALL.LOG <<EOF
+-------------------
+Installing tcl...
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
+
+(cd ${PRODUCT_DIR}/bin; ln -fs tclsh${TCL_LIBVERSION} tclsh)
+(cd ${PRODUCT_DIR}/lib; ln -fs libtcl${TCL_LIBVERSION}.so libtcl.so)
+(cd ${PRODUCT_DIR}/lib; ln -fs libtclstub${TCL_LIBVERSION}.a libtclstub.a)
+
+cd ${PRODUCT_SRC_DIR}/tk-${TK_VERSION}_SRC/unix
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Configuring tk...
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --enable-gcc --enable-shared --enable-threads --prefix=${PRODUCT_DIR} --with-tcl=${PRODUCT_DIR}/lib
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+-------------------
+Making tk...
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+cat >> ${PRODUCT_DIR}/MAKEINSTALL.LOG <<EOF
+-------------------
+Installing tk...
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
+
+(cd ${PRODUCT_DIR}/bin; ln -fs wish${TK_VERSION} wish)
+(cd ${PRODUCT_DIR}/lib; ln -fs libtk${TK_VERSION}.so libtk.so)
+(cd ${PRODUCT_DIR}/lib; ln -fs libtkstub${TK_VERSION}.a libtkstub.a)
+
+cd ${PRODUCT_SRC_DIR}/tclx_${TCLX_VERSION}_SRC
+#INV - bug in a tclx configure 
+chmod +w configure && sed -i "s/relid'/relid/" configure
+
+cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+-------------------
+Configuring tclx...
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --enable-gcc --enable-shared --enable-threads \
+    --prefix=${PRODUCT_DIR} --with-tcl=${PRODUCT_DIR}/lib --with-tk=${PRODUCT_DIR}/lib
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+-------------------
+Making tclx...
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+cat >> ${PRODUCT_DIR}/MAKEINSTALL.LOG <<EOF
+-------------------
+Installing tclx...
+-------------------
+EOF
+check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
+
+(cd ${PRODUCT_DIR}/lib; ln -fs tclx${TCLX_LIBVERSION}/libtclx${TCLX_LIBVERSION}.so libtclx.so)
+
+cd ${PRODUCT_DIR}
+test `uname -m` = "x86_64" && test ! -e lib64 && ln -s lib lib64
+
+# remove sources and temporary files after building
+if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+    test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+# create a product directory
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+
+# overriding installation path
+cd ${PRODUCT_DIR}/lib
+old_prefix=`grep -e "^TCL_PREFIX='.*'" tclConfig.sh | sed -e "s%^TCL_PREFIX='\(.*\)'%\1%g"`
+sed -i "s%${old_prefix}%${PRODUCT_DIR}%g" tclConfig.sh
+sed -i "s%${old_prefix}%${PRODUCT_DIR}%g" tkConfig.sh
+
+cd ${PRODUCT_DIR}
+test `uname -m` = "x86_64" && test ! -e lib64 && ln -s lib lib64
+
+# 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-${TCL_VERSION}"
+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