#$DELIM ${PRODUCT_TYPE} $DELIM
export PVHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PARAVIEW_ROOT_DIR=\${PVHOME}
+export VTK_DIR=\${PVHOME}/lib/paraview-${PVLIBVERSION}
+export PV_PLUGIN_PATH=\${PVHOME}/lib/paraview-${PVLIBVERSION}
export PATH=\${PVHOME}/bin:\${PATH}
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})
# 1.
local patch_lib_depends=1
if [ "${patch_lib_depends}" == "1" ] ; then
- echo -n ".. Patching ParaView sources: fix missing library dependencies..." && \
- 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
+ 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.
local patch_surface_lic=1
if [ "${patch_surface_lic}" == "1" -a -f ${SRCDIR}/patches/surface_lic.png ] ; then
- echo -n ".. Patching ParaView sources: fix problem with SurfaceLIC plugin..." && \
- cp -f ${SRCDIR}/patches/surface_lic.png ${PRODUCT_SRC_DIR}/Plugins/SurfaceLIC/doc
+ cp -f ${SRCDIR}/patches/surface_lic.png ${PRODUCT_SRC_DIR}/Plugins/SurfaceLIC/doc
fi
# 3.
local patch_topological_sort=1
if [ "${patch_topological_sort}" == "1" ] ; then
- echo -n ".. Patching ParaView sources: fix about missing TopologicalSort.cmake..." && \
- sed -i "s%CMake/vtkWrapTcl.cmake%CMake/vtkWrapTcl.cmake\n\t\tCMake/TopologicalSort.cmake%" ${PRODUCT_SRC_DIR}/VTK/CMake/vtkModuleTop.cmake
+ sed -i "s%CMake/vtkWrapTcl.cmake%CMake/vtkWrapTcl.cmake\n\t\tCMake/TopologicalSort.cmake%" ${PRODUCT_SRC_DIR}/VTK/CMake/vtkModuleTop.cmake
fi
# 4.
local patch_missing_headers=1
CMAKE_OPTIONS=$CMAKE_OPTIONS" -DCMAKE_BUILD_TYPE:STRING=Release"
CMAKE_OPTIONS=$CMAKE_OPTIONS" -DBUILD_SHARED_LIBS:BOOL=ON"
-### compiler settings
+### 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`"
+
### compiler settings for 64 bit platforms
if test `uname -m` = "x86_64" ; then
CMAKE_OPTIONS=$CMAKE_OPTIONS" -DCMAKE_CXX_FLAGS:STRING=-m64"
fi
### Paraview general settings
-CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON"
### VTK general settings
#CMAKE_OPTIONS=$CMAKE_OPTIONS" -DVTK_LEGACY_REMOVE:BOOL=OFF"
used ParaView configuration options:
$CMAKE_OPTIONS
EOF
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${PRODUCT_SRC_DIR} $CMAKE_OPTIONS
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG cmake ${PRODUCT_SRC_DIR} ${CMAKE_OPTIONS}
# patch buildir
local patch_fatal_warnings=1
if [ "${patch_fatal_warnings}" == "1" ] ; then
- echo -n ".. Patching ParaView builddir: fix problem with fatal warnings on linking..." && \
- sed -i "s%-Wl,--fatal-warnings%%g" ${PRODUCT_BUILD_DIR}/VTK/Wrapping/Python/CMakeFiles/vtkpython.dir/link.txt
+ sed -i "s%-Wl,--fatal-warnings%%g" ${PRODUCT_BUILD_DIR}/VTK/Wrapping/Python/CMakeFiles/vtkpython.dir/link.txt
fi
# make
cat > ${PRODUCT_DIR}/MAKE.LOG <<EOF
used gcc=`which gcc`
EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make -j4 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
if [ "${patch_vtkconfig}" == "1" ] ; then
- echo -n ".. Patching ParaView binaries: fix problem with missing cmake modules..." && \
- 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 >& /dev/null && \
- sed -i "s%\(IMPORTED_LOCATION_RELEASE.*\"\).*/bin/\([^/]\+\"\)%\1${PRODUCT_DIR}/bin/\2%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake >& /dev/null && \
- sed -i "s%[^;\"]\+/qt-[0-9\.]\+/lib/\([^;]\+\)%${QTDIR}/lib/\1%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake >& /dev/null && \
- sed -i "s%[^;\"]\+/Python-[0-9\.]\+/lib/\([^;]\+\)%${PYTHONROOT}/lib/\1%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake >& /dev/null && \
- sed -i "s%[^;\"]\+/hdf5-[0-9\.]\+/lib/\([^;]\+\)%${HDF5HOME}/lib/\1%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake >& /dev/null && \
- sed -i "s%[^;\"]\+/gl2ps-[0-9\.]\+/lib/\([^;]\+\)%${GL2PSHOME}/lib/\1%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake >& /dev/null && \
- 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 >& /dev/null
+ 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%[^;\"]\+/qt-[0-9\.]\+/lib/\([^;]\+\)%${QTDIR}/lib/\1%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake
+ sed -i "s%[^;\"]\+/Python-[0-9\.]\+/lib/\([^;]\+\)%${PYTHONROOT}/lib/\1%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake
+ sed -i "s%[^;\"]\+/hdf5-[0-9\.]\+/lib/\([^;]\+\)%${HDF5HOME}/lib/\1%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKTargets.cmake
+ sed -i "s%[^;\"]\+/gl2ps-[0-9\.]\+/lib/\([^;]\+\)%${GL2PSHOME}/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
cd ${PRODUCT_DIR}