# $Id: Portfile 59980 2009-10-28 14:50:06Z avsm@macports.org $

PortSystem          1.0
name                caml-batteries
version             20090405
categories          devel ml
maintainers         erickt openmaintainer
description         A new O'Caml standard library
long_description    OCaml Batteries included (or simply Batteries) is a \
                    community-driven effort to standardize on an consistent, \
                    documented, and comprehensive development platform for the \
                    OCaml programming language.
homepage            http://batteries.forge.ocamlcore.org/
platforms           darwin
master_sites        http://forge.ocamlcore.org/frs/download.php/199

distfiles           batteries-${version}.tar.gz
worksrcdir          batteries-${version}

checksums           md5     4cdd4c6885a2213c6d9aff6b1e4b1da7 \
                    sha1    e5fdc8940d73296cadcae5a4d10d61f7ebf5e566 \
                    rmd160  cfda79b2ce4d8980e8bb553efbd972d5da402dc4

depends_lib         port:ocaml \
                    port:caml-findlib \
                    port:caml-type-conv \
                    port:caml-sexplib \
                    port:caml-bin-prot \
                    port:caml-camomile \
                    port:caml-camlzip \
                    port:caml-ocamlnet \
                    port:caml-ounit

configure.pre_args
configure.args      --with-docroot=${prefix}/share/doc/caml-batteries
build.target        all opt top syntax
use_parallel_build  no

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

destroot.target     install
destroot.destdir    DESTDIR=${ocamlfind_destdir}

pre-destroot {
    file mkdir $ocamlfind_destdir
}

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

variant doc description {Install documentation} {
    build.target-append doc
    destroot.target-append install-doc
}
