# -*- 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           legacysupport 1.1
PortGroup           makefile 1.0

# clock_gettime
legacysupport.newest_darwin_requires_legacy 15

github.setup        clainstone cbirds 1.7.0 v
github.tarball_from archive
revision            0

description         a flock of birds in your terminal

long_description    ${name} draws Craig Reynolds' boids flocking simulation \
                    in braille or sextant characters in any terminal, and as \
                    sprites over the Kitty graphics protocol in Kitty and \
                    Ghostty. The flock can write words, tell the time, draw \
                    pictures, be hunted by hawks, fly in three dimensions, and \
                    take flight from any text piped into it.

categories          games
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  356ff573eadfde3c6a9c0a3d5126d66b04c01878 \
                    sha256  2daa4d0f17c74c6fef208bfd849c8f6920cec58fa3408e00d28fddf2a8fdb073 \
                    size    28188129

test.run            yes
test.target         test

post-destroot {
    set cbirds ${destroot}${prefix}/bin/${name}

    set bash_completion ${prefix}/share/bash-completion/completions
    xinstall -d ${destroot}${bash_completion}
    system "${cbirds} --completion bash > ${destroot}${bash_completion}/${name}"

    set zsh_completion ${prefix}/share/zsh/site-functions
    xinstall -d ${destroot}${zsh_completion}
    system "${cbirds} --completion zsh > ${destroot}${zsh_completion}/_${name}"

    set fish_completion ${prefix}/share/fish/vendor_completions.d
    xinstall -d ${destroot}${fish_completion}
    system "${cbirds} --completion fish > ${destroot}${fish_completion}/${name}.fish"

    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} LICENSE README.md ${destroot}${docdir}
}
