# -*- 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-lwd
github.setup        let-def lwd 0.5 v
revision            1
categories          ocaml devel
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             MIT
description         Lightweight reactive documents
long_description    {*}${description}
use_bzip2           yes
extract.suffix      .tbz
distname            lwd-${version}
checksums           rmd160  d688a31853447d39a8f5d2bdc9fbe73863e10331 \
                    sha256  60066378bba103150207746b06e978bbbd20e5312a4f60bb674f586d8c8f64e6 \
                    size    100170
github.tarball_from releases

depends_lib-append  port:ocaml-seq

ocaml.build_type    dune

subport ocaml-nottui {
    description     UI toolkit for the terminal built on top of Notty and Lwd

    depends_lib     port:ocaml-lwd
}

subport ocaml-nottui-lwt {
    description     Run Nottui UIs in Lwt

    depends_lib     port:ocaml-lwt \
                    port:ocaml-nottui
}

subport ocaml-nottui-pretty {
    description     Pretty-printer based on PPrint rendering UIs

    depends_lib     port:ocaml-nottui
}

subport ocaml-nottui-unix {
    description     UI toolkit for the UNIX terminal built on top of Notty and Lwd

    depends_lib     port:ocaml-lwd \
                    port:ocaml-nottui
}

if {${subport} ne ${name}} {
    depends_lib-append \
                    port:ocaml-notty-community
}
