From 35c1487b81c663d8ba34db75331fde720502328a Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 16 May 2014 15:42:26 +0400 Subject: [PATCH] Update install scripts for SALOME 7.4.0 --- config_files/ParaView.sh | 254 +++++++++++++++++++++++--------------- config_files/common.sh | 29 +++++ config_files/freeimage.sh | 21 +++- config_files/qwt.sh | 15 +-- 4 files changed, 207 insertions(+), 112 deletions(-) diff --git a/config_files/ParaView.sh b/config_files/ParaView.sh index 02a3e69..146d132 100755 --- a/config_files/ParaView.sh +++ b/config_files/ParaView.sh @@ -39,7 +39,7 @@ 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} +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}) @@ -77,29 +77,51 @@ if [ -f ${data_archive} ] ; then 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 <> ${PRODUCT_SRC_DIR}/Qt/Components/CMakeLists.txt < 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 @@ -270,8 +327,7 @@ ${CMAKE_OPTIONS} 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 @@ -281,29 +337,33 @@ fi cat > ${PRODUCT_DIR}/MAKE.LOG <0)a1=$1;if(NF>1)a2=$2;if(NF>2)a3=$3;printf("%02d%02d%02d",a1,a2,a3);}'` + local gcc_found + local gxx_found + if [ ${gcc_ver} -le ${gcc_min} ] ; then + local wheregcc=$(dirname `which gcc`) + local all_gcc=$(find ${wheregcc}/gcc*) + local gcc_alt + local gcc_max=0 + for gcc_alt in ${all_gcc} XXX ; do + if [ ${gcc_alt} = "XXX" ] ; then continue ; fi + gcc_ver=`${gcc_alt} -dumpversion 2>/dev/null | awk -F. '{a1=0;a2=0;a3=0;if(NF>0)a1=$1;if(NF>1)a2=$2;if(NF>2)a3=$3;printf("%02d%02d%02d",a1,a2,a3);}'` + if [ "${gcc_ver}" = "" ] ; then continue ; fi + if [ ${gcc_ver} -gt ${gcc_min} ] && [ ${gcc_ver} -gt ${gcc_max} ] ; then + gcc_max=${gcc_ver} + gcc_found=${gcc_alt} + gxx_found=`echo ${gcc_found} | sed -e "s%gcc%g++%"` + fi + done + if [ "${gcc_found}" != "" ] ; then + echo "CC=${gcc_found} CXX=${gxx_found}" + fi + fi +} + modif_la_files(){ return 0 # obsolete diff --git a/config_files/freeimage.sh b/config_files/freeimage.sh index f90c8f9..bd97c2e 100755 --- a/config_files/freeimage.sh +++ b/config_files/freeimage.sh @@ -71,16 +71,18 @@ source ${INSTALL_WORK}/${SHRC} check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT} # patch sources + # [-] patch for build procedure local patch_build_procedure=1 +# [-] patch for gcc 4.7 compatibility +local patch_gcc47_compat=1 + if [ "${patch_build_procedure}" = "1" ] ; then sed -i "s%DESTDIR ?= /%DESTDIR ?= /usr%g;s%INCDIR ?= \$(DESTDIR)/usr/include%INCDIR ?= \$(DESTDIR)/include%g;s%INSTALLDIR ?= \$(DESTDIR)/usr/lib%INSTALLDIR ?= \$(DESTDIR)/lib%g;s%-o root -g root %%g" ${PRODUCT_SRC_DIR}/Makefile.gnu sed -i "s%DESTDIR ?= /%DESTDIR ?= /usr%g;s%INCDIR ?= \$(DESTDIR)/usr/include%INCDIR ?= \$(DESTDIR)/include%g;s%INSTALLDIR ?= \$(DESTDIR)/usr/lib%INSTALLDIR ?= \$(DESTDIR)/lib%g;s%-o root -g root %%g" ${PRODUCT_SRC_DIR}/Makefile.fip sed -i "s%\(^[[:space:]]*\)\(install -m 755 \$(SHAREDLIB) \$(INSTALLDIR)\)%\1\2\n\1ln -sf \$(SHAREDLIB) \$(INSTALLDIR)/\$(VERLIBNAME)\n\1ln -sf \$(VERLIBNAME) \$(INSTALLDIR)/\$(LIBNAME)%g" ${PRODUCT_SRC_DIR}/Makefile.fip fi -# [-] patch for gcc 4.7 compatibility -local patch_gcc47_compat=1 if [ "${patch_gcc47_compat}" = "1" ] ; then sed -i 's%\(#include "OpenEXRConfig.h"\)%\1\n#include %g' ${PRODUCT_SRC_DIR}/Source/OpenEXR/IlmImf/ImfAutoArray.h fi @@ -105,11 +107,18 @@ cd ${PRODUCT_SRC_DIR} ## building FreeImage library +# workaround for CentOS 5.5: FreeImage 3.16.0 is not compiled with gcc 4.2 and older :( +local workaround_gcc42_pb=1 +gcc_found="" +if [ "${workaround_gcc42_pb}" = "1" ] ; then + gcc_found="`use_latest_gcc 040200`" +fi + # compile -check_job ${PRODUCT_DIR}/MAKE.LOG make -f Makefile.gnu +check_job ${PRODUCT_DIR}/MAKE.LOG make ${gcc_found} -f Makefile.gnu # install -check_job ${PRODUCT_DIR}/INSTALL.LOG make -f Makefile.gnu DESTDIR=${PRODUCT_DIR} install +check_job ${PRODUCT_DIR}/INSTALL.LOG make ${gcc_found} -f Makefile.gnu DESTDIR=${PRODUCT_DIR} install # clean temporary files ###make -f Makefile.gnu clean @@ -117,10 +126,10 @@ check_job ${PRODUCT_DIR}/INSTALL.LOG make -f Makefile.gnu DESTDIR=${PRODUCT_DIR} ## building FreeImagePlus library # compile -check_job ${PRODUCT_DIR}/MAKEPLUS.LOG make -f Makefile.fip +check_job ${PRODUCT_DIR}/MAKEPLUS.LOG make ${gcc_found} -f Makefile.fip # install -check_job ${PRODUCT_DIR}/INSTALLPLUS.LOG make -f Makefile.fip DESTDIR=${PRODUCT_DIR} install +check_job ${PRODUCT_DIR}/INSTALLPLUS.LOG make ${gcc_found} -f Makefile.fip DESTDIR=${PRODUCT_DIR} install # clean temporary files ###make -f Makefile.fip clean diff --git a/config_files/qwt.sh b/config_files/qwt.sh index 0565475..b7c68da 100755 --- a/config_files/qwt.sh +++ b/config_files/qwt.sh @@ -72,21 +72,18 @@ source ${INSTALL_WORK}/${SHRC} check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT} local patch_build_procedure=1 + if [ "${patch_build_procedure}" = "1" ] ; then + # 1. correct install path: for Qwt 5.x the variable is INSTALLBASE; for Qwt 6.x the variable is QWT_INSTALL_PREFIX + # 2. include QwtSvg support: required only for qwt 5.x + # 3. specify correct installation path for the designer plugin: required only for qwt 5.x # specify install path if [ "${QWT_MAJOR_VERSION}" = "5" ] ; then - # for Qwt 5.x the variable is INSTALLBASE sed -i "s%\(INSTALLBASE[[:space:]]*\)=\([[:space:]]*\).*%\1=\2${PRODUCT_DIR}%g" ${PRODUCT_SRC_DIR}/qwtconfig.pri - else - # for Qwt 6.x the variable is QWT_INSTALL_PREFIX - sed -i "s%\(QWT_INSTALL_PREFIX[[:space:]]*\)=\([[:space:]]*\).*%\1=\2${PRODUCT_DIR}%g" ${PRODUCT_SRC_DIR}/qwtconfig.pri - fi - - if [ "${QWT_MAJOR_VERSION}" = "5" ] ; then - # include QwtSvg support (required only for qwt 5.x) sed -i "s%#\(CONFIG[[:space:]]*+=[[:space:]]*QwtSVGItem\)%\1%g" ${PRODUCT_SRC_DIR}/qwtconfig.pri - # specify correct installation path for the designer plugin (required only for qwt 5.x) sed -i "s%\(target\.path[[:space:]]*\)=\([[:space:]]*\).*%\1=\2\$\$INSTALLBASE/plugins/designer%g" ${PRODUCT_SRC_DIR}/designer/designer.pro + else + sed -i "s%\(QWT_INSTALL_PREFIX[[:space:]]*\)=\([[:space:]]*\).*%\1=\2${PRODUCT_DIR}%g" ${PRODUCT_SRC_DIR}/qwtconfig.pri fi fi -- 2.39.2