# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem      1.0

name            h4h5tools
version         2.2.5
revision        0
categories      science
# Equivalent to BSD + explicitly requiring modifications to be documented
license         Permissive
platforms       darwin
maintainers     nomaintainer

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

homepage        https://support.hdfgroup.org/products/hdf5_tools/h4toh5/
master_sites    https://hdf-wordpress-1.s3.amazonaws.com/wp-content/uploads/manual/H4H5TOOLS/H4H5TOOLS-${version}/src/

checksums       rmd160  013a02ac08deba35db03bcc5a823d1a74cda7089 \
                sha256  79f6505c1df3ad0c2cc1a19b9b433b5d955dfd7d2dffefc080d89fdde01fd6f2 \
                size    1645708

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

configure.args-append \
                --with-hdfeos2=${prefix}
configure.libs  -ldf -lmfhdf

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

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