# -*- 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/lmorg/murex 5.3.5000 v
github.tarball_from archive
revision            0

homepage            https://murex.rocks

description         \
    Bash-like \$SHELL designed for greater commandline productivity and safer \
    shell scripts

long_description    \
    ${name} is a shell, like bash / zsh / fish / etc. It follows a similar \
    syntax to POSIX shells like Bash however supports more advanced features \
    than you'd typically expect from a \$SHELL. It aims to be similar enough \
    to traditional shells that you can retain most of your muscle memory, \
    while not being afraid to make breaking changes where "bash-isms" lead to \
    unreadable, hard to maintain, or unsafe code.  ${name} is designed for \
    DevOps productivity so it isn't suited for high-performance workloads \
    beyond what you'd typically run in Bash (eg pipelines forked as \
    concurrent processes).

categories          shells
installs_libs       no
license             GPL-2
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  14e28ba4352abbaf903033b50a08633aeb74f76b \
                    sha256  01dd4cac5d71692c0bb3724c543f6a2a45259f0199249335f94511f3509d7ebf \
                    size    1965231

depends_run-append  port:aspell \
                    port:aspell-dict-en

# Enable download deps at build time.
go.offline_build no

set mx_doc_dir      ${prefix}/share/doc/${name}
set mx_share_dir    ${prefix}/share/${name}

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/

    xinstall -d ${destroot}${mx_doc_dir}
    xinstall -d ${destroot}${mx_share_dir}

    file copy ${worksrcpath}/examples ${destroot}${mx_share_dir}/
    file copy {*}[glob ${worksrcpath}/docs/*] ${destroot}${mx_doc_dir}/
}

notes "
    Examples can be found in: ${mx_share_dir}
"
