# $Id: Portfile 66754 2010-04-22 02:09:03Z ryandesign@macports.org $

PortSystem          1.0
name                caml-bin-prot
version             1.2.20
revision            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

distfiles           bin-prot-release-${version}.tar.gz
worksrcdir          bin-prot-release-${version}

checksums           md5     e87e2c76d53b6ff38e276053bd78a787 \
                    sha1    8dcf1f8b5465b5db630fbabbe9a6b9c1a9ebca05 \
                    rmd160  b6312efedfbfabd7de6a5ff76c4d6bde657c96cb

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_INSTFLAGS="-ldconf ignore -destdir $ocamlfind_destdir"

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

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