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

github.setup        dlang-community DCD 0.19.4 v
github.tarball_from archive
name                d-completion-daemon
categories          devel
license             GPL-3
maintainers         {gmail.com:ppadilcdx @papadil} openmaintainer
description         The D Completion Daemon (DCD) is an auto-complete program for the \
                    D programming language
long_description    DCD consists of a client and a server. \
                    The client (dcd-client) is almost always \
                    used through a text editor script or plugin, \
                    though it can be used from the command line. \
                    The server (dcd-server) is responsible for caching \
                    imported files, calculating autocomplete \
                    information, and sending it back to the client.

# Fetch from git instead of distfile because it needs submodules
fetch.type          git

depends_lib         port:ldc
                    
use_configure       no

checksums           rmd160  96f5c707ae1e2f3f739d6d59360eb5fa69e88987 \
                    sha256  9e592f8deede2cee92a687053dd9797cd4edb385818263279b79815e52df3976 \
                    size    874694

build.type          default
build.target        ldc

post-fetch {
    system -W ${worksrcpath} "git submodule update --init --recursive"
}

destroot {
    xinstall -d -m 755 ${destroot}${prefix}/bin
    file copy ${worksrcpath}/bin/dcd-client ${destroot}${prefix}/bin
    file copy ${worksrcpath}/bin/dcd-server ${destroot}${prefix}/bin
}

# Exclude pre-release candidates
github.livecheck.regex {([0-9.]+)}
