From 7f47d176f8dac540b183e94a08142b9446705c91 Mon Sep 17 00:00:00 2001 From: maintenance team Date: Mon, 29 Oct 2007 15:26:58 +0000 Subject: [PATCH] Update for Salome 4X --- config_files/Python-2.3.4.sh | 156 ------------------ config_files/Python-2.3.5.sh | 156 ------------------ .../{Python-2.4.1.sh => Python-2.4.4.sh} | 14 +- 3 files changed, 7 insertions(+), 319 deletions(-) delete mode 100755 config_files/Python-2.3.4.sh delete mode 100755 config_files/Python-2.3.5.sh rename config_files/{Python-2.4.1.sh => Python-2.4.4.sh} (94%) diff --git a/config_files/Python-2.3.4.sh b/config_files/Python-2.3.4.sh deleted file mode 100755 index 0b31afb..0000000 --- a/config_files/Python-2.3.4.sh +++ /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: *10000+*100+ - # 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 < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < _Makefile -mv -f _Makefile Makefile -GCC=`which gcc` -cat >> ${PRODUCT_DIR}/MAKE.LOG < _"$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 index 50497ba..0000000 --- a/config_files/Python-2.3.5.sh +++ /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: *10000+*100+ - # 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 < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < _Makefile -mv -f _Makefile Makefile -GCC=`which gcc` -cat >> ${PRODUCT_DIR}/MAKE.LOG < _"$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.4.sh similarity index 94% rename from config_files/Python-2.4.1.sh rename to config_files/Python-2.4.4.sh index 23a8d0e..6423414 100755 --- a/config_files/Python-2.4.1.sh +++ b/config_files/Python-2.4.4.sh @@ -1,7 +1,7 @@ #!/bin/bash -noprofile #################################################################################### -# File : Python-2.4.1.sh +# 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 @@ -20,10 +20,10 @@ fi isPython=`which python 2>/dev/null` if [ -n "$isPython" ]; then # version number is calculated as: *10000+*100+ - # for Python 2.4.1 it is equal to 20401 + # 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 20401 ] ; then + if [ $ver -eq 20404 ] ; then return 0 fi fi @@ -83,10 +83,10 @@ check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}${PYTHON_ARCHIVE_PREFIX}.tar.gz -C ${IN # 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 + if [ -f patches/python_patch_lib64.patch ] ; then + cp patches/python_patch_lib64.patch ${PRODUCT_DIR}_SRC ( cd ${PRODUCT_DIR}_SRC ; \ - patch -p1 < Python-2.4.1-lib64.patch ; \ + patch -p1 < python_patch_lib64.patch ; \ rm -rf aclocal.m4 ; \ aclocal >& /dev/null ; \ autoconf >& /dev/null ; \ @@ -178,7 +178,7 @@ export PRODUCT_TYPE=$6; export INSTALL_PRODUCTS=$7; shift REMOVE_SRC_TMP=$8; -export PRODUCT="Python-2.4.1" +export PRODUCT="Python-2.4.4" export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} source ./common.sh -- 2.39.2