# $Id: Portfile 77746 2011-04-11 04:29:59Z jmr@macports.org $

PortSystem          1.0
name                caml-bin-prot
version             1.3.1
categories          devel ml
maintainers         erickt openmaintainer
description         A binary protocol generator
long_description    This library contains functionality for reading and writing OCaml-values \
                    in a type-safe binary protocol. These functions are extremely efficient and \
                    provide users with a convenient and safe way of performing I/O on any \
                    extensionally defined data type. This means that functions, objects, and \
                    values whose type is bound through a polymorphic record field are not \
                    supported, but everything else is.

homepage            http://ocaml.janestreet.com/?q=node/13
platforms           darwin
master_sites        http://www.janestreet.com/ocaml

distname            bin_prot-${version}

checksums           md5     6ed3471d26ede09250cbcef21f9fb966 \
                    sha1    95804f6afd9552fb4daa6d3f430b171333874c66 \
                    rmd160  f984d3f8af1b4cbc7d2d93098c38116ff994e01f

depends_lib         port:ocaml port:caml-findlib port:caml-ounit port:caml-type-conv

use_configure       no
use_parallel_build  no

build.env           PREFIX=${prefix}

set ocamlfind_destdir ${destroot}${prefix}/lib/ocaml/site-lib

destroot.env        OCAMLFIND_LDCONF="ignore" \
                    OCAMLFIND_DESTDIR="$ocamlfind_destdir"

pre-destroot {
    file mkdir ${ocamlfind_destdir}/stublibs
}

livecheck.type      regex
livecheck.regex     "bin-prot-release-(.*?).tar.gz"
