#!/bin/sh
check_version(){
-ver=`egrep 'BOOST_VERSION [0-9]+' ${BOOSTDIR}/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
-if [ "$ver" = "103002" ]; then
- return 0
+if [ -n "${BOOSTDIR}" ]; then
+ ver=`egrep 'BOOST_VERSION [0-9]+' ${BOOSTDIR}/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
+ if [ "$ver" = "103002" ]; then
+ return 0
+ fi
fi
return 1;
}
# looks for the native product and collects it's environment (used by make_env())
try_native(){
-echo "It is impossible to use native BOOST."
+boostdir="`find_in_path version.hpp /usr/include/boost`"
+if [ -z "${boostdir}" ] ; then
+ boostdir="`find_in_path version.hpp /usr/share/include/boost`"
+fi
+if [ -n "${boostdir}" ] ; then
+ boostdir=`cd ${boostdir}/..; pwd`
+ ver=`egrep 'BOOST_VERSION [0-9]+' ${boostdir}/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
+ if [ $ver -ge 103002 ] ; then
+ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export BOOSTDIR=${boostdir}
+##
+EOF
+ make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+ if [ $ver -eq 103002 ] ; then
+ return 0
+ else
+ return 2
+ fi
+ fi
+fi
return 1
}
install_binary()
{
-echo "It impossible to install BOOST from binaries, try install from sources."
+echo "It impossible to install BOOST 1.30.2 from binaries, try to install it from sources."
return 1
}
# looks for the native product and collects it's environment (used by make_env())
try_native(){
-echo "It is impossible to use native BOOST 1.31.0."
+boostdir="`find_in_path version.hpp /usr/include/boost`"
+if [ -z "${boostdir}" ] ; then
+ boostdir="`find_in_path version.hpp /usr/share/include/boost`"
+fi
+if [ -n "${boostdir}" ] ; then
+ boostdir=`cd ${boostdir}/..; pwd`
+ ver=`egrep 'BOOST_VERSION [0-9]+' ${boostdir}/boost/version.hpp | sed 's/.*BOOST_VERSION \([0-9]\+\)/\1/g'`
+ if [ $ver -ge 103100 ] ; then
+ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export BOOSTDIR=${boostdir}
+##
+EOF
+ make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+ if [ $ver -eq 103100 ] ; then
+ return 0
+ else
+ return 2
+ fi
+ fi
+fi
return 1
}
#$DELIM ${PRODUCT_TYPE} $DELIM
export CASROOT=\${INSTALL_ROOT}/${PRODUCT}
export PATH=\${CASROOT}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${CASROOT}/lib:\${LD_LIBRARY_PATH}
+export LD_LIBRARY_PATH=\${CASROOT}/lib:\${CASROOT}/lin/lib:\${LD_LIBRARY_PATH}
# Variable for Foundation Classes :
export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat
export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat
#$DELIM ${PRODUCT_TYPE} $DELIM
export CASROOT=${CASROOT}
export PATH=\${CASROOT}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${CASROOT}/lib:\${LD_LIBRARY_PATH}
+export LD_LIBRARY_PATH=\${CASROOT}/lib:\${CASROOT}/lin/lib:\${LD_LIBRARY_PATH}
# Variable for Foundation Classes :
export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat
export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat