5 if [ -z "$HDF5HOME" ]; then
8 check_lib_version libhdf5.so.0.0.0 ${HDF5HOME}/lib
9 if [ "$?" -ne "0" ]; then
12 check_lib_version libhdf5.settings ${HDF5HOME}/lib
13 if [ "$?" -eq "0" ]; then
14 ver=`grep "HDF5 Version:" ${HDF5HOME}/lib/libhdf5.settings | awk '{print $3}'`
15 if [ "$ver" = "1.6.3" ]; then
24 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
25 #$DELIM ${PRODUCT_TYPE} $DELIM
26 export HDF5HOME=\${INSTALL_ROOT}/${PRODUCT}
27 export PATH=\${HDF5HOME}/bin:\$PATH
28 export LD_LIBRARY_PATH=\${HDF5HOME}/lib:\${LD_LIBRARY_PATH}
31 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
32 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
35 # looks for the native product and collects it's environment (used by make_env())
38 if [ $? -eq 0 ] ; then
39 tmp="\${HDF5HOME}/bin ${HDF5HOME}/bin \${PATH} ${PATH}";
40 path=`sort_path ${tmp}`
41 tmp="\${HDF5HOME}/lib ${HDF5HOME}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
42 ld_library_path=`sort_path ${tmp}`
43 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
44 #$DELIM ${PRODUCT_TYPE} $DELIM
45 export HDF5HOME=${HDF5HOME}
47 export LD_LIBRARY_PATH=${ld_library_path}
50 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
57 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
63 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
64 source ${INSTALL_WORK}/$SHRC
66 check_jb tar xfz ${SOURCE_DIR}/hdf5-1.6.3.tar.gz -C ${INSTALL_WORK}
68 makedir ${PRODUCT_DIR}
69 check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
70 ./configure --prefix=${PRODUCT_DIR} -disable-debug --enable-production --enable-threadsafe --enable-hdf5v1_2 \
71 --enable-stream-vfd --disable-hsizet --with-pthread=/usr/include,/usr/lib
73 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
76 check_job ${PRODUCT_DIR}/MAKE.LOG make
77 check_job ${PRODUCT_DIR}/INSTALL.LOG make install
79 #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
80 rm -fr ${PRODUCT_WORK}
86 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
87 source ${INSTALL_WORK}/$SHRC
89 check_jb tar xfz ${SOURCE_DIR}/hdf5-1.6.3.tar.gz -C ${INSTALL_ROOT}
91 ### modify libhdf5.la file to correct direct path to hdf5 library
92 ### no need to do this for sources installation because 'make install' does it!
94 sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5.la > libhdf5.la.new
95 mv -f libhdf5.la.new libhdf5.la
101 export INSTALL_WORK=$2;
102 export SOURCE_DIR=$3;
103 export INSTALL_ROOT=$4;
104 export PRODUCT_SEQUENCE=$5;
105 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="hdf" ; fi
106 export PRODUCT="hdf5-1.6.3"
107 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
108 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}