48 lines
1.6 KiB
Ruby
48 lines
1.6 KiB
Ruby
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.13.zip"
|
|
sha256 "a8f5a4bbb962e50beb73f6345d051c38fadb553442c7c3d1e2fc4b1d1654c640"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "c0e31d3c5ecfcd41701efe279e5cbd69c536afab6e7bf37920b1721b3423a2ec" => :catalina
|
|
sha256 "66b8ea43139dc35bdd6a24e2444986a2a1254945eb89aad7e194c9a08cd34a8f" => :mojave
|
|
sha256 "6eff44b07779d6607aed77226b3628f48c42860ca33975bd9457fece26062995" => :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
|