]> SALOME platform Git repositories - tools/install.git/blobdiff - config_files/common.sh
Salome HOME
Small correction
[tools/install.git] / config_files / common.sh
index 8d9fd0f62d174d24a464fd58ccaf85026524218f..2f33ae8ed98297846ad5f3ca6fd2aba909689d59 100755 (executable)
@@ -208,6 +208,7 @@ EOF
 
 # 3. writing global functions to _salome.csh file
 cat >> ${install_work}/_$CSHRC <<EOF
+
 ###########################################################################
 # Aliases setenva and setenvp are used to append/prepend correspondingly 
 # one directory or a set of directories separated by semicolon symbol (':')
@@ -279,6 +280,11 @@ sed -e 's%export\([[:blank:]]*\)PATH=\$[{]\?PATH[}]\?:\(.*\)%exporta\1PATH \2%g'
 sed -e 's%export\([[:blank:]]*\)LD_LIBRARY_PATH=\$[{]\?LD_LIBRARY_PATH[}]\?:\(.*\)%exporta\1LD_LIBRARY_PATH \2%g' -e 's%export\([[:blank:]]*\)LD_LIBRARY_PATH=\(.*\):\$[{]\?LD_LIBRARY_PATH[}]\?%exportp\1LD_LIBRARY_PATH \2%g' ${INSTALL_WORK}/_tmp1 > ${INSTALL_WORK}/_tmp2 2>/dev/null
 sed -e 's%export\([[:blank:]]*\)PYTHONPATH=\$[{]\?PYTHONPATH[}]\?:\(.*\)%exporta\1PYTHONPATH \2%g' -e 's%export\([[:blank:]]*\)PYTHONPATH=\(.*\):\$[{]\?PYTHONPATH[}]\?%exportp\1PYTHONPATH \2%g' ${INSTALL_WORK}/_tmp2 > ${INSTALL_WORK}/_tmp1 2>/dev/null
 sed -e 's%export\([[:blank:]]*\)LD_RUN_PATH=\$[{]\?LD_RUN_PATH[}]\?:\(.*\)%exporta\1LD_RUN_PATH \2%g' -e 's%export\([[:blank:]]*\)LD_RUN_PATH=\(.*\):\$[{]\?LD_RUN_PATH[}]\?%exportp\1LD_RUN_PATH \2%g' ${INSTALL_WORK}/_tmp1 > ${INSTALL_WORK}/_tmp2
+
+# Setting "/usr/X11R6/lib" path in LD_LIBRARY_PATH for the libGL.so.1 file
+echo '# Setting /usr/X11R6/lib path in LD_LIBRARY_PATH for the libGL.so.1 file' >> ${INSTALL_WORK}/_tmp2
+echo 'export LD_LIBRARY_PATH=/usr/X11R6/lib:${LD_LIBRARY_PATH}' >> ${INSTALL_WORK}/_tmp2
+
 cat ${INSTALL_WORK}/_tmp2 >> ${install_work}/_$SHRC
 
 # 5. Create a salome.csh file from salome.sh by replacing export by setenv, etc.
@@ -305,13 +311,26 @@ if [ $# -eq 4 ] ; then
 fi
 sed -e 's%setenv ENV_FOR_LAUNCH 1%setenv ENV_FOR_LAUNCH 0%' ${install_work}/_$CSHRC > ${install_root}/env_build.csh
 sed -e 's%export ENV_FOR_LAUNCH=1%export ENV_FOR_LAUNCH=0%' ${install_work}/_$SHRC  > ${install_root}/env_build.sh
+
 cp -f ${install_work}/_$CSHRC ${install_root}/env_products.csh
 cp -f ${install_work}/_$SHRC  ${install_root}/env_products.sh
+
 rm -f ${install_work}/_$SHRC ${install_work}/_$CSHRC
 ### !!! copying build.csh script
 if [ -e ./build.csh ]; then
     cp -f ./build.csh ${install_root}
 fi
+### !!! copying release notes
+for p in `ls ../` ; do
+    export pdf=`echo ${p} | sed s/[.]/" "/g | awk '{print $2}'`
+    if [ "${pdf}" = "pdf" ]; then
+       export RN=$p
+       if [ ! -e ${install_root}/${RN} ]; then
+           cp -f ../${RN} ${install_root}
+       fi
+    fi
+done
+
 }
 
 #try use already existing product
@@ -509,7 +528,7 @@ if [ "$l" != "X" ] ; then
        moddir=`printenv ${mod}_ROOT_DIR`
        if [ -n "${moddir}" ] ; then
            #echo $l $mod $moddir
