# -*- 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        ygrek ocurl 0.10.0
name                ocaml-curl
revision            0
categories          ocaml net
license             MIT
maintainers         nomaintainer

description         OCaml bindings to libcurl
long_description    ocurl provides OCaml bindings to libcurl, a client-side \
                    URL transfer library supporting HTTP and many other \
                    network protocols. It wraps both the easy synchronous \
                    API (Curl) and the multi API (Curl.Multi). The findlib \
                    package is named \"curl\".

homepage            https://ygrek.org/p/ocurl

distname            curl-${version}
use_bzip2           yes
extract.suffix      .tbz

checksums           rmd160  b7e2721abf7aabaf25adb55af4bfe708b2365c70 \
                    sha256  c14e215fda7f94292a758d9ae90f7bcbc21564c919190064011fccdcf7a12914 \
                    size    46086
github.tarball_from releases

worksrcdir          curl-${version}

if {${subport} eq ${name}} {
    depends_build-append \
                    port:ocaml-dune-configurator \
                    path:bin/pkg-config:pkgconfig
    depends_lib-append \
                    port:curl
}

ocaml.build_type    dune

subport ocaml-curl_lwt {
    description     Bindings to libcurl (lwt variant)

    depends_lib-append \
                    port:ocaml-curl \
                    port:ocaml-lwt \
                    port:ocaml-lwt_ppx
}
