From: vsr Date: Wed, 21 Dec 2005 07:51:45 +0000 (+0000) Subject: Fix a bug with environment for qwt libraries X-Git-Tag: V_3_1_0~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0f3f935e3db024a38ffb08c3bd664cf8ac465f6f;p=tools%2Finstall.git Fix a bug with environment for qwt libraries --- diff --git a/config_files/qwt-0.4.1.sh b/config_files/qwt-0.4.1.sh index 1656160..61a6e72 100755 --- a/config_files/qwt-0.4.1.sh +++ b/config_files/qwt-0.4.1.sh @@ -2,14 +2,11 @@ check_version() { -if [ -z "$QWTHOME" ]; then - #echo "QWTHOME doesn't set" - return 1 -fi -check_lib_version libqwt.so.0.4.1 ${QWTHOME}/lib -if [ "$?" -eq "0" ]; then - #echo "The product ${PRODUCT} has been already installed on yours system" - return 0 +if [ -n "${QWTHOME}" ]; then + check_lib_version libqwt.so.0.4.1 ${QWTHOME}/lib + if [ "$?" -eq "0" ]; then + return 0 + fi fi return 1 } @@ -29,13 +26,14 @@ make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" # looks for the native product and collects it's environment (used by make_env()) try_native(){ qwthome="`find_in_path libqwt.so.0.4.1 ${LD_LIBRARY_PATH}`" +if [ -z "${qwthome}" ] ; then + qwthome="`find_in_path libqwt.so.0.4.1 /usr/lib`" +fi if [ -n "${qwthome}" ] ; then - qwthome=`cd ${qwthome}/..; pwd` - tmp="\${QWTHOME}/lib ${QWTHOME}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; + tmp="${qwthome} ${qwthome} \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; ld_library_path=`sort_path ${tmp}` cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <