# -*- 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           xcode 1.0
PortGroup           github 1.0

name                choose-gui
github.setup        chipsenkbeil choose 1.5.0
github.tarball_from tarball
revision            0

checksums           rmd160  80188538ed6519eed232962c64eed57eb9bbbb2e \
                    sha256  98596ca72cfcad568ad89e9d3240ecbac91f9fbb5221e9438eb9c3ca3e177557 \
                    size    19421

description         Fuzzy matcher for OS X that uses both std{in,out} and a native GUI
long_description    {*}${description}

license             MIT
maintainers         {alum.wpi.edu:arno+macports @fracai} openmaintainer

supported_archs     x86_64 arm64
xcode.configuration Release

variant docs description {Build and install manual pages} {
    depends_build-append \
                    port:pandoc \
                    port:dos2unix

    post-build {
        system -W ${worksrcpath} "pandoc -s -f markdown -t man docs/choose.1.md | dos2unix > ${name}.1"
    }

    post-destroot {
        copy ${worksrcpath}/${name}.1 ${destroot}${prefix}/share/man/man1/${name}.1
    }
}

destroot {
    copy ${worksrcpath}/build/Release/choose ${destroot}${prefix}/bin/${name}
}
