# $Id: Portfile 118639 2014-04-06 14:12:40Z mww@macports.org $

PortSystem 1.0

name                abcMIDI
version             2014-04-03
categories          audio
platforms           darwin
maintainers         mww
license             GPL
description         ABC to midi and vice versa converter
long_description    ABC is a text-based music notation language. These \
                    tools can convert ABC to midi and vice versa.

homepage            http://ifdo.pugmarks.com/~seymour/runabc/top.html
master_sites        http://ifdo.pugmarks.com/~seymour/runabc/
checksums           rmd160  bc49fff66c8c42c9c46e16cf7ea7c9bc8ae453d9 \
                    sha256  e595b705adb513ea3f5e8b9a503f4e04872b1ad14a11bdfaa006a9ab8a0f5309
patchfiles          patch-makefile.diff

worksrcdir          abcmidi

use_zip             yes
post-extract { xinstall -m 755 ${filespath}/configure ${worksrcpath} }

variant universal   {}

configure.pre_args     PREFIX=${prefix}

destroot {
     xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
     xinstall -m 755 -W ${worksrcpath} abc2abc abc2midi mftext midi2abc \
         yaps ${destroot}${prefix}/bin
     xinstall -m 644 -W ${worksrcpath}/doc abc2abc.1 abc2midi.1 mftext.1 \
         midi2abc.1 yaps.1 ${destroot}${prefix}/share/man/man1
     xinstall -m 644 -W ${worksrcpath}/doc AUTHORS CHANGES abcguide.txt gpl.txt \
         history.txt readme.txt yapshelp.txt \
         ${destroot}${prefix}/share/doc/${name}
}

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

