check_jb tar xfz ${SOURCE_DIR}/hdf5-1.4.4.tar.gz -C ${INSTALL_ROOT}
+### modify libhdf5.la file to correct direct path to hdf5 library
+### no need to do this for sources installation because 'make install' does it!
+cd ${PRODUCT_DIR}/lib
+sed -e "s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5.la > libhdf5.la.new
+mv -f libhdf5.la.new libhdf5.la
+
print_env
}
check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
rm -fr ${PRODUCT_WORK}
+
+### modify libmed.la libmedC.la files to correct direct path to hdf5 library
+cd ${PRODUCT_DIR}/lib
+tmp=""
+if [ -n ${HDF5HOME} ]; then
+ tmp="-L${HDF5HOME}/lib"
+fi
+sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-1\.4\.4/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new
+mv -f libmed.la.new libmed.la
+
print_env
}
check_jb tar xfz ${SOURCE_DIR}/med-2.1.6.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%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libmed.la > libmed.la.new
+mv -f libmed.la.new libmed.la
+tmp=""
+if [ -n ${HDF5HOME} ]; then
+ tmp="-L${HDF5HOME}/lib"
+fi
+sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-1\.4\.4/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new
+mv -f libmed.la.new libmed.la
+
print_env
}
check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
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-1\.4\.4/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new
+mv -f libmed.la.new libmed.la
+sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-1\.4\.4/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
}
check_jb tar xfz ${SOURCE_DIR}/med-2.2.2.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-1\.4\.4/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new
+mv -f libmed.la.new libmed.la
+sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-1\.4\.4/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
}