From 9314023de30d7ef86c606ef1c83af185a008db8f Mon Sep 17 00:00:00 2001 From: maintenance team Date: Tue, 3 Jun 2008 07:27:24 +0000 Subject: [PATCH] Update for Salome 4.1.3 --- config_Debian_3.1.xml | 8 +- config_Debian_4.0.xml | 8 +- config_Mandrake_10.1.xml | 8 +- config_Mandriva_2006.0.xml | 8 +- config_Mandriva_2006.0_64.xml | 8 +- config_Mandriva_2007.0.xml | 8 +- config_Mandriva_2008.0.xml | 8 +- config_Mandriva_2008.0_64.xml | 8 +- config_RedHatEnterprise_4.xml | 8 +- config_RedHat_8.0.xml | 8 +- config_RedHat_9.xml | 8 +- config_Scientific_4.2.xml | 8 +- config_Scientific_4.3.xml | 8 +- config_files/BLSURFPLUGIN.sh | 2 +- config_files/CALCULATOR.sh | 2 +- config_files/CAS-6.2.1sp3.sh | 291 +++++++++++++++++++++++++++++++++ config_files/COMPONENT.sh | 2 +- config_files/DOCUMENTATION.sh | 2 +- config_files/FILTER.sh | 2 +- config_files/GEOM.sh | 2 +- config_files/GHS3DPLUGIN.sh | 2 +- config_files/GHS3DPRLPLUGIN.sh | 2 +- config_files/GUI.sh | 2 +- config_files/HELLO.sh | 2 +- config_files/HXX2SALOME.sh | 2 +- config_files/HXX2SALOMEDOC.sh | 2 +- config_files/HexoticPLUGIN.sh | 2 +- config_files/KERNEL.sh | 2 +- config_files/LIGHT.sh | 2 +- config_files/MED.sh | 2 +- config_files/MULTIPR.sh | 2 +- config_files/NETGENPLUGIN.sh | 2 +- config_files/PYCALCULATOR.sh | 2 +- config_files/PYHELLO.sh | 2 +- config_files/RANDOMIZER.sh | 2 +- config_files/SAMPLES.sh | 2 +- config_files/SIERPINSKY.sh | 2 +- config_files/SMESH.sh | 2 +- config_files/SUPERV.sh | 2 +- config_files/VISU.sh | 2 +- config_files/YACS.sh | 2 +- config_files/med-2.3.4.sh | 212 ++++++++++++++++++++++++ 42 files changed, 582 insertions(+), 79 deletions(-) create mode 100755 config_files/CAS-6.2.1sp3.sh create mode 100755 config_files/med-2.3.4.sh diff --git a/config_Debian_3.1.xml b/config_Debian_3.1.xml index d2c4715..d0d4be7 100755 --- a/config_Debian_3.1.xml +++ b/config_Debian_3.1.xml @@ -364,10 +364,10 @@ type="prerequisite" description="Open CASCADE version 6.2sp3"> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> + script="CAS-6.2.1sp3.sh"/> + script="med-2.3.4.sh"/> ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < /dev/null + if [ $? == 0 ] ; then is_mandriva2007=1 ; fi +fi + +if [ -e /etc/issue ] ; then + grep -e "Mandriva Linux release 2008.0" /etc/issue > /dev/null + if [ $? == 0 ] ; then is_mandriva2008=1 ; fi +fi + +if [ -e /etc/issue ] ; then + grep -e "Debian GNU/Linux 4.0" /etc/issue > /dev/null + if [ $? == 0 ] ; then is_debian40=1 ; fi +fi + +if [ $is_mandriva2007 == 1 ] || [ $is_mandriva2008 == 1 ] || [ $is_debian40 == 1 ] ; then +where_xmu_include=/usr/include/X11 +else +where_xmu_include=/usr/X11R6/include/X11 +fi + +flags="$flags --with-xmu-include=$where_xmu_include" + +if test `uname -m` = "x86_64" ; then + flags="$flags --with-xmu-library=/usr/lib64" +else + flags="$flags --with-xmu-library=/usr/X11R6/lib" +fi + + flags="$flags LDFLAGS=-lpthread" +glincdir="`where_gl_includes`" +if [ $? -eq 0 ] ; then flags="$flags --with-gl-include=$glincdir"; fi +gllibdir="`where_gl_libs`" +if [ $? -eq 0 ] ; then flags="$flags --with-gl-library=$gllibdir"; fi +tcldir="`where_tcl`" +if [ $? -eq 0 ] ; then flags="$flags --with-tcl=$tcldir"; fi +tkdir="`where_tk`" +if [ $? -eq 0 ] ; then flags="$flags --with-tk=$tkdir"; fi +dpsdir="`where_dps`" +if [ $? -eq 0 ] ; then flags="$flags --with-dps-include=$dpsdir/include --with-dps-library=$dpsdir/lib"; fi +flags="$flags --disable-wrappers --disable-wok --disable-debug --enable-production" + +export CASROOT=${PRODUCT_SRC_DIR} + +echo "`pwd` -> ./configure --prefix=${PRODUCT_DIR} $flags >> ${PRODUCT_DIR}/CONFIGURE.LOG" +./configure --prefix=${PRODUCT_DIR} $flags >> ${PRODUCT_DIR}/CONFIGURE.LOG 2> ${INSTALL_WORK}/errlog + +# make +echo " +++++++++++ make" +GCC=`which gcc` +cat >> ${PRODUCT_DIR}/MAKE.LOG </dev/null`" ] ; then + str_to_replace="${gllibdir}/libGL.la" + fi + fi + if [ "$str_to_replace" == "" ] ; then + str_to_replace="-L${gllibdir} -lGL" + fi + + sed -e "s%-lGL%%g" \ + -e "s%[^[:space:]]*libGL.la[[:space:]]%%g" \ + -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \ + libTKOpenGl.la > libTKOpenGl.la.new + mv -f libTKOpenGl.la.new libTKOpenGl.la +fi + +#du -sk ${PRODUCT_SRC_DIR} > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR} +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 + +# 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} + +is_mandriva2008=0 + +if [ -e /etc/issue ] ; then + grep -e "Mandriva Linux release 2008.0" /etc/issue > /dev/null + if [ $? == 0 ] ; then is_mandriva2008=1 ; fi +fi + +# modify *.la files +ldir=${PRODUCT_DIR}/lib +if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/Linux/lib; fi +if [ ! -d $ldir ]; then ldir=${PRODUCT_DIR}/lin/lib; fi +cd $ldir +# 1. set libdir correctly, correct dependencies, set tcldir correctly +tcldir=`printenv TCLHOME` +for l in X `find . -name "*.la"`; do + if [ "$l" != "X" ] ; then + l=`basename $l` + libdir=`grep -e "libdir=.*" $l | sed -e "s/libdir=[\'|\"]\(.*\)[\'|\"]/\1/g"` + sed -e "s%${libdir}%${ldir}%g" $l > _$l + mv -f _$l $l + if [ -n "${tcldir}" ] && [ -d "${tcldir}" ] ; then + sed -e "s%-L[^[:space:]]*tcltk[^[:space:]]*/lib%-L${tcldir}/lib%g" $l > _$l + mv -f _$l $l + fi + chmod a+x $l + fi +done + +# 2. fix libGL dependencies + +#if test "$is_mandriva2008" = "1" && test `uname -m` = "x86_64" ; then + +#echo " +++++++++++ libGL dependencies are not updated" + +#else + +#cd $ldir +#gllibdir="`where_gl_libs`" +#if [ "$gllibdir" != "" ] ; then +# if [ -f ${gllibdir}/libGL.la ] ; then +# libdir=`grep "libdir=" ${gllibdir}/libGL.la | sed -e "s%libdir='\(.*\)'%\1%"` +# if [ "`ls $libdir/libGL.so* 2>/dev/null`" ] ; then +# str_to_replace="${gllibdir}/libGL.la" +# fi +# fi +# if [ "$str_to_replace" == "" ] ; then +# str_to_replace="-L${gllibdir} -lGL" +# fi + + if test `uname -m` = "x86_64" ; then + libGLpath=/usr/lib64/libGL.la + else + libGLpath=/usr/lib/libGL.la + fi + sed -e "s%$libGLpath%""%g" \ + libTKOpenGl.la > libTKOpenGl.la.new + mv -f libTKOpenGl.la.new libTKOpenGl.la + +# sed -e "s%-lGL%%g" \ +# -e "s%[^[:space:]]*libGL.la[[:space:]]%%g" \ +# -e "s%^dependency_libs='\(.*\)%dependency_libs='${str_to_replace} \1%" \ +# libTKOpenGl.la > libTKOpenGl.la.new +# mv -f libTKOpenGl.la.new libTKOpenGl.la +#fi +#fi + +# 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; +test $# == 10 && shift && SINGLE_DIR=$9 +export PRODUCT="CAS-6.2.1sp3" +export PRODUCT_DIR=${INSTALL_ROOT}/${SINGLE_DIR:-${PRODUCT}} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT}_SRC +source ./common.sh +$PROCEDURE diff --git a/config_files/COMPONENT.sh b/config_files/COMPONENT.sh index 638b5f7..e0a0569 100755 --- a/config_files/COMPONENT.sh +++ b/config_files/COMPONENT.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${COMPONENT_ROOT_DIR}" ]; then diff --git a/config_files/DOCUMENTATION.sh b/config_files/DOCUMENTATION.sh index fcdbf64..aa1bb91 100755 --- a/config_files/DOCUMENTATION.sh +++ b/config_files/DOCUMENTATION.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ # There is no possibility to check version number diff --git a/config_files/FILTER.sh b/config_files/FILTER.sh index bccd356..3878f44 100755 --- a/config_files/FILTER.sh +++ b/config_files/FILTER.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${FILTER_ROOT_DIR}" ]; then diff --git a/config_files/GEOM.sh b/config_files/GEOM.sh index c0c291c..5fc11b5 100755 --- a/config_files/GEOM.sh +++ b/config_files/GEOM.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${GEOM_ROOT_DIR}" ]; then diff --git a/config_files/GHS3DPLUGIN.sh b/config_files/GHS3DPLUGIN.sh index 65be4be..3645951 100755 --- a/config_files/GHS3DPLUGIN.sh +++ b/config_files/GHS3DPLUGIN.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${GHS3DPLUGIN_ROOT_DIR}" ]; then diff --git a/config_files/GHS3DPRLPLUGIN.sh b/config_files/GHS3DPRLPLUGIN.sh index 626aaf5..f735a63 100755 --- a/config_files/GHS3DPRLPLUGIN.sh +++ b/config_files/GHS3DPRLPLUGIN.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${GHS3DPRLPLUGIN_ROOT_DIR}" ]; then diff --git a/config_files/GUI.sh b/config_files/GUI.sh index 772e747..419a7b5 100755 --- a/config_files/GUI.sh +++ b/config_files/GUI.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${GUI_ROOT_DIR}" ]; then diff --git a/config_files/HELLO.sh b/config_files/HELLO.sh index e91dab1..dd283fa 100755 --- a/config_files/HELLO.sh +++ b/config_files/HELLO.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${HELLO_ROOT_DIR}" ]; then diff --git a/config_files/HXX2SALOME.sh b/config_files/HXX2SALOME.sh index c476574..a6fa3de 100755 --- a/config_files/HXX2SALOME.sh +++ b/config_files/HXX2SALOME.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ # No way to check version! diff --git a/config_files/HXX2SALOMEDOC.sh b/config_files/HXX2SALOMEDOC.sh index 0136316..bff2329 100755 --- a/config_files/HXX2SALOMEDOC.sh +++ b/config_files/HXX2SALOMEDOC.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ # No way to check version! diff --git a/config_files/HexoticPLUGIN.sh b/config_files/HexoticPLUGIN.sh index de76911..fad8937 100755 --- a/config_files/HexoticPLUGIN.sh +++ b/config_files/HexoticPLUGIN.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${HexoticPLUGIN_ROOT_DIR}" ]; then diff --git a/config_files/KERNEL.sh b/config_files/KERNEL.sh index 86b554f..e79099a 100755 --- a/config_files/KERNEL.sh +++ b/config_files/KERNEL.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${KERNEL_ROOT_DIR}" ]; then diff --git a/config_files/LIGHT.sh b/config_files/LIGHT.sh index ec9bbdf..50ef571 100755 --- a/config_files/LIGHT.sh +++ b/config_files/LIGHT.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${LIGHT_ROOT_DIR}" ]; then diff --git a/config_files/MED.sh b/config_files/MED.sh index 2ecb361..9258f4c 100755 --- a/config_files/MED.sh +++ b/config_files/MED.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${MED_ROOT_DIR}" ]; then diff --git a/config_files/MULTIPR.sh b/config_files/MULTIPR.sh index 7d6a3ff..7ca3945 100755 --- a/config_files/MULTIPR.sh +++ b/config_files/MULTIPR.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${MULTIPR_ROOT_DIR}" ]; then diff --git a/config_files/NETGENPLUGIN.sh b/config_files/NETGENPLUGIN.sh index 3356584..dd40ffd 100755 --- a/config_files/NETGENPLUGIN.sh +++ b/config_files/NETGENPLUGIN.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${NETGENPLUGIN_ROOT_DIR}" ]; then diff --git a/config_files/PYCALCULATOR.sh b/config_files/PYCALCULATOR.sh index 8fbca87..cc17d2f 100755 --- a/config_files/PYCALCULATOR.sh +++ b/config_files/PYCALCULATOR.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${PYCALCULATOR_ROOT_DIR}" ]; then diff --git a/config_files/PYHELLO.sh b/config_files/PYHELLO.sh index dc9e2b0..5c8dd08 100755 --- a/config_files/PYHELLO.sh +++ b/config_files/PYHELLO.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${PYHELLO_ROOT_DIR}" ]; then diff --git a/config_files/RANDOMIZER.sh b/config_files/RANDOMIZER.sh index 9a899bb..50d0e86 100755 --- a/config_files/RANDOMIZER.sh +++ b/config_files/RANDOMIZER.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${RANDOMIZER_ROOT_DIR}" ]; then diff --git a/config_files/SAMPLES.sh b/config_files/SAMPLES.sh index 4cba131..2f7169c 100755 --- a/config_files/SAMPLES.sh +++ b/config_files/SAMPLES.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ # There is no possibility to check version number diff --git a/config_files/SIERPINSKY.sh b/config_files/SIERPINSKY.sh index 4768c74..1d12efe 100755 --- a/config_files/SIERPINSKY.sh +++ b/config_files/SIERPINSKY.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${SIERPINSKY_ROOT_DIR}" ]; then diff --git a/config_files/SMESH.sh b/config_files/SMESH.sh index 670b137..7f8ec49 100755 --- a/config_files/SMESH.sh +++ b/config_files/SMESH.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${SMESH_ROOT_DIR}" ]; then diff --git a/config_files/SUPERV.sh b/config_files/SUPERV.sh index daf3a65..1e431b7 100755 --- a/config_files/SUPERV.sh +++ b/config_files/SUPERV.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${SUPERV_ROOT_DIR=}" ]; then diff --git a/config_files/VISU.sh b/config_files/VISU.sh index 248fdc1..6e35235 100755 --- a/config_files/VISU.sh +++ b/config_files/VISU.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${VISU_ROOT_DIR}" ]; then diff --git a/config_files/YACS.sh b/config_files/YACS.sh index 8276e91..f1fbcda 100755 --- a/config_files/YACS.sh +++ b/config_files/YACS.sh @@ -12,7 +12,7 @@ # #################################################################################### -VERSION="4.1.2" +VERSION="4.1.3" check_version(){ if [ -n "${YACS_ROOT_DIR}" ]; then diff --git a/config_files/med-2.3.4.sh b/config_files/med-2.3.4.sh new file mode 100755 index 0000000..87570e4 --- /dev/null +++ b/config_files/med-2.3.4.sh @@ -0,0 +1,212 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : med-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 "$MED2HOME" ]; then + #echo "MED2HOME doesn't set" + return 1 +fi +check_lib_version libmed.so.1.1.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_bin() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < /dev/null + if [ $? == 0 ] ; then is_mandriva2006=1 ; fi + grep -e "Mandriva Linux release 2007.0" /etc/issue > /dev/null + if [ $? == 0 ] ; then is_mandriva2007=1 ; fi + grep -e "Mandriva Linux release 2008.0" /etc/issue > /dev/null + if [ $? == 0 ] ; then is_mandriva2008=1 ; fi + grep -e "Debian GNU/Linux 4.0" /etc/issue > /dev/null + if [ $? == 0 ] ; then is_debian40=1 ; fi + grep -e "Fedora Core release 4" /etc/issue > /dev/null + if [ $? == 0 ] ; then is_fedora4=1 ; fi + grep -e "Fedora Core release 6" /etc/issue > /dev/null + if [ $? == 0 ] ; then is_fedora6=1 ; fi +fi +if [ $is_mandriva2007 == 1 ] || [ $is_mandriva2008 == 1 ] || [ $is_fedora6 == 1 ] ; then +chmod +w ./Makefile.am +mv Makefile.am Makefile.am.orig +sed -e 's/ include src tests tools doc / include src tools doc /g' Makefile.am.orig > Makefile.am +fi +if [ $is_mandriva2006 == 1 ] || [ $is_mandriva2007 == 1 ] || [ $is_mandriva2008 == 1 ] || [ $is_fedora4 == 1 ] || [ $is_fedora6 == 1 ] || [ $is_debian40 == 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> ${PRODUCT_SRC_DIR}/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> ${PRODUCT_SRC_DIR}/errlog + fi + if [ "$?" -ne "0" ] ; then + cat ${PRODUCT_DIR}/CONFIGURE.LOG + cat ${PRODUCT_SRC_DIR}/errlog >&2 + cat ${PRODUCT_SRC_DIR}/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 < 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 +sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmedimport.la > libmedimport.la.new +mv -f libmedimport.la.new libmedimport.la +sed -e 's%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 -lhdf5\3%g' -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmedimportcxx.la > libmedimportcxx.la.new +mv -f libmedimportcxx.la.new libmedimportcxx.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 + +sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedimport.la > libmedimport.la.new +mv -f libmedimport.la.new libmedimport.la +sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedimportcxx.la > libmedimportcxx.la.new +mv -f libmedimportcxx.la.new libmedimportcxx.la + +chmod 755 libmed.la +chmod 755 libmedC.la +chmod 755 libmedimport.la +chmod 755 libmedimportcxx.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 + +# 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; +shift +SINGLE_DIR=$9 +export PRODUCT="med-2.3.4" +export PRODUCT_DIR=${INSTALL_ROOT}/${SINGLE_DIR:-${PRODUCT}} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +export PRODUCT_SRC_DIR=${INSTALL_ROOT}/${PRODUCT}_SRC +source ./common.sh +$PROCEDURE -- 2.39.2