# -*- 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.06.27
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  03c7e53e28244b347e063f25533516577eb9b48f \
                    sha256  617b4e8b2cb4608677627e2b04998d0ff252e95d63d8694b1b763376c9b6c8cd \
                    size    638066

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