From 25a6316d0083a0467c0e73164757bbcc39d8e542 Mon Sep 17 00:00:00 2001 From: maintenance team Date: Tue, 25 Sep 2007 11:07:16 +0000 Subject: [PATCH] Adding tcltk 8.4.13 to IP for Mandriva2007 --- config_files/tcltk-8.4.13.sh | 245 +++++++++++++++++++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100755 config_files/tcltk-8.4.13.sh diff --git a/config_files/tcltk-8.4.13.sh b/config_files/tcltk-8.4.13.sh new file mode 100755 index 0000000..4c8c94b --- /dev/null +++ b/config_files/tcltk-8.4.13.sh @@ -0,0 +1,245 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : tcltk-8.4.13.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-2007 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +VERSION="8.4" + +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 < Common.mk.in +cd ${INSTALL_WORK}/tclx8.3.5/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 ${INSTALL_WORK}/tclx8.3.5/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 ${INSTALL_WORK}/tclx8.3.5/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 +cp configure configure.orig && sed "s/relid'/relid/" configure.orig > configure +chmod 755 ./configure +#VRV - bug in a tclx configure +cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <> ${PRODUCT_DIR}/MAKE.LOG <> ${PRODUCT_DIR}/MAKEINSTALLEXEC.LOG < ${PRODUCT_DIR}/size.log +#du -sk ${INSTALL_WORK}/tk8.4.13 >> ${PRODUCT_DIR}/size.log +#du -sk ${INSTALL_WORK}/tclx8.3.5 >> ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR} +rm -fr ${INSTALL_WORK}/tcl8.4.13 ${INSTALL_WORK}/tk8.4.13 ${INSTALL_WORK}/tclx8.3.5 +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.4.13.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.4.13" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +source ./common.sh +$PROCEDURE -- 2.39.2