PortSystem          1.0
PortGroup           ocaml 1.0

name                ocaml-batteries-devel
conflicts           ocaml-batteries
version             2.0beta2
revision            5
categories          ocaml devel
license             LGPL-2.1
platforms           darwin
maintainers         nomaintainer
description         A new O'Caml standard library -- BETA version
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/

fetch.type          git
git.url             git://github.com/ocaml-batteries-team/batteries-included.git
git.branch          0bdfe1bca5c5b9dea5590b426b199bc742c541db

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

patch {
    reinplace "s|ocamlfind|${ocamlfind_wrapper}|g" ${worksrcpath}/Makefile
}

use_configure no
use_parallel_build no

build.target        all doc qtest

destroot.target     install install-doc
destroot.destdir    DESTDIR=${ocamlfind_destdir} DOCROOT=${destroot}${prefix}/share/doc/${name}

pre-destroot {
    file mkdir $ocamlfind_destdir
}
post-destroot {
    system "ln -sf ${prefix}/lib/ocaml/site-lib/batteries/qtest ${destroot}${prefix}/bin/qtest"
}