]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
SALOME 6.5.0 preparation: OCCT 6.5.2 -> 6.5.3
authorinv <inv@opencascade.com>
Tue, 3 Apr 2012 15:33:42 +0000 (15:33 +0000)
committerinv <inv@opencascade.com>
Tue, 3 Apr 2012 15:33:42 +0000 (15:33 +0000)
13 files changed:
config_CentOS_5.5_64bit.xml
config_Debian_4.0.xml
config_Debian_4.0_64bit.xml
config_Debian_5.0_64bit.xml
config_Debian_6.0_64bit.xml
config_Mandriva_2008.0.xml
config_Mandriva_2008.0_64bit.xml
config_Mandriva_2010.0.xml
config_Mandriva_2010.0_64bit.xml
config_Red_Hat_Enterprise_WS_4_64bit.xml
config_Scientific_SL_5.1_64bit.xml
config_files/OCCT-6.5.2.sh [deleted file]
config_files/OCCT.sh [new file with mode: 0755]

index d0f84f68154bb4eaa1cf2942f2781bc74c7b1fb4..8f73384119458d14081f1b3b6c6bb4e0c38fb1a1 100755 (executable)
     </product>
     <product name="OpenCascade" 
             type="prerequisite"
-             description="Open CASCADE version 6.5.2">
+             description="Open CASCADE Technology">
       <installation os="CentOS 5.5 64bit"
-                    version="6.5.2
+                    version="6.5.3
                    disable="false"
                    installdiskspace="34168,23512,158888"
-                   script="OCCT-6.5.2.sh"/>
+                   script="OCCT.sh"/>
     </product>
     <product name="Qwt" 
             type="prerequisite"
index ffe84ef9f05df1ad0e9c035e1763aa60557461dc..346913546c9bf863f91dcd38ff59c7bd0f7ddab2 100755 (executable)
     </product>
     <product name="OpenCascade" 
             type="prerequisite"
-             description="Open CASCADE version 6.5.2">
+             description="Open CASCADE Technology">
       <installation os="Debian 4.0"
-                    version="6.5.2
+                    version="6.5.3
                    disable="false"
                    installdiskspace="34168,23512,158888"
-                   script="OCCT-6.5.2.sh"/>
+                   script="OCCT.sh"/>
     </product>
     <product name="Qwt" 
             type="prerequisite"
index 497f229c850ca59e26b09a53304dd389636da305..9b66199702be3ee022478c229fcd25734a50616d 100755 (executable)
     </product>
     <product name="OpenCascade" 
             type="prerequisite"
-             description="Open CASCADE version 6.5.2">
+             description="Open CASCADE Technology">
       <installation os="Debian 4.0 64bit"
-                    version="6.5.2
+                    version="6.5.3
                    disable="false"
                    installdiskspace="34168,23512,158888"
-                   script="OCCT-6.5.2.sh"/>
+                   script="OCCT.sh"/>
     </product>
     <product name="Qwt" 
             type="prerequisite"
index e2445108b750fecf5290eca87901c4182e920353..3a3225467cf30563d9d101227faec5324de6576e 100755 (executable)
     </product>
     <product name="OpenCascade" 
             type="prerequisite"
-             description="Open CASCADE version 6.5.2">
+             description="Open CASCADE Technology">
       <installation os="Debian 5.0 64bit"
-                    version="6.5.2
+                    version="6.5.3
                    disable="false"
                    installdiskspace="34168,23512,158888"
-                   script="OCCT-6.5.2.sh"/>
+                   script="OCCT.sh"/>
     </product>
     <product name="Qwt" 
             type="prerequisite"
index fbd9c7a09c80220896cdc1ae1e23cd81ad83d239..9c061d44d65bca65b33cb08297f51a06f29fbec9 100755 (executable)
     </product>
     <product name="OpenCascade" 
             type="prerequisite"
-             description="Open CASCADE version 6.5.2">
+             description="Open CASCADE Technology">
       <installation os="Debian 6.0 64bit"
-                    version="6.5.2
+                    version="6.5.3
                    disable="false"
                    installdiskspace="34168,23512,158888"
