# $Id$

PortSystem          1.0
PortGroup           ocaml 1.0

name                ocaml-zarith
version             1.3
revision            1
categories          devel ml
maintainers         mww openmaintainer
license             LGPL-2
platforms           darwin
description         Arbitrary-precision integers for OCaml
long_description    \
        The Zarith library implements arithmetic and logical operations \
        over arbitrary-precision integers. It uses GMP to efficiently \
        implement arithmetic over big integers. Small integers are \
        represented as Caml unboxed integers, for speed and space economy.
homepage            http://forge.ocamlcore.org/projects/zarith/
master_sites        http://forge.ocamlcore.org/frs/download.php/1471/
distname            zarith-${version}
extract.suffix      .tgz

checksums           rmd160  aa376ea750a21ea4945d484fde4cb3a96e34ef05 \
                    sha256  946687d6f032b96ab9db9661d876e39437bff783e0ad473ac463c06259b7a3d7

depends_lib         port:ocaml port:ocaml-findlib port:gmp

patchfiles          patch-configure.diff patch-caml_z_x86_64.S.diff

configure.pre_args
configure.args       -installdir ${ocamlfind_destdir} -ocamllibdir ${prefix}/lib/ocaml
configure.cc_archflags
configure.ld_archflags

use_parallel_build  no

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} Changes LICENSE README \
        ${destroot}${prefix}/share/doc/${name}
}

test.run            yes
test.cmd            make test && ./test

livecheck.type      regex
livecheck.url       http://forge.ocamlcore.org/frs/?group_id=243
livecheck.regex     "zarith-(\[0-9\\.\]+).tgz"