#
# Paraview version and lib version
#
-PVVERSION=3.98.1
-PVLIBVERSION=`echo ${PVVERSION} | awk -F. '{printf("%d.%d",$1,$2)}'`
+VERSION_PARAVIEW=3.98.1
+PVLIBVERSION=`echo ${VERSION_PARAVIEW} | awk -F. '{printf("%d.%d",$1,$2)}'`
check_version()
{
-if [ -z "$PARAVIEW" ]; then
+if [ -z "${PARAVIEW_ROOT_DIR}" ]; then
return 1
fi
-check_lib_version libvtkCommon.so ${PVHOME}/lib/paraview-${PVLIBVERSION}
+check_lib_version libvtkCommonCore-pv${PVLIBVERSION}.so ${PARAVIEW_ROOT_DIR}/lib/paraview-${PVLIBVERSION}
if [ "$?" -eq "0" ]; then
return 0
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export PVHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PARAVIEW_ROOT_DIR=\${PVHOME}
-export PARAVIEW_VERSION=${PVLIBVERSION}
-export VTK_DIR=\${PVHOME}/lib/cmake/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}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export PARAVIEW_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export VTK_DIR=\${PARAVIEW_ROOT_DIR}/lib/cmake/paraview-${PVLIBVERSION}
+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}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
-data_archive=${SOURCE_DIR}/ParaViewData-${PVVERSION}.tar.gz
+data_archive=${SOURCE_DIR}/ParaViewData-${VERSION_PARAVIEW}.tar.gz
if [ ! -f ${data_archive} ] ; then
data_archive=${SOURCE_DIR}/ParaViewData-${PVLIBVERSION}.tar.gz
fi
### patch paraview
# 1. fix missing library dependencies
-local patch_lib_depends=1
-if [ "${patch_lib_depends}" == "1" ] ; then
+local patch_lib_depends=0
+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
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
+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. fix about missing TopologicalSort.cmake
local patch_topological_sort=1
-if [ "${patch_topological_sort}" == "1" ] ; then
+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_missing_headers}" == "1" ] ; then
+if [ "${patch_missing_headers}" = "1" ] ; then
cat >> ${PRODUCT_SRC_DIR}/Qt/Components/CMakeLists.txt <<EOF
IF (PARAVIEW_INSTALL_DEVELOPMENT_FILES)
FILE(GLOB files RELATIVE \${CMAKE_CURRENT_SOURCE_DIR} *.h)
fi
# 5. fix pb with dynamic loader in SALOME
local patch_dlopen=1
-if [ "${patch_dlopen}" == "1" ] ; then
+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
if [ $? -eq 0 ] && [ -e ${tcldir}/tclConfig.sh ] ; then
tcl_version=`grep -e "TCL_VERSION=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_VERSION=[\'|\"]\(.*\)[\'|\"]%\1%g" | sed -e "s%^[[:space:]]%%g;s%[[:space:]]\+$%%g"`
tcl_includes=`grep -e "TCL_INCLUDE_SPEC=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_INCLUDE_SPEC=[\'|\"]-I\(.*\)[\'|\"]%\1%g" | sed -e "s%^[[:space:]]%%g;s%[[:space:]]\+$%%g"`
- if [ -z "$tcl_includes" ] ; then tcl_includes=/usr/include ; fi
+ if [ -z "${tcl_includes}" ] ; then tcl_includes=/usr/include ; fi
tcl_libs=`grep -e "TCL_PACKAGE_PATH=.*" ${tcldir}/tclConfig.sh | sed -e "s%TCL_PACKAGE_PATH=[\'|\"]\(.*\)[\'|\"]%\1%g" | sed -e "s%^[[:space:]]%%g;s%[[:space:]]\+$%%g"`
fi
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"
### 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"
### 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}" -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=${PYTHONROOT}/bin/python${python_version}"
- CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPYTHON_INCLUDE_PATH:STRING=${PYTHONROOT}/include/python${python_version}"
- CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPYTHON_LIBRARY:STRING=${PYTHONROOT}/lib/python${python_version}/config/libpython${python_version}.a"
+ 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"
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
#<---
### HDF5 settings
-if [ "${HDF5HOME}" != "" ]; 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=${HDF5HOME}"
- #CMAKE_OPTIONS=$CMAKE_OPTIONS" -DHDF5_INCLUDE_DIRS=${HDF5HOME}/include"
- #CMAKE_OPTIONS=$CMAKE_OPTIONS" -DHDF5_LIBRARIES=${HDF5HOME}/lib/libhdf5.so;${HDF5HOME}/lib/libhdf5_hl.so"
- CMAKE_OPTIONS=$CMAKE_OPTIONS" -DHDF5_INCLUDE_DIR:PATH=${HDF5HOME}/include"
- CMAKE_OPTIONS=$CMAKE_OPTIONS" -DHDF5_HL_INCLUDE_DIR:PATH=${HDF5HOME}/include"
- CMAKE_OPTIONS=$CMAKE_OPTIONS" -DHDF5_LIBRARY_DIRS=${HDF5HOME}/lib"
- #CMAKE_OPTIONS=$CMAKE_OPTIONS" -DHDF5_LIBRARY:PATH=${HDF5HOME}/lib/libhdf5.so"
- CMAKE_OPTIONS=$CMAKE_OPTIONS" -DHDF5_HL_LIBRARY_DIRS=${HDF5HOME}/lib"
- #CMAKE_OPTIONS=$CMAKE_OPTIONS" -DHDF5_HL_LIBRARY:PATH=${HDF5HOME}/lib/libhdf5_hl.so"
- CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_H5PartReader:BOOL=OFF"
+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"
fi
### VisIt Database bridge settings
-CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_USE_VISITBRIDGE=ON"
-CMAKE_OPTIONS=$CMAKE_OPTIONS" -DBOOST_ROOT=${BOOSTDIR}"
+CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_USE_VISITBRIDGE=ON"
+CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DBOOST_ROOT=${BOOST_ROOT_DIR}"
### gl2ps settings
-if [ "${GL2PSHOME}" != "" ]; 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=${GL2PSHOME}/include"
- CMAKE_OPTIONS=$CMAKE_OPTIONS" -DGL2PS_LIBRARY:STRING=${GL2PSHOME}/lib/libgl2ps.so"
+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"
fi
### 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_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_CoProcessingScriptGenerator:BOOL=OFF"
-CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_ENABLE_COPROCESSING: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_ENABLE_COPROCESSING:BOOL=OFF"
+CMAKE_OPTIONS=${CMAKE_OPTIONS}" -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator: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
qmake : `which qmake`
used ParaView configuration options:
-$CMAKE_OPTIONS
+${CMAKE_OPTIONS}
EOF
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
+local patch_fatal_warnings=0
+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
# patch binaries
local patch_vtkconfig=1
-if [ "${patch_vtkconfig}" == "1" ] ; then
+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%[^;\"]\+/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
+ 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
+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
+fi
+
cd ${PRODUCT_DIR}
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
test -d ${PRODUCT_BUILD_DIR} && rm -fr ${PRODUCT_BUILD_DIR}
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a product directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
-data_archive=${SOURCE_DIR}/../../SOURCES/ParaViewData-${PVVERSION}.tar.gz
+data_archive=${SOURCE_DIR}/../../SOURCES/ParaViewData-${VERSION_PARAVIEW}.tar.gz
if [ ! -f ${data_archive} ] ; then
data_archive=${SOURCE_DIR}/../../SOURCES/ParaViewData-${PVLIBVERSION}.tar.gz
fi
cd ${PRODUCT_DIR}
for f in `find . -name "*.cmake"` ; do
-sed -e "s%/[^\";]*/bin/moc%${QTDIR}/bin/moc%g" \
- -e "s%/[^\";]*/bin/uic%${QTDIR}/bin/uic%g" \
- -e "s%/[^\";]*/bin/rcc%${QTDIR}/bin/rcc%g" \
- -e "s%/[^\";]*/bin/qmake%${QTDIR}/bin/qmake%g" \
- -e "s%/[^\";]*/lib/libQt%${QTDIR}/lib/libQt%g" \
- -e "s%/[^\";]*/lib64/libQt%${QTDIR}/lib64/libQt%g" \
- -e "s%/[^\";]*/lib/python\([0-9].[0-9]\)/config/libpython%$PYTHONHOME/lib/python\1/config/libpython%g" \
- -e "s%/[^\";]*/include/python\([0-9].[0-9]\)%$PYTHONHOME/include/python\1%g" \
+sed -e "s%/[^\";]*/bin/moc%${QT4_ROOT_DIR}/bin/moc%g" \
+ -e "s%/[^\";]*/bin/uic%${QT4_ROOT_DIR}/bin/uic%g" \
+ -e "s%/[^\";]*/bin/rcc%${QT4_ROOT_DIR}/bin/rcc%g" \
+ -e "s%/[^\";]*/bin/qmake%${QT4_ROOT_DIR}/bin/qmake%g" \
+ -e "s%/[^\";]*/lib/libQt%${QT4_ROOT_DIR}/lib/libQt%g" \
+ -e "s%/[^\";]*/lib64/libQt%${QT4_ROOT_DIR}/lib64/libQt%g" \
+ -e "s%/[^\";]*/lib/python\([0-9].[0-9]\)/config/libpython%${PYTHON_ROOT_DIR}/lib/python\1/config/libpython%g" \
+ -e "s%/[^\";]*/include/python\([0-9].[0-9]\)%${PYTHON_ROOT_DIR}/include/python\1%g" \
-e "s%/[^\";]*/tcltk[^/]*/include%${TCLHOME}/include%g" \
-e "s%/[^\";]*/tcltk[^/]*/lib%${TCLHOME}/lib%g" \
- -e "s%/[^\";]*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/include%${HDF5HOME}/include%g" \
- -e "s%/[^\";]*/lib/libhdf5.so%${HDF5HOME}/lib/libhdf5.so%g" \
- -e "s%/[^\";]*/lib64/libhdf5.so%${HDF5HOME}/lib64/libhdf5.so%g" \
- -e "s%/[^\";]*/lib/libhdf5_hl.so%${HDF5HOME}/lib/libhdf5_hl.so%g" \
- -e "s%/[^\";]*/lib64/libhdf5_hl.so%${HDF5HOME}/lib64/libhdf5_hl.so%g" \
- -e "s%/[^\";]*/gl2ps-[0-9]\+\.[0-9]\+\.[0-9]\+/include%${GL2PSHOME}/include%g" \
- -e "s%/[^\";]*/lib/libgl2ps.so%${GL2PSHOME}/lib/libgl2ps.so%g" \
- -e "s%/[^\";]*/lib64/libgl2ps.so%${GL2PSHOME}/lib64/libgl2ps.so%g" \
+ -e "s%/[^\";]*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/include%${HDF5_ROOT_DIR}/include%g" \
+ -e "s%/[^\";]*/lib/libhdf5.so%${HDF5_ROOT_DIR}/lib/libhdf5.so%g" \
+ -e "s%/[^\";]*/lib64/libhdf5.so%${HDF5_ROOT_DIR}/lib64/libhdf5.so%g" \
+ -e "s%/[^\";]*/lib/libhdf5_hl.so%${HDF5_ROOT_DIR}/lib/libhdf5_hl.so%g" \
+ -e "s%/[^\";]*/lib64/libhdf5_hl.so%${HDF5_ROOT_DIR}/lib64/libhdf5_hl.so%g" \
+ -e "s%/[^\";]*/gl2ps-[0-9]\+\.[0-9]\+\.[0-9]\+/include%${GL2PS_ROOT_DIR}/include%g" \
+ -e "s%/[^\";]*/lib/libgl2ps.so%${GL2PS_ROOT_DIR}/lib/libgl2ps.so%g" \
+ -e "s%/[^\";]*/lib64/libgl2ps.so%${GL2PS_ROOT_DIR}/lib64/libgl2ps.so%g" \
-e "s%\(IMPORTED_LOCATION_RELEASE.*\"\).*/lib/paraview-${PVLIBVERSION}/\([^/]\+\"\)%\1${PRODUCT_DIR}/lib/paraview-${PVLIBVERSION}/\2%g" \
-e "s%\(IMPORTED_LOCATION_RELEASE.* \"\).*/bin/\([^/]\+\"\)%\1${PRODUCT_DIR}/bin/\2%g" \
${f} > ${f}.new
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="ParaView-${PVVERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="ParaView-${VERSION_PARAVIEW}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
source ./common.sh
-$PROCEDURE
+${PROCEDURE}
#
# PyQt version
#
-PYQT_VERSION=4.9.6
-PYQT_XVERSION=`echo ${PYQT_VERSION} | awk -F. '{printf("%d",$1*10000+$2*100+$3)}'`
+VERSION_PYQT=4.9.6
+PYQT_XVERSION=`echo ${VERSION_PYQT} | awk -F. '{printf("%d",$1*10000+$2*100+$3)}'`
check_version()
{
-if [ -n "${PYQTDIR}" ] && [ -f ${PYQTDIR}/pyqtconfig.py ] ; then
- ver=`cd ${PYQTDIR} && python -c "from pyqtconfig import Configuration; c=Configuration();print c.__getattr__('pyqt_version_str')" 2>/dev/null`
- if [ -n "$ver" ] ; then
- maj_ver=`echo $ver | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
- min_ver=`echo $ver | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
- rel_ver=`echo $ver | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
- let ver=$maj_ver*10000+$min_ver*100+$rel_ver
- if [ $ver -eq ${PYQT_XVERSION} ] ; then
+if [ -n "${PYQT4_ROOT_DIR}" ] && [ -f ${PYQT4_ROOT_DIR}/pyqtconfig.py ] ; then
+ ver=`cd ${PYQT4_ROOT_DIR} && python -c "from pyqtconfig import Configuration; c=Configuration();print c.__getattr__('pyqt_version_str')" 2>/dev/null`
+ if [ -n "${ver}" ] ; then
+ maj_ver=`echo ${ver} | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
+ min_ver=`echo ${ver} | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
+ rel_ver=`echo ${ver} | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
+ let ver=${maj_ver}*10000+${min_ver}*100+${rel_ver}
+ if [ ${ver} -eq ${PYQT_XVERSION} ] ; then
return 0
fi
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export PYQTDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PYQT_ROOT_DIR=\${PYQTDIR}
-export PYQT_SIPS=\${PYQTDIR}/sip
-export PATH=\${PYQTDIR}/bin:\$PATH
-export PYTHONPATH=\${PYQTDIR}:\${PYQTDIR}/PyQt4:\${PYTHONPATH}
-export LD_LIBRARY_PATH=\${PYQTDIR}/PyQt4:\$LD_LIBRARY_PATH
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export PYQT4_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PYQT_SIPS=\${PYQT4_ROOT_DIR}/sip
+export PATH=\${PYQT4_ROOT_DIR}/bin:\${PATH}
+export PYTHONPATH=\${PYQT4_ROOT_DIR}:\${PYQT4_ROOT_DIR}/PyQt4:\${PYTHONPATH}
+export LD_LIBRARY_PATH=\${PYQT4_ROOT_DIR}/PyQt4:\${LD_LIBRARY_PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
# apply patch for phonon includes
local patch_phonon_includes=1
-if [ "$patch_phonon_includes" == "1" ] ; then
- ( cd ${PRODUCT_SRC_DIR}/sip/phonon && for f in `find . -name "*.sip"` ; do sed -i "s%^#include <%#include <phonon/%g" $f ; done )
+if [ "${patch_phonon_includes}" = "1" ] ; then
+ ( cd ${PRODUCT_SRC_DIR}/sip/phonon && for f in `find . -name "*.sip"` ; do sed -i "s%^#include <%#include <phonon/%g" ${f} ; done )
fi
# apply patch for phonon module
# apply additional patch (if there's any)
( test -f patches/${PRODUCT}.patch && cp patches/${PRODUCT}.patch ${PRODUCT_SRC_DIR} && cd ${PRODUCT_SRC_DIR} && patch -p1 < ${PRODUCT}.patch )
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+fi
+
# to generate environment scripts
try_preinstalled
}
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
check_job ${PRODUCT_DIR}/MAKE.LOG make
check_job ${PRODUCT_DIR}/INSTALL.LOG make install
cd ${PRODUCT_DIR};
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build.size
+ du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size
+fi
+
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a product directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
PYQT_CONFIGURE_OPTIONS="-b ${PRODUCT_DIR}/bin -d ${PRODUCT_DIR} -v ${PRODUCT_DIR}/sip -p ${PRODUCT_DIR}/plugins --confirm-license"
# modify pyqtconfig.py file
-if [ -n "${PYTHONROOT}" ] && [ -n "${QTDIR}" ] ; then
- cd ${PRODUCT_DIR}/PyQt4
+if [ -n "${PYTHON_ROOT_DIR}" ] && [ -n "${QT4_ROOT_DIR}" ] ; then
python_version=`python -V 2>&1 | awk '{print $2}' | awk -F. '{printf("0x%02d%02d%02d",$1,$2,$3)}'`
- qt_version=`grep -e "^#define[[:space:]]\+QT_VERSION[[:space:]]\+" ${QTDIR}/include/Qt/qglobal.h | sed -e 's%^#define[[:space:]\+QT_VERSION[[:space:]]\+\(.*\)$%\1%g'`
- sed -e "s%\('pyqt_bin_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" \
- -e "s%\('pyqt_mod_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" \
- -e "s%\('pyqt_sip_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/sip',%g" \
- -e "s%\('qt_dir':[[:space:]]*\).*%\1'${QTDIR}',%g" \
- -e "s%\('qt_data_dir':[[:space:]]*\).*%\1'${QTDIR}',%g" \
- -e "s%\('qt_version':[[:space:]]*\).*%\1${qt_version},%g" \
- -e "s%\('qt_inc_dir':[[:space:]]*\).*%\1'${QTDIR}/include',%g" \
- -e "s%\('qt_lib_dir':[[:space:]]*\).*%\1'${QTDIR}/lib',%g" \
- -e "s%\('INCDIR_QT':[[:space:]]*\).*%\1'${QTDIR}/include',%g" \
- -e "s%\('LIBDIR_QT':[[:space:]]*\).*%\1'${QTDIR}/lib',%g" \
- -e "s%\('MOC':[[:space:]]*\).*%\1'${QTDIR}/bin/moc',%g" \
- -e "s%\('pyqt_config_args':[[:space:]]*\).*%\1'${PYQT_CONFIGURE_OPTIONS}',%g" \
- pyqtconfig.py > pyqtconfig.py.1
- mv -f pyqtconfig.py.1 pyqtconfig.py
- cd ${PRODUCT_DIR}/bin
- sed -i "s%exec.*pyuic.py%exec ${PYTHONROOT}/bin/python ${PRODUCT_DIR}/PyQt4/uic/pyuic.py%g" pyuic4
+ qt_version=`grep -e "^#define[[:space:]]\+QT_VERSION[[:space:]]\+" ${QT4_ROOT_DIR}/include/Qt/qglobal.h | sed -e 's%^#define[[:space:]\+QT_VERSION[[:space:]]\+\(.*\)$%\1%g'`
+ sed -i "s%\('pyqt_bin_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g;s%\('pyqt_mod_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" ${PRODUCT_DIR}/PyQt4/pyqtconfig.py
+ sed -i "s%\('pyqt_sip_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/sip',%g;s%\('qt_dir':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}',%g" ${PRODUCT_DIR}/PyQt4/pyqtconfig.py
+ sed -i "s%\('qt_data_dir':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}',%g;s%\('qt_version':[[:space:]]*\).*%\1${qt_version},%g" ${PRODUCT_DIR}/PyQt4/pyqtconfig.py
+ sed -i "s%\('qt_inc_dir':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}/include',%g;s%\('qt_lib_dir':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}/lib',%g" ${PRODUCT_DIR}/PyQt4/pyqtconfig.py
+ sed -i "s%\('INCDIR_QT':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}/include',%g;s%\('LIBDIR_QT':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}/lib',%g" ${PRODUCT_DIR}/PyQt4/pyqtconfig.py
+ sed -i "s%\('MOC':[[:space:]]*\).*%\1'${QT4_ROOT_DIR}/bin/moc',%g;s%\('pyqt_config_args':[[:space:]]*\).*%\1'${PYQT_CONFIGURE_OPTIONS}',%g" ${PRODUCT_DIR}/PyQt4/pyqtconfig.py
+ sed -i "s%exec.*pyuic.py%exec ${PYTHON_ROOT_DIR}/bin/python ${PRODUCT_DIR}/PyQt4/uic/pyuic.py%g" ${PRODUCT_DIR}/bin/pyuic4
fi
# to generate environment script for sources
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="PyQt-${PYQT_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="PyQt-${VERSION_PYQT}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
source ./common.sh
-$PROCEDURE
+${PROCEDURE}
#
# Python version
#
-PY_VERSION=2.7.3
-PY_XVERSION=`echo ${PY_VERSION} | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'`
-PY_LIBVERSION=`echo ${PY_VERSION} | awk -F. '{printf("%d.%d",$1,$2)}'`
+VERSION_PYTHON=2.7.3
+PY_XVERSION=`echo ${VERSION_PYTHON} | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'`
+PY_LIBVERSION=`echo ${VERSION_PYTHON} | awk -F. '{printf("%d.%d",$1,$2)}'`
check_version()
{
-if [ -z "$PYTHONHOME" ]; then
+if [ -z "${PYTHON_ROOT_DIR}" ]; then
return 1
fi
isPython=`which python 2>/dev/null`
-if [ -n "$isPython" ]; then
+if [ -n "${isPython}" ]; then
# version number is calculated as: <major>*10000+<minor>*100+<release>
ver=`python -V 2>&1`
- ver=`echo $ver | awk '{print $2}' | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'`
- if [ $ver -eq ${PY_XVERSION} ] ; then
+ ver=`echo ${ver} | awk '{print $2}' | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'`
+ if [ ${ver} -eq ${PY_XVERSION} ] ; then
return 0
fi
fi
print_env_bin()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export PYTHONROOT=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
-export PYTHONHOME=\$PYTHONROOT
-export PYTHON_ROOT_DIR=\${PYTHONROOT}
-export PYTHON_VERSION=$PY_LIBVERSION
-export PYTHON_INCLUDE=\${PYTHONROOT}/include/python\${PYTHON_VERSION}
-export PATH=\${PYTHONROOT}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${PYTHONROOT}/lib:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${PYTHONROOT}/lib/python\${PYTHON_VERSION}:\${PYTHONPATH}
+#${DELIM} ${PRODUCT_TYPE} ${DELIM}
+export PYTHON_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PYTHONHOME=\${PYTHON_ROOT_DIR}
+export PYTHON_VERSION=${PY_LIBVERSION}
+export PYTHON_INCLUDE=\${PYTHON_ROOT_DIR}/include/python\${PYTHON_VERSION}
+export PATH=\${PYTHON_ROOT_DIR}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${PYTHON_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
+export PYTHONPATH=\${PYTHON_ROOT_DIR}/lib/python\${PYTHON_VERSION}:\${PYTHONPATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
print_env_src()
{
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
+#${DELIM} ${PRODUCT_TYPE}_src ${DELIM}
# nothing to do
##
EOF
install_source()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.src.size
+fi
+
# to generate environment scripts
try_preinstalled
}
fi
### --with-pydebug ### (for debug)
-INCDIR=
-LIBDIR=
+TCL_INCDIR=
+TCL_LIBDIR=
tcl_dir=`where_tcl`
if [ "${tcl_dir}" != "" ] ; then
source ${tcl_dir}/tclConfig.sh
- INCDIR="${TCL_INCLUDE_SPEC}"
- LIBDIR="-L${TCL_PACKAGE_PATH}"
+ TCL_INCDIR="${TCL_INCLUDE_SPEC}"
+ TCL_LIBDIR="-L${TCL_PACKAGE_PATH}"
fi
#tk_dir=`where_tk`
#if [ "${tk_dir}" != "" ] ; then
# source ${tk_dir}/tkConfig.sh
-# INCDIR="${INCDIR} ${TK_INCLUDE_SPEC}"
-# LIBDIR="${LIBDIR} -L${TCL_PACKAGE_PATH}"
+# TCL_INCDIR="${TCL_INCDIR} ${TK_INCLUDE_SPEC}"
+# TCL_LIBDIR="${TCL_LIBDIR} -L${TCL_PACKAGE_PATH}"
#fi
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${PYTHON_CONFIGURE_OPTIONS} CPPFLAGS="${INCDIR}" LDFLAGS="${LIBDIR}"
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} ${PYTHON_CONFIGURE_OPTIONS} CPPFLAGS="${TCL_INCDIR}" LDFLAGS="${TCL_LIBDIR}"
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
+used gcc=${GCC}
EOF
unset PYTHONPATH PYTHONHOME
check_job ${PRODUCT_DIR}/MAKE.LOG make
check_job ${PRODUCT_DIR}/MAKINSTALL.LOG make install
-(cd ${PRODUCT_DIR}/lib${PYTHON_LIB_PREFIX}/python${PY_LIBVERSION}/config; ln -fs ../../libpython${PY_LIBVERSION}.so.1.0 libpython${PY_LIBVERSION}.so)
-cd ${PRODUCT_DIR}/bin
-for sc in idle pydoc smtpd.py 2to3 python${PY_LIBVERSION}-config ; do
- if [ -e $sc ] ; then
- sed -i "s%^#\!.*python.*$%#\!/usr/bin/env python%" "$sc"
- fi
+# add symbolic link to library
+(cd ${PRODUCT_DIR}/lib${PYTHON_LIB_PREFIX}/python${PY_LIBVERSION}/config && ln -fs ../../libpython${PY_LIBVERSION}.so.1.0 libpython${PY_LIBVERSION}.so)
+
+# modify scripts
+for l in idle pydoc smtpd.py 2to3 python${PY_LIBVERSION}-config ; do
+ test -e ${PRODUCT_DIR}/bin/${l} && sed -i "s%^#\!.*python.*$%#\!/usr/bin/env python%" ${PRODUCT_DIR}/bin/${l}
done
-cd ${PRODUCT_DIR};
+cd ${PRODUCT_DIR}
+
+if [ "${SALOME_IW_COMPSIZE}" = "1" ] ; then
+ du -sk ${PRODUCT_SRC_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.build.size
+ du -sk ${PRODUCT_DIR} > ${INST_ROOT}/${PRODUCT_TYPE}.bin.size
+fi
# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+if [ ${REMOVE_SRC_TMP} = "TRUE" ] ; then
test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
fi
install_binary()
{
make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
+source ${INSTALL_WORK}/${SHRC}
# create a product directory
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
-(cd ${PRODUCT_DIR}/lib/python${PY_LIBVERSION}/config; ln -fs ../../libpython${PY_LIBVERSION}.so.1.0 libpython${PY_LIBVERSION}.so)
-(cd ${PRODUCT_DIR}/lib/python${PY_LIBVERSION}/config && test -e Makefile && sed -i "s%^\(prefix[[:space:]]*=[[:space:]]*\).*%\1${PRODUCT_DIR}%g;s%^\(CONFIG_ARGS[[:space:]]*=.*\)--prefix=[^']*'%\1--prefix=${PRODUCT_DIR}'%g" Makefile)
+# add symbolic link to library
+(cd ${PRODUCT_DIR}/lib/python${PY_LIBVERSION}/config && ln -fs ../../libpython${PY_LIBVERSION}.so.1.0 libpython${PY_LIBVERSION}.so)
-cd ${PRODUCT_DIR}/bin
-for sc in idle pydoc smtpd.py ; do
- if [ -e $sc ] ; then
- sed -i "s%#\!.*python%#\!/usr/bin/env python%" "$sc"
- fi
+# correct install dir
+test -e ${PRODUCT_DIR}/lib/python${PY_LIBVERSION}/config/Makefile && \
+ sed -i "s%^\(prefix[[:space:]]*=[[:space:]]*\).*%\1${PRODUCT_DIR}%g;s%^\(CONFIG_ARGS[[:space:]]*=.*\)--prefix=[^']*'%\1--prefix=${PRODUCT_DIR}'%g" \
+ ${PRODUCT_DIR}/lib/python${PY_LIBVERSION}/config/Makefile)
+
+# modify scripts
+for l in idle pydoc smtpd.py 2to3 python${PY_LIBVERSION}-config ; do
+ test -e ${PRODUCT_DIR}/bin/${l} && sed -i "s%^#\!.*python.*$%#\!/usr/bin/env python%" ${PRODUCT_DIR}/bin/${l}
done
# modify pkgconfig
if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then
- cd ${PRODUCT_DIR}/lib/pkgconfig
- for l in X `find . -name "*.pc"`; do
+ for l in X `find ${PRODUCT_DIR}/lib/pkgconfig -name "*.pc"` ; do
if [ "${l}" != "X" ] ; then
sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l}
fi
export INSTALL_PRODUCTS=$7;
shift
REMOVE_SRC_TMP=$8;
-test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="Python-${PY_VERSION}"
+test $# = 10 && shift && SINGLE_DIR=$9
+export PRODUCT="Python-${VERSION_PYTHON}"
export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC