# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0

github.setup        terhechte SourceKittenDaemon 0.1.5
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
categories          devel

universal_variant   no
license             MIT
maintainers         nomaintainer

description         Swift Auto Completions for any Text Editor
long_description    {*}${description}

depends_build       bin:carthage:carthage

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

patchfiles          patch-Makefile.diff

use_configure       no

# everything is built during the prefix_install target
build               {}

destroot {
    system -W ${worksrcpath} "${build.cmd} install PREFIX=${destroot}${prefix} FRAMEWORKS_FOLDER=/Library/Frameworks/SourceKittenDaemon DSTROOT=${destroot} DERIVED_PATH=${worksrcpath}/custombuild"
}

post-destroot {
    delete ${destroot}/Applications
}
