class Abcmidi < Formula desc "Converts abc music notation files to MIDI files" homepage "https://www.ifdo.ca/~seymour/runabc/top.html" url "https://ifdo.ca/~seymour/runabc/abcMIDI-2019.11.11.zip" sha256 "569058c33a7f8b50eded7ed3de38527e3b151fa0fc44cb7981d584044d8681d8" bottle do cellar :any_skip_relocation sha256 "05fdfa7b164403194454f8acc1ea7cb6dc2641471d1a2b2f3e46eee3bd93fb96" => :catalina sha256 "b4bfd68f32338c189cbd0d803579d58bcb6ca13fef320c94322c6f2c05213a77" => :mojave sha256 "d804aed2ba5e35b8a208ab6a82c700464394f728e8b0251badca45ffa2a6166b" => :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