]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Update for series 4X
authormaintenance team <salome-mnt@opencascade.com>
Mon, 29 Oct 2007 11:19:27 +0000 (11:19 +0000)
committermaintenance team <salome-mnt@opencascade.com>
Mon, 29 Oct 2007 11:19:27 +0000 (11:19 +0000)
config_files/VTK-4.2.6.sh [deleted file]
config_files/VTK-5.0.0.sh [new file with mode: 0755]

diff --git a/config_files/VTK-4.2.6.sh b/config_files/VTK-4.2.6.sh
deleted file mode 100755 (executable)
index e4e1068..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-#!/bin/bash -noprofile
-
-####################################################################################
-#  File      : VTK-4.2.6.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 "$VTKHOME" ]; then
-   return 1 
-fi
-check_lib_version libvtkCommon.so ${VTKHOME}/lib/vtk
-if [ "$?" -eq "0" ]; then
-   return 0
-fi
-return 1
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export VTKHOME=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${VTKHOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${VTKHOME}/lib/vtk:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${VTKHOME}/lib/vtk:\${VTKHOME}/lib/python\${PYTHON_VERSION}/site-packages/vtk_python:\${PYTHONPATH}
-export TCLLIBPATH="\${VTKHOME}/lib/vtk/tcl \${TCLLIBPATH}"
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INSTALL_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_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-makedir ${PRODUCT_DIR}_SRC
-
-check_jb tar xfz ${SOURCE_DIR}/cmake-1.6.6.tar.gz -C ${PRODUCT_DIR}_SRC
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}_SRC
-
-# apply patches for 64-bit platforms
-if test `uname -m` = "x86_64" ; then
-    if [ -f patches/cmake-1.6.6-lib64.patch ] ; then
-       cp patches/cmake-1.6.6-lib64.patch ${PRODUCT_DIR}_SRC/cmake-1.6.6_SRC
-       ( cd ${PRODUCT_DIR}_SRC/cmake-1.6.6_SRC ; patch -p1 < cmake-1.6.6-lib64.patch )
-    fi
-    if [ -f patches/vtk-4.2.6-lib64.patch ] ; then
-       cp patches/vtk-4.2.6-lib64.patch ${PRODUCT_DIR}_SRC/${PRODUCT}_SRC
-       ( cd ${PRODUCT_DIR}_SRC/${PRODUCT}_SRC ; patch -p1 < vtk-4.2.6-lib64.patch )
-    fi
-fi
-# apply patch: fix pb with importing Python vtk modules on some platforms
-if [ -f patches/vtk-4.2.6-patented.patch ] ; then
-    cp patches/vtk-4.2.6-patented.patch ${PRODUCT_DIR}_SRC/${PRODUCT}_SRC
-    ( cd ${PRODUCT_DIR}_SRC/${PRODUCT}_SRC ; patch -p1 < vtk-4.2.6-patented.patch )
-fi
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-makedir ${PRODUCT_DIR}
-
-cd ${PRODUCT_DIR}_SRC/cmake-1.6.6_SRC
-
-check_job ${PRODUCT_DIR}/CONFIGUREcmake.LOG ./configure
-cat >> ${PRODUCT_DIR}/MAKEcmake.LOG <<EOF
-used gcc=$GCC
-EOF
-check_job ${PRODUCT_DIR}/MAKEcmake.LOG make
-
-cd ${PRODUCT_DIR}_SRC/${PRODUCT}_SRC
-
-# apply a small patch for VTK (needed for gcc-3.4)
-sed -e "s%seekg(self->GetFile()->tellg()%seekg(static_cast<long>(self->GetFile()->tellg())%g" IO/vtkBMPReader.cxx > IO/vtkBMPReader.cxx.orig
-mv -f IO/vtkBMPReader.cxx.orig IO/vtkBMPReader.cxx
-sed -e "s%seekg(self->GetFile()->tellg()%seekg(static_cast<long>(self->GetFile()->tellg())%g" IO/vtkImageReader.cxx > IO/vtkImageReader.cxx.orig
-mv -f IO/vtkImageReader.cxx.orig IO/vtkImageReader.cxx
-
-# get Python and tcl/tk version
-python_version="`python -c 'import sys; print sys.version[:3]'`"
-tcl_version=""
-tcl_includes=""
-tcl_libs=""
-tcldir="`where_tcl`"
-if [ $? -eq 0 ] && [ -e ${tcldir}/tclConfig.sh ] ; then
-    tcl_version=`grep -e "TCL_VERSION=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_VERSION=[\'|\"]\(.*\)[\'|\"]%\1%g"`
-    tcl_includes=`grep -e "TCL_INCLUDE_SPEC=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_INCLUDE_SPEC=[\'|\"]-I\(.*\)[\'|\"]%\1%g"`
-    if [ -z "$tcl_includes" ] ; then tcl_includes=/usr/include ; fi
-    tcl_libs=`grep -e "TCL_PACKAGE_PATH=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_PACKAGE_PATH=[\'|\"]\(.*\)[\'|\"]%\1%g"`
-fi
-    
-VTK_CMAKE_OPTIONS=""
-### common VTK settings
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DBUILD_SHARED_LIBS:BOOL=ON"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DCMAKE_BUILD_TYPE:STRING=Release"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DCMAKE_CXX_COMPILER:STRING=`which g++`"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DCMAKE_C_COMPILER:STRING=`which gcc`"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_DIR}"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_USE_HYBRID:BOOL=ON"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_USE_PARALLEL:BOOL=ON"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_USE_PATENTED:BOOL=OFF" 
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_USE_RENDERING:BOOL=ON"
-  if test `uname -m` = "x86_64" ; then
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DCMAKE_CXX_FLAGS:STRING=-m64"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DCMAKE_C_FLAGS:STRING=-m64"
-  fi
-
-### Wrap Python settings
-if [ "${python_version}" != "" ]; then
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_WRAP_PYTHON:BOOL=ON"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_EXECUTABLE:STRING=${PYTHONHOME}/bin/python${python_version}"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_INCLUDE_PATH:STRING=${PYTHONHOME}/include/python${python_version}"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_LIBRARY:STRING=${PYTHONHOME}/lib/python${python_version}/config/libpython${python_version}.a"
-fi
-### Wrap Tcl settings
-if [ "${tcl_version}" != "" ] && [ "${tcl_includes}" != "" ] && [ "${tcl_libs}" != "" ] ; then
-# suppose that tcl and tk are installed in the same dir
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_WRAP_TCL:BOOL=ON"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_INCLUDE_PATH:STRING=${tcl_includes}"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_LIBRARY:STRING=${tcl_libs}/libtcl${tcl_version}.so"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_STUB_LIBRARY:STRING=${tcl_libs}/libtclstub${tcl_version}.a"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_TCLSH:STRING=${TCLHOME}/bin/tclsh${tcl_version}"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_INCLUDE_PATH:STRING=${tcl_includes}"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_LIBRARY:STRING=${tcl_libs}/libtk${tcl_version}.so"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_STUB_LIBRARY:STRING=${tcl_libs}/libtkstub${tcl_version}.a"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_WISH:STRING=${TCLHOME}/bin/wish${tcl_version}"
-fi
-### if Mesa is pre-installed
-if [ -n "$MESA_HOME" ]; then
-  VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_INCLUDE_DIR:STRING=${MESA_HOME}/include"
-  if test `uname -m` = "x86_64" ; then
-      VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_gl_LIBRARY:STRING=${MESA_HOME}/lib64/libGL.so"
-      VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_glu_LIBRARY:STRING=${MESA_HOME}/lib64/libGLU.so"
-  else
-      VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_gl_LIBRARY:STRING=${MESA_HOME}/lib/libGL.so"
-      VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_glu_LIBRARY:STRING=${MESA_HOME}/lib/libGLU.so"
-  fi
-  VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_xmesa_INCLUDE_DIR:STRING=${MESA_HOME}/include"
-fi
-
-cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
-used VTK settings:
-$VTK_CMAKE_OPTIONS
-EOF
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ${PRODUCT_DIR}_SRC/cmake-1.6.6_SRC/Source/cmake . $VTK_CMAKE_OPTIONS
-
-cat > ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-
-check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
-
-cd ${PRODUCT_DIR}_SRC/${PRODUCT}_SRC/Wrapping/Python
-
-check_job ${PRODUCT_DIR}/SETUPPYTHON.LOG python setup.py install --prefix=${PRODUCT_DIR}
-
-# set correct symbolic links - bug of python wrappings installation
-  if test `uname -m` = "x86_64" ; then
-      cd ${PRODUCT_DIR}/lib64/python${python_version}/site-packages/vtk_python
-  else
-      cd ${PRODUCT_DIR}/lib/python${python_version}/site-packages/vtk_python
-  fi
-  ln -sf ../../../vtk/*Python*.so .
-
-  if test `uname -m` = "x86_64" ; then
-      cd ${PRODUCT_DIR}; ln -s lib64 lib
-  fi
-
-#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
-cd ${PRODUCT_DIR};
-
-# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
-    test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
-fi
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_binary()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-if [ -n "$MESA_HOME" ]; then
-  check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}_with_Mesa.tar.gz -C ${INSTALL_ROOT}
-else
-  check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-fi
-
-# to generate environment script for sources
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INSTALL_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-export PRODUCT_TYPE=$6;
-export INSTALL_PRODUCTS=$7;
-shift
-REMOVE_SRC_TMP=$8;
-export PRODUCT="VTK-4.2.6"
-export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
-export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
-source ./common.sh
-$PROCEDURE 
diff --git a/config_files/VTK-5.0.0.sh b/config_files/VTK-5.0.0.sh
new file mode 100755 (executable)
index 0000000..5aa2e83
--- /dev/null
@@ -0,0 +1,256 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : VTK-5.0.0.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 "$VTKHOME" ]; then
+   return 1 
+fi
+check_lib_version libvtkCommon.so ${VTKHOME}/lib/vtk
+if [ "$?" -eq "0" ]; then
+   return 0
+fi
+return 1
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export VTKHOME=\${INSTALL_ROOT}/${PRODUCT}
+export PATH=\${VTKHOME}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${VTKHOME}/lib/vtk:\${LD_LIBRARY_PATH}
+export PYTHONPATH=\${VTKHOME}/lib/vtk:\${VTKHOME}/lib/python\${PYTHON_VERSION}/site-packages/vtk_python:\${PYTHONPATH}
+export TCLLIBPATH="\${VTKHOME}/lib/vtk/tcl \${TCLLIBPATH}"
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_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_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+makedir ${PRODUCT_DIR}_SRC
+
+check_jb tar xfz ${SOURCE_DIR}/cmake-2.2.3.tar.gz -C ${PRODUCT_DIR}_SRC
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}_SRC
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+makedir ${PRODUCT_DIR}
+
+cd ${PRODUCT_DIR}_SRC/cmake-2.2.3_SRC
+
+chmod +w ./configure
+#INV - bug in a cmake configure 
+cp configure configure.orig && sed "s/relid'/relid/" configure.orig > configure
+chmod 755 ./configure
+
+check_job ${PRODUCT_DIR}/CONFIGUREcmake.LOG ./configure
+cat >> ${PRODUCT_DIR}/MAKEcmake.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKEcmake.LOG make
+
+cd ${PRODUCT_DIR}_SRC/${PRODUCT}_SRC
+
+# apply a small patch for VTK (needed for gcc-3.4)
+sed -e "s%seekg(self->GetFile()->tellg()%seekg(static_cast<long>(self->GetFile()->tellg())%g" IO/vtkBMPReader.cxx > IO/vtkBMPReader.cxx.orig
+mv -f IO/vtkBMPReader.cxx.orig IO/vtkBMPReader.cxx
+sed -e "s%seekg(self->GetFile()->tellg()%seekg(static_cast<long>(self->GetFile()->tellg())%g" IO/vtkImageReader.cxx > IO/vtkImageReader.cxx.orig
+mv -f IO/vtkImageReader.cxx.orig IO/vtkImageReader.cxx
+
+# get Python and tcl/tk version
+python_version="`python -c 'import sys; print sys.version[:3]'`"
+tcl_version=""
+tcl_includes=""
+tcl_libs=""
+tcldir="`where_tcl`"
+if [ $? -eq 0 ] && [ -e ${tcldir}/tclConfig.sh ] ; then
+    tcl_version=`grep -e "TCL_VERSION=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_VERSION=[\'|\"]\(.*\)[\'|\"]%\1%g"`
+    tcl_includes=`grep -e "TCL_INCLUDE_SPEC=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_INCLUDE_SPEC=[\'|\"]-I\(.*\)[\'|\"]%\1%g"`
+    if [ -z "$tcl_includes" ] ; then tcl_includes=/usr/include ; fi
+    tcl_libs=`grep -e "TCL_PACKAGE_PATH=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_PACKAGE_PATH=[\'|\"]\(.*\)[\'|\"]%\1%g"`
+fi
+    
+VTK_CMAKE_OPTIONS=""
+
+### compiler options
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS"-DVTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T=1"
+
+### common VTK settings
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DBUILD_SHARED_LIBS:BOOL=ON"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DCMAKE_BUILD_TYPE:STRING=Release"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DCMAKE_CXX_COMPILER:STRING=`which g++`"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DCMAKE_C_COMPILER:STRING=`which gcc`"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_DIR}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_USE_HYBRID:BOOL=ON"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_USE_PARALLEL:BOOL=ON"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_USE_PATENTED:BOOL=OFF" 
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_USE_RENDERING:BOOL=ON"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_USE_GL2PS:BOOL=ON"
+  if test `uname -m` = "x86_64" ; then
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DCMAKE_CXX_FLAGS:STRING=-m64"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DCMAKE_C_FLAGS:STRING=-m64"
+  fi
+#INV: provide additional flags Mandriva 2007.0
+#is_mandriva2007=0
+#if [ -e /etc/redhat-release ] ; then
+#  grep -e "Mandriva Linux release 2007.0" /etc/redhat-release > /dev/null
+#  if [ $? == 0 ] ; then is_mandriva2007=1 ; fi
+#fi
+### Wrap Python settings
+if [ "${python_version}" != "" ]; then
+#if [ $is_mandriva2007 == 1 ] ; then
+#VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_WRAP_PYTHON:BOOL=OFF"
+#else
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_WRAP_PYTHON:BOOL=ON"
+#fi
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_EXECUTABLE:STRING=${PYTHONHOME}/bin/python${python_version}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_INCLUDE_PATH:STRING=${PYTHONHOME}/include/python${python_version}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_LIBRARY:STRING=${PYTHONHOME}/lib/python${python_version}/config/libpython${python_version}.a"
+fi
+### Wrap Tcl settings
+if [ "${tcl_version}" != "" ] && [ "${tcl_includes}" != "" ] && [ "${tcl_libs}" != "" ] ; then
+# suppose that tcl and tk are installed in the same dir
+#if [ $is_mandriva2007 == 1 ] ; then
+#VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_WRAP_TCL:BOOL=OFF"
+#else
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_WRAP_TCL:BOOL=ON"
+#fi
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_INCLUDE_PATH:STRING=${tcl_includes}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_LIBRARY:STRING=${tcl_libs}/libtcl${tcl_version}.so"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_STUB_LIBRARY:STRING=${tcl_libs}/libtclstub${tcl_version}.a"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_TCLSH:STRING=${TCLHOME}/bin/tclsh${tcl_version}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_INCLUDE_PATH:STRING=${tcl_includes}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_LIBRARY:STRING=${tcl_libs}/libtk${tcl_version}.so"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_STUB_LIBRARY:STRING=${tcl_libs}/libtkstub${tcl_version}.a"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_WISH:STRING=${TCLHOME}/bin/wish${tcl_version}"
+fi
+### if Mesa is pre-installed
+if [ -n "$MESA_HOME" ]; then
+  VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_INCLUDE_DIR:STRING=${MESA_HOME}/include"
+  if test `uname -m` = "x86_64" ; then
+      VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_gl_LIBRARY:STRING=${MESA_HOME}/lib64/libGL.so"
+      VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_glu_LIBRARY:STRING=${MESA_HOME}/lib64/libGLU.so"
+  else
+      VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_gl_LIBRARY:STRING=${MESA_HOME}/lib/libGL.so"
+      VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_glu_LIBRARY:STRING=${MESA_HOME}/lib/libGLU.so"
+  fi
+  VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_xmesa_INCLUDE_DIR:STRING=${MESA_HOME}/include"
+fi
+
+cat > ${PRODUCT_DIR}/CONFIGURE.LOG <<EOF
+used VTK settings:
+$VTK_CMAKE_OPTIONS
+EOF
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ${PRODUCT_DIR}_SRC/cmake-2.2.3_SRC/Source/cmake . $VTK_CMAKE_OPTIONS
+
+cat > ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+
+check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
+
+cd ${PRODUCT_DIR}_SRC/${PRODUCT}_SRC/Wrapping/Python
+
+check_job ${PRODUCT_DIR}/SETUPPYTHON.LOG python setup.py install --prefix=${PRODUCT_DIR}
+
+# set correct symbolic links - bug of python wrappings installation
+      cd ${PRODUCT_DIR}/include
+      ln -sf vtk-5.0 vtk
+
+      if test `uname -m` = "x86_64" ; then
+         cd ${PRODUCT_DIR}/lib; ln -s ../lib64/python${python_version} .
+      fi
+      cd ${PRODUCT_DIR}/lib/python${python_version}/site-packages
+      ln -sf vtk vtk_python 
+
+      cd ${PRODUCT_DIR}/lib
+      ln -sf ../lib vtk
+
+      if test `uname -m` = "x86_64" ; then
+         cd ${PRODUCT_DIR}/lib64; ln -sf ../lib/* .
+      fi
+
+#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
+cd ${PRODUCT_DIR};
+
+# remove sources and temporary files after building
+if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+    test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+if [ -n "$MESA_HOME" ]; then
+  check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}_with_Mesa.tar.gz -C ${INSTALL_ROOT}
+else
+  check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
+fi
+
+# to generate environment script for sources
+try_preinstalled
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+shift
+REMOVE_SRC_TMP=$8;
+export PRODUCT="VTK-5.0.0"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE