fi
### patch paraview
-# 1.
+# 1. fix missing library dependencies
local patch_lib_depends=1
if [ "${patch_lib_depends}" == "1" ] ; then
echo "target_link_libraries(vtkWrappingPython pthread util)" >> ${PRODUCT_SRC_DIR}/VTK/Wrapping/Python/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
fi
-# 2.
+# 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
fi
-# 3.
+# 3. fix about missing TopologicalSort.cmake
local patch_topological_sort=1
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.
+# 4. fix about missing header files
local patch_missing_headers=1
if [ "${patch_missing_headers}" == "1" ] ; then
- echo -n ".. Patching ParaView sources: fix about missing missing pq3DWidget.h and others header files..." && \
cat >> ${PRODUCT_SRC_DIR}/Qt/Components/CMakeLists.txt <<EOF
IF (PARAVIEW_INSTALL_DEVELOPMENT_FILES)
FILE(GLOB files RELATIVE \${CMAKE_CURRENT_SOURCE_DIR} *.h)
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
+fi
# to generate environment scripts
try_preinstalled