+++ /dev/null
-#!/bin/bash -noprofile
-
-####################################################################################
-# File : VTK-4.2.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-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
-
-# 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
-
-# get Python and tcl/tk version
-python_version="`python -c 'import sys; print sys.version[:3]'`"
-tcl_version=""
-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"`
-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"
-### 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}" != "" ]; then
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_WRAP_TCL:BOOL=ON"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_INCLUDE_PATH:STRING=${TCLHOME}/include"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_LIBRARY:STRING=${TCLHOME}/lib/libtcl${tcl_version}.so"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_STUB_LIBRARY:STRING=${TCLHOME}/lib/libtclstub${tcl_version}.a"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_TCLSH:STRING=${TCLHOME}/bin/tclsh"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_INCLUDE_PATH:STRING=${TCLHOME}/include"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_LIBRARY:STRING=${TCLHOME}/lib/libtk${tcl_version}.so"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_STUB_LIBRARY:STRING=${TCLHOME}/lib/libtkstub${tcl_version}.a"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_WISH:STRING=${TCLHOME}/bin/wish"
-fi
-### if Mesa is pre-installed
-if [ -n "$MESA_HOME" ]; then
- VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DOPENGL_INCLUDE_DIR:STRING=${MESA_HOME}/include"
- 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"
- 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}
-
-#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
-cd ${PRODUCT_DIR};
-
-# set correct symbolic links - bug of python wrappings installation
-cd ${PRODUCT_DIR}/lib/python${python_version}/site-packages/vtk_python
-ln -sf ../../../vtk/*Python*.so .
-
-# 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
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-
-# 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.2"
-export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
-export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
-source ./common.sh
-$PROCEDURE