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

name                ocaml-rdf
version             1.1.0
revision            2
categories          ocaml devel
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             LGPL-3
description         OCaml library to manipulate RDF graphs
long_description    {*}${description}, implements SPARQL.
homepage            https://www.good-eris.net/${name}
master_sites        ${homepage}/archives/
use_bzip2           yes
checksums           rmd160  ef436ccade2d5703b9f92dd91a22b276a936027e \
                    sha256  eb67d5a41a6f00bc35599a97b8ea5d981a20cb99f06a3da1143f48813d5341ee \
                    size    17715050

depends_lib-append  port:ocaml-dune-build-info \
                    port:ocaml-fmt \
                    port:ocaml-iri \
                    port:ocaml-jsonm \
                    port:ocaml-logs \
                    port:ocaml-menhir \
                    port:ocaml-pcre \
                    port:ocaml-ptime \
                    port:ocaml-re \
                    port:ocaml-sedlex \
                    port:ocaml-uri \
                    port:ocaml-uucp \
                    port:ocaml-uuidm \
                    port:ocaml-uutf \
                    port:ocaml-xmlm \
                    port:ocaml-yojson

ocaml.build_type    dune

subport ${name}-lwt {
    description     Sparql HTTP with Lwt

    depends_lib     port:ocaml-cohttp-lwt-unix \
                    port:ocaml-lwt \
                    port:ocaml-lwt_ppx
}

subport ocaml-rdf_impls {
    description     C implementations (using Cyrptokit and Pcre) of functions used by Rdf

    depends_lib     port:ocaml-cryptokit \
                    port:ocaml-pcre
}

subport ocaml-rdf_ppx {
    description     Syntax extension for rdf

    depends_lib     port:ocaml-ppxlib
}

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

livecheck.type      regex
livecheck.regex     ${name}-(\[0-9\.]+).tar.bz2