-           sed -e "s%\(-L\)\?[^[:space:]]*${mod}[^[:space:]/]*/lib%\1${moddir}/lib%g" $l > $l"_"
+           sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*${mod}[^[:space:]/]*/lib% \1${moddir}/lib%g" $l > $l"_"
            mv -f $l"_" $l
        fi
     done
@@ -519,7 +538,9 @@ if [ "$l" != "X" ] ; then
     if [ ! -d ${casdir} ] ; then casdir=`printenv CASROOT`/lin/lib ; fi
     if [ -n "${CASROOT}" ] && [ -d "${casdir}" ] ; then
        # echo $l $CASROOT $casdir
-       sed -e "s%-L[^[:space:]]*\(OCT\|CAS\)[^[:space:]]*%-L${casdir}%g" $l > $l"_"
+       sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*\(OCT\|CAS\)[^[:space:]/]*/Linux/lib% \1${casdir}%g" \
+           -e "s%[[:space:]]\(-L\)\?[^[:space:]]*\(OCT\|CAS\)[^[:space:]/]*/lin/lib% \1${casdir}%g"   \
+           -e "s%[[:space:]]\(-L\)\?[^[:space:]]*\(OCT\|CAS\)[^[:space:]/]*/lib% \1${casdir}%g" $l > $l"_"
        mv -f $l"_" $l
     fi
     # 3. process omniORB dependencies
@@ -541,28 +562,28 @@ if [ "$l" != "X" ] ; then
     hdfdir=`printenv HDF5HOME`/lib
     if [ -n "${HDF5HOME}" ] && [ -d "${hdfdir}" ] ; then
        # echo $l $HDF5HOME $hdfdir
-       sed -e "s%-L[^[:space:]]*hdf[^[:space:]]*/lib%-L${hdfdir}%g" $l > $l"_"
+       sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*hdf[^[:space:]/]*/lib% \1${hdfdir}%g" $l > $l"_"
        mv -f $l"_" $l
     fi
     # 6. process MED dependencies
     meddir=`printenv MED2HOME`/lib
     if [ -n "${MED2HOME}" ] && [ -d "${meddir}" ] ; then
        # echo $l $MED2HOME $meddir
-       sed -e "s%-L[^[:space:]]*med[^[:space:]]*/lib%-L${meddir}%g" $l > $l"_"
+       sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*med[^[:space:]/]*/lib% \1${meddir}%g" $l > $l"_"
        mv -f $l"_" $l
     fi
     # 7. process qwt dependencies
     qwtdir=`find_in_path libqwt.so ${LD_LIBRARY_PATH}`
     if [ -n "${qwtdir}" ] && [ -d "${qwtdir}" ] ; then
        # echo $l $qwtdir
-       sed -e "s%-L[^[:space:]]*qwt[^[:space:]]*/lib%-L${qwtdir}%g" $l > $l"_"
+       sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*qwt[^[:space:]/]*/lib% \1${qwtdir}%g" $l > $l"_"
        mv -f $l"_" $l
     fi
     # 8. process qt dependencies
     qtdir=`printenv QTDIR`/lib
     if [ -n "${QTDIR}" ] && [ -d "${qtdir}" ] ; then
        # echo $l $QTDIR $qtdir
-       sed -e "s%-L[^[:space:]]*qt[^[:space:]]*/lib%-L${qtdir}%g" $l > $l"_"
+       sed -e "s%[[:space:]]\(-L\)\?[^[:space:]]*qt[^[:space:]/]*/lib% \1${qtdir}%g" $l > $l"_"
        mv -f $l"_" $l
     fi
     # 9. process python dependencies
@@ -596,7 +617,14 @@ if [ "$l" != "X" ] ; then
        sed -e "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}%g" $l > $l"_"
        mv -f $l"_" $l
     fi
-    # 13. modify libdir
+    # 13. process boost dependencies
+    boostdir=`printenv BOOSTDIR`/lib
+    if [ -n "${boostdir}" ] && [ -d "${boostdir}" ] ; then
+       # echo $l $BOOSTDIR $boostdir
+       sed -e "s%-L[^[:space:]]*boost[^[:space:]]*/lib%-L${boostdir}%g" $l > $l"_"
+       mv -f $l"_" $l
+    fi
+    # 14. modify libdir
     #sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib/salome'%g" $l > $l"_"
     mod=`basename $ldir | awk -F_ '{print $1}'`
     moddir=`printenv ${mod}_ROOT_DIR`