]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Adding sh file for CAS-6.3 patch
authormaintenance team <salome-mnt@opencascade.com>
Thu, 27 Nov 2008 10:11:50 +0000 (10:11 +0000)
committermaintenance team <salome-mnt@opencascade.com>
Thu, 27 Nov 2008 10:11:50 +0000 (10:11 +0000)
config_files/CAS-6.3-patch.sh [new file with mode: 0755]

diff --git a/config_files/CAS-6.3-patch.sh b/config_files/CAS-6.3-patch.sh
new file mode 100755 (executable)
index 0000000..41b4004
--- /dev/null
@@ -0,0 +1,133 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : CAS-6.3.sh
+#  Created   : Thu Dec 18 12:01:00 2002
+#  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+#  Project   : SALOME
+#  Module    : Installation Wizard
+#  Copyright : 2002-2008 CEA
+#
+#  This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+check_version()
+{
+if [ -z "$CASROOT" ]; then
+    return 1
+fi
+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_maint=`grep "#define OCC_VERSION_MAINTENANCE" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
+ver="$ver_major.$ver_minor.$ver_maint"
+if [ "$ver" == "6.3" ] ; then
+    return 0
+fi
+return 1
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+##
+# Patch for Open CASCADE 6.3 has been installed
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+print_env_src()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
+#$DELIM ${PRODUCT_TYPE}_src $DELIM
+##
+# Patch for Open CASCADE 6.3 has been installed
+##
+EOF
+(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled()
+{
+try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+# unpack
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}-patch.tar.gz -C ${INST_ROOT}
+cp -rf ${INST_ROOT}/${PRODUCT}-patch_SRC/* ${PRODUCT_SRC_DIR}
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+#test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+cd ${PRODUCT_SRC_DIR}
+
+# make
+echo " +++++++++++ make"
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE-PATH.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE-PATH.LOG make -j4 install-strip
+
+#du -sk ${PRODUCT_SRC_DIR} > ${PRODUCT_DIR}/size.log
+cd ${PRODUCT_DIR};
+
+# remove sources and temporary files after building
+if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+    test -d ${INST_ROOT}/${PRODUCT}-patch_SRC && rm -fr ${INST_ROOT}/${PRODUCT}-patch_SRC
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+# create a product directory
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}-patch.tar.gz -C ${PRODUCT_DIR}
+
+try_preinstalled
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INST_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+shift
+REMOVE_SRC_TMP=$8;
+test $# == 10 && shift && SINGLE_DIR=$9
+export PRODUCT="CAS-6.3"
+export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
+source ./common.sh
+$PROCEDURE