]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Fix a bug with environment for qwt libraries
authorvsr <vsr@opencascade.com>
Wed, 21 Dec 2005 07:51:45 +0000 (07:51 +0000)
committervsr <vsr@opencascade.com>
Wed, 21 Dec 2005 07:51:45 +0000 (07:51 +0000)
config_files/qwt-0.4.1.sh
config_files/qwt-4.2.0.sh

index 1656160da745753d271269023a09e55e9ada2988..61a6e7244b5f9ff957c76a8d95276c6684b3e272 100755 (executable)
@@ -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 <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
-export QWTHOME=${qwthome}
 export LD_LIBRARY_PATH=${ld_library_path}
 ##
 EOF
index d91c2f0fada525af89e5ed35763714f40970d5a9..88f5b2d2768c532ad91f07a9acf4bd845a26d983 100755 (executable)
@@ -26,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.4.2.0 ${LD_LIBRARY_PATH}`"
+if [ -z "${qwthome}" ] ; then
+    qwthome="`find_in_path libqwt.so.4.2.0 /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 <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
-export QWTHOME=${qwthome}
 export LD_LIBRARY_PATH=${ld_library_path}
 ##
 EOF