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_maint=`grep "#define OCC_VERSION_MAINTENANCE" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
15 ver="$ver_major.$ver_minor.$ver_maint"
16 if [ "$ver" == "6.1.0" ] ; then
24 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
25 #$DELIM ${PRODUCT_TYPE} $DELIM
26 export CASROOT=\${INSTALL_ROOT}/${PRODUCT}
27 export PATH=\${CASROOT}/bin:\${PATH}
28 export LD_LIBRARY_PATH=\${CASROOT}/lib:\${CASROOT}/lin/lib:\${LD_LIBRARY_PATH}
29 # Variable for Foundation Classes :
30 export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat
31 export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat
32 # Variable for DataExchange :
33 export CSF_SHMessageStd=\${CASROOT}/src/SHMessageStd
34 export CSF_XSMessage=\${CASROOT}/src/XSMessage
36 export CSF_MDTVFontDirectory=\${CASROOT}/src/FontMFT
37 export CSF_MDTVTexturesDirectory=\${CASROOT}/src/Textures
40 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
41 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
44 # looks for the native product and collects it's environment (used by make_env())
47 if [ $? -eq 0 ] ; then
48 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
49 #$DELIM ${PRODUCT_TYPE} $DELIM
50 export CASROOT=${CASROOT}
51 export PATH=\${CASROOT}/bin:\${PATH}
52 export LD_LIBRARY_PATH=\${CASROOT}/lib:\${CASROOT}/lin/lib:\${LD_LIBRARY_PATH}
53 # Variable for Foundation Classes :
54 export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat
55 export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat
56 # Variable for DataExchange :
57 export CSF_SHMessageStd=\${CASROOT}/src/SHMessageStd
58 export CSF_XSMessage=\${CASROOT}/src/XSMessage
60 export CSF_MDTVFontDirectory=\${CASROOT}/src/FontMFT
61 export CSF_MDTVTexturesDirectory=\${CASROOT}/src/Textures
64 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
71 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
77 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
78 source ${INSTALL_WORK}/$SHRC
80 makedir ${PRODUCT_DIR}
83 check_jb tar xfz ${SOURCE_DIR}/CAS-6.1.tar.gz -C ${INSTALL_WORK}
87 flags="--with-gl-include=/usr/include --with-gl-library=/usr/lib"
88 flags="$flags --with-xmu-include=/usr/X11R6/include/X11"
89 flags="$flags --with-xmu-library=/usr/X11R6/lib"
91 if [ $? -eq 0 ] ; then flags="$flags --with-tcl=$tcldir"; fi
93 if [ $? -eq 0 ] ; then flags="$flags --with-tk=$tkdir"; fi
95 if [ $? -eq 0 ] ; then flags="$flags --with-dps-include=$dpsdir/include --with-dps-library=$dpsdir/lib"; fi
96 flags="$flags --disable-debug --enable-production"
98 export CASROOT=${PRODUCT_WORK}
99 check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure $flags --prefix=${PRODUCT_DIR}
103 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
106 check_job ${PRODUCT_DIR}/MAKE.LOG make -j4 install-strip
109 cp -fr inc ${PRODUCT_DIR}
110 cp -f config.h ${PRODUCT_DIR}
111 (cd ${PRODUCT_DIR}/inc; ln -fs ../config.h config.h)
113 makedir ${PRODUCT_DIR}/src
114 cp -rp src/UnitsAPI ${PRODUCT_DIR}/src
115 cp -rp src/SHMessage ${PRODUCT_DIR}/src
116 cp -rp src/FontMFT ${PRODUCT_DIR}/src
117 cp -rp src/Textures ${PRODUCT_DIR}/src
118 cp -rp src/XSMessage ${PRODUCT_DIR}/src
119 cp -rp src/DrawResources ${PRODUCT_DIR}/src
120 (cd ${PRODUCT_DIR}; mkdir -p Linux; cd Linux; ln -fs ../lib lib; ln -fs ../bin bin)
121 (cd ${PRODUCT_DIR}; mkdir -p lin; cd lin; ln -fs ../lib lib; ln -fs ../bin bin)
123 #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
124 cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
130 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
131 source ${INSTALL_WORK}/$SHRC
133 check_jb tar xfz ${SOURCE_DIR}/CAS-6.1.tar.gz -C ${INSTALL_ROOT}
134 ldir=${PRODUCT_DIR}/lib
135 if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/Linux/lib; fi
136 if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/lin/lib; fi
138 tcldir=`printenv TCLHOME`
139 for l in X `find . -name "*.la"`; do
140 if [ "$l" != "X" ] ; then
142 libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
143 sed -e "s%${libdir}%${ldir}%g" $l > _$l
145 if [ -n "${tcldir}" ] && [ -d "${tcldir}" ] ; then
146 sed -e "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}/lib%g" $l > _$l
157 export INSTALL_WORK=$2;
158 export SOURCE_DIR=$3;
159 export INSTALL_ROOT=$4;
160 export PRODUCT_SEQUENCE=$5;
161 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="cas" ; fi
162 export PRODUCT="CAS-6.1"
163 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
164 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}