# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2

PortSystem              1.0
PortGroup               github 1.0
PortGroup               makefile 1.0

name                    orca
github.setup            hundredrabbits Orca-c 9df9786e2ad3c01955cdf4cdd5ae1fffad8fa5cc
github.tarball_from     archive
version                 20250416
revision                0

categories              audio lang
license                 MIT
maintainers             nomaintainer

description             C implementation of the ORCΛ language \
                        and terminal livecoding environment.
long_description        Orca is a two-dimensional esoteric programming \
                        language in which every letter of the alphabet \
                        is an operator, where lowercase letters operate \
                        on bang, uppercase letters operate each frame. The \
                        application is not a synthesiser, but a flexible \
                        livecoding environment capable of sending MIDI, \
                        OSC & UDP to your audio interface, like Ableton, \
                        Renoise, VCV Rack or SuperCollider.

homepage                https://100r.co/site/orca.html

checksums               rmd160  51a669d6b1b4bec163ca197cb64f4bf4073b5b12 \
                        sha256  8c1d3b32b4c78e8cd612dacddebb010532ed3d5041a18bea2bce23d04c092a56 \
                        size    80494

depends_lib             port:ncurses \
                        port:portmidi

patchfiles              patch-tool.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/tool
}

build.target            release

destroot {
    set examples_dir    ${destroot}${prefix}/share/examples/${name}
    set doc_dir         ${destroot}${prefix}/share/doc/${name}

    xinstall -d -m 0755 ${examples_dir}/basics ${examples_dir}/benchmarks \
    ${examples_dir}/misc ${examples_dir}/setups ${doc_dir}
    xinstall -m 0644 {*}[glob ${worksrcpath}/examples/basics/*.orca] \
    ${examples_dir}/basics
    xinstall -m 0644 {*}[glob ${worksrcpath}/examples/benchmarks/*.orca] \
    ${examples_dir}/benchmarks
    xinstall -m 0644 {*}[glob ${worksrcpath}/examples/misc/*.orca] \
    ${examples_dir}/misc
    xinstall -m 0644 {*}[glob ${worksrcpath}/examples/setups/*.orca] \
    ${examples_dir}/setups
    xinstall -m 0644 -W ${worksrcpath} LICENSE.md README.md ${doc_dir}
    xinstall -m 0755 ${build.dir}/build/orca ${destroot}${prefix}/bin
}

notes "
To get started, see ${prefix}/share/doc/${name}/README.md and
${prefix}/share/examples/${name}/.
"

livecheck.type          none
