# $Id: Portfile 98499 2012-10-07 11:42:35Z mww@macports.org $

PortSystem 1.0
PortGroup           ocaml 1.0

name                ocaml-pcre
version             7.0.2
revision            1
categories          devel ml
maintainers         landonf openmaintainer
license             LGPL-2.1
description         Perl compatibility regular expressions for OCaml
long_description    This OCaml-library interfaces the PCRE (Perl-compatibility regular \
                    expressions) library which is written in C. it can be used for matching \
                    regular expressions which are written in PERL-style. Searching for, replacing \
                    or splitting text should become much easier with this library.

homepage            http://www.ocaml.info/home/ocaml_sources.html
platforms           darwin
master_sites        https://bitbucket.org/mmottl/pcre-ocaml/downloads/

checksums           rmd160  cd0f6c62b2c6d42597fdd02bda39e976d77bda0e \
                    sha256  052a2fdd8da597724ac8ca474fdd40772b461888e3ff8ef75cc71e43a65766ea

distname            pcre-ocaml-${version}

livecheck.type      regex
livecheck.regex     {>pcre-ocaml-release-(.*)\.tar\.bz2}

depends_lib         port:ocaml port:ocaml-findlib port:pcre

use_oasis           yes
use_oasis_doc       yes

configure.args-append "--override docdir ${destroot}${prefix}/share/doc/${name}"

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} AUTHORS.txt CHANGES.txt COPYING.txt INSTALL.txt \
         ${destroot}${prefix}/share/doc/${name}
    file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${name}
}

