From 7e9cda50884869327c229a9a64fe7f9b5e056399 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 29 Nov 2013 13:43:26 +0000 Subject: [PATCH] SALOME 7.3.0 preparation --- config_files/ParaView.sh | 247 ++++++++++++++++++++------------------- config_files/PyQt.sh | 90 +++++++------- config_files/Python.sh | 102 ++++++++-------- 3 files changed, 226 insertions(+), 213 deletions(-) diff --git a/config_files/ParaView.sh b/config_files/ParaView.sh index 210b37b..b02003c 100755 --- a/config_files/ParaView.sh +++ b/config_files/ParaView.sh @@ -15,15 +15,15 @@ # # 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 @@ -33,15 +33,13 @@ return 1 print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <> ${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 < 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 @@ -267,13 +266,13 @@ tclsh : `which tclsh` 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 @@ -289,22 +288,28 @@ check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install # 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 @@ -316,13 +321,13 @@ try_preinstalled 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 @@ -333,24 +338,24 @@ 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 @@ -376,10 +381,10 @@ export PRODUCT_TYPE=$6; 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} diff --git a/config_files/PyQt.sh b/config_files/PyQt.sh index 0f52d4b..c09a264 100755 --- a/config_files/PyQt.sh +++ b/config_files/PyQt.sh @@ -15,19 +15,19 @@ # # 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 @@ -38,13 +38,12 @@ return 1 print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INST_ROOT}/${PRODUCT_TYPE}.src.size +fi + # to generate environment scripts try_preinstalled } @@ -111,15 +114,20 @@ check_job ${PRODUCT_DIR}/CONFIGURE.LOG python ./configure.py ${PYQT_CONFIGURE_OP GCC=`which gcc` cat >> ${PRODUCT_DIR}/MAKE.LOG < ${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 @@ -130,7 +138,7 @@ try_preinstalled 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} @@ -140,26 +148,16 @@ check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${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 @@ -175,10 +173,10 @@ export PRODUCT_TYPE=$6; 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} diff --git a/config_files/Python.sh b/config_files/Python.sh index 1fb368f..f9a7805 100755 --- a/config_files/Python.sh +++ b/config_files/Python.sh @@ -15,21 +15,21 @@ # # 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: *10000+*100+ 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 @@ -39,15 +39,14 @@ return 1 print_env_bin() { cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < ${INST_ROOT}/${PRODUCT_TYPE}.src.size +fi + # to generate environment scripts try_preinstalled } @@ -98,43 +101,48 @@ if test `uname -m` = "x86_64" ; then 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 < ${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 @@ -145,27 +153,29 @@ try_preinstalled 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 @@ -185,8 +195,8 @@ export PRODUCT_TYPE=$6; 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 -- 2.39.2