# -*- 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
# $Id: Portfile 68471 2010-06-04 09:16:10Z ryandesign@macports.org $

PortSystem          1.0

name                hdfeos5
version             1.12
categories          science
platforms           darwin
maintainers         takeshi
description         HDF-EOS library built on HDF5
long_description \
    library designed built on HDF5 to support the same Grid/Point/Swath \
    functionality in HDF-EOS 2 and to the extent possible it will be    \
    built with the same calling sequences as the original HDF-EOS 2 library.
homepage            http://hdfeos.org/
master_sites        ftp://edhs1.gsfc.nasa.gov/edhs/${name}/latest_release/
distname            HDF-EOS5.${version}

checksums           md5     c2c51a7ab67215d3861000452bcb8550 \
                    sha1    c20d54a34a08586cc0c3ac06773ea557f78ddc66 \
                    rmd160  be71e5ab494319c75cffd0ff39e10b78e2843c2d

depends_lib         port:hdf5-18
worksrcdir          ${name}
extract.suffix      .tar.Z
fetch.use_epsv      no

configure.cc        ${prefix}/bin/h5cc
configure.cflags-append -DH5_USE_16_API
configure.args      --prefix=${prefix}/lib/${name} \
                    --with-hdf5=${prefix} \
                    --with-zlib=${prefix} \
                    --with-szlib=${prefix} \
                    --disable-dependency-tracking

post-destroot {
    set incdir ${destroot}${prefix}/lib/${name}/include
    xinstall -d -m 755 ${incdir}
    xinstall -m 644 ${worksrcpath}/include/HE5_GctpFunc.h ${incdir}
    xinstall -m 644 ${worksrcpath}/include/HE5_HdfEosDef.h ${incdir}
}
