From: maintenance team Date: Thu, 14 Jun 2007 10:52:46 +0000 (+0000) Subject: Update med products up to 3.2.1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9b64321bc12f3dc13d819b315f87476e5a9a57e4;p=tools%2Finstall.git Update med products up to 3.2.1 --- diff --git a/config_files/med-2.3.0.sh b/config_files/med-2.3.0.sh deleted file mode 100755 index 54096ac..0000000 --- a/config_files/med-2.3.0.sh +++ /dev/null @@ -1,184 +0,0 @@ -#!/bin/bash -noprofile - -#################################################################################### -# File : med-2.3.0.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 "$MED2HOME" ]; then - #echo "MED2HOME doesn't set" - return 1 -fi -check_lib_version libmed.so.1.0.2 ${MED2HOME}/lib -if [ "$?" -eq "0" ]; then - #echo "The product ${PRODUCT} has been already installed on yours system" - return 0 -fi -return 1 -} - -print_env() -{ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < /dev/null - if [ $? == 0 ] ; then is_mandriva=1 ; fi - grep -e "Fedora Core release 4" /etc/redhat-release > /dev/null - if [ $? == 0 ] ; then is_fedora=1 ; fi -fi - -if [ $is_mandriva == 1 ] || [ $is_fedora == 1 ] ; then - if test `uname -m` = "x86_64" ; then - echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} FFLAGS='-g -O2 -ffixed-line-length-none' CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG" - ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog - else - echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} FFLAGS='-g -O2 -ffixed-line-length-none' >> ${PRODUCT_DIR}/CONFIGURE.LOG" - ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog - fi - if [ "$?" -ne "0" ] ; then - cat ${PRODUCT_DIR}/CONFIGURE.LOG - cat ${INSTALL_WORK}/errlog >&2 - cat ${INSTALL_WORK}/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG - exit 1 - fi -else - check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} -fi - -GCC=`which gcc` -cat >> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log -cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} - -### modify libmed.la libmedC.la files to correct direct path to hdf5 library -cd ${PRODUCT_DIR}/lib -sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' libmed.la > libmed.la.new -mv -f libmed.la.new libmed.la -sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' libmedC.la > libmedC.la.new -mv -f libmedC.la.new libmedC.la -tmp="" -if [ -n "${HDF5HOME}" ]; then - tmp="-L${HDF5HOME}/lib" -fi -sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new -mv -f libmed.la.new libmed.la -sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedC.la > libmedC.la.new -mv -f libmedC.la.new libmedC.la - -chmod 755 libmed.la -chmod 755 libmedC.la - -print_env -} - -install_binary() -{ -make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC - -check_jb tar xfz ${SOURCE_DIR}/med-2.3.0.tar.gz -C ${INSTALL_ROOT} - -### modify libmed.la libmedC.la files to correct direct path to hdf5 library -### also modify libmed.la and libmedC.la files to correct direct path to med libraries -### no need to do this for sources installation because 'make install' does it! -cd ${PRODUCT_DIR}/lib -sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmed.la > libmed.la.new -mv -f libmed.la.new libmed.la -sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmedC.la > libmedC.la.new -mv -f libmedC.la.new libmedC.la -tmp="" -if [ -n "${HDF5HOME}" ]; then - tmp="-L${HDF5HOME}/lib" -fi -sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new -mv -f libmed.la.new libmed.la -sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedC.la > libmedC.la.new -mv -f libmedC.la.new libmedC.la - -chmod 755 libmed.la -chmod 755 libmedC.la - -### modify scripts to correct installation path -cd ${PRODUCT_DIR}/bin -sed -e "s%set cmd \".*/bin/mdump\"%set cmd \"${PRODUCT_DIR}/bin/mdump\"%g" xmdump > _xmdump -mv _xmdump xmdump -chmod a+x xmdump - -print_env -} - -export PROCEDURE=$1; -export INSTALL_WORK=$2; -export SOURCE_DIR=$3; -export INSTALL_ROOT=$4; -export PRODUCT_SEQUENCE=$5; -if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="med" ; fi -export PRODUCT="med-2.3.0" -export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} -export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -source ./common.sh -$PROCEDURE diff --git a/config_files/med-2.3.1.sh b/config_files/med-2.3.1.sh new file mode 100755 index 0000000..781bcc0 --- /dev/null +++ b/config_files/med-2.3.1.sh @@ -0,0 +1,184 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : med-2.3.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 "$MED2HOME" ]; then + #echo "MED2HOME doesn't set" + return 1 +fi +check_lib_version libmed.so.1.0.2 ${MED2HOME}/lib +if [ "$?" -eq "0" ]; then + #echo "The product ${PRODUCT} has been already installed on yours system" + return 0 +fi +return 1 +} + +print_env() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < /dev/null + if [ $? == 0 ] ; then is_mandriva=1 ; fi + grep -e "Fedora Core release 4" /etc/redhat-release > /dev/null + if [ $? == 0 ] ; then is_fedora=1 ; fi +fi + +if [ $is_mandriva == 1 ] || [ $is_fedora == 1 ] ; then + if test `uname -m` = "x86_64" ; then + echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} FFLAGS='-g -O2 -ffixed-line-length-none' CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG" + ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" CFLAGS=-m64 CXXFLAGS=-m64 >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog + else + echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} FFLAGS='-g -O2 -ffixed-line-length-none' >> ${PRODUCT_DIR}/CONFIGURE.LOG" + ./configure --prefix=${PRODUCT_DIR} FFLAGS="-g -O2 -ffixed-line-length-none" >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog + fi + if [ "$?" -ne "0" ] ; then + cat ${PRODUCT_DIR}/CONFIGURE.LOG + cat ${INSTALL_WORK}/errlog >&2 + cat ${INSTALL_WORK}/errlog >> ${PRODUCT_DIR}/CONFIGURE.LOG + exit 1 + fi +else + check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} +fi + +GCC=`which gcc` +cat >> ${PRODUCT_DIR}/MAKE.LOG < ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} + +### modify libmed.la libmedC.la files to correct direct path to hdf5 library +cd ${PRODUCT_DIR}/lib +sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' libmed.la > libmed.la.new +mv -f libmed.la.new libmed.la +sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' libmedC.la > libmedC.la.new +mv -f libmedC.la.new libmedC.la +tmp="" +if [ -n "${HDF5HOME}" ]; then + tmp="-L${HDF5HOME}/lib" +fi +sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new +mv -f libmed.la.new libmed.la +sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedC.la > libmedC.la.new +mv -f libmedC.la.new libmedC.la + +chmod 755 libmed.la +chmod 755 libmedC.la + +print_env +} + +install_binary() +{ +make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} +source ${INSTALL_WORK}/$SHRC + +check_jb tar xfz ${SOURCE_DIR}/med-2.3.1.tar.gz -C ${INSTALL_ROOT} + +### modify libmed.la libmedC.la files to correct direct path to hdf5 library +### also modify libmed.la and libmedC.la files to correct direct path to med libraries +### no need to do this for sources installation because 'make install' does it! +cd ${PRODUCT_DIR}/lib +sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmed.la > libmed.la.new +mv -f libmed.la.new libmed.la +sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmedC.la > libmedC.la.new +mv -f libmedC.la.new libmedC.la +tmp="" +if [ -n "${HDF5HOME}" ]; then + tmp="-L${HDF5HOME}/lib" +fi +sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new +mv -f libmed.la.new libmed.la +sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedC.la > libmedC.la.new +mv -f libmedC.la.new libmedC.la + +chmod 755 libmed.la +chmod 755 libmedC.la + +### modify scripts to correct installation path +cd ${PRODUCT_DIR}/bin +sed -e "s%set cmd \".*/bin/mdump\"%set cmd \"${PRODUCT_DIR}/bin/mdump\"%g" xmdump > _xmdump +mv _xmdump xmdump +chmod a+x xmdump + +print_env +} + +export PROCEDURE=$1; +export INSTALL_WORK=$2; +export SOURCE_DIR=$3; +export INSTALL_ROOT=$4; +export PRODUCT_SEQUENCE=$5; +if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="med" ; fi +export PRODUCT="med-2.3.1" +export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +source ./common.sh +$PROCEDURE