5 if [ -z "$CASROOT" ]; then
8 check_lib_version ${CASROOT}/inc/Standard_Version.hxx
9 if [ "$?" -ne "0" ] ; then
12 ver_major=`grep "#define OCC_VERSION_MAJOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
13 ver_minor=`grep "#define OCC_VERSION_MINOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
14 ver="$ver_major.$ver_minor"
15 if [ "$ver" == "5.2" ] ; then
23 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
24 #$DELIM ${PRODUCT_TYPE} $DELIM
25 export CASROOT=\${INSTALL_ROOT}/${PRODUCT}
26 export LD_LIBRARY_PATH=\${CASROOT}/lin/lib:\${CASROOT}/`uname`/lib:\${LD_LIBRARY_PATH}
27 # Variable for Foundation Classes :
28 export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat
29 export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat
30 # Variable for DataExchange :
31 export CSF_SHMessageStd=\${CASROOT}/src/SHMessageStd
32 export CSF_XSMessage=\${CASROOT}/src/XSMessage
34 export CSF_MDTVFontDirectory=\${CASROOT}/src/FontMFT
35 export CSF_MDTVTexturesDirectory=\${CASROOT}/src/Textures
38 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
39 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
42 # looks for the native product and collects it's environment (used by make_env())
45 if [ $? -eq 0 ] ; then
46 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
47 #$DELIM ${PRODUCT_TYPE} $DELIM
48 export CASROOT=${CASROOT}
49 export LD_LIBRARY_PATH=\${CASROOT}/lin/lib:\${CASROOT}/`uname`/lib:\${LD_LIBRARY_PATH}
50 # Variable for Foundation Classes :
51 export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat
52 export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat
53 # Variable for DataExchange :
54 export CSF_SHMessageStd=\${CASROOT}/src/SHMessageStd
55 export CSF_XSMessage=\${CASROOT}/src/XSMessage
57 export CSF_MDTVFontDirectory=\${CASROOT}/src/FontMFT
58 export CSF_MDTVTexturesDirectory=\${CASROOT}/src/Textures
61 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
68 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
74 echo "You can only install precompiled CAS-5.2"
80 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
81 source ${INSTALL_WORK}/$SHRC
83 check_jb tar xfz ${SOURCE_DIR}/CAS-5.2.tar.gz -C ${INSTALL_ROOT}
84 ldir=${PRODUCT_DIR}/lib
85 if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/Linux/lib; fi
86 if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/lin/lib; fi
88 tcldir=`printenv TCLHOME`
89 for l in X `find . -name "*.la"`; do
90 if [ "$l" != "X" ] ; then
92 libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
93 sed -e "s%${libdir}%${ldir}%g" $l > _$l
95 if [ -n "${tcldir}" ] && [ -d "${tcldir}" ] ; then
96 sed -e "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}/lib%g" $l > _$l
107 export INSTALL_WORK=$2;
108 export SOURCE_DIR=$3;
109 export INSTALL_ROOT=$4;
110 export PRODUCT_SEQUENCE=$5;
111 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="cas" ; fi
112 export PRODUCT="CAS-5.2"
113 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
114 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}