# $Id$

PortSystem          1.0
name                ocaml-ancient
version             0.9.0
revision            5
categories          devel ml
maintainers         mww openmaintainer
license             LGPL-2.1
description         Mark objects as 'ancient' so they are taken out of the OCaml heap
long_description    ${description}
homepage            http://git.et.redhat.com/?p=ocaml-ancient.git
platforms           darwin

master_sites        http://www.ocaml-programming.de/godi-backup/
distname            ancient-${version}

checksums           md5     a5529e09f3c96247f362b7640e710157 \
                    sha1    be60cddcc3047cd34fa452d816d5ab13edd6ea54 \
                    rmd160  96c3ef4f3c6d8f303ebbc3bc60ae336db23a3fb2
patchfiles          patch-ancient_c.c.diff patch-Makefile.diff

depends_lib         port:ocaml port:ocaml-findlib

use_parallel_build  no

configure.dir       ${worksrcpath}/mmalloc

build {
   system -W ${worksrcpath}/mmalloc "make all"
   system -W ${worksrcpath} "CFLAGS='-I${prefix}/lib/ocaml' make all"
}

destroot {
   set ocamlfind_destdir ${destroot}${prefix}/lib/ocaml/site-lib
   xinstall -m 755 -d "${ocamlfind_destdir}/stublibs"
   system -W ${worksrcpath} "ocamlfind install -destdir ${ocamlfind_destdir} -ldconf ignore ancient ancient.cmi *.mli *.cma ancient.cmx *.cmxa *.a *.so mmalloc/*.a META"
}

livecheck.type      regex
livecheck.url       http://www.ocaml-programming.de/godi-backup/
livecheck.regex     "ancient-(.*?).tar.gz"