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.4.4" ]; 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.4.4.tar.gz -C ${INSTALL_WORK}
68 makedir ${PRODUCT_DIR}
69 check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
70 ./configure --prefix=${PRODUCT_DIR} --enable-threadsafe --enable-hdf5v1_2 \
71 --enable-stream-vfd --disable-hsizet --with-pthread=/usr/include,/usr/lib
73 cat >> ${PRODUCT_DIR}/MAKE0.LOG <<EOF
76 check_job ${PRODUCT_DIR}/MAKE0.LOG make
78 sed -e 's%$(srcdir)/usr%/usr%g' ./src/.depend > ./src/.dependnew
79 mv ./src/.dependnew ./src/.depend
80 cat >> ${PRODUCT_DIR}/MAKE1.LOG <<EOF
83 check_job ${PRODUCT_DIR}/MAKE1.LOG make
85 sed -e 's%$(srcdir)/usr%/usr%g' ./test/.depend > ./test/.dependnew
86 mv ./test/.dependnew ./test/.depend
87 cat >> ${PRODUCT_DIR}/MAKE2.LOG <<EOF
90 check_job ${PRODUCT_DIR}/MAKE2.LOG make
92 sed -e 's%$(srcdir)/usr%/usr%g' ./tools/lib/.depend > ./tools/lib/.dependnew
93 mv ./tools/lib/.dependnew ./tools/lib/.depend
94 cat >> ${PRODUCT_DIR}/MAKE3.LOG <<EOF
97 check_job ${PRODUCT_DIR}/MAKE3.LOG make
99 sed -e 's%$(srcdir)/usr%/usr%g' ./tools/h5dump/.depend > ./tools/h5dump/.dependnew
100 mv ./tools/h5dump/.dependnew ./tools/h5dump/.depend
101 cat >> ${PRODUCT_DIR}/MAKE4.LOG <<EOF
104 check_job ${PRODUCT_DIR}/MAKE4.LOG make
106 sed -e 's%$(srcdir)/usr%/usr%g' ./tools/h5ls/.depend > ./tools/h5ls/.dependnew
107 mv ./tools/h5ls/.dependnew ./tools/h5ls/.depend
108 cat >> ${PRODUCT_DIR}/MAKE5.LOG <<EOF
111 check_job ${PRODUCT_DIR}/MAKE5.LOG make
113 sed -e 's%$(srcdir)/usr%/usr%g' ./tools/misc/.depend > ./tools/misc/.dependnew
114 mv ./tools/misc/.dependnew ./tools/misc/.depend
115 cat >> ${PRODUCT_DIR}/MAKE6.LOG <<EOF
118 check_job ${PRODUCT_DIR}/MAKE6.LOG make
120 #sed -e 's%$(srcdir)/usr%/usr%g' ./examples/.depend > ./examples/.dependnew
121 #mv ./examples/.dependnew ./examples/.depend
122 #cat >> ${PRODUCT_DIR}/MAKE7.LOG <<EOF
125 #check_job ${PRODUCT_DIR}/MAKE7.LOG make
127 #check_job ${PRODUCT_DIR}/MAKECHECK.LOG make check
128 check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
130 #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
131 cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
137 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
138 source ${INSTALL_WORK}/$SHRC
140 check_jb tar xfz ${SOURCE_DIR}/hdf5-1.4.4.tar.gz -C ${INSTALL_ROOT}
142 ### modify libhdf5.la file to correct direct path to hdf5 library
143 ### no need to do this for sources installation because 'make install' does it!
144 cd ${PRODUCT_DIR}/lib
145 sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5.la > libhdf5.la.new
146 mv -f libhdf5.la.new libhdf5.la
152 export INSTALL_WORK=$2;
153 export SOURCE_DIR=$3;
154 export INSTALL_ROOT=$4;
155 export PRODUCT_SEQUENCE=$5;
156 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="hdf" ; fi
157 export PRODUCT="hdf5-1.4.4"
158 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
159 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}