From 55845739b9ab48e130c3637be022482faeefffbd Mon Sep 17 00:00:00 2001 From: inv Date: Wed, 4 Apr 2012 13:17:49 +0000 Subject: [PATCH] SALOME 6.5.0 preparation: update qwt script for version 6.0.1 (currect version is still 5.2.1) --- config_files/qwt.sh | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/config_files/qwt.sh b/config_files/qwt.sh index 6ffa469..308a383 100755 --- a/config_files/qwt.sh +++ b/config_files/qwt.sh @@ -16,6 +16,7 @@ # QWT version # QWT_VERSION=5.2.1 +QWT_MAJOR_VERSION=`echo ${QWT_VERSION} | awk -F. '{print $1}'` check_version() { @@ -83,13 +84,21 @@ install_source cd ${PRODUCT_SRC_DIR} test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} -sed -e "s%\(INSTALLBASE[[:space:]]*\)=\([[:space:]]*\).*%\1=\2${PRODUCT_DIR}%g" \ - -e "s%#\(CONFIG[[:space:]]*+=[[:space:]]*QwtSVGItem\)%\1%g" qwtconfig.pri > qwtconfig.pri.new -mv -f qwtconfig.pri.new qwtconfig.pri +# 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" 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" qwtconfig.pri +fi -sed -e "s%\(target\.path[[:space:]]*\)=\([[:space:]]*\).*%\1=\2\$\$INSTALLBASE/plugins/designer%g" \ - designer/designer.pro > designer/designer.pro.new -mv -f designer/designer.pro.new designer/designer.pro +if [ "${QWT_MAJOR_VERSION}" == "5" ] ; then + # include QwtSvg support (required only for qwt 5.x) + sed -i "s%#\(CONFIG[[:space:]]*+=[[:space:]]*QwtSVGItem\)%\1%g" 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" designer/designer.pro +fi INSTALL_ROOT_PREV=$INSTALL_ROOT unset INSTALL_ROOT @@ -136,6 +145,11 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} +# patch features files (required for Qwt 6.x only) +if [ "${QWT_MAJOR_VERSION}" == "6" ] ; then + test -f ${PRODUCT_DIR}/features/qwtconfig.pri && cd ${PRODUCT_DIR}/features && sed -i "s%\(QWT_INSTALL_PREFIX[[:space:]]*\)=\([[:space:]]*\).*%\1=\2${PRODUCT_DIR}%g" qwtconfig.pri +fi + # to generate environment script for sources try_preinstalled } -- 2.39.2