Salome HOME
Prepare SALOME 2.2.6 installation
[tools/install.git] / config_files / CAS-5.2.4a.sh
index 9ab0087c958f52129fc0ab89e414d0f38d087390..56ee860e06ef6646558590d66ee5bdfdbe330cb5 100755 (executable)
@@ -9,18 +9,11 @@ check_lib_version ${CASROOT}/inc/Standard_Version.hxx
 if [ "$?" -ne "0" ] ; then
     return 1
 fi
-ver_major=`grep "!define OCC_VERSION_MAJOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
-ver_minor=`grep "!define OCC_VERSION_MINOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
-ver="$ver_major.$ver_minor"
-if [ "$ver" != "5.2" ] ; then
-    return 1
-fi
-# above check if only for major and minor version numbers
-# we need also the check for the release version number
-# unfortunately there is no appropriate method to define the release version number,
-# so we use a little trick here:
-check_lib_version libStdPlugin.so ${CASROOT}/lin/lib
-if [ "$?" -eq "0" ] ; then
+ver_major=`grep "#define OCC_VERSION_MAJOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
+ver_minor=`grep "#define OCC_VERSION_MINOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
+ver_maint=`grep "#define OCC_VERSION_MAINTENANCE" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
+ver="$ver_major.$ver_minor.$ver_maint"
+if [ "$ver" == "5.2.4" ] ; then
     return 0
 fi
 return 1
@@ -89,6 +82,16 @@ make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
 source ${INSTALL_WORK}/$SHRC
 
 check_jb tar xfz ${SOURCE_DIR}/CAS-5.2.4a.tar.gz -C ${INSTALL_ROOT}
+ldir=${PRODUCT_DIR}/lib
+if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/Linux/lib; fi
+if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/lin/lib; fi
+cd $ldir
+for l in `ls *.la`; do
+    libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"`
+    sed -e "s%${libdir}%${ldir}%g" $l > _$l
+    mv -f _$l $l
+    chmod a+x $l
+done
 
 print_env
 }