# $Id: Portfile 92021 2012-04-16 10:42:24Z jmr@macports.org $

PortSystem 1.0

name			h4h5tools
version			2.2.1
categories		science
platforms		darwin
maintainers		dal.ca:tom.duck openmaintainer

description		HDF4 to HDF5 conversion tools.
long_description	Provides the h4toh5 conversion utility and \
			library.

homepage		http://www.hdfgroup.org/h4toh5/
master_sites		http://www.hdfgroup.org/ftp/HDF5/tools/h4toh5/src/

checksums		rmd160 f90ac82c900e59564fe9d4da93dd2cf70cd87763 \
			sha256 a814e5312355a97dc41b837dfcf057d925844b6a00f06c6d68fe9418094eb893

depends_lib-append	port:hdf5-18 \
			port:hdf4 \
			port:netcdf

configure.cc		${prefix}/bin/h4cc

post-destroot {
  xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
  xinstall -m 644 -W ${worksrcpath} README.txt COPYING Copyright.html \
    ${destroot}${prefix}/share/doc/${name}

  xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/pdf
  xinstall -m 644 -W ${worksrcpath}/doc \
    H4H5ProgrammersNotes.pdf h4toh5lib_RM.pdf h4toh5lib_UG.pdf \
    ${destroot}${prefix}/share/doc/${name}/pdf

  xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/html
  xinstall -m 644 -W ${worksrcpath}/doc \
    h4toh5lib_RM.html h4toh5lib_UG.html \
    ${destroot}${prefix}/share/doc/${name}/html
}

livecheck.type     regex
livecheck.url      ${homepage}
livecheck.regex    {Current Release:</note> &nbsp; ([0-9]+\.[0-9.]+)<br />}
