48 lines
1.4 KiB
Ruby
48 lines
1.4 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.3.10.tar.gz"
|
|
sha256 "4fa1e9650f7a08ae7217899431a3b3f0a173ad826dd819f0b8c760e4e2a65298"
|
|
license "Apache-2.0"
|
|
head "https://github.com/CopernicaMarketingSoftware/AMQP-CPP.git"
|
|
|
|
livecheck do
|
|
url "https://github.com/CopernicaMarketingSoftware/AMQP-CPP/releases/latest"
|
|
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)["' >]}i)
|
|
end
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "7ac83ccaae984ecc6fbd138b417c7613a87049bf15db87bddeb359a9c6168e6a" => :big_sur
|
|
sha256 "04110248cacbc6f2139945936635906e3225a8ca69f2481774c3f23f9918707a" => :catalina
|
|
sha256 "5c90bc9289b6de7c8f7604ee67767cd8df2629b8657bce2652d26d96e812cddc" => :mojave
|
|
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
|