7 if [ -z "$TCLHOME" ]; then
8 echo "TCLHOME doesn't set"
13 tcl_cfg=${TCLHOME}/lib/tclConfig.sh
14 if [ ! -f ${tcl_cfg} ]; then tcl_cfg=${TCLHOME}/tcl${VERSION}/lib/tclConfig.sh; fi
15 if [ ! -f ${tcl_cfg} ]; then tcl_cfg=${TCLHOME}/lib/tcl${VERSION}/tclConfig.sh; fi
16 if [ ! -f ${tcl_cfg} ]; then tcl_cfg=${TCLHOME}/lib/tcl${VERSION}/lib/tclConfig.sh; fi
17 if [ -f ${tcl_cfg} ]; then
18 tcl_ver=`awk '/^TCL_VERSION=.*/ {gsub("TCL_VERSION=","",$1);print $1}' ${tcl_cfg} | cut -d "'" -f 2`
19 if [ "$tcl_ver" != ${VERSION} ] ; then
27 tk_cfg=${TCLHOME}/lib/tkConfig.sh
28 if [ ! -f ${tk_cfg} ]; then tk_cfg=${TCLHOME}/tk${VERSION}/tkConfig.sh; fi
29 if [ ! -f ${tk_cfg} ]; then tk_cfg=${TCLHOME}/lib/tk${VERSION}/tkConfig.sh; fi
30 if [ ! -f ${tk_cfg} ]; then tk_cfg=${TCLHOME}/lib/tk${VERSION}/lib/tkConfig.sh; fi
31 if [ -f ${tk_cfg} ]; then
32 tk_ver=`awk '/^TK_VERSION=.*/ {gsub("TK_VERSION=","",$1);print $1}' ${tk_cfg} | cut -d "'" -f 2`
33 if [ "$tk_ver" != ${VERSION} ] ; then
45 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
46 #$DELIM ${PRODUCT_TYPE} $DELIM
47 export TCLHOME=\${INSTALL_ROOT}/${PRODUCT}
48 export PATH=\${TCLHOME}/bin:\${PATH}
49 export LD_LIBRARY_PATH=\${TCLHOME}/lib:\${LD_LIBRARY_PATH}
50 export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl${VERSION} \${TCLHOME}/lib/tk${VERSION} \${TCLLIBPATH}"
53 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
54 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
57 # looks for the native product and collects it's environment (used by make_env())
59 tclhome="`find_in_path tclsh ${PATH}`"
60 if [ -z "${tclhome}" ] ; then
61 tclhome="`find_in_path tclsh /usr/bin`"
63 if [ -n "${tclhome}" ] ; then
64 tclhome=`cd ${tclhome}/..; pwd`
65 tmp="\${TCLHOME}/bin ${tclhome}/bin \${PATH} ${PATH}";
66 path=`sort_path ${tmp}`
67 tmp="\${TCLHOME}/lib ${tclhome}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
68 ld_library_path=`sort_path ${tmp}`
69 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
70 #$DELIM ${PRODUCT_TYPE} $DELIM
71 export TCLHOME=${tclhome}
73 export LD_LIBRARY_PATH=${ld_library_path}
74 export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl${VERSION} \${TCLHOME}/lib/tk${VERSION} \${TCLLIBPATH}"
77 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
78 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
85 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
91 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
92 source ${INSTALL_WORK}/$SHRC
94 makedir ${PRODUCT_DIR}
96 check_jb tar xfz ${SOURCE_DIR}/tcl8.4.5.tar.gz -C ${INSTALL_WORK}
97 cd ${INSTALL_WORK}/tcl8.4.5/unix
98 cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
103 check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --enable-gcc --enable-shared --enable-threads \
104 --prefix=${PRODUCT_DIR}
106 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
112 check_job ${PRODUCT_DIR}/MAKE.LOG make
113 cat >> ${PRODUCT_DIR}/MAKEINSTALL.LOG <<EOF
118 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
120 (cd ${PRODUCT_DIR}/bin; ln -s tclsh8.4 tclsh)
121 (cd ${PRODUCT_DIR}/lib; ln -s libtcl8.4.so libtcl.so)
122 (cd ${PRODUCT_DIR}/lib; ln -s libtclstub8.4.a libtclstub.a)
124 check_jb tar xfz ${SOURCE_DIR}/tk8.4.5.tar.gz -C ${INSTALL_WORK}
125 cd ${INSTALL_WORK}/tk8.4.5/unix
126 cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
131 check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --enable-gcc --enable-shared --enable-threads \
132 --prefix=${PRODUCT_DIR}
133 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
138 check_job ${PRODUCT_DIR}/MAKE.LOG make
139 cat >> ${PRODUCT_DIR}/MAKEINSTALL.LOG <<EOF
144 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
146 (cd ${PRODUCT_DIR}/bin; ln -s wish8.4 wish)
147 (cd ${PRODUCT_DIR}/lib; ln -s libtk8.4.so libtk.so)
148 (cd ${PRODUCT_DIR}/lib; ln -s libtkstub8.4.a libtkstub.a)
150 check_jb tar xfz ${SOURCE_DIR}/tclx8.3.5.tar.gz -C ${INSTALL_WORK}
151 cd ${INSTALL_WORK}/tclx8.3.5/unix
152 #VRV - bug in a tclx configure
154 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
156 #VRV - bug in a tclx configure
157 cat >> ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
162 check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
163 ./configure --enable-gcc --enable-shared --enable-threads \
164 --prefix=${PRODUCT_DIR}
165 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
170 check_job ${PRODUCT_DIR}/MAKE.LOG make
171 cat >> ${PRODUCT_DIR}/MAKEINSTALLEXEC.LOG <<EOF
176 check_job ${PRODUCT_DIR}/MAKEINSTALLEXEC.LOG make install-exec
178 (cd ${PRODUCT_DIR}/lib; ln -s libtclx8.3.so libtclx.so)
179 (cd ${PRODUCT_DIR}/lib; ln -s libtclx8.3.a libtclx.a)
180 (cd ${PRODUCT_DIR}/lib; ln -s libtkx8.3.so libtkx.so)
181 (cd ${PRODUCT_DIR}/lib; ln -s libtkx8.3.a libtkx.a)
183 #du -sk ${INSTALL_WORK}/tcl8.4.5 > ${PRODUCT_DIR}/size.log
184 #du -sk ${INSTALL_WORK}/tk8.4.5 >> ${PRODUCT_DIR}/size.log
185 #du -sk ${INSTALL_WORK}/tclx8.3.5 >> ${PRODUCT_DIR}/size.log
187 rm -fr ${INSTALL_WORK}/tcl8.4.5 ${INSTALL_WORK}/tk8.4.5 ${INSTALL_WORK}/tclx8.3.5
193 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
194 source ${INSTALL_WORK}/$SHRC
196 check_jb tar xfz ${SOURCE_DIR}/tcltk-8.4.5.tar.gz -C ${INSTALL_ROOT}
198 # overriding installation path
199 cd ${PRODUCT_DIR}/lib
200 old_prefix=`grep -e "^TCL_PREFIX='.*'" tclConfig.sh | sed -e "s%^TCL_PREFIX='\(.*\)'%\1%g"`
201 sed -e "s%${old_prefix}%${PRODUCT_DIR}%g" tclConfig.sh > _tclConfig.sh
202 mv -f _tclConfig.sh tclConfig.sh
203 sed -e "s%${old_prefix}%${PRODUCT_DIR}%g" tkConfig.sh > _tkConfig.sh
204 mv -f _tkConfig.sh tkConfig.sh
210 export INSTALL_WORK=$2;
211 export SOURCE_DIR=$3;
212 export INSTALL_ROOT=$4;
213 export PRODUCT_SEQUENCE=$5;
214 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="tcl" ; fi
215 export PRODUCT="tcltk-8.4.5"
216 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
217 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}