-                   script="OCCT-6.5.2.sh"/>
+                   script="OCCT.sh"/>
     </product>
     <product name="Qwt" 
             type="prerequisite"
index 6d44abe9d7be4be5b7908d7bf922ec50adf71bc4..de0bfc3b20eb4138eb63c13e0c6edf27ff75de5c 100755 (executable)
     </product>
     <product name="OpenCascade" 
             type="prerequisite"
-             description="Open CASCADE version 6.5.2">
+             description="Open CASCADE Technology">
       <installation os="Mandriva 2008.0"
-                    version="6.5.2
+                    version="6.5.3
                    disable="false"
                    installdiskspace="34168,23512,158888"
-                   script="OCCT-6.5.2.sh"/>
+                   script="OCCT.sh"/>
     </product>
     <product name="Qwt" 
             type="prerequisite"
index 7ce898119c07492dfd599e2cfcbca9cd3aede9ca..77f76bece9f72509c4212a87ad0cc2504a5f02c7 100755 (executable)
     </product>
     <product name="OpenCascade" 
             type="prerequisite"
-             description="Open CASCADE version 6.5.2">
+             description="Open CASCADE Technology">
       <installation os="Mandriva 2008.0 64bit"
-                    version="6.5.2
+                    version="6.5.3
                    disable="false"
                    installdiskspace="34168,23512,158888"
-                   script="OCCT-6.5.2.sh"/>
+                   script="OCCT.sh"/>
     </product>
     <product name="Qwt" 
             type="prerequisite"
index 74135d68b028ef554b86a47897fa9745677b0bd6..541b2740c7af5eaf454e63fad0b7d3b695b04b33 100755 (executable)
     </product>
     <product name="OpenCascade" 
             type="prerequisite"
-             description="Open CASCADE version 6.5.2">
+             description="Open CASCADE Technology">
       <installation os="Mandriva 2010.0"
-                    version="6.5.2
+                    version="6.5.3
                    disable="false"
                    installdiskspace="34168,23512,158888"
-                   script="OCCT-6.5.2.sh"/>
+                   script="OCCT.sh"/>
     </product>
     <product name="Qwt" 
             type="prerequisite"
index 30ca1ec0671ff72012f639ab2db187f9f5586c89..cc4ea4e1b4158c7db3914b117cfbf03a2252fc34 100755 (executable)
     </product>
     <product name="OpenCascade" 
             type="prerequisite"
-             description="Open CASCADE version 6.5.2">
+             description="Open CASCADE Technology">
       <installation os="Mandriva 2010.0 64bit"
-                    version="6.5.2
+                    version="6.5.3
                    disable="false"
                    installdiskspace="34168,23512,158888"
-                   script="OCCT-6.5.2.sh"/>
+                   script="OCCT.sh"/>
     </product>
     <product name="Qwt" 
             type="prerequisite"
index 2cc7c11f78cfcfe8490c3bfd83e5ffdc1ceb0f11..78ce7b5e5b5f354201d76b9b9513a5ea398d01bc 100755 (executable)
     </product>
     <product name="OpenCascade" 
             type="prerequisite"
-             description="Open CASCADE version 6.5.2">
+             description="Open CASCADE Technology">
       <installation os="Red Hat Enterprise WS 4 64bit"
-                    version="6.5.2
+                    version="6.5.3
                    disable="false"
                    installdiskspace="34168,23512,158888"
-                   script="OCCT-6.5.2.sh"/>
+                   script="OCCT.sh"/>
     </product>
     <product name="Qwt" 
             type="prerequisite"
index 04944d533a8500e495903d65450e4a07ba6ffc9b..117ee387ffa442454faaac60dc4bebed6f7755c6 100755 (executable)
     </product>
     <product name="OpenCascade" 
             type="prerequisite"
-             description="Open CASCADE version 6.5.2">
+             description="Open CASCADE Technology">
       <installation os="Scientific SL 5.1 64bit"
-                    version="6.5.2
+                    version="6.5.3
                    disable="false"
                    installdiskspace="34168,23512,158888"
-                   script="OCCT-6.5.2.sh"/>
+                   script="OCCT.sh"/>
     </product>
     <product name="Qwt" 
             type="prerequisite"
