# -*- 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        nvie git-toolbelt 1.9.3 v
github.tarball_from archive
revision            0

description         \
    Helper tools to make everyday life with Git much easier

long_description    \
    {*}${description}. A suite of useful Git commands that aid with scripting \
    or every day command line usage
    
categories          devel
installs_libs       no
license             BSD
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer
supported_archs     noarch
platforms           any

checksums           ${distname}${extract.suffix} \
                    rmd160  b2feb01b45d4c39761b9a25bd7cff3f2425d77f5 \
                    sha256  d39e45a9d2a2501bc6f06fc0c5eb8f1fb7a3b372c0ee4d6def4c77541d102c44 \
                    size    140533

depends_run-append  path:bin/git:git \
                    port:fzf \
                    port:realpath

if {${os.platform} eq "darwin" && ${os.major} < 17} {
    # fzf is not building on older macOS because of older Go.
    # Do without it on those platforms.
    depends_run-delete port:fzf
}

use_configure       no

build {}

destroot {
    foreach _bin [glob ${worksrcpath}/git-*] {
        xinstall -m 0755 ${_bin} ${destroot}${prefix}/bin/
    }
}
