]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Improvement for SWIG: possibility to install binaries
authorvsr <vsr@opencascade.com>
Mon, 19 Oct 2009 19:13:03 +0000 (19:13 +0000)
committervsr <vsr@opencascade.com>
Mon, 19 Oct 2009 19:13:03 +0000 (19:13 +0000)
config_files/SWIG-1.3.40.sh

index 190d2751843bd17d4f70412f5127aa3d642b41ae..3b3f8085dc7e4152441e939ceb01696883369610 100755 (executable)
 #
 ####################################################################################
 
+SWIG_VERSION=1.3.40
+
 check_version(){
 if [ -n "`which swig 2>/dev/null`" ]; then
     ver=`swig -version 2>&1 | grep -i version | awk '{ print $3 }' | sed -e 's/^\([0-9.]*\)\(.*\)/\1/'`
-    if [ "$ver" == "1.3.40" ] ;  then 
+    if [ "$ver" == "${SWIG_VERSION}" ] ;  then 
        return 0;
     fi
 fi
@@ -28,6 +30,7 @@ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
 #$DELIM ${PRODUCT_TYPE} $DELIM 
 export SWIG_ROOT=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
 export PATH=\${SWIG_ROOT}/bin:\${PATH}
+export SWIG_LIB=\${SWIG_ROOT}/share/swig/${SWIG_VERSION}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -98,8 +101,16 @@ try_preinstalled
 
 install_binary()
 {
-echo "It impossible to install ${PRODUCT} from binaries! So this one will be build from sources."
-install_source_and_build
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+# create a product directory
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+
+# to generate environment script for sources
+try_preinstalled
 }
 
 export PROCEDURE=$1;
@@ -113,7 +124,7 @@ SRC_DIR=$8;
 shift
 REMOVE_SRC_TMP=$8;
 test $# == 10 && shift && SINGLE_DIR=$9
-export PRODUCT="SWIG-1.3.40"
+export PRODUCT="SWIG-${SWIG_VERSION}"
 export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
 export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC