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

PortSystem          1.0

name                abcMIDI
version             2025.11.26
revision            0

categories          audio
maintainers         {judaew @judaew} openmaintainer
license             GPL-2+

description         Abc to midi and vice versa converter
long_description    ABC is a text-based music notation language. Abc2midi is a program that \
                    converts an abc music notation file to a MIDI file.

homepage            https://ifdo.ca/~seymour/runabc/top.html
master_sites        https://ifdo.ca/~seymour/runabc/

checksums           rmd160  c4bb442136d5184f33707903a0b09c15a6af1c97 \
                    sha256  f89b91aee73746c3e8ec487258fbf82f1e1845741adfcaf49514898f938dc695 \
                    size    638290

use_zip             yes
set worksrcpath     ${workpath}/abcmidi

post-extract {
    file attributes ${worksrcpath}/configure -permissions a+x

    foreach f [glob -types d ${worksrcpath}/*] {
        file attributes ${f} -permissions 0755
    }
}

patchfiles-append   patch-configure.diff

test.run            yes
test {
    system -W ${worksrcpath}/samples "../abc2midi drums.abc"
    system -W ${worksrcpath}/samples "../midi2abc drums1.mid"
}

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     abcMIDI-(20\[0-9\]+\\.\[0-9\]+\\.\[0-9\]+)
