forked from sjackman/linuxbrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
abcmidi.rb
48 lines (43 loc) · 1.58 KB
/
abcmidi.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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