2012-06-19 20:19:41 +00:00
|
|
|
class Abcmidi < Formula
|
2015-02-22 20:21:00 +00:00
|
|
|
homepage "http://www.ifdo.ca/~seymour/runabc/top.html"
|
|
|
|
url "http://www.ifdo.ca/~seymour/runabc/abcMIDI-2014-12-25.zip"
|
|
|
|
version "2014-12-25"
|
|
|
|
sha1 "a8d9509b32131015f38e0a31432b6c8990607888"
|
2012-06-19 20:19:41 +00:00
|
|
|
|
2014-12-11 13:01:30 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-02-23 08:03:41 +00:00
|
|
|
sha1 "63b792b7623b9706183a9ea6513b53a536899403" => :yosemite
|
|
|
|
sha1 "d75b566f2cef9f3614b04d36847f95a162ae9341" => :mavericks
|
|
|
|
sha1 "1fdd827245c315ab25d8eb8a65e00d02d518e174" => :mountain_lion
|
2014-12-11 13:01:30 +00:00
|
|
|
end
|
|
|
|
|
2012-06-19 20:19:41 +00:00
|
|
|
def install
|
2013-04-03 04:39:26 +00:00
|
|
|
# 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.
|
2015-02-22 20:21:00 +00:00
|
|
|
rm "makefile"
|
2013-04-03 04:39:26 +00:00
|
|
|
|
|
|
|
system "./configure", "--disable-debug", "--prefix=#{prefix}", "--mandir=#{man}"
|
|
|
|
# The Makefile is broken when using --prefix (value is added to path twice).
|
|
|
|
# abcmidi author is notified (2012-06-20). In the meantime, here's a fix.
|
|
|
|
inreplace "Makefile", "$(DESTDIR)${prefix}", "$(DESTDIR)"
|
|
|
|
|
|
|
|
system "make", "install"
|
2012-06-19 20:19:41 +00:00
|
|
|
end
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2014-12-11 12:28:08 +00:00
|
|
|
(testpath/"balk.abc").write <<-EOF.undent
|
|
|
|
X: 1
|
|
|
|
T: Abdala
|
|
|
|
F: http://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 :|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
system "#{bin}/abc2midi", (testpath/"balk.abc")
|
2012-06-19 20:19:41 +00:00
|
|
|
end
|
|
|
|
end
|