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

name                seaport
version             0.10.1
revision            1
categories-prepend  devel
license             BSD
supported_archs     noarch
platforms           {darwin any}

python.default_version \
                     311
python.pep517_backend \
                    poetry

maintainers         {@harens harens} openmaintainer

description         The modern MacPorts portfile updater
long_description    {*}${description}.

homepage            https://${name}.rtfd.io

checksums           rmd160  2335b4129567754136a3280b73d21e1cf71b8b2a \
                    sha256  ba4f9ef1ae7ecbf6341b90397481b7b3ad750b0a96855dc205e8579eff676643 \
                    size    22729

depends_run-append \
                    port:py${python.version}-beartype \
                    port:py${python.version}-click \
                    port:gh

post-destroot {
    set autocomplete_dir ${worksrcpath}/${name}/_autocomplete

    set bash_completion_dir ${destroot}${prefix}/etc/bash_completion.d
    xinstall -d ${bash_completion_dir}
    xinstall -m 0644 ${autocomplete_dir}/${name}.bash ${bash_completion_dir}/${name}

    set zsh_completion_dir ${destroot}${prefix}/share/zsh/site-functions
    xinstall -d ${zsh_completion_dir}
    xinstall -m 0644 ${autocomplete_dir}/${name}.zsh ${zsh_completion_dir}/_${name}

    set fish_completion_dir ${destroot}${prefix}/share/fish/vendor_completions.d
    xinstall -d ${fish_completion_dir}
    xinstall -m 0644 ${autocomplete_dir}/${name}.fish ${fish_completion_dir}
}
