]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Update for Salome 4X
authormaintenance team <salome-mnt@opencascade.com>
Mon, 29 Oct 2007 15:26:58 +0000 (15:26 +0000)
committermaintenance team <salome-mnt@opencascade.com>
Mon, 29 Oct 2007 15:26:58 +0000 (15:26 +0000)
config_files/Python-2.3.4.sh [deleted file]
config_files/Python-2.3.5.sh [deleted file]
config_files/Python-2.4.1.sh [deleted file]
config_files/Python-2.4.4.sh [new file with mode: 0755]

diff --git a/config_files/Python-2.3.4.sh b/config_files/Python-2.3.4.sh
deleted file mode 100755 (executable)
index 0b31afb..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-#!/bin/bash -noprofile
-
-####################################################################################
-#  File      : Python-2.3.4.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-2007 CEA
-#
-#  This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-check_version()
-{
-if [ -z "$PYTHONHOME"  ]; then
-   return 1
-fi
-isPython=`which python 2>/dev/null`
-if [ -n "$isPython" ]; then
-  # version number is calculated as: <major>*10000+<minor>*100+<release>
-  # e.g. for Python 2.3.4 it is equal to 20304
-  ver=`python -V 2>&1`
-  ver=`echo $ver | awk '{print $2}' | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'`
-  if [ $ver -eq 20304 ] ;  then 
-    return 0
-  fi
-fi
-return 1 
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export PYTHONHOME=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${PYTHONHOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${PYTHONHOME}/lib:\${LD_LIBRARY_PATH}
-export PYTHON_VERSION=\`python -c "import sys; print sys.version[:3]"\`
-export PYTHON_INCLUDE=\${PYTHONHOME}/include/python\${PYTHON_VERSION}
-export PYTHONPATH=\${PYTHONHOME}/lib/python\${PYTHON_VERSION}:\${PYTHONPATH}
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-print_env_src()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-# unpack
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-cd ${PRODUCT_DIR}_SRC
-makedir ${PRODUCT_DIR}
-
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
-    ./configure --prefix=${PRODUCT_DIR} --with-threads --with-cxx=`which g++` --enable-shared
-# vsr: force linking to libstdc++.so
-sed -e 's%\(^LIBS=.*\)%\1 -lstdc++%g' Makefile > _Makefile
-mv -f _Makefile Makefile
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
-EOF
-
-check_job ${PRODUCT_DIR}/MAKE.LOG make 
-check_job ${PRODUCT_DIR}/MAKINSTALL.LOG make install
-(cd ${PRODUCT_DIR}/lib/python2.3/config; ln -fs ../../libpython2.3.so.1.0 libpython2.3.so)
-
-cd ${PRODUCT_DIR}/bin
-for sc in idle pydoc smtpd.py ; do
-    if [ -e $sc ] ; then
-       sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc"
-       mv -f _"$sc" "$sc"
-       chmod a+x "$sc"
-    fi
-done
-#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
-cd ${PRODUCT_DIR};
-
-# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
-    test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
-fi
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_binary()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-
-(cd ${PRODUCT_DIR}/lib/python2.3/config; ln -fs ../../libpython2.3.so.1.0 libpython2.3.so)
-
-cd ${PRODUCT_DIR}/bin
-for sc in idle pydoc smtpd.py ; do
-    if [ -e $sc ] ; then
-       sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc"
-       mv -f _"$sc" "$sc"
-       chmod a+x "$sc"
-    fi
-done
-
-# to generate environment scripts
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INSTALL_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-export PRODUCT_TYPE=$6;
-export INSTALL_PRODUCTS=$7;
-shift
-REMOVE_SRC_TMP=$8;
-export PRODUCT="Python-2.3.4"
-export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
-export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
-source ./common.sh
-${PROCEDURE}
diff --git a/config_files/Python-2.3.5.sh b/config_files/Python-2.3.5.sh
deleted file mode 100755 (executable)
index 50497ba..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-#!/bin/bash -noprofile
-
-####################################################################################
-#  File      : Python-2.3.5.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-2007 CEA
-#
-#  This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-check_version()
-{
-if [ -z "$PYTHONHOME"  ]; then
-   return 1
-fi
-isPython=`which python 2>/dev/null`
-if [ -n "$isPython" ]; then
-  # version number is calculated as: <major>*10000+<minor>*100+<release>
-  # e.g. for Python 2.3.5 it is equal to 20305
-  ver=`python -V 2>&1`
-  ver=`echo $ver | awk '{print $2}' | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'`
-  if [ $ver -eq 20305 ] ;  then 
-    return 0
-  fi
-fi
-return 1 
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export PYTHONHOME=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${PYTHONHOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${PYTHONHOME}/lib:\${LD_LIBRARY_PATH}
-export PYTHON_VERSION=\`python -c "import sys; print sys.version[:3]"\`
-export PYTHON_INCLUDE=\${PYTHONHOME}/include/python\${PYTHON_VERSION}
-export PYTHONPATH=\${PYTHONHOME}/lib/python\${PYTHON_VERSION}:\${PYTHONPATH}
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-print_env_src()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-makedir ${PRODUCT_DIR}
-cd ${PRODUCT_DIR}_SRC
-
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
-    ./configure --prefix=${PRODUCT_DIR} --with-threads --with-cxx=`which g++` --enable-shared
-# vsr: force linking to libstdc++.so
-sed -e 's%\(^LIBS=.*\)%\1 -lstdc++%g' Makefile > _Makefile
-mv -f _Makefile Makefile
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
-EOF
-
-check_job ${PRODUCT_DIR}/MAKE.LOG make 
-check_job ${PRODUCT_DIR}/MAKINSTALL.LOG make install
-(cd ${PRODUCT_DIR}/lib/python2.3/config; ln -fs ../../libpython2.3.so.1.0 libpython2.3.so)
-
-cd ${PRODUCT_DIR}/bin
-for sc in idle pydoc smtpd.py ; do
-    if [ -e $sc ] ; then
-       sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc"
-       mv -f _"$sc" "$sc"
-       chmod a+x "$sc"
-    fi
-done
-
-#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
-cd ${PRODUCT_DIR};
-
-# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
-    test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
-fi
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_binary()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-
-(cd ${PRODUCT_DIR}/lib/python2.3/config; ln -fs ../../libpython2.3.so.1.0 libpython2.3.so)
-
-cd ${PRODUCT_DIR}/bin
-for sc in idle pydoc smtpd.py ; do
-    if [ -e $sc ] ; then
-       sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc"
-       mv -f _"$sc" "$sc"
-       chmod a+x "$sc"
-    fi
-done
-
-# to generate environment script for sources
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INSTALL_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-export PRODUCT_TYPE=$6;
-export INSTALL_PRODUCTS=$7;
-shift
-REMOVE_SRC_TMP=$8;
-export PRODUCT="Python-2.3.5"
-export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
-export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
-source ./common.sh
-${PROCEDURE}
diff --git a/config_files/Python-2.4.1.sh b/config_files/Python-2.4.1.sh
deleted file mode 100755 (executable)
index 23a8d0e..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/bin/bash -noprofile
-
-####################################################################################
-#  File      : Python-2.4.1.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-2007 CEA
-#
-#  This script is the part of the SALOME installation procedure.
-#
-####################################################################################
-
-check_version()
-{
-if [ -z "$PYTHONHOME"  ]; then
-   return 1
-fi
-isPython=`which python 2>/dev/null`
-if [ -n "$isPython" ]; then
-  # version number is calculated as: <major>*10000+<minor>*100+<release>
-  # for Python 2.4.1 it is equal to 20401
-  ver=`python -V 2>&1`
-  ver=`echo $ver | awk '{print $2}' | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'`
-  if [ $ver -eq 20401 ] ;  then 
-    return 0
-  fi
-fi
-return 1 
-}
-
-print_env_bin()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export PYTHONHOME=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${PYTHONHOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${PYTHONHOME}/lib:\${LD_LIBRARY_PATH}
-export PYTHON_VERSION=\`python -c "import sys; print sys.version[:3]"\`
-export PYTHON_INCLUDE=\${PYTHONHOME}/include/python\${PYTHON_VERSION}
-export PYTHONPATH=\${PYTHONHOME}/lib/python\${PYTHON_VERSION}:\${PYTHONPATH}
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-print_env_src()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
-#$DELIM ${PRODUCT_TYPE}_src $DELIM
-# nothing to do
-##
-EOF
-(test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-return $?
-}
-
-install_source()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
-source ${INSTALL_WORK}/$SHRC
-
-if test `uname -m` = "x86_64" ; then
-    export PYTHON_ARCHIVE_PREFIX="-lib64"
-    export PYTHON_LIB_PREFIX="64"
-    export CFLAGS=-m64
-    export CXXFLAGS=-m64
-    PYTHON_CONFIGURE_OPTIONS="--with-threads --with-cxx=`which g++` --enable-shared CFLAGS=-m64 CXXFLAGS=-m64"
-else
-    export PYTHON_ARCHIVE_PREFIX=""
-    PYTHON_CONFIGURE_OPTIONS="--with-threads --with-cxx=`which g++` --enable-shared"
-fi
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}${PYTHON_ARCHIVE_PREFIX}.tar.gz -C ${INSTALL_ROOT}
-
-# apply patch for 64-bit platforms
-if test `uname -m` = "x86_64" ; then
-    if [ -f patches/Python-2.4.1-lib64.patch ] ; then
-       cp patches/Python-2.4.1-lib64.patch ${PRODUCT_DIR}_SRC 
-       ( cd ${PRODUCT_DIR}_SRC ;                \
-         patch -p1 < Python-2.4.1-lib64.patch ; \
-         rm -rf aclocal.m4 ;                    \
-         aclocal >& /dev/null ;                 \
-         autoconf >& /dev/null ;                \
-         aclocal >& /dev/null ;                 \
-         autoconf >& /dev/null )
-    fi
-fi
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_source_and_build()
-{
-# install sources
-install_source
-
-# build sources
-makedir ${PRODUCT_DIR}
-cd ${PRODUCT_DIR}_SRC
-
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
-    ./configure --prefix=${PRODUCT_DIR} $PYTHON_CONFIGURE_OPTIONS
-
-# vsr: force linking to libstdc++.so
-sed -e 's%\(^LIBS=.*\)%\1 -lstdc++%g' Makefile > _Makefile
-mv -f _Makefile Makefile
-GCC=`which gcc`
-cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
-used gcc=$GCC
-EOF
-check_job ${PRODUCT_DIR}/MAKE.LOG make 
-check_job ${PRODUCT_DIR}/MAKINSTALL.LOG make install
-(cd ${PRODUCT_DIR}/lib${PYTHON_LIB_PREFIX}/python2.4/config; ln -fs ../../libpython2.4.so.1.0 libpython2.4.so)
-
-cd ${PRODUCT_DIR}/bin
-for sc in idle pydoc smtpd.py ; do
-    if [ -e $sc ] ; then
-       sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc"
-       mv -f _"$sc" "$sc"
-       chmod a+x "$sc"
-    fi
-done
-
-if test `uname -m` = "x86_64" ; then
-    ( cd ${PRODUCT_DIR}; ln -sf lib64 lib )
-fi
-
-#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
-cd ${PRODUCT_DIR};
-
-# remove sources and temporary files after building
-if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
-    test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
-fi
-
-# to generate environment scripts
-try_preinstalled
-}
-
-install_binary()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
-
-(cd ${PRODUCT_DIR}/lib/python2.4/config; ln -fs ../../libpython2.4.so.1.0 libpython2.4.so)
-
-cd ${PRODUCT_DIR}/bin
-for sc in idle pydoc smtpd.py ; do
-    if [ -e $sc ] ; then
-       sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc"
-       mv -f _"$sc" "$sc"
-       chmod a+x "$sc"
-    fi
-done
-
-# to generate environment scripts
-try_preinstalled
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INSTALL_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-export PRODUCT_TYPE=$6;
-export INSTALL_PRODUCTS=$7;
-shift
-REMOVE_SRC_TMP=$8;
-export PRODUCT="Python-2.4.1"
-export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
-export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
-source ./common.sh
-${PROCEDURE}
diff --git a/config_files/Python-2.4.4.sh b/config_files/Python-2.4.4.sh
new file mode 100755 (executable)
index 0000000..6423414
--- /dev/null
@@ -0,0 +1,185 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : Python-2.4.4.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-2007 CEA
+#
+#  This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+check_version()
+{
+if [ -z "$PYTHONHOME"  ]; then
+   return 1
+fi
+isPython=`which python 2>/dev/null`
+if [ -n "$isPython" ]; then
+  # version number is calculated as: <major>*10000+<minor>*100+<release>
+  # for Python 2.4.4 it is equal to 20404
+  ver=`python -V 2>&1`
+  ver=`echo $ver | awk '{print $2}' | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'`
+  if [ $ver -eq 20404 ] ;  then 
+    return 0
+  fi
+fi
+return 1 
+}
+
+print_env_bin()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export PYTHONHOME=\${INSTALL_ROOT}/${PRODUCT}
+export PATH=\${PYTHONHOME}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${PYTHONHOME}/lib:\${LD_LIBRARY_PATH}
+export PYTHON_VERSION=\`python -c "import sys; print sys.version[:3]"\`
+export PYTHON_INCLUDE=\${PYTHONHOME}/include/python\${PYTHON_VERSION}
+export PYTHONPATH=\${PYTHONHOME}/lib/python\${PYTHON_VERSION}:\${PYTHONPATH}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+print_env_src()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
+#$DELIM ${PRODUCT_TYPE}_src $DELIM
+# nothing to do
+##
+EOF
+(test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+if test `uname -m` = "x86_64" ; then
+    export PYTHON_ARCHIVE_PREFIX="-lib64"
+    export PYTHON_LIB_PREFIX="64"
+    export CFLAGS=-m64
+    export CXXFLAGS=-m64
+    PYTHON_CONFIGURE_OPTIONS="--with-threads --with-cxx=`which g++` --enable-shared CFLAGS=-m64 CXXFLAGS=-m64"
+else
+    export PYTHON_ARCHIVE_PREFIX=""
+    PYTHON_CONFIGURE_OPTIONS="--with-threads --with-cxx=`which g++` --enable-shared"
+fi
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}${PYTHON_ARCHIVE_PREFIX}.tar.gz -C ${INSTALL_ROOT}
+
+# apply patch for 64-bit platforms
+if test `uname -m` = "x86_64" ; then
+    if [ -f patches/python_patch_lib64.patch ] ; then
+       cp patches/python_patch_lib64.patch ${PRODUCT_DIR}_SRC 
+       ( cd ${PRODUCT_DIR}_SRC ;                \
+         patch -p1 < python_patch_lib64.patch ; \
+         rm -rf aclocal.m4 ;                    \
+         aclocal >& /dev/null ;                 \
+         autoconf >& /dev/null ;                \
+         aclocal >& /dev/null ;                 \
+         autoconf >& /dev/null )
+    fi
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+makedir ${PRODUCT_DIR}
+cd ${PRODUCT_DIR}_SRC
+
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
+    ./configure --prefix=${PRODUCT_DIR} $PYTHON_CONFIGURE_OPTIONS
+
+# vsr: force linking to libstdc++.so
+sed -e 's%\(^LIBS=.*\)%\1 -lstdc++%g' Makefile > _Makefile
+mv -f _Makefile Makefile
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE.LOG make 
+check_job ${PRODUCT_DIR}/MAKINSTALL.LOG make install
+(cd ${PRODUCT_DIR}/lib${PYTHON_LIB_PREFIX}/python2.4/config; ln -fs ../../libpython2.4.so.1.0 libpython2.4.so)
+
+cd ${PRODUCT_DIR}/bin
+for sc in idle pydoc smtpd.py ; do
+    if [ -e $sc ] ; then
+       sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc"
+       mv -f _"$sc" "$sc"
+       chmod a+x "$sc"
+    fi
+done
+
+if test `uname -m` = "x86_64" ; then
+    ( cd ${PRODUCT_DIR}; ln -sf lib64 lib )
+fi
+
+#du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
+cd ${PRODUCT_DIR};
+
+# remove sources and temporary files after building
+if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+    test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
+
+(cd ${PRODUCT_DIR}/lib/python2.4/config; ln -fs ../../libpython2.4.so.1.0 libpython2.4.so)
+
+cd ${PRODUCT_DIR}/bin
+for sc in idle pydoc smtpd.py ; do
+    if [ -e $sc ] ; then
+       sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc"
+       mv -f _"$sc" "$sc"
+       chmod a+x "$sc"
+    fi
+done
+
+# to generate environment scripts
+try_preinstalled
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+shift
+REMOVE_SRC_TMP=$8;
+export PRODUCT="Python-2.4.4"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+${PROCEDURE}