# -*- 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.02.16
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  b1cebfdb4c3c9c9ebcd290262fa39fa12bab2cfa \
                    sha256  2bbe8a6305d3708e874d3e211c831a52433ea4970bbc81d2d1ce92491c4fee5f \
                    size    638042

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