diff options
| author | Kamil Figiela | 2014-11-19 17:57:48 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-11-20 16:13:19 +0000 |
| commit | 1bf89483cbd8ee867240c47414277b38792fdbed (patch) | |
| tree | cc5579a9cdb5b37cb25a225475cb634ce2dfedc3 /Library | |
| parent | 8107c753ad7ead04fc961af38ed18a3e92dd721a (diff) | |
| download | homebrew-1bf89483cbd8ee867240c47414277b38792fdbed.tar.bz2 | |
simple-amqp-client 2.4.0 (new formula)
Closes #34322.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/simple-amqp-client.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Library/Formula/simple-amqp-client.rb b/Library/Formula/simple-amqp-client.rb new file mode 100644 index 000000000..2742b5b73 --- /dev/null +++ b/Library/Formula/simple-amqp-client.rb @@ -0,0 +1,35 @@ +require "formula" + +class SimpleAmqpClient < Formula + homepage "https://github.com/alanxz/SimpleAmqpClient" + url "https://github.com/alanxz/SimpleAmqpClient/archive/v2.4.0.tar.gz" + sha1 "5b24c79a34dc8c97ff5dd0c78d545b9f507478a5" + head "https://github.com/alanxz/SimpleAmqpClient.git", :branch => "master" + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "rabbitmq-c" + depends_on "boost" + + def install + system "cmake", ".", *std_cmake_args + system "make", "install" + end + + test do + (testpath/'test.cpp').write <<-EOS.undent + #include <SimpleAmqpClient/SimpleAmqpClient.h> + #include <string> + int main() { + const std::string expected = "test body"; + AmqpClient::BasicMessage::ptr_t msg = AmqpClient::BasicMessage::Create(expected); + + if(msg->Body() != expected) return 1; + + return 0; + } + EOS + system ENV.cxx, "test.cpp", "-lSimpleAmqpClient", "-o", "test" + system "./test" + end +end |
