class Abcmidi < Formula desc "Converts abc music notation files to MIDI files" homepage "https://ifdo.ca/~seymour/runabc/top.html" url "https://ifdo.ca/~seymour/runabc/abcMIDI-2019.12.09.zip" sha256 "d9a00f68765a8f0e5bf57e96557ca1c0fc98b4683094ef4ff24a134ecf05e619" bottle do cellar :any_skip_relocation sha256 "8e16ce8828c5e324b41bfe4c1feca501bdb9f9134a39201d552d02268ee8ab34" => :catalina sha256 "c48eb3b843c99b908dd2dcdebbd000dcd149ff7e6804a5764d7994ecd31c6699" => :mojave sha256 "253549953d4c5b0c8b773780bce462dd545dfedd87542d000c8a15177a173d8b" => :high_sierra 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