+++ /dev/null
-#!/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-2008 CEA
-#
-# This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-#
-# VTK version
-#
-VTK_VERSION=5.0.0
-VTK_LIBVERSION=`echo ${VTK_VERSION} | awk -F. '{printf("%d.%d",$1,$2)}'`
-
-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=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PATH=\${VTKHOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${VTKHOME}/lib:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${VTKHOME}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
-export TCLLIBPATH="\${VTKHOME}/lib/vtk-${VTK_LIBVERSION}/tcl \${TCLLIBPATH}"
-##
-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
-
-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}
-
-# patch for gcc-3.4
-for f in IO/vtkBMPReader.cxx IO/vtkImageReader.cxx ; do
- sed -e "s%seekg(self->GetFile()->tellg()%seekg(static_cast<long>(self->GetFile()->tellg())%g" ${f} > ${f}_
- mv -f ${f}_ ${f}
-done
-
-# patch for gcc 4.3
-for f in Utilities/DICOMParser/DICOMAppHelper.cxx Utilities/DICOMParser/DICOMFile.cxx Utilities/DICOMParser/DICOMParser.cxx ; do
- sed -e "s%#include <string>%#include <string>\n#include <string.h>%g" ${f} > ${f}_
- mv -f ${f}_ ${f}
-done
-
-sed -e "s%char \*doc \=%const char \*doc \=%g" Common/vtkPythonUtil.cxx > Common/vtkPythonUtil.cxx.orig
-mv -f Common/vtkPythonUtil.cxx.orig Common/vtkPythonUtil.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=${PYTHONROOT}/bin/python${python_version}"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_INCLUDE_PATH:STRING=${PYTHONROOT}/include/python${python_version}"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_LIBRARY:STRING=${PYTHONROOT}/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 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_SRC_DIR}/Wrapping/Python
-
-check_job ${PRODUCT_DIR}/SETUPPYTHON.LOG python setup.py install --prefix=${PRODUCT_DIR}
-
-cd ${PRODUCT_DIR};
-
-# remove sources and temporary files after building
-if [ ${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}
-
-# 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="VTK-${VTK_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
--- /dev/null
+#!/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-2008 CEA
+#
+# This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+#
+# VTK version
+#
+VTK_VERSION=5.0.4
+VTK_LIBVERSION=`echo ${VTK_VERSION} | awk -F. '{printf("%d.%d",$1,$2)}'`
+
+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=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${VTKHOME}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${VTKHOME}/lib:\${LD_LIBRARY_PATH}
+export PYTHONPATH=\${VTKHOME}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
+export TCLLIBPATH="\${VTKHOME}/lib/vtk-${VTK_LIBVERSION}/tcl \${TCLLIBPATH}"
+##
+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
+
+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}
+
+# patch for gcc-3.4
+for f in IO/vtkBMPReader.cxx IO/vtkImageReader.cxx ; do
+ sed -e "s%seekg(self->GetFile()->tellg()%seekg(static_cast<long>(self->GetFile()->tellg())%g" ${f} > ${f}_
+ mv -f ${f}_ ${f}
+done
+
+# patch for gcc 4.3
+for f in Utilities/DICOMParser/DICOMAppHelper.cxx Utilities/DICOMParser/DICOMFile.cxx Utilities/DICOMParser/DICOMParser.cxx ; do
+ sed -e "s%#include <string>%#include <string>\n#include <string.h>%g" ${f} > ${f}_
+ mv -f ${f}_ ${f}
+done
+
+#sed -e "s%char \*doc \=%const char \*doc \=%g" Common/vtkPythonUtil.cxx > Common/vtkPythonUtil.cxx.orig
+#mv -f Common/vtkPythonUtil.cxx.orig Common/vtkPythonUtil.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=${PYTHONROOT}/bin/python${python_version}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_INCLUDE_PATH:STRING=${PYTHONROOT}/include/python${python_version}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_LIBRARY:STRING=${PYTHONROOT}/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 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_SRC_DIR}/Wrapping/Python
+
+check_job ${PRODUCT_DIR}/SETUPPYTHON.LOG python setup.py install --prefix=${PRODUCT_DIR}
+
+cd ${PRODUCT_DIR};
+
+# remove sources and temporary files after building
+if [ ${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}
+
+# 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="VTK-${VTK_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