# -*- 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             2026.10.04
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/
master_sites        https://ifdo.ca/~seymour/runabc/

checksums           rmd160  56f80695f2a2a293950535c9e9a1fa6bbb628d03 \
                    sha256  9c51181f1354491e06e4a6c511091a85c1489ca5efd5421cd5065fdaeb023ba0 \
                    size    977156

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\]+)
