2012-06-19 20:19:41 +00:00
|
|
|
class Abcmidi < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Converts abc music notation files to MIDI files"
|
2015-02-22 20:21:00 +00:00
|
|
|
homepage "http://www.ifdo.ca/~seymour/runabc/top.html"
|
2015-08-06 04:40:10 +00:00
|
|
|
url "http://ifdo.ca/~seymour/runabc/abcMIDI-2015-08-06.zip"
|
|
|
|
version "2015-08-06"
|
|
|
|
sha256 "6ada64028344b5d778714bca02e41ed98a97c656aa45ea0e4a21de926502304e"
|
2012-06-19 20:19:41 +00:00
|
|
|
|
2014-12-11 13:01:30 +00:00
|
|
|
bottle do
|
2016-02-23 11:07:18 +00:00
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "aa5e2f014d6b0cfccc6170c01db070dde3e55b8c620792d64f94da49d59d32d4" => :el_capitan
|
2015-08-06 19:46:10 +00:00
|
|
|
sha256 "e427b95a6b3a7d1ee12b5cd2d30bdd87f41bc77a8834fc9f15bfe4d77f22e1db" => :yosemite
|
|
|
|
sha256 "211c580f9941f3e3c6189c57ebb902e33bcfc54d24292de4e08f7a146d2c85e1" => :mavericks
|
|
|
|
sha256 "09c43c49c3a7dae429429acc2a31b0942ba540636fa598a648576e007cde988f" => :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
|
|
|
|
2015-08-06 04:40:10 +00:00
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--mandir=#{man}"
|
2013-04-03 04:39:26 +00:00
|
|
|
# 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
|