diff --git a/config_files/OCCT-6.5.2.sh b/config_files/OCCT-6.5.2.sh
deleted file mode 100755 (executable)
index 0f017db..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-#!/bin/bash -noprofile
-
-####################################################################################
-#  File      : OCCT-6.5.2.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-2008 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.5.2" ] ; then
-    return 0
-fi
-return 1
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export CASROOT=\${INST_ROOT}/${SINGLE_DIR:-${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 ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-print_env_src()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled()
-{
-try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-# unpack
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-cd ${PRODUCT_SRC_DIR}
-
-# configure
-
-echo " +++++++++++ configure"
-
-is_mandriva2010=0
-is_mandriva2008=0
-is_debian40=0
-is_debian50=0
-is_debian60=0
-is_centos=0
-
-if [ -e /etc/issue ] ; then
-  grep -e "Mandriva Linux release 2008.0" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_mandriva2008=1 ; fi
-fi
-
-if [ -e /etc/issue ] ; then
-  grep -e "Mandriva Linux release 2010.0" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_mandriva2010=1 ; fi
-fi
-
-if [ -e /etc/issue ] ; then
-  grep -e "Debian GNU/Linux 4.0" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_debian40=1 ; fi
-fi
-
-if [ -e /etc/issue ] ; then
-  grep -e "Debian GNU/Linux 4.0" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_debian40=1 ; fi
-fi
-
-if [ -e /etc/issue ] ; then
-  grep -e "Debian GNU/Linux 5.0" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_debian50=1 ; fi
-fi
-
-if [ -e /etc/issue ] ; then
-  grep -e "Debian GNU/Linux 6.0" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_debian60=1 ; fi
-fi
-
-if [ -e /etc/issue ] ; then
-grep -e "CentOS release 5.5" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_centos=1 ; fi
-fi
-
-if [ $is_centos == 1 ] || [ $is_mandriva2008 == 1 ] || [ $is_mandriva2010 == 1 ] || [ $is_debian40 == 1 ] || [ $is_debian50 == 1 ] || [ $is_debian60 == 1 ] ; then
-where_xmu_include=/usr/include
-else
-where_xmu_include=/usr/X11R6/include
-fi
-
-flags=""
-
-flags="$flags --with-xmu-include=$where_xmu_include"
-
-if test `uname -m` = "x86_64" ; then
-    flags="$flags --with-xmu-library=/usr/lib64"
-else
-    flags="$flags --with-xmu-library=/usr/lib"
-fi
-
-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
-
-flags="$flags --with-tbb-include=${TBBHOME}/include" 
-
-if test `uname -m` = "x86_64" ; then
-    flags="$flags --with-tbb-library=${TBBHOME}/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21"
-else
-    flags="$flags --with-tbb-library=${TBBHOME}/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21"
-fi
-
-flags="$flags --with-freetype=${FREETYPEDIR}"
-flags="$flags --with-ftgl=${FTGLDIR}"
-flags="$flags --with-freeimage=${FREEIMAGEDIR}"
-flags="$flags --with-gl2ps=${GL2PSHOME}"
-
-flags="$flags --disable-debug --enable-production"
-
-export CASROOT=${PRODUCT_SRC_DIR}
-
-check_job ${PRODUCT_DIR}/BUILDCONFIGURE.LOG ./build_configure
-
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} $flags
-
-# make
-echo " +++++++++++ make"
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make -j4 install-strip
-
-# fix libGL dependencies
-echo " +++++++++++ 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\b%%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_SRC_DIR} > ${PRODUCT_DIR}/size.log
-cd ${PRODUCT_DIR};
-
-# remove sources and temporary files after building
-echo "${INSTALL_PRODUCTS}" | grep -q "PatchForOpenCascade"
-if [ $? -eq 1 ] && [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
-    test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
-fi
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_binary()
-{
-make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-# create a product directory
-test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
-
-is_mandriva2008=0
-
-if [ -e /etc/issue ] ; then
-  grep -e "Mandriva Linux release 2008.0" /etc/issue > /dev/null
-  if [ $? == 0 ] ; then is_mandriva2008=1 ; fi
-fi
-
-# 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`
-freetypedir=`printenv FREETYPEDIR`
-ftgldir=`printenv FTGLDIR`
-gl2psdir=`printenv GL2PSHOME`
-freeimagedir=`printenv FREEIMAGEDIR`
-tbbbasedir=`printenv TBBHOME`
-
-TBBKERNEL='cc4.1.0_libc2.4_kernel2.6.16.21'
-if test `uname -m` = "x86_64" ; then
-    export TBBMODE="intel64/$TBBKERNEL"
-else
-    export TBBMODE="ia32/$TBBKERNEL"
-fi
-
-tbbdir=${tbbbasedir}/lib/$TBBMODE
-
-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
-       if [ -n "${freetypedir}" ] && [ -d "${freetypedir}" ] ; then
-           sed -e "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freetypedir}/lib \3%g" \
-               -e 's%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype \3%g' $l > _$l
-           mv -f _$l $l
-       fi
-       chmod a+x $l
-       if [ -n "${ftgldir}" ] && [ -d "${ftgldir}" ] ; then
-           sed -e "s%\(.*\)\([[:space:]].*-L.*/ftgl-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${ftgldir}/lib \3%g" \
-               -e 's%\(.*\)\([[:space:]].*libftgl.la\)\(.*\)%\1 -lftgl \3%g' $l > _$l
-           mv -f _$l $l
-       fi
-       chmod a+x $l
-       if [ -n "${gl2psdir}" ] && [ -d "${gl2psdir}" ] ; then
-           sed -e "s%\(.*\)\([[:space:]].*-L.*/gl2ps-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${gl2psdir}/lib \3%g" $l > _$l
-           mv -f _$l $l
-       fi
-       chmod a+x $l
-       if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then
-           sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" $l > _$l
-           mv -f _$l $l
-       fi
-       chmod a+x $l
-       if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then
-           sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9][0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" $l > _$l
-           mv -f _$l $l
-       fi
-       chmod a+x $l
-       if [ -n "${tbbdir}" ] && [ -d "${tbbdir}" ] ; then
-           sed -e "s%\(.*\)\([[:space:]].*-L.*/tbb[^[:space:]]*/lib[^[:space:]]*\)\(.*\)%\1 -L${tbbdir} \3%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\b%%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
-
-# to generate environment script for sources
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INST_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-export PRODUCT_TYPE=$6;
-export INSTALL_PRODUCTS=$7;
-shift
-REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="OCCT-6.5.2"
-export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
-export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
-source ./common.sh
-$PROCEDURE 
diff --git a/config_files/OCCT.sh b/config_files/OCCT.sh
new file mode 100755 (executable)
index 0000000..cb6536e
--- /dev/null
@@ -0,0 +1,320 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : OCCT.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-2012 CEA
+#
+#  This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+#
+# Open CASCADE Technology version
+#
+OCCT_VERSION=6.5.3
+
+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" == "${OCCT_VERSION}" ] ; then
+    return 0
+fi
+return 1
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export CASROOT=\${INST_ROOT}/${SINGLE_DIR:-${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 ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+print_env_src()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
+#$DELIM ${PRODUCT_TYPE}_src $DELIM
+# nothing to do
+##
+EOF
+(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled()
+{
+try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+# unpack
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources...
+
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+cd ${PRODUCT_SRC_DIR}
+export CASROOT=${PRODUCT_SRC_DIR}
+
+# build_configure
+
+echo " +++++++++++ build_configure"
+
+check_job ${PRODUCT_DIR}/BUILDCONFIGURE.LOG ./build_configure
+
+# configure
+
+echo " +++++++++++ configure"
+
+flags=""
+
+# ... tcl/tk options
+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
+# ... tbb options
+if [ "${TBBHOME}" != "" ] ; then
+    flags="$flags --with-tbb-include=${TBBHOME}/include" 
+    if test `uname -m` = "x86_64" ; then
+       flags="$flags --with-tbb-library=${TBBHOME}/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21"
+    else
+       flags="$flags --with-tbb-library=${TBBHOME}/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21"
+    fi
+fi
+# ... freetype options
+if [ "{FREETYPEDIR}" != "" ] ; then
+    flags="$flags --with-freetype=${FREETYPEDIR}"
+fi
+# ... ftgl options
+if [ "{FTGLDIR}" != "" ] ; then
+    flags="$flags --with-ftgl=${FTGLDIR}"
+fi
+# ... freeimage options
+if [ "{FREEIMAGEDIR}" != "" ] ; then
+    flags="$flags --with-freeimage=${FREEIMAGEDIR}"
+fi
+# ... gl2ps options
+if [ "{GL2PSHOME}" != "" ] ; then
+    flags="$flags --with-gl2ps=${GL2PSHOME}"
+fi
+# other options
+flags="$flags --disable-production --enable-debug"
+
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} $flags
+
+# make
+
+echo " +++++++++++ make"
+
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE.LOG make -j4 install-strip
+
+# fix libGL dependencies
+
+echo " +++++++++++ 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\b%%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_SRC_DIR} > ${PRODUCT_DIR}/size.log
+cd ${PRODUCT_DIR};
+
+# remove sources and temporary files after building
+echo "${INSTALL_PRODUCTS}" | grep -q "PatchForOpenCascade"
+if [ $? -eq 1 ] && [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+    test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+# create a product directory
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+
+# 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
+
+tcldir=`printenv TCLHOME`
+freetypedir=`printenv FREETYPEDIR`
+ftgldir=`printenv FTGLDIR`
+gl2psdir=`printenv GL2PSHOME`
+freeimagedir=`printenv FREEIMAGEDIR`
+tbbbasedir=`printenv TBBHOME`
+
+TBBKERNEL='cc4.1.0_libc2.4_kernel2.6.16.21'
+if test `uname -m` = "x86_64" ; then
+    export TBBMODE="intel64/$TBBKERNEL"
+else
+    export TBBMODE="ia32/$TBBKERNEL"
+fi
+
+tbbdir=${tbbbasedir}/lib/$TBBMODE
+
+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
+       if [ -n "${freetypedir}" ] && [ -d "${freetypedir}" ] ; then
+           sed -e "s%\(.*\)\([[:space:]].*-L.*/freetype-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freetypedir}/lib \3%g" \
+               -e 's%\(.*\)\([[:space:]].*libfreetype.la\)\(.*\)%\1 -lfreetype \3%g' $l > _$l
+           mv -f _$l $l
+       fi
+       chmod a+x $l
+       if [ -n "${ftgldir}" ] && [ -d "${ftgldir}" ] ; then
+           sed -e "s%\(.*\)\([[:space:]].*-L.*/ftgl-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${ftgldir}/lib \3%g" \
+               -e 's%\(.*\)\([[:space:]].*libftgl.la\)\(.*\)%\1 -lftgl \3%g' $l > _$l
+           mv -f _$l $l
+       fi
+       chmod a+x $l
+       if [ -n "${gl2psdir}" ] && [ -d "${gl2psdir}" ] ; then
+           sed -e "s%\(.*\)\([[:space:]].*-L.*/gl2ps-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${gl2psdir}/lib \3%g" $l > _$l
+           mv -f _$l $l
+       fi
+       chmod a+x $l
+       if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then
+           sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" $l > _$l
+           mv -f _$l $l
+       fi
+       chmod a+x $l
+       if [ -n "${freeimagedir}" ] && [ -d "${freeimagedir}" ] ; then
+           sed -e "s%\(.*\)\([[:space:]].*-L.*/freeimage-[0-9]\.[0-9][0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 -L${freeimagedir}/lib \3%g" $l > _$l
+           mv -f _$l $l
+       fi
+       chmod a+x $l
+       if [ -n "${tbbdir}" ] && [ -d "${tbbdir}" ] ; then
+           sed -e "s%\(.*\)\([[:space:]].*-L.*/tbb[^[:space:]]*/lib[^[:space:]]*\)\(.*\)%\1 -L${tbbdir} \3%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\b%%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
+
+# to generate environment script for sources
+try_preinstalled
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INST_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+shift
+REMOVE_SRC_TMP=$8;
+test $# == 10 && shift && SINGLE_DIR=$9
+export PRODUCT="OCCT-${OCCT_VERSION}"
+export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
+source ./common.sh
+$PROCEDURE