# $Id$

PortSystem 1.0
PortGroup           ocaml 1.0

name                ocaml-pcre
version             7.1.5
revision            1
categories          devel ml
maintainers         nomaintainer
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://mmottl.github.io/pcre-ocaml/
platforms           darwin
master_sites        https://github.com/mmottl/pcre-ocaml/releases/download/v${version}/

checksums           rmd160  d4e6b89a92753465352f1a42e1ba90dcdca90eff \
                    sha256  6495ecf25ed6a69fd14fda472f9fac9853dde2aee9944f6b6c0111d458c1039b

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}
}