# $Id: Portfile 78992 2011-05-29 01:06:07Z ryandesign@macports.org $

PortSystem          1.0

name                caml-batteries
epoch               1
version             1.3.0
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/
master_sites        https://forge.ocamlcore.org/frs/download.php/560
platforms           darwin

distname            batteries-${version}

checksums           sha1   afd5fbb6c0424fb08e9a66790679401c8e003cc4 \
                    rmd160 00ae9372648ee9e927a6edd581b56e84fa54a79f

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

use_configure       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     "batteries-(.*?).tar.gz"

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