# $Id: Portfile 98499 2012-10-07 11:42:35Z mww@macports.org $

PortSystem          1.0
PortGroup           ocaml 1.0

name                ocaml-odn
version             0.0.8
revision            4
categories          devel ml
maintainers         landonf openmaintainer
license             LGPL-2.1
description         OCaml data notation.
long_description    This project uses type-conv to dump OCaml data structure \
                    using OCaml data notation. This kind of data dumping helps \
                    to write OCaml code generator, like OASIS.

homepage            https://forge.ocamlcore.org/projects/odn
platforms           darwin
master_sites        https://forge.ocamlcore.org/frs/download.php/833/
distname            ocaml-data-notation-${version}

checksums           md5     1d674e3cbd0ea4f399d150cbbb349090 \
                    sha1    4f52b94e51a4163b4f3f288b1c5960e8f0595a11 \
                    rmd160  93c393a97b42e5914f961e4bd456a0f0f1d18b64

livecheck.type      regex
livecheck.regex     {>ocaml-data-notation-(.*)\.tar\.bz2}

depends_lib         port:ocaml port:ocaml-type-conv

use_oasis           yes

patch {
    reinplace "s|type-conv|type_conv|g" ${worksrcpath}/setup.ml
    reinplace "s|type-conv|type_conv|g" ${worksrcpath}/src/META
}

configure.args-append "--override ocamlbuildflags '-use-ocamlfind -pkg type_conv'"

