3 ####################################################################################
4 # File : SWIG-1.3.31.sh
5 # Created : Thu Dec 18 12:01:00 2002
6 # Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
8 # Module : Installation Wizard
9 # Copyright : 2002-2007 CEA
11 # This script is the part of the SALOME installation procedure.
13 ####################################################################################
16 if [ -n "`which swig 2>/dev/null`" ]; then
17 ver=`swig -version 2>&1 | grep -i version | awk '{ print $3 }' | sed -e 's/^\([0-9.]*\)\(.*\)/\1/'`
18 if [ "$ver" == "1.3.31" ] ; then
27 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
28 #$DELIM ${PRODUCT_TYPE} $DELIM
29 export SWIG_ROOT=\${INSTALL_ROOT}/${PRODUCT}
30 export PATH=\${SWIG_ROOT}/bin:\${PATH}
33 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
34 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
39 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
40 #$DELIM ${PRODUCT_TYPE}_src $DELIM
44 (test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
45 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
49 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
50 try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
56 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
57 source ${INSTALL_WORK}/$SHRC
59 check_jb tar xfz ${SRC_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
61 # to generate environment scripts
65 install_source_and_build()
71 if test `uname -m` = "x86_64" ; then
77 makedir ${PRODUCT_DIR}
79 check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
80 ./configure --prefix=${PRODUCT_DIR}
82 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
85 check_job ${PRODUCT_DIR}/MAKE.LOG make
86 check_job ${PRODUCT_DIR}/INSTALL.LOG make install
88 #du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
91 # remove sources and temporary files after building
92 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
93 test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
96 # to generate environment scripts
102 echo "It impossible to install ${PRODUCT} from binaries! So this one will be build from sources."
103 install_source_and_build
107 export INSTALL_WORK=$2;
108 export SOURCE_DIR=$3;
109 export INSTALL_ROOT=$4;
110 export PRODUCT_SEQUENCE=$5;
111 export PRODUCT_TYPE=$6;
112 export INSTALL_PRODUCTS=$7;
116 export PRODUCT="SWIG-1.3.31"
117 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
118 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}