# -*- 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           legacysupport 1.1
PortGroup           makefile 1.0

# utimensat
legacysupport.newest_darwin_requires_legacy 16

github.setup        gittup tup 0.7.11 v
revision            0
checksums           rmd160  0a94df3d9acf69a1a25bae5dcd89e848ea099e8c \
                    sha256  be24dff5f1f32cc85c73398487a756b4a393adab5e4d8500fd5164909d3e85b9 \
                    size    4683309

categories          devel
platforms           macosx
maintainers         {ryandesign @ryandesign} openmaintainer
license             GPL-2

description         A build system with amazingly fast incremental build cycle

long_description    \
    Tup is a file-based build system - it inputs a list of file changes    \
    and a directed acyclic graph (DAG), then processes the DAG to execute  \
    the appropriate commands required to update dependent files.  The DAG  \
    is stored in an SQLite database.  By providing the file change log up  \
    front and storing the dependencies in an efficient database structure, \
    updates can be performed with very little overhead.

homepage            http://gittup.org/tup/
github.tarball_from archive

depends_build       port:pkgconfig

depends_lib         port:osxfuse \
                    port:libiconv

# osxfuse is not universal
universal_variant   no

patchfiles-append   dont-force-clang.patch

build.cmd           ./build.sh
build.env-append    TUP_LABEL=${version}

destroot {
    xinstall -m 0755 ${worksrcpath}/build/tup ${destroot}${prefix}/bin/
    xinstall -m 0644 ${worksrcpath}/tup.1 ${destroot}${prefix}/share/man/man1/

    set docdir ${prefix}/share/doc/${subport}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} \
        COPYING \
        README.md \
        ${destroot}${docdir}
}
