# -*- 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        Hackerpilot DCD 0.8.0 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                d-completion-daemon
categories          devel
license             GPL-3
maintainers         nomaintainer
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:dmd \
                    port:druntime \
                    port:phobos

use_configure       no

build.env-append    CC=${configure.cc}

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
}

github.livecheck.regex  {([^"b-]+)}
