# -*- 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

github.setup        mirage ocaml-conduit 8.0.0 v
revision            3
categories          ocaml net devel
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             ISC
description         Network connection establishment library
long_description    {*}${description} for OCaml.
use_bzip2           yes
extract.suffix      .tbz
distname            conduit-${version}
checksums           rmd160  d7c8aba88c8bc92e4e4af11bb83b552f92061186 \
                    sha256  0a63d910865b5473893a170cda51f61388f488ecf4c4b2ed7fe9ec4e2cf66f61 \
                    size    39039
github.tarball_from releases

depends_lib-append  port:ocaml-ppx_sexp_conv

if {${subport} eq ${name}} {
    depends_lib-append \
                    port:ocaml-astring \
                    port:ocaml-ipaddr \
                    port:ocaml-ipaddr-sexp \
                    port:ocaml-logs \
                    port:ocaml-sexplib0 \
                    port:ocaml-uri
}

subport ${name}-async {
    description-append \
                    for Async

    depends_lib-append \
                    port:ocaml-async \
                    port:ocaml-async_ssl \
                    port:ocaml-conduit \
                    port:ocaml-core \
                    port:ocaml-ipaddr \
                    port:ocaml-ipaddr-sexp \
                    port:ocaml-ppx_here \
                    port:ocaml-ppx_sexp_conv \
                    port:ocaml-sexplib0 \
                    port:ocaml-uri
}

subport ${name}-lwt {
    description     Portable network connection establishment library using Lwt

    depends_lib-append \
                    port:ocaml-conduit \
                    port:ocaml-lwt \
                    port:ocaml-sexplib0
}

subport ${name}-lwt-unix {
    description-append \
                    for Lwt_unix

    depends_lib-append \
                    port:ocaml-ca-certs \
                    port:ocaml-conduit-lwt \
                    port:ocaml-ipaddr \
                    port:ocaml-ipaddr-sexp \
                    port:ocaml-logs \
                    port:ocaml-lwt \
                    port:ocaml-lwt_ssl \
                    port:ocaml-tls-lwt \
                    port:ocaml-uri
}

ocaml.build_type    dune
