# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           ocaml 1.1

name                ocaml-pcre
github.setup        mmottl pcre-ocaml 8.0.5
revision            2
categories          ocaml devel
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            https://mmottl.github.io/pcre-ocaml

checksums           rmd160  718c771d16ca2cbfe1f68ccb6b929f9c18996d37 \
                    sha256  2c6fdb3d134d977862bb50b840af7ce52c1f1fb94d53aacbf6e9a6758f781d2e \
                    size    51846
github.tarball_from archive

depends_lib-append  port:pcre

depends_build-append \
                    port:ocaml-dune-configurator

use_configure       no
ocaml.build_type    dune
oasis.build_docs    yes

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

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} CHANGELOG.md README.md \
         ${destroot}${prefix}/share/doc/${name}
    copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${name}
}

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