# 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 (':')
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.
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
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
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
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
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`