PortSystem          1.0

name                ocaml-inifiles
version             1.2
revision            5
categories          ocaml devel
maintainers         nomaintainer
platforms           darwin
license             BSD
description         ini file parser for OCaml
long_description    ${description}

# original homepage at .mac is down
homepage            http://caml.inria.fr/cgi-bin/hump.en.cgi?contrib=564
master_sites        ${homepage}

distname            inifiles-${version}

checksums           md5     9deb802bdf98f5ead88598752d9ea5ac \
                    sha1    215120d4957c2a1fabb869804ae1360aaf32f6ac \
                    rmd160  977a0e72b7c247bedc83f87136572cca4b53bfe6

depends_lib         port:ocaml port:ocaml-pcre

use_configure       no

use_parallel_build  no

destroot {
    set ocaml_site_path [exec ocamlfind printconf destdir]
    xinstall -m 755 -d ${destroot}/${ocaml_site_path} \
        ${destroot}${prefix}/share/doc/${name}
    system "cd ${worksrcpath} && OCAMLFIND_INSTFLAGS=\"-destdir ${destroot}/${ocaml_site_path}\" make install "
    xinstall -m 644 -W ${worksrcpath} COPYING ${destroot}${prefix}/share/doc/${name}/
}

livecheck.url       ${homepage}
livecheck.type      regex
livecheck.regex     Version:</td><td>(\[0-9\.\]+)