Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

rtmidi 2.1.0 (new formula) #41125

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions Library/Formula/rtmidi.rb
@@ -0,0 +1,30 @@
class Rtmidi < Formula
desc "C++ classes that provide a common API for realtime MIDI input/output"
homepage "http://www.music.mcgill.ca/~gary/rtmidi/"
url "https://github.com/thestk/rtmidi/archive/2.1.0.tar.gz"
sha256 "52e6822fc413d5d3963c5b7bfe412ed69233bb81a7f04d6097f5b56aafa28934"

depends_on "autoconf" => :build

def install
system "autoconf"
system "./configure", "--prefix=#{prefix}"
system "make", "librtmidi.a"
lib.install Dir["*.a", "*.dylib"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no make install we can use?

include.install Dir["*.h"]
end

test do
(testpath/"test.cpp").write <<-EOS.undent
#include "RtMidi.h"
int main(int argc, char **argv, char **env) {
RtMidiIn midiin;
RtMidiOut midiout;
std::cout << "Input ports: " << midiin.getPortCount() << "\\n"
<< "Output ports: " << midiout.getPortCount() << "\\n";
}
EOS
system ENV.cxx, "test.cpp", "-L#{lib}", "-lrtmidi", "-o", "test"
system "./test"
end
end