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

go.setup            github.com/mrtazz/checkmake 0.2.2
# Delete this on next update to use golang PortGroup's default ('archive')
github.tarball_from tarball
revision            0
categories          devel
license             MIT
maintainers         {@therealketo gmail.com:therealketo} openmaintainer

description         experimental tool for linting and checking Makefiles
long_description    ${name} is a {*}${description}. It may not do what you \
                    want it to.

checksums           ${distname}${extract.suffix} \
                        rmd160  13116415355b2353487bd724b8480e43ff19d12f \
                        sha256  4d93f70268ee33690754dbcdb9744b1481ca027e4ce070043ba27c14aec878b0 \
                        size    102682

patch.pre_args-replace  -p0 -p1
patchfiles          no-builder-name-email.diff

depends_build-append \
                    port:pandoc

# Vendored libraries cause failure, fetch them at build time
go.offline_build    no

build.cmd           make
build.target        all
build.args          BUILDER="MacPorts" \
                    VERSION="${version}"

destroot {
    xinstall -d ${destroot}${prefix}/share/man/man1
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
    xinstall -m 0644 \
        ${worksrcpath}/${name}.1 \
        ${destroot}${prefix}/share/man/man1/
}
