class Abcmidi < Formula desc "Converts abc music notation files to MIDI files" homepage "https://www.ifdo.ca/~seymour/runabc/top.html" url "https://www.ifdo.ca/~seymour/runabc/abcMIDI-2018.03.21.zip" sha256 "7347f8ab521fdfa541d2ab7cb8b5ca2d38cd465a125b33a6d18b14d51452730f" bottle do cellar :any_skip_relocation sha256 "c1299e98338f176a76b76b31087abe21c82847a3d0350f01676601bc9dbf0cee" => :high_sierra sha256 "998e06ffb9e27875532829b0fd2b309c062886193aa80e893c51dcbc4cad5ea7" => :sierra sha256 "767043b36eb8f91d7f018d83c2fb1340a1bdcf47c3460011192ba6731700ec04" => :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