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

github.setup        xonsh xonsh 0.19.4
github.tarball_from releases
revision            0
categories          shells
supported_archs     noarch
platforms           {darwin any}
maintainers         {mps @Schamschula} openmaintainer
license             Permissive

description         Xonsh is a Python-ish, BASHwards-looking shell language \
                    and command prompt.

long_description    {*}${description} \
                    The language is a superset of Python 3.4+ with additional \
                    shell primitives that you are used to from Bash and \
                    IPython. It works on all major systems including Linux, \
                    macOS, and Windows. Xonsh is meant for the daily use of \
                    experts and novices alike.

checksums           rmd160  1961712f59cf66d073bb982459ec969c4b1c1710 \
                    sha256  5eb3c1b40f9b7986dbf4b2101c61d02b4668d6da3809894ad51ef7116c723f99 \
                    size    12751641

variant python39 conflicts python310 python311 python312 description {Use Python 3.9} {}
variant python310 conflicts python39 python311 python312 description {Use Python 3.10} {}
variant python311 conflicts python39 python310 python312 description {Use Python 3.11} {}
variant python312 conflicts python39 python310 python311 description {Use Python 3.12} {}

if {![variant_isset python39] && ![variant_isset python310] && ![variant_isset python310]} {
        default_variants +python312
}

foreach pv {312 311 310 39} {
    if {[variant_isset python${pv}]} {
        python.default_version ${pv}
        break
    }
}

depends_lib-append  port:py${python.version}-prompt_toolkit \
                    port:py${python.version}-pygments \
                    port:py${python.version}-gnureadline
