49 lines
1.6 KiB
Ruby
49 lines
1.6 KiB
Ruby
class Abcmidi < Formula
|
|
desc "Converts abc music notation files to MIDI files"
|
|
homepage "http://www.ifdo.ca/~seymour/runabc/top.html"
|
|
url "http://www.ifdo.ca/~seymour/runabc/abcMIDI-2017.10.18.zip"
|
|
version "2017-10-18"
|
|
sha256 "a3299db678dfb1699226950f9711d330fcfd83c9689e26a7337affe2120b6986"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "ef3b73763c4a8018d3e4b7bf28305139ee701c321cee7a113e1f4fb238875a5b" => :high_sierra
|
|
sha256 "a89f986b617c9d8195eee723c1fb4c84a16ede0c0c40b6196fea26c986b52ea9" => :sierra
|
|
sha256 "6c389514c4a79edd31d40af8af23ce5c66b39831ed30e6624d1e6ef13eef7aa3" => :el_capitan
|
|
end
|
|
|
|
def install
|
|
# configure creates a "Makefile" file. A "makefile" file already exist in
|
|
# the tarball. On case-sensitive file-systems, the "makefile" file won't
|
|
# be overridden and will be chosen over the "Makefile" file.
|
|
rm "makefile"
|
|
|
|
system "./configure", "--disable-debug",
|
|
"--prefix=#{prefix}",
|
|
"--mandir=#{man}"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"balk.abc").write <<~EOS
|
|
X: 1
|
|
T: Abdala
|
|
F: https://www.youtube.com/watch?v=YMf8yXaQDiQ
|
|
L: 1/8
|
|
M: 2/4
|
|
K:Cm
|
|
Q:1/4=180
|
|
%%MIDI bassprog 32 % 32 Acoustic Bass
|
|
%%MIDI program 23 % 23 Tango Accordian
|
|
%%MIDI bassvol 69
|
|
%%MIDI gchord fzfz
|
|
|:"G"FDEC|D2C=B,|C2=B,2 |C2D2 |\
|
|
FDEC |D2C=B,|C2=B,2 |A,2G,2 :|
|
|
|:=B,CDE |D2C=B,|C2=B,2 |C2D2 |\
|
|
=B,CDE |D2C=B,|C2=B,2 |A,2G,2 :|
|
|
|:C2=B,2 |A,2G,2| C2=B,2|A,2G,2 :|
|
|
EOS
|
|
|
|
system "#{bin}/abc2midi", (testpath/"balk.abc")
|
|
end
|
|
end
|