homebrew-core/Formula/amqp-cpp.rb

43 lines
1.3 KiB
Ruby

class AmqpCpp < Formula
desc "C++ library for communicating with a RabbitMQ message broker"
homepage "https://github.com/CopernicaMarketingSoftware/AMQP-CPP"
url "https://github.com/CopernicaMarketingSoftware/AMQP-CPP/archive/v4.1.7.tar.gz"
sha256 "71b504f21f62b69c76b371fe7044e0dfc6d42650a15c267431c5084badb0ade7"
license "Apache-2.0"
head "https://github.com/CopernicaMarketingSoftware/AMQP-CPP.git"
bottle do
cellar :any_skip_relocation
sha256 "1bc7470b4ede09d2c270b3581f0e0c791943f050be7c2695dfc6f983a5dfc93a" => :catalina
sha256 "dc608777daa46c2b4ac309992b6e958446e812efcd511f4670cef9dc9cf10aeb" => :mojave
sha256 "2e4c08dc2967f679c6dc9179dd6d1513309843bf40ab56fee369f863a44e3912" => :high_sierra
end
depends_on "cmake" => :build
depends_on "openssl@1.1"
def install
ENV.cxx11
system "cmake", "-DBUILD_SHARED=ON",
"-DCMAKE_MACOSX_RPATH=1",
"-DAMQP-CPP_LINUX_TCP=ON",
*std_cmake_args
system "make"
system "make", "install"
end
test do
(testpath/"test.cpp").write <<~EOS
#include <amqpcpp.h>
int main()
{
return 0;
}
EOS
system ENV.cxx, "test.cpp", "-std=c++11", "-L#{lib}", "-o",
"test", "-lc++", "-lamqpcpp"
system "./test"
end
end