export PV_PLUGIN_PATH=\${PARAVIEW_ROOT_DIR}/lib/paraview-${PVLIBVERSION}
export PATH=\${PARAVIEW_ROOT_DIR}/bin:\${PATH}
export LD_LIBRARY_PATH=\${PARAVIEW_ROOT_DIR}/lib/paraview-${PVLIBVERSION}:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${PARAVIEW_ROOT_DIR}/lib/paraview-${PVLIBVERSION}:\${PARAVIEW_ROOT_DIR}/lib/paraview-${PVLIBVERSION}/site-packages:\${PARAVIEW_ROOT_DIR}/lib/paraview-${PVLIBVERSION}/site-packages/paraview:\${PYTHONPATH}
+export PYTHONPATH=\${PARAVIEW_ROOT_DIR}/lib/paraview-${PVLIBVERSION}:\${PARAVIEW_ROOT_DIR}/lib/paraview-${PVLIBVERSION}/site-packages:\${PARAVIEW_ROOT_DIR}/lib/paraview-${PVLIBVERSION}/site-packages/paraview:\${PARAVIEW_ROOT_DIR}/lib/paraview-${PVLIBVERSION}/site-packages/vtk:\${PYTHONPATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
check_jb tar xfz ${data_archive} -C ${INST_ROOT}
fi
-### patch paraview
-# 1. fix missing library dependencies
-local patch_lib_depends=0
+### patch options
+local patch_sources=1
+local patch_lib_depends=0 # not needed when dynamic Python libs are used
+local patch_dlopen=1
+local patch_surface_lic=1
+local patch_topological_sort=1
+local patch_matplotlib=0 # included to diff patch
+local patch_missing_headers=1
+local patch_python_threads=0 # included to diff patch
+local patch_vtk_math=0 # not needed for pv4.1
+
+# patch: apply general sources patch if present
+if [ "${patch_sources}" = "1" ] ; then
+ ( test -f patches/${PRODUCT}.patch && cp patches/${PRODUCT}.patch ${PRODUCT_SRC_DIR} && cd ${PRODUCT_SRC_DIR} && patch -p1 < ${PRODUCT}.patch )
+fi
+
+# patch: fix missing library dependencies
if [ "${patch_lib_depends}" = "1" ] ; then
- echo "target_link_libraries(vtkWrappingPython pthread util)" >> ${PRODUCT_SRC_DIR}/VTK/Wrapping/Python/CMakeLists.txt
- sed -i "s%LINK_PUBLIC vtkPVServerManagerCore%LINK_PUBLIC vtkPVServerManagerCore util%g" ${PRODUCT_SRC_DIR}/ParaViewCore/ServerManager/SMApplication/CMakeLists.txt
- sed -i "s%VTK_PYTHON_LIBRARIES})%VTK_PYTHON_LIBRARIES} pthread util)%g" ${PRODUCT_SRC_DIR}/ParaViewCore/PythonSupport/CMakeLists.txt
- sed -i "s%PYTHON_UTIL_LIBRARY_LIB}%PYTHON_UTIL_LIBRARY_LIB} pthread dl%g" ${PRODUCT_SRC_DIR}/ThirdParty/QtTesting/vtkqttesting/CMakeLists.txt
+ echo "target_link_libraries(vtkPythonInterpreter pthread util dl)" >> ${PRODUCT_SRC_DIR}/VTK/Utilities/PythonInterpreter/CMakeLists.txt
+ echo "target_link_libraries(\${vtk-module} pthread util dl)" >> ${PRODUCT_SRC_DIR}/VTK/Wrapping/PythonCore/CMakeLists.txt
fi
-# 2. fix problem with SurfaceLIC plugin
-local patch_surface_lic=1
-if [ "${patch_surface_lic}" = "1" -a -f ${SRCDIR}/patches/surface_lic.png ] ; then
- cp -f ${SRCDIR}/patches/surface_lic.png ${PRODUCT_SRC_DIR}/Plugins/SurfaceLIC/doc
+
+# patch: fix pb with dynamic loader in SALOME
+if [ "${patch_dlopen}" = "1" ] ; then
+ sed -i "s%RTLD_LAZY%RTLD_LAZY|RTLD_NODELETE%g" ${PRODUCT_SRC_DIR}/VTK/Utilities/KWSys/vtksys/DynamicLoader.cxx
fi
-# 3. fix about missing TopologicalSort.cmake
-local patch_topological_sort=1
+
+# patch: fix problem with SurfaceLIC plugin
+if [ "${patch_surface_lic}" = "1" ] ; then
+ ( test -f patches/surface_lic.png && cp -f ${SRCDIR}/patches/surface_lic.png ${PRODUCT_SRC_DIR}/Plugins/SurfaceLIC/doc )
+fi
+
+# patch: fix about missing TopologicalSort.cmake
if [ "${patch_topological_sort}" = "1" ] ; then
sed -i "s%CMake/vtkWrapTcl.cmake%CMake/vtkWrapTcl.cmake\n\t\tCMake/TopologicalSort.cmake%" ${PRODUCT_SRC_DIR}/VTK/CMake/vtkModuleTop.cmake
fi
-# 4. fix about missing header files
-local patch_missing_headers=1
+
+if [ "${patch_matplotlib}" = "1" ] ; then
+ sed -i "s%^[[:space:]]*vtkMatplotlibMathTextUtilities::NOT_TESTED;%vtkMatplotlibMathTextUtilities::UNAVAILABLE;%" ${PRODUCT_SRC_DIR}/VTK/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx
+fi
+
+# patch: fix about missing header files
if [ "${patch_missing_headers}" = "1" ] ; then
- cat >> ${PRODUCT_SRC_DIR}/Qt/Components/CMakeLists.txt <<EOF
+ sed -i "s%\(.*\)\(\${CMAKE_CURRENT_SOURCE_DIR}/vtkSMMessageMinimal.h\)%\1\2\n\1\${CMAKE_CURRENT_SOURCE_DIR}/vtkSIVectorPropertyTemplate.h%g" ${PRODUCT_SRC_DIR}/ParaViewCore/ServerImplementation/Core/CMakeLists.txt
+ cat >> ${PRODUCT_SRC_DIR}/Qt/Components/CMakeLists.txt <<EOF
IF (PARAVIEW_INSTALL_DEVELOPMENT_FILES)
FILE(GLOB files RELATIVE \${CMAKE_CURRENT_SOURCE_DIR} *.h)
INSTALL(
ENDIF (PARAVIEW_INSTALL_DEVELOPMENT_FILES)
EOF
fi
-# 5. fix pb with dynamic loader in SALOME
-local patch_dlopen=1
-if [ "${patch_dlopen}" = "1" ] ; then
- sed -i "s%RTLD_LAZY%RTLD_LAZY|RTLD_NODELETE%g" ${PRODUCT_SRC_DIR}/VTK/Utilities/KWSys/vtksys/DynamicLoader.cxx
+
+# patch: enable python threads
+if [ "${patch_python_threads}" = "1" ] ; then
+ sed -i "s%set (VTK_NO_PYTHON_THREADS 1%set (VTK_NO_PYTHON_THREADS OFF%" ${PRODUCT_SRC_DIR}/CMakeLists.txt
+fi
+
+# patch: fix pb with vtkMath, if present
+if [ "${patch_vtk_math}" = "1" ] ; then
+ ( test -f patches/vtkMath.h.patch && cp patches/vtkMath.h.patch ${PRODUCT_SRC_DIR}/VTK/Common/Core && cd ${PRODUCT_SRC_DIR}/VTK/Common/Core && patch -p1 < vtkMath.h.patch )
fi
# to generate environment scripts
mkdir ${PRODUCT_BUILD_DIR}
cd ${PRODUCT_BUILD_DIR}
+# patch options
+local patch_fatal_warnings=0 # not needed for pv4.1
+local patch_vtkconfig=1
+local patch_nvidia_deps=1
+
# get Python and tcl/tk version
python_version="`python -c 'import sys; print sys.version[:3]'`"
tcl_version=""
CMAKE_OPTIONS=""
### common settings
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_DIR}"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DCMAKE_BUILD_TYPE:STRING=Release"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DBUILD_SHARED_LIBS:BOOL=ON"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_DIR}"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_BUILD_TYPE:STRING=Release"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DBUILD_TESTING:BOOL=OFF"
### general compiler settings
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T=1"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DCMAKE_CXX_COMPILER:STRING=`which g++`"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DCMAKE_C_COMPILER:STRING=`which gcc`"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T=1"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER:STRING=`which g++`"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_COMPILER:STRING=`which gcc`"
### compiler settings for 64 bit platforms
if test `uname -m` = "x86_64" ; then
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DCMAKE_CXX_FLAGS:STRING=-m64"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DCMAKE_C_FLAGS:STRING=-m64"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_FLAGS:STRING=-m64"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_FLAGS:STRING=-m64"
fi
### Paraview general settings
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_DATA_ROOT=${PARAVIEWDATA_ROOT_DIR}"
### VTK general settings
-#CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_LEGACY_REMOVE:BOOL=OFF"
-#CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_USE_HYBRID:BOOL=ON"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_USE_PARALLEL:BOOL=ON"
-#CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_USE_PATENTED:BOOL=OFF"
-#CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_USE_RENDERING:BOOL=ON"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_USE_64BIT_IDS:BOOL=OFF"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_LEGACY_REMOVE:BOOL=OFF"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_USE_HYBRID:BOOL=ON"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_USE_PARALLEL:BOOL=ON"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_USE_PATENTED:BOOL=OFF"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_USE_RENDERING:BOOL=ON"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_USE_64BIT_IDS:BOOL=OFF"
### Qt settings
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_BUILD_QT_GUI:BOOL=ON"
-#CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_QT_USE_WEBKIT:BOOL=ON"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DQT_TESTING_INSTALL_DEVELOPMENT:BOOL=ON"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DQT_HELP_GENERATOR:STRING=${QT4_ROOT_DIR}/bin/qhelpgenerator"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_BUILD_QT_GUI:BOOL=ON"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_QT_USE_WEBKIT:BOOL=ON"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DQT_TESTING_INSTALL_DEVELOPMENT:BOOL=ON"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DQT_HELP_GENERATOR:STRING=${QT4_ROOT_DIR}/bin/qhelpgenerator"
### Python settings
if [ "${python_version}" != "" ]; then
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_ENABLE_PYTHON:BOOL=ON"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_WRAP_PYTHON:BOOL=ON"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPYTHON_USE_STATIC_LIBRARIES:BOOL=OFF"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPYTHON_EXECUTABLE:STRING=${PYTHON_ROOT_DIR}/bin/python${python_version}"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPYTHON_INCLUDE_PATH:STRING=${PYTHON_ROOT_DIR}/include/python${python_version}"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPYTHON_LIBRARY:STRING=${PYTHON_ROOT_DIR}/lib/python${python_version}/config/libpython${python_version}.so"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_ENABLE_PYTHON:BOOL=ON"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_WRAP_PYTHON:BOOL=ON"
+ #CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPYTHON_USE_STATIC_LIBRARIES:BOOL=OFF"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPYTHON_EXECUTABLE:STRING=${PYTHON_ROOT_DIR}/bin/python${python_version}"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPYTHON_INCLUDE_DIR:STRING=${PYTHON_ROOT_DIR}/include/python${python_version}"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPYTHON_LIBRARY:STRING=${PYTHON_ROOT_DIR}/lib/python${python_version}/config/libpython${python_version}.so"
+ #CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_NO_PYTHON_THREADS:BOOL=OFF"
fi
### Tcl/Tk settings
if false ; then
#<---
if [ "${tcl_version}" != "" ] && [ "${tcl_includes}" != "" ] && [ "${tcl_libs}" != "" ] ; then
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_WRAP_TCL:BOOL=ON"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DTCL_INCLUDE_PATH:STRING=${tcl_includes}"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DTCL_LIBRARY:STRING=${tcl_libs}/libtcl${tcl_version}.so"
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DTCL_STUB_LIBRARY:STRING=${tcl_libs}/libtclstub${tcl_version}.a"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DTCL_TCLSH:STRING=${TCLHOME}/bin/tclsh${tcl_version}"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DTK_INCLUDE_PATH:STRING=${tcl_includes}"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DTK_LIBRARY:STRING=${tcl_libs}/libtk${tcl_version}.so"
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DTK_STUB_LIBRARY:STRING=${tcl_libs}/libtkstub${tcl_version}.a"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DTK_WISH:STRING=${TCLHOME}/bin/wish${tcl_version}"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_WRAP_TCL:BOOL=ON"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DTCL_INCLUDE_PATH:STRING=${tcl_includes}"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DTCL_LIBRARY:STRING=${tcl_libs}/libtcl${tcl_version}.so"
+ #CMAKE_OPTIONS="${CMAKE_OPTIONS} -DTCL_STUB_LIBRARY:STRING=${tcl_libs}/libtclstub${tcl_version}.a"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DTCL_TCLSH:STRING=${TCLHOME}/bin/tclsh${tcl_version}"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DTK_INCLUDE_PATH:STRING=${tcl_includes}"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DTK_LIBRARY:STRING=${tcl_libs}/libtk${tcl_version}.so"
+ #CMAKE_OPTIONS="${CMAKE_OPTIONS} -DTK_STUB_LIBRARY:STRING=${tcl_libs}/libtkstub${tcl_version}.a"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DTK_WISH:STRING=${TCLHOME}/bin/wish${tcl_version}"
else
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_WRAP_TCL:BOOL=OFF"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_WRAP_TCL:BOOL=OFF"
fi
#--->
fi
#<---
+### Java settings
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_WRAP_JAVA:BOOL=OFF"
+
+### MPI settings
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_USE_MPI:BOOL=OFF"
+
### HDF5 settings
if [ "${HDF5_ROOT_DIR}" != "" ]; then
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_USE_SYSTEM_HDF5:BOOL=ON"
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF"
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}"
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_INCLUDE_DIRS=${HDF5_ROOT_DIR}/include"
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_LIBRARIES=${HDF5_ROOT_DIR}/lib/libhdf5.so;${HDF5_ROOT_DIR}/lib/libhdf5_hl.so"
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_INCLUDE_DIR:PATH=${HDF5_ROOT_DIR}/include"
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_HL_INCLUDE_DIR:PATH=${HDF5_ROOT_DIR}/include"
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_LIBRARY_DIRS=${HDF5_ROOT_DIR}/lib"
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_LIBRARY:PATH=${HDF5_ROOT_DIR}/lib/libhdf5.so"
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_HL_LIBRARY_DIRS=${HDF5_ROOT_DIR}/lib"
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DHDF5_HL_LIBRARY:PATH=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_BUILD_PLUGIN_H5PartReader:BOOL=ON"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_USE_SYSTEM_HDF5:BOOL=ON"
+ if [ -f ${HDF5_ROOT_DIR}/share/cmake/hdf5 ] ; then
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF_DIR:PATH=${HDF5_ROOT_DIR}/share/cmake/hdf5"
+ fi
+ #CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}"
+ #CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_INCLUDE_DIRS=${HDF5_ROOT_DIR}/include"
+ #CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_LIBRARIES=${HDF5_ROOT_DIR}/lib/libhdf5.so;${HDF5_ROOT_DIR}/lib/libhdf5_hl.so"
+ #CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_INCLUDE_DIR:PATH=${HDF5_ROOT_DIR}/include"
+ #CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_C_LIBRARY:STRING=${HDF5_ROOT_DIR}/lib/libhdf5.so"
+ #CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHDF5_HL_LIBRARY:PATH=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_BUILD_PLUGIN_H5PartReader:BOOL=OFF"
fi
### VisIt Database bridge settings
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_USE_VISITBRIDGE=ON"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DBOOST_ROOT=${BOOST_ROOT_DIR}"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_USE_VISITBRIDGE=ON"
+
+### Boost settings
+if [ "${BOOST_ROOT_DIR}" != "" ]; then
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DBOOST_ROOT=${BOOST_ROOT_DIR}"
+fi
### gl2ps settings
if [ "${GL2PS_ROOT_DIR}" != "" ]; then
- #CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_USE_GL2PS:BOOL=ON"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DVTK_USE_SYSTEM_GL2PS:BOOL=ON"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DGL2PS_INCLUDE_DIR:STRING=${GL2PS_ROOT_DIR}/include"
- CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DGL2PS_LIBRARY:STRING=${GL2PS_ROOT_DIR}/lib/libgl2ps.so"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_USE_SYSTEM_GL2PS:BOOL=ON"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DGL2PS_INCLUDE_DIR:STRING=${GL2PS_ROOT_DIR}/include"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DGL2PS_LIBRARY:STRING=${GL2PS_ROOT_DIR}/lib/libgl2ps.so"
+fi
+
+### libxml2 settings
+if [ "${LIBXML2_ROOT_DIR}" != "" ]; then
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_USE_SYSTEM_LIBXML2:BOOL=ON"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so"
fi
+### freetype settings
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON"
+
### Extra options (switch off non-used Paraview plug-ins)
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_BUILD_PLUGIN_Moments:BOOL=OFF"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_BUILD_PLUGIN_PrismPlugin:BOOL=OFF"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_BUILD_PLUGIN_SLACTools:BOOL=OFF"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_BUILD_PLUGIN_SierraPlotTools:BOOL=OFF"
-#CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_BUILD_PLUGIN_VisTrailsPlugin:BOOL=OFF"
-#CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_BUILD_PLUGIN_pvblot:BOOL=OFF"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_ENABLE_COPROCESSING:BOOL=OFF"
-CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=OFF"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_BUILD_PLUGIN_Moments:BOOL=OFF"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_BUILD_PLUGIN_PrismPlugin:BOOL=OFF"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_BUILD_PLUGIN_SLACTools:BOOL=OFF"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_BUILD_PLUGIN_SierraPlotTools:BOOL=OFF"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_BUILD_PLUGIN_VisTrailsPlugin:BOOL=OFF"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_BUILD_PLUGIN_pvblot:BOOL=OFF"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_BUILD_PLUGIN_PacMan:BOOL=OFF"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_BUILD_PLUGIN_MobileRemoteControl:BOOL=OFF"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_ENABLE_COPROCESSING:BOOL=OFF"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=OFF"
+CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_ENABLE_CATALYST:BOOL=OFF"
+#CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_BUILD_CATALYST_ADAPTORS: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"
+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"
# configure
EOF
check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${PRODUCT_SRC_DIR} ${CMAKE_OPTIONS}
-# patch buildir
-local patch_fatal_warnings=0
+# patch: fix problems with fatal warnings
if [ "${patch_fatal_warnings}" = "1" ] ; then
sed -i "s%-Wl,--fatal-warnings%%g" ${PRODUCT_BUILD_DIR}/VTK/Wrapping/Python/CMakeFiles/vtkpython.dir/link.txt
fi
cat > ${PRODUCT_DIR}/MAKE.LOG <<EOF
used gcc=`which gcc`
EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make VERBOSE=1
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+# VERBOSE=1
# make install
check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
-# patch binaries
-local patch_vtkconfig=1
+# patch: modify config files properly
if [ "${patch_vtkconfig}" = "1" ] ; then
cp -f ${PRODUCT_BUILD_DIR}/VTK/VTKTargets.cmake ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}
sed -i "s%\(IMPORTED_LOCATION_RELEASE.*\"\).*/lib/\([^/]\+\"\)%\1${PRODUCT_DIR}/lib/paraview-${PVLIBVERSION}/\2%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake
sed -i "s%\(IMPORTED_LOCATION_RELEASE.*\"\).*/bin/\([^/]\+\"\)%\1${PRODUCT_DIR}/bin/\2%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake
+ sed -i "s%\(IMPORTED_LOCATION_DEBUG.*\"\).*/lib/\([^/]\+\"\)%\1${PRODUCT_DIR}/lib/paraview-${PVLIBVERSION}/\2%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake
+ sed -i "s%\(IMPORTED_LOCATION_DEBUG.*\"\).*/bin/\([^/]\+\"\)%\1${PRODUCT_DIR}/bin/\2%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake
sed -i "s%[^;\"]\+/qt-[0-9\.]\+/lib/\([^;]\+\)%${QT4_ROOT_DIR}/lib/\1%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake
sed -i "s%[^;\"]\+/Python-[0-9\.]\+/lib/\([^;]\+\)%${PYTHON_ROOT_DIR}/lib/\1%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake
sed -i "s%[^;\"]\+/hdf5-[0-9\.]\+/lib/\([^;]\+\)%${HDF5_ROOT_DIR}/lib/\1%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake
sed -i "s%[^;\"]\+/gl2ps-[0-9\.]\+/lib/\([^;]\+\)%${GL2PS_ROOT_DIR}/lib/\1%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake
- cp -f ${PRODUCT_SRC_DIR}/VTK/CMake/vtkTestingMacros.cmake ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}
- sed -i "s%include(\".*/vtkTestingMacros.cmake\")%include(\"\${VTK_INSTALL_PREFIX}/lib/cmake/paraview-${PVLIBVERSION}/vtkTestingMacros.cmake\")%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKConfig.cmake
fi
-local patch_nvidia_deps=1
+# patch: fix wrong NVidia drivers dependencies
if [ "${patch_nvidia_deps}" = "1" ] ; then
- sed -i "s%/usr/lib/libXNVCtrl.a;%%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake
- sed -i "s%/usr/lib/libXNVCtrl.a;%%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/ParaViewTargets-release.cmake
+ pvtargetsfile=ParaViewTargets-release.cmake
+ #pvtargetsfile=ParaViewTargets-debug.cmake
+
+ ( test -f ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake && sed -i "s%/usr/lib/libXNVCtrl.a;%%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake || true )
+ ( test -f ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/${pvtargetsfile} && sed -i "s%/usr/lib/libXNVCtrl.a;%%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/${pvtargetsfile} || true )
+ ( test -f ${PRODUCT_DIR}/lib/CMake/${pvtargetsfile} && sed -i "s%/usr/lib/libXNVCtrl.a;%%g" ${PRODUCT_DIR}/lib/CMake/${pvtargetsfile} || true )
fi
cd ${PRODUCT_DIR}