# -*- 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.2 timedesc-
categories          ocaml devel
maintainers         nomaintainer
license             MIT
description         OCaml date time handling library
long_description    {*}${description}
distname            timedesc-${version}
checksums           rmd160  6437ed94c7aabbccf8b86bbea41d176c1d219ba3 \
                    sha256  8577628c6634aaefa92d1d97b4afca2fd817bc2b2d6d979da35dfbf65a80d6bd \
                    size    426050
github.tarball_from releases
extract.mkdir       yes

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

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

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

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

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

ocaml.build_type    dune
