class Abcm2ps < Formula desc "ABC music notation software" homepage "http://moinejf.free.fr" url "https://github.com/leesavide/abcm2ps/archive/v8.13.20.tar.gz" sha256 "20b3480f56c82476474bfa1ff9dcbdef93f3f87650c19219f36ddf759b662ed8" bottle do sha256 "ade517e102ad2d430cebf2314653f4d8bb159cae705d07165f4bdb0bc20f8f80" => :high_sierra sha256 "88edc60e906b7ef549b1bc88191ad4978841fe2000c048f6fbf96b4228c57087" => :sierra sha256 "01c01fb4a7dd14403caa5f2afa8b829b4ab86fa4b08196dd80f34f49422d75b5" => :el_capitan end depends_on "pkg-config" => :build depends_on "pango" => :optional def install system "./configure", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"voices.abc").write <<~EOS X:7 T:Qui Tolis (Trio) C:Andre Raison M:3/4 L:1/4 Q:1/4=92 %%staves {(Pos1 Pos2) Trompette} K:F % V:Pos1 %%MIDI program 78 "Positif"x3 |x3|c'>ba|Pga/g/f|:g2a |ba2 |g2c- |c2P=B |c>de |fga | V:Pos2 %%MIDI program 78 Mf>ed|cd/c/B|PA2d |ef/e/d |:e2f |ef2 |c>BA |GA/G/F |E>FG |ABc- | V:Trompette %%MIDI program 56 "Trompette"z3|z3 |z3 |z3 |:Mc>BA|PGA/G/F|PE>EF|PEF/E/D|C>CPB,|A,G,F,-| EOS system "#{bin}/abcm2ps", testpath/"voices" assert_predicate testpath/"Out.ps", :exist? end end