3 ####################################################################################
5 # Created : Thu Dec 18 12:01:00 2002
6 # Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
8 # Module : Installation Wizard
9 # Copyright : 2002-2007 CEA
11 # This script is the part of the SALOME installation procedure.
13 ####################################################################################
17 if [ -z "$HDF5HOME" ]; then
20 check_lib_version libhdf5.so.0.0.0 ${HDF5HOME}/lib
21 if [ "$?" -ne "0" ]; then
24 check_lib_version libhdf5.settings ${HDF5HOME}/lib
25 if [ "$?" -eq "0" ]; then
26 ver=`grep "HDF5 Version:" ${HDF5HOME}/lib/libhdf5.settings | awk '{print $3}'`
27 if [ "$ver" == "1.6.3" ]; then
36 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
37 #$DELIM ${PRODUCT_TYPE} $DELIM
38 export HDF5HOME=\${INSTALL_ROOT}/${PRODUCT}
39 export PATH=\${HDF5HOME}/bin:\$PATH
40 export LD_LIBRARY_PATH=\${HDF5HOME}/lib:\${LD_LIBRARY_PATH}
43 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
44 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
49 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
50 #$DELIM ${PRODUCT_TYPE}_src $DELIM
54 (test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
55 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
59 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
60 try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
66 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
67 source ${INSTALL_WORK}/$SHRC
69 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
71 # to generate environment scripts
75 install_source_and_build()
82 makedir ${PRODUCT_DIR}
83 check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
84 ./configure --prefix=${PRODUCT_DIR} -disable-debug --enable-production --enable-threadsafe --enable-hdf5v1_2 \
85 --enable-stream-vfd --disable-hsizet --with-pthread=/usr/include,/usr/lib
87 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
90 check_job ${PRODUCT_DIR}/MAKE.LOG make
91 check_job ${PRODUCT_DIR}/INSTALL.LOG make install
93 #du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
96 # remove sources and temporary files after building
97 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
98 test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
101 # to generate environment scripts
107 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
108 source ${INSTALL_WORK}/$SHRC
110 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
112 ### modify libhdf5.la file to correct direct path to hdf5 library
113 ### no need to do this for sources installation because 'make install' does it!
114 cd ${PRODUCT_DIR}/lib
115 sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5.la > libhdf5.la.new
116 mv -f libhdf5.la.new libhdf5.la
118 # to generate environment script for sources
123 export INSTALL_WORK=$2;
124 export SOURCE_DIR=$3;
125 export INSTALL_ROOT=$4;
126 export PRODUCT_SEQUENCE=$5;
127 export PRODUCT_TYPE=$6;
128 export INSTALL_PRODUCTS=$7;
131 export PRODUCT="hdf5-1.6.3"
132 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
133 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}