]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Changing CASCADE version from 6.2sp2 to 6.2sp3
authormaintenance team <salome-mnt@opencascade.com>
Wed, 3 Oct 2007 14:20:57 +0000 (14:20 +0000)
committermaintenance team <salome-mnt@opencascade.com>
Wed, 3 Oct 2007 14:20:57 +0000 (14:20 +0000)
13 files changed:
config.xml
config_Debian_3.1.xml
config_Mandrake_10.1.xml
config_Mandriva_2006.0.xml
config_Mandriva_2006.0_64.xml
config_Mandriva_2007.0.xml
config_RedHatEnterprise_4.xml
config_RedHat_8.0.xml
config_RedHat_9.xml
config_Scientific_4.2.xml
config_Scientific_4.3.xml
config_files/CAS-6.2sp2.sh [deleted file]
config_files/CAS-6.2sp3.sh [new file with mode: 0755]

index e7405a4cc14a243ae5b9f1a43c5dfe22f16e3d3c..5f0669a68f9844fc3705e9c73a0a1ca3fd940367 100644 (file)
           temporarydiskspace="25500"
           script="SWIG-1.3.24.sh"/>
   <product name="OpenCascade" 
-           version="6.2sp2
-           description="Open CASCADE version 6.2sp2"
+           version="6.2sp3
+           description="Open CASCADE version 6.2sp3"
            install="install binaries"
           supported="install sources,install binaries"
           disable="false"
           dependancies="gcc,tcltk"
           installdiskspace="239478"
           temporarydiskspace="980538"
-          script="CAS-6.2sp2.sh"/>
+          script="CAS-6.2sp3.sh"/>
   <product name="Qwt" 
            version="4.2.0" 
            description="2-D plotting extension for Qt library"
index afc0f78255925770b81a6a9da5e698dba2dbc25c..df9f72bd36d6bbcca70484f75cf2e9a6cce92f91 100755 (executable)
           temporarydiskspace="27724"
           script="SWIG-1.3.24.sh"/>
   <product name="OpenCascade" 
-           version="6.2sp2
-           description="Open CASCADE version 6.2sp2"
+           version="6.2sp3
+           description="Open CASCADE version 6.2sp3"
            install="install binaries"
           supported="install sources,install binaries"
           disable="false"
           dependancies="gcc,tcltk"
           installdiskspace="241631"
           temporarydiskspace="980538"
-          script="CAS-6.2sp2.sh"/>
+          script="CAS-6.2sp3.sh"/>
   <product name="Qwt" 
            version="4.2.0" 
            description="2-D plotting extension for Qt library"
index e7405a4cc14a243ae5b9f1a43c5dfe22f16e3d3c..5f0669a68f9844fc3705e9c73a0a1ca3fd940367 100755 (executable)
           temporarydiskspace="25500"
           script="SWIG-1.3.24.sh"/>
   <product name="OpenCascade" 
-           version="6.2sp2
-           description="Open CASCADE version 6.2sp2"
+           version="6.2sp3
+           description="Open CASCADE version 6.2sp3"
            install="install binaries"
           supported="install sources,install binaries"
           disable="false"
           dependancies="gcc,tcltk"
           installdiskspace="239478"
           temporarydiskspace="980538"
-          script="CAS-6.2sp2.sh"/>
+          script="CAS-6.2sp3.sh"/>
   <product name="Qwt" 
            version="4.2.0" 
            description="2-D plotting extension for Qt library"
index d3342555bb88a5b4d15206ebd20ddbb153060829..a4e22dd0d9f9d69a83794f4731daf9a4fbbd0743 100755 (executable)
           temporarydiskspace="25500"
           script="SWIG-1.3.24.sh"/>
   <product name="OpenCascade" 
-           version="6.2sp2
-           description="Open CASCADE version 6.2sp2"
+           version="6.2sp3
+           description="Open CASCADE version 6.2sp3"
            install="install binaries"
           supported="install sources,install binaries"
           disable="false"
           dependancies="gcc,tcltk"
           installdiskspace="237087"
           temporarydiskspace="980538"
-          script="CAS-6.2sp2.sh"/>
+          script="CAS-6.2sp3.sh"/>
   <product name="Qwt" 
            version="4.2.0" 
            description="2-D plotting extension for Qt library"
index f8fafac26fea3383bb1e3526631ae0aeba884cf8..b6c7ed1ba43b810677c6d9849cd2d2fb5219a381 100755 (executable)
           temporarydiskspace="25500"
           script="SWIG-1.3.24.sh"/>
   <product name="OpenCascade" 
-           version="6.2sp2
-           description="Open CASCADE version 6.2sp2"
+           version="6.2sp3
+           description="Open CASCADE version 6.2sp3"
            install="install binaries"
           supported="install sources,install binaries"
           disable="false"
           dependancies="gcc,tcltk"
           installdiskspace="239924"
           temporarydiskspace="980538"
-          script="CAS-6.2sp2.sh"/>
+          script="CAS-6.2sp3.sh"/>
   <product name="Qwt" 
            version="4.2.0" 
            description="2-D plotting extension for Qt library"
index 6be113e84ec5321d45513a6e93d9859344f0e042..e87cd0b444389e726c3af3fcbe8641c628f54a5d 100755 (executable)
           temporarydiskspace="25500"
           script="SWIG-1.3.24.sh"/>
   <product name="OpenCascade" 
-           version="6.2sp2
-           description="Open CASCADE version 6.2sp2"
+           version="6.2sp3
+           description="Open CASCADE version 6.2sp3"
            install="install binaries"
           supported="install sources,install binaries"
           disable="false"
           dependancies="gcc,tcltk"
           installdiskspace="237087"
           temporarydiskspace="980538"
-          script="CAS-6.2sp2.sh"/>
+          script="CAS-6.2sp3.sh"/>
   <product name="Qwt" 
            version="4.2.0" 
            description="2-D plotting extension for Qt library"
index ab99be55f19d4bb16b5319397ed0f8dc6a0c90a2..e987dd301c897b61b4d762b409ff65ee19464f68 100755 (executable)
           temporarydiskspace="25500"
           script="SWIG-1.3.24.sh"/>
   <product name="OpenCascade" 
-           version="6.2sp2
-           description="Open CASCADE version 6.2sp2"
+           version="6.2sp3
+           description="Open CASCADE version 6.2sp3"
            install="install binaries"
           supported="install sources,install binaries"
           disable="false"
           dependancies="gcc,tcltk"
           installdiskspace="217388"
           temporarydiskspace="980538"
-          script="CAS-6.2sp2.sh"/>
+          script="CAS-6.2sp3.sh"/>
   <product name="Qwt" 
            version="4.2.0" 
            description="2-D plotting extension for Qt library"
index ff5c64813ecce556bb1d2c5ffd33d7b5b75beebc..f3fd892daf88abaf31a12bc49bc1fe6a2dfffcdf 100755 (executable)
           temporarydiskspace="27512"
           script="SWIG-1.3.24.sh"/>
   <product name="OpenCascade" 
-           version="6.2sp2
-           description="Open CASCADE version 6.2sp2"
+           version="6.2sp3
+           description="Open CASCADE version 6.2sp3"
            install="install binaries"
           supported="install sources,install binaries"
           disable="false"
           dependancies="gcc,tcltk"
           installdiskspace="207372"
           temporarydiskspace="844120"
-          script="CAS-6.2sp2.sh"/>
+          script="CAS-6.2sp3.sh"/>
   <product name="Qwt" 
            version="0.4.1" 
            description="2-D plotting extension for Qt library"
index 9d0af684243fd7a037d11deb07b32c1937150c81..701df77ff610dffd1462b75a9ba636953dd3f88d 100755 (executable)
           temporarydiskspace="27512"
           script="SWIG-1.3.24.sh"/>
   <product name="OpenCascade" 
-           version="6.2sp2
-           description="Open CASCADE version 6.2sp2"
+           version="6.2sp3
+           description="Open CASCADE version 6.2sp3"
            install="install binaries"
           supported="install sources,install binaries"
           disable="false"
           dependancies="gcc,tcltk"
           installdiskspace="207372"
           temporarydiskspace="844120"
