# -*- 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.24.0
revision            0

homepage            https://www.${name}.org

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  b0264e9af5c38d6247e61543eed778af452d5180 \
                    sha256  f199f5384e72c53eeb8a159ee7ac1b92819adc13a6dc5644ccae33e7ceaa9c72 \
                    size    2097001

master_sites        ${homepage}/download/
distname            oil-${version}

depends_lib-append  port:readline

configure.args-append \
                    --with-readline

build.target        {}

destroot {
    xinstall -m 0755 ${worksrcpath}/_bin/oil.ovm ${destroot}${prefix}/bin/

    foreach shname {osh ysh oil} {
        ln -sf ${prefix}/bin/oil.ovm ${destroot}${prefix}/bin/${shname}
    }

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

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