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

# Version must match OCaml: https://github.com/ocaml/merlin/issues/1697
name                ocaml-merlin
github.setup        ocaml merlin 4.14-414 v
revision            0
categories          ocaml devel
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
license             MIT
description         Editor helper, provides completion, typing and source browsing in Vim and Emacs
long_description    {*}${description}
checksums           rmd160  63d6d6faabfa091a7782cc373a26bccde5dfde79 \
                    sha256  eeab97336086887fcaaa8281daff93ddaa9ebbe34ff2a244aeb92f7a6ba3899b \
                    size    2463721
github.tarball_from archive

ocaml.build_type    dune

if {${subport} eq ${name} } {
    depends_lib-append \
                    port:ocaml-dot-merlin-reader \
                    port:ocaml-yojson
}

subport ocaml-dot-merlin-reader {
    description     Reads config files for merlin
    depends_lib-append \
                    port:ocaml-findlib \
                    port:ocaml-merlin-lib
}

subport ocaml-merlin-lib {
    depends_lib-append \
                    port:ocaml-csexp \
                    port:ocaml-menhir \
                    port:ocaml-menhirLib \
                    port:ocaml-menhirSdk
}
