####################################################################################
#
-# VTK version
+# Paraview version and lib version
#
-PVVERSION=3.10
+PVVERSION=3.10.1
+PVLIBVERSION=`echo ${PVVERSION} | awk -F. '{printf("%d.%d",$1,$2)}'`
check_version()
{
if [ -z "$PARAVIEW" ]; then
return 1
fi
-check_lib_version libvtkCommon.so ${PVHOME}/lib/paraview-${PVVERSION}
+check_lib_version libvtkCommon.so ${PVHOME}/lib/paraview-${PVLIBVERSION}
if [ "$?" -eq "0" ]; then
return 0
fi
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
-export PVVERSION=${PVVERSION}
export PVHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PATH=\${PVHOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${PVHOME}/lib/paraview-\${PVVERSION}:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${PVHOME}/lib/paraview-\${PVVERSION}:\${PVHOME}/lib/paraview-\${PVVERSION}/site-packages:\${PVHOME}/lib/paraview-\${PVVERSION}/site-packages/paraview:\${PYTHONPATH}
+export LD_LIBRARY_PATH=\${PVHOME}/lib/paraview-${PVLIBVERSION}:\${LD_LIBRARY_PATH}
+export PYTHONPATH=\${PVHOME}/lib/paraview-${PVLIBVERSION}:\${PVHOME}/lib/paraview-${PVLIBVERSION}/site-packages:\${PVHOME}/lib/paraview-${PVLIBVERSION}/site-packages/paraview:\${PYTHONPATH}
+export VTK_DIR=\${PVHOME}/lib/paraview-${PVLIBVERSION}
+export PV_PLUGIN_PATH=\${PVHOME}/lib/paraview-${PVLIBVERSION}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
source ${INSTALL_WORK}/$SHRC
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
-check_jb tar xfz ${SOURCE_DIR}/ParaViewData-${PVVERSION}.tar.gz -C ${INST_ROOT}
+data_archive=${SOURCE_DIR}/ParaViewData-${PVVERSION}.tar.gz
+if [ ! -f ${data_archive} ] ; then
+ data_archive=${SOURCE_DIR}/ParaViewData-${PVLIBVERSION}.tar.gz
+fi
+check_jb tar xfz ${data_archive} -C ${INST_ROOT}
### patch paraview
-# 1. patch for ParaViewLibraryDepends.cmake problem (ParaView 3.10.0)
-need_patch_depend=1
+# 1. patch for ParaViewLibraryDepends.cmake problem (ParaView 3.10.0) [OBSOLETE]
+need_patch_depend=0
if [ "${need_patch_depend}" == "1" ] && [ -f patches/paraview-3.10.0-depend.patch ] ; then
cp patches/paraview-3.10.0-depend.patch ${PRODUCT_SRC_DIR}
( cd ${PRODUCT_SRC_DIR} ; patch -p0 < paraview-3.10.0-depend.patch )
CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_USE_VISITBRIDGE=ON"
CMAKE_OPTIONS=$CMAKE_OPTIONS" -DBOOST_ROOT=${BOOSTDIR}"
+### Extra options (switch off non-used Paraview plug-ins)
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_CoProcessing:BOOL=OFF"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_Moments:BOOL=OFF"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_Prism:BOOL=OFF"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_SLACTool:BOOL=OFF"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_SierraPlugin:BOOL=OFF"
+
+### Extra options (switch on required Paraview plug-ins)
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_EyeDomeLighting:BOOL=ON"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_ForceTime:BOOL=ON"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_H5PartReader:BOOL=ON"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_PointSprite:BOOL=ON"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_SurfaceLIC:BOOL=ON"
+
### Mesa settings (if pre-installed) [OBSOLETE]
-if [ -n "$MESA_HOME" ]; then
+with_mesa=0
+if [ "${with_mesa}" == "1" ] && [ "$MESA_HOME" != "" ] ; then
CMAKE_OPTIONS=$CMAKE_OPTIONS" -DOPENGL_INCLUDE_DIR:STRING=${MESA_HOME}/include"
if test `uname -m` = "x86_64" ; then
CMAKE_OPTIONS=$CMAKE_OPTIONS" -DOPENGL_gl_LIBRARY:STRING=${MESA_HOME}/lib64/libGL.so"
### 'make install` has been replaced by `cpack`
use_make_install=0
-
if [ "${use_make_install}" == "1" ] ; then
check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
# 1. patch for missing libvtkPV*.so libraries (ParaView 3.10 development version) [OBSOLETE]
need_patch_libvtkpv=0
if [ "${need_patch_libvtkpv}" == "1" ] ; then
- cd ${PRODUCT_DIR}/lib/paraview-${PVVERSION}
+ cd ${PRODUCT_DIR}/lib/paraview-${PVLIBVERSION}
for f in `find . -name "vtkPV*.so"` XXX ; do
if test "$f" == "XXX" ; then continue ; fi
d=`dirname $f`
cp -rf ${bindir}/* ${PRODUCT_DIR}
fi
-# patch Paraview problem (bad VisItBridge configuration)
-sed -i "s%SET(PARAVIEW_USE_VISITBRIDGE \"ON\")%SET(PARAVIEW_USE_VISITBRIDGE \"OFF\")%g" ${PRODUCT_DIR}/lib/paraview-${PVVERSION}/ParaViewConfig.cmake
+# patch Paraview problem for bad VisItBridge configuration), required at least for Paraview 3.10.0 and 3.10.1
+patch_visit_usage=1
+if [ "${patch_visit_usage}" == "1" ] ; then
+ sed -i "s%SET(PARAVIEW_USE_VISITBRIDGE \"ON\")%SET(PARAVIEW_USE_VISITBRIDGE \"OFF\")%g" ${PRODUCT_DIR}/lib/paraview-${PVLIBVERSION}/ParaViewConfig.cmake
+fi
cd ${PRODUCT_DIR}