# $Id: Portfile 60454 2009-11-12 23:35:31Z ryandesign@macports.org $

PortSystem          1.0
name                caml-fieldslib
version             0.1.0
extract.suffix      .tgz
distname            fieldslib-${version}
categories          devel ml
maintainers         avsm openmaintainer
description         Syntax support for folding over record fields in OCaml
long_description    This library defines a syntax extension for OCaml using Camlp4 that \
                    can be used to define first class values representing record fields, \
                    and additional routines, to get and set record fields, iterate and fold \
                    over all fields of a record and create new record values.

homepage            http://ocaml.janestreet.com/?q=node/13
platforms           darwin
master_sites        http://www.janestreet.com/ocaml/

livecheck.url       http://ocaml.janestreet.com/?q=node/13
livecheck.type      regex
livecheck.regex     {fieldslib-(.*)\.tgz}

checksums           md5     a5a50b2f883c31255bcac4b7b0f9e679 \
                    sha1    5f3ce22f6aaeed5ef5ec0bfa064ff49500f74858 \
                    rmd160  c0bed7efa1069c3cd74badc36de561a57cb00377

depends_lib         port:ocaml port:caml-findlib port:caml-type-conv

use_configure       no
use_parallel_build  no

build.env           PREFIX=${prefix}

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

destroot.env        OCAMLFIND_INSTFLAGS="-destdir $ocamlfind_destdir"

pre-destroot {
    file mkdir $ocamlfind_destdir
}
