# $Id: Portfile 61300 2009-12-08 11:30:17Z mww@macports.org $

PortSystem          1.0

name                caml-sexplib
version             4.2.16
distname            release-${version}
worksrcdir          sexplib310-${distname}
categories          devel ml
maintainers         erickt openmaintainer
description         Automated code generation for converting OCaml-values to S-expressions
long_description	${description}
homepage            http://www.ocaml.info/home/ocaml_sources.html
platforms           darwin
master_sites        http://hg.ocaml.info/release/sexplib310/archive/
checksums           md5     b3b86a51db40b792a951df039da1948e \
                    sha1    66510b2203f78558891c440a6eb3d7b237991428 \
                    rmd160  1a35ffa3600e51a6a4e6b07ad888c10e85f517a1
use_bzip2           yes

livecheck.type      regex
livecheck.regex     "sexplib310/archive/release-(\\d+(?:\\.\\d+)*).tar.bz2"

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

use_configure       no

build.env           PREFIX=${prefix}
use_parallel_build  no

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

destroot.env        OCAMLFIND_INSTFLAGS="-destdir $ocamlfind_destdir"

pre-destroot {
    file mkdir $ocamlfind_destdir
}