-          script="CAS-6.2sp2.sh"/>
+          script="CAS-6.2sp3.sh"/>
   <product name="Qwt" 
            version="0.4.1" 
            description="2-D plotting extension for Qt library"
index 64c13150eab95175fab7bf8f0f7842f2c804bdff..802ace54cc1a665e6586ab628ac353cfb28b8839 100755 (executable)
           temporarydiskspace="25500"
           script="SWIG-1.3.24.sh"/>
   <product name="OpenCascade" 
-           version="6.2sp2
-           description="Open CASCADE version 6.2sp2"
+           version="6.2sp3
+           description="Open CASCADE version 6.2sp3"
            install="install binaries"
           supported="install sources,install binaries"
           disable="false"
           dependancies="gcc,tcltk"
           installdiskspace="217388"
           temporarydiskspace="980538"
-          script="CAS-6.2sp2.sh"/>
+          script="CAS-6.2sp3.sh"/>
   <product name="Qwt" 
            version="4.2.0" 
            description="2-D plotting extension for Qt library"
index ba3ad3c743afc9536e0ea8567c17ced5cf640bbf..0d0940861e83e25e358322635f2439eeb3f6ac84 100755 (executable)
           temporarydiskspace="25500"
           script="SWIG-1.3.24.sh"/>
   <product name="OpenCascade" 
-           version="6.2sp2
-           description="Open CASCADE version 6.2sp2"
+           version="6.2sp3
+           description="Open CASCADE version 6.2sp3"
            install="install binaries"
           supported="install sources,install binaries"
           disable="false"
           dependancies="gcc,tcltk"
           installdiskspace="217388"
           temporarydiskspace="980538"
-          script="CAS-6.2sp2.sh"/>
+          script="CAS-6.2sp3.sh"/>
   <product name="Qwt" 
            version="4.2.0" 
            description="2-D plotting extension for Qt library"
diff --git a/config_files/CAS-6.2sp2.sh b/config_files/CAS-6.2sp2.sh
deleted file mode 100755 (executable)
index f5d9d63..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-#!/bin/bash -noprofile
-
-####################################################################################
-#  File      : CAS-6.2sp2.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.
-#
-####################################################################################
-
-check_version()
-{
-if [ -z "$CASROOT" ]; then
-    return 1
-fi
-check_lib_version ${CASROOT}/inc/Standard_Version.hxx
-if [ "$?" -ne "0" ] ; then
-    return 1
-fi
-ver_major=`grep "#define OCC_VERSION_MAJOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
-ver_minor=`grep "#define OCC_VERSION_MINOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
-ver_maint=`grep "#define OCC_VERSION_MAINTENANCE" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
-ver="$ver_major.$ver_minor.$ver_maint"
-if [ "$ver" == "6.2sp2" ] ; then
-    return 0
-fi
-return 1
-}
-
-print_env()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export CASROOT=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${CASROOT}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${CASROOT}/lib:\${CASROOT}/lin/lib:\${LD_LIBRARY_PATH}
-# Variable for Foundation Classes : 
-export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat 
-export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat 
-# Variable for DataExchange : 
-export CSF_SHMessage=\${CASROOT}/src/SHMessage
-export CSF_XSMessage=\${CASROOT}/src/XSMessage 
-# Variable for Font : 
-export CSF_MDTVFontDirectory=\${CASROOT}/src/FontMFT 
-export CSF_MDTVTexturesDirectory=\${CASROOT}/src/Textures 
-# Activation of OCCT Kernel multithreading :
-export MMGT_REENTRANT=1
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
-}
-
-# looks for the native product and collects it's environment (used by make_env())
-try_native(){
-check_version
-if [ $? -eq 0 ] ; then
-    cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export CASROOT=${CASROOT}
-export PATH=\${CASROOT}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${CASROOT}/lib:\${CASROOT}/lin/lib:\${LD_LIBRARY_PATH}
-# Variable for Foundation Classes : 
-export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat 
-export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat 
-# Variable for DataExchange : 
-export CSF_SHMessage=\${CASROOT}/src/SHMessage
-export CSF_XSMessage=\${CASROOT}/src/XSMessage 
-# Variable for Font : 
-export CSF_MDTVFontDirectory=\${CASROOT}/src/FontMFT 
-export CSF_MDTVTexturesDirectory=\${CASROOT}/src/Textures 
-##
-EOF
-    make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
-    return 0
-fi
-return 1;
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
-return $?
-}
-
-install_source()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-makedir ${PRODUCT_DIR}
-
-# unpack
-check_jb tar xfz ${SOURCE_DIR}/CAS-6.2sp2.tar.gz -C ${INSTALL_WORK}
-cd ${PRODUCT_WORK}
-
-# configure
-
-is_mandriva2007=0
-
-if [ -e /etc/issue ] ; then
-  grep -e "Mandriva Linux release 2007.0" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_mandriva2007=1 ; fi
-fi
-
-if [ $is_mandriva2007 == 1 ] ; then
-where_xmu_include=/usr/include/X11
-else
-where_xmu_include=/usr/X11R6/include/X11
-fi
-
-if test `uname -m` = "x86_64" ; then
-    flags="$flags --with-xmu-include=$where_xmu_include"
-    flags="$flags --with-xmu-library=/usr/X11R6/lib64"
-else
-    flags="$flags --with-xmu-include=$where_xmu_include"
-    flags="$flags --with-xmu-library=/usr/X11R6/lib"
-fi
-    flags="$flags LDFLAGS=-lpthread"
-glincdir="`where_gl_includes`"
-if [ $? -eq 0 ] ; then flags="$flags --with-gl-include=$glincdir"; fi
-gllibdir="`where_gl_libs`"
-if [ $? -eq 0 ] ; then flags="$flags --with-gl-library=$gllibdir"; fi
-tcldir="`where_tcl`"
-if [ $? -eq 0 ] ; then flags="$flags --with-tcl=$tcldir"; fi
-tkdir="`where_tk`"
-if [ $? -eq 0 ] ; then flags="$flags --with-tk=$tkdir"; fi
-dpsdir="`where_dps`"
-if [ $? -eq 0 ] ; then flags="$flags --with-dps-include=$dpsdir/include --with-dps-library=$dpsdir/lib"; fi
-flags="$flags --disable-jcas --disable-debug --enable-production"
-
-export CASROOT=${PRODUCT_WORK}
-
-if test `uname -m` = "x86_64" ; then
-echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} $flags CFLAGS="-m64 -D_OCC64" CXXFLAGS="-m64 -D_OCC64" >> ${PRODUCT_DIR}/CONFIGURE.LOG"
-./configure --prefix=${PRODUCT_DIR} $flags CFLAGS="-m64 -D_OCC64" CXXFLAGS="-m64 -D_OCC64" >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog
-else
-echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} $flags  >> ${PRODUCT_DIR}/CONFIGURE.LOG"
-./configure --prefix=${PRODUCT_DIR} $flags >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog
-fi
-
-if [ "$?" -ne "0" ] ; then
-    cat ${PRODUCT_DIR}/CONFIGURE.LOG
-    cat ${INSTALL_WORK}/errlog >&2
-    cat ${INSTALL_WORK}/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG
-    exit 1
-fi
-
-# make
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make -j4 install-strip
-
-# copy includes
-cp -fr inc ${PRODUCT_DIR}
-cp -f config.h ${PRODUCT_DIR}
-(cd ${PRODUCT_DIR}/inc; ln -fs ../config.h config.h)
-# copy resources
-makedir ${PRODUCT_DIR}/src
-for d in UnitsAPI SHMessage FontMFT Textures XSMessage DrawResources ; do
-    cp -rp src/${d} ${PRODUCT_DIR}/src
-done
-(cd ${PRODUCT_DIR}; mkdir -p Linux; cd Linux; ln -fs ../lib lib; ln -fs ../bin bin)
-(cd ${PRODUCT_DIR}; mkdir -p lin;   cd lin;   ln -fs ../lib lib; ln -fs ../bin bin)
-
-# fix libGL dependencies
-cd ${PRODUCT_DIR}/lib
-gllibdir="`where_gl_libs`"
-if [ "$gllibdir" != "" ] ; then
-    if [ -f ${gllibdir}/libGL.la ] ; then
-       libdir=`grep "libdir=" ${gllibdir}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%"`
-       if [ "`ls $libdir/libGL.so* 2>/dev/null`" ] ; then
-           str_to_replace="${gllibdir}/libGL.la"
-       fi
-    fi
-    if [ "$str_to_replace" == "" ] ; then
-       str_to_replace="-L${gllibdir} -lGL"
-    fi
-    sed -e "s%-lGL%%g"                                                         \
-       -e "s%[^[:space:]]*libGL.la[[:space:]]%%g"                             \
-       -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \
-       libTKOpenGl.la > libTKOpenGl.la.new
-    mv -f libTKOpenGl.la.new libTKOpenGl.la
-fi
-
-#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
-cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
-print_env
-}
-
-install_binary()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SOURCE_DIR}/CAS-6.2sp2.tar.gz -C ${INSTALL_ROOT}
-
-# modify *.la files
-ldir=${PRODUCT_DIR}/lib
-if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/Linux/lib; fi
-if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/lin/lib; fi
-cd $ldir
-# 1. set libdir correctly, correct dependencies, set tcldir correctly
-tcldir=`printenv TCLHOME`
-for l in X `find . -name "*.la"`; do
-    if [ "$l" != "X" ] ; then
-       l=`basename $l`
-       libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
-       sed -e "s%${libdir}%${ldir}%g" $l > _$l
-       mv -f _$l $l
-       if [ -n "${tcldir}" ] && [ -d "${tcldir}" ] ; then
-           sed -e "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}/lib%g" $l > _$l
-           mv -f _$l $l
-       fi
-       chmod a+x $l
-    fi
-done
-
-# 2. fix libGL dependencies
-cd $ldir
-gllibdir="`where_gl_libs`"
-if [ "$gllibdir" != "" ] ; then
-    if [ -f ${gllibdir}/libGL.la ] ; then
-       libdir=`grep "libdir=" ${gllibdir}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%"`
-       if [ "`ls $libdir/libGL.so* 2>/dev/null`" ] ; then
-           str_to_replace="${gllibdir}/libGL.la"
-       fi
-    fi
-    if [ "$str_to_replace" == "" ] ; then
-       str_to_replace="-L${gllibdir} -lGL"
-    fi
-    sed -e "s%-lGL%%g"                                                         \
-       -e "s%[^[:space:]]*libGL.la[[:space:]]%%g"                             \
-       -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \
-       libTKOpenGl.la > libTKOpenGl.la.new
-    mv -f libTKOpenGl.la.new libTKOpenGl.la
-fi
-
-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="cas" ; fi
-export PRODUCT="CAS-6.2sp2"
-export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
-export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
-source ./common.sh
-$PROCEDURE 
diff --git a/config_files/CAS-6.2sp3.sh b/config_files/CAS-6.2sp3.sh
new file mode 100755 (executable)
index 0000000..7b61816
--- /dev/null
@@ -0,0 +1,257 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : CAS-6.2sp3.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.
+#
+####################################################################################
+
+check_version()
+{
+if [ -z "$CASROOT" ]; then
+    return 1
+fi
+check_lib_version ${CASROOT}/inc/Standard_Version.hxx
+if [ "$?" -ne "0" ] ; then
+    return 1
+fi
+ver_major=`grep "#define OCC_VERSION_MAJOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
+ver_minor=`grep "#define OCC_VERSION_MINOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
+ver_maint=`grep "#define OCC_VERSION_MAINTENANCE" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
+ver="$ver_major.$ver_minor.$ver_maint"
+if [ "$ver" == "6.2sp3" ] ; then
+    return 0
+fi
+return 1
+}
+
+print_env()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export CASROOT=\${INSTALL_ROOT}/${PRODUCT}
+export PATH=\${CASROOT}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${CASROOT}/lib:\${CASROOT}/lin/lib:\${LD_LIBRARY_PATH}
+# Variable for Foundation Classes : 
+export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat 
+export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat 
+# Variable for DataExchange : 
+export CSF_SHMessage=\${CASROOT}/src/SHMessage
+export CSF_XSMessage=\${CASROOT}/src/XSMessage 
+# Variable for Font : 
+export CSF_MDTVFontDirectory=\${CASROOT}/src/FontMFT 
+export CSF_MDTVTexturesDirectory=\${CASROOT}/src/Textures 
+# Activation of OCCT Kernel multithreading :
+export MMGT_REENTRANT=1
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+}
+
+# looks for the native product and collects it's environment (used by make_env())
+try_native(){
+check_version
+if [ $? -eq 0 ] ; then
+    cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export CASROOT=${CASROOT}
+export PATH=\${CASROOT}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${CASROOT}/lib:\${CASROOT}/lin/lib:\${LD_LIBRARY_PATH}
+# Variable for Foundation Classes : 
+export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat 
+export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat 
+# Variable for DataExchange : 
+export CSF_SHMessage=\${CASROOT}/src/SHMessage
+export CSF_XSMessage=\${CASROOT}/src/XSMessage 
+# Variable for Font : 
+export CSF_MDTVFontDirectory=\${CASROOT}/src/FontMFT 
+export CSF_MDTVTexturesDirectory=\${CASROOT}/src/Textures 
+##
+EOF
+    make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+    return 0
+fi
+return 1;
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+makedir ${PRODUCT_DIR}
+
+# unpack
+check_jb tar xfz ${SOURCE_DIR}/CAS-6.2sp3.tar.gz -C ${INSTALL_WORK}
+cd ${PRODUCT_WORK}
+
+# configure
+
+is_mandriva2007=0
+
+if [ -e /etc/issue ] ; then
+  grep -e "Mandriva Linux release 2007.0" /etc/issue > /dev/null
+  if [ $? == 0 ] ; then is_mandriva2007=1 ; fi
+fi
+
+if [ $is_mandriva2007 == 1 ] ; then
+where_xmu_include=/usr/include/X11
+else
+where_xmu_include=/usr/X11R6/include/X11
+fi
+
+if test `uname -m` = "x86_64" ; then
+    flags="$flags --with-xmu-include=$where_xmu_include"
+    flags="$flags --with-xmu-library=/usr/X11R6/lib64"
+else
+    flags="$flags --with-xmu-include=$where_xmu_include"
+    flags="$flags --with-xmu-library=/usr/X11R6/lib"
+fi
+    flags="$flags LDFLAGS=-lpthread"
+glincdir="`where_gl_includes`"
+if [ $? -eq 0 ] ; then flags="$flags --with-gl-include=$glincdir"; fi
+gllibdir="`where_gl_libs`"
+if [ $? -eq 0 ] ; then flags="$flags --with-gl-library=$gllibdir"; fi
+tcldir="`where_tcl`"
+if [ $? -eq 0 ] ; then flags="$flags --with-tcl=$tcldir"; fi
+tkdir="`where_tk`"
+if [ $? -eq 0 ] ; then flags="$flags --with-tk=$tkdir"; fi
+dpsdir="`where_dps`"
+if [ $? -eq 0 ] ; then flags="$flags --with-dps-include=$dpsdir/include --with-dps-library=$dpsdir/lib"; fi
+flags="$flags --disable-jcas --disable-debug --enable-production"
+
+export CASROOT=${PRODUCT_WORK}
+
+if test `uname -m` = "x86_64" ; then
+echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} $flags CFLAGS="-m64 -D_OCC64" CXXFLAGS="-m64 -D_OCC64" >> ${PRODUCT_DIR}/CONFIGURE.LOG"
+./configure --prefix=${PRODUCT_DIR} $flags CFLAGS="-m64 -D_OCC64" CXXFLAGS="-m64 -D_OCC64" >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog
+else
+echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} $flags  >> ${PRODUCT_DIR}/CONFIGURE.LOG"
+./configure --prefix=${PRODUCT_DIR} $flags >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog
+fi
+
+if [ "$?" -ne "0" ] ; then
+    cat ${PRODUCT_DIR}/CONFIGURE.LOG
+    cat ${INSTALL_WORK}/errlog >&2
+    cat ${INSTALL_WORK}/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG
+    exit 1
+fi
+
+# make
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE.LOG make -j4 install-strip
+
+# copy includes
+cp -fr inc ${PRODUCT_DIR}
+cp -f config.h ${PRODUCT_DIR}
+(cd ${PRODUCT_DIR}/inc; ln -fs ../config.h config.h)
+# copy resources
+makedir ${PRODUCT_DIR}/src
+for d in UnitsAPI SHMessage FontMFT Textures XSMessage DrawResources ; do
+    cp -rp src/${d} ${PRODUCT_DIR}/src
+done
+(cd ${PRODUCT_DIR}; mkdir -p Linux; cd Linux; ln -fs ../lib lib; ln -fs ../bin bin)
+(cd ${PRODUCT_DIR}; mkdir -p lin;   cd lin;   ln -fs ../lib lib; ln -fs ../bin bin)
+
+# fix libGL dependencies
+cd ${PRODUCT_DIR}/lib
+gllibdir="`where_gl_libs`"
+if [ "$gllibdir" != "" ] ; then
+    if [ -f ${gllibdir}/libGL.la ] ; then
+       libdir=`grep "libdir=" ${gllibdir}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%"`
+       if [ "`ls $libdir/libGL.so* 2>/dev/null`" ] ; then
+           str_to_replace="${gllibdir}/libGL.la"
+       fi
+    fi
+    if [ "$str_to_replace" == "" ] ; then
+       str_to_replace="-L${gllibdir} -lGL"
+    fi
+    sed -e "s%-lGL%%g"                                                         \
+       -e "s%[^[:space:]]*libGL.la[[:space:]]%%g"                             \
+       -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \
+       libTKOpenGl.la > libTKOpenGl.la.new
+    mv -f libTKOpenGl.la.new libTKOpenGl.la
+fi
+
+#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
+cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
+print_env
+}
+
+install_binary()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/CAS-6.2sp3.tar.gz -C ${INSTALL_ROOT}
+
+# modify *.la files
+ldir=${PRODUCT_DIR}/lib
+if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/Linux/lib; fi
+if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/lin/lib; fi
+cd $ldir
+# 1. set libdir correctly, correct dependencies, set tcldir correctly
+tcldir=`printenv TCLHOME`
+for l in X `find . -name "*.la"`; do
+    if [ "$l" != "X" ] ; then
+       l=`basename $l`
+       libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
+       sed -e "s%${libdir}%${ldir}%g" $l > _$l
+       mv -f _$l $l
+       if [ -n "${tcldir}" ] && [ -d "${tcldir}" ] ; then
+           sed -e "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}/lib%g" $l > _$l
+           mv -f _$l $l
+       fi
+       chmod a+x $l
+    fi
+done
+
+# 2. fix libGL dependencies
+cd $ldir
+gllibdir="`where_gl_libs`"
+if [ "$gllibdir" != "" ] ; then
+    if [ -f ${gllibdir}/libGL.la ] ; then
+       libdir=`grep "libdir=" ${gllibdir}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%"`
+       if [ "`ls $libdir/libGL.so* 2>/dev/null`" ] ; then
+           str_to_replace="${gllibdir}/libGL.la"
+       fi
+    fi
+    if [ "$str_to_replace" == "" ] ; then
+       str_to_replace="-L${gllibdir} -lGL"
+    fi
+    sed -e "s%-lGL%%g"                                                         \
+       -e "s%[^[:space:]]*libGL.la[[:space:]]%%g"                             \
+       -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \
+       libTKOpenGl.la > libTKOpenGl.la.new
+    mv -f libTKOpenGl.la.new libTKOpenGl.la
+fi
+
+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="cas" ; fi
+export PRODUCT="CAS-6.2sp3"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE