# -*- 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 7.5.0
revision            0
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  c822f1bbed673c134609e34b467fca6b41525f1c \
                    sha256  4f047eff30b7715c58c2ca3c98c0c741884f28d8ee99847688be66703661ebe4 \
                    size    47652
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} CHANGES.md README.md pre-v7.3.0-CHANGES.txt \
         ${destroot}${prefix}/share/doc/${name}
    file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${name}
}

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