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

name                oilshell
version             0.34.0
revision            0

homepage            https://oils.pub

description         \
    Oils is our upgrade path from bash to a better language and runtime.

long_description    \
    {*}${description} Compared to POSIX shell and bash, Oil is easier to \
    learn, write, and debug. It's designed for programmers who know Python, \
    JavaScript, or Ruby, but avoid shell. Oil will do everything bash can, \
    and more. For example, it will have dynamic types and structured data, \
    not just strings.

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

checksums           rmd160  496430a8c97e66bd3f77fbf61b0a3f251efe42c3 \
                    sha256  469018ef475a1ca9e8397c02f75b2dc63882a4a2e20d77a303d74a728ae31a22 \
                    size    875768

set archivename     oils-for-unix
master_sites        ${homepage}/download/
distname            ${archivename}-${version}

depends_lib-append  port:readline

configure.args-append \
                    --with-readline

build.cmd           _build/oils.sh
build.pre_args      {}
build.args          {}

destroot {
    foreach oilbin {oils-for-unix osh ysh} {
        copy ${worksrcpath}/_bin/cxx-opt-sh/${oilbin} \
            ${destroot}${prefix}/bin/
    }

    xinstall -d ${destroot}${prefix}/share/man/man1
    xinstall -m 0444 \
        ${worksrcpath}/doc/osh.1 ${destroot}${prefix}/share/man/man1/
}

livecheck.regex     "${archivename}-(\[0-9.\]+)${extract.suffix}"
