# -*- 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-timedesc
github.setup        daypack-dev timere 3.1.0 timedesc-
categories          ocaml devel
maintainers         nomaintainer
license             MIT
description         OCaml date time handling library
long_description    {*}${description}
distname            timedesc-${version}
checksums           rmd160  b026c3cdf631c6b23d3e9033ba9617dbdf8dfa64 \
                    sha256  9c469c849ca6242f133ff1dadab3855379f4f6bc559486589a04276223428871 \
                    size    424826
github.tarball_from releases
extract.mkdir       yes

if {${subport} eq ${name}} {
    revision        1
    depends_lib-append \
                    port:ocaml-angstrom \
                    port:ocaml-ptime \
                    port:ocaml-result \
                    port:ocaml-timedesc-tzdb \
                    port:ocaml-timedesc-tzlocal
}

subport ${name}-json {
    revision        1
    description     Timedesc JSON backend

    depends_lib-append \
                    port:ocaml-timedesc \
                    port:ocaml-yojson
}

subport ${name}-tzdb {
    revision        1
    description     Time zone database for timedesc
}

subport ${name}-tzlocal {
    revision        1
    description     Virtual library for Timedesc local time zone detection backends
}

ocaml.build_type    dune
