2017-02-14 02:58:10 +00:00
|
|
|
class Grpc < Formula
|
|
|
|
desc "Next generation open source RPC library and framework"
|
|
|
|
homepage "http://www.grpc.io/"
|
2017-03-07 19:24:26 +00:00
|
|
|
url "https://github.com/grpc/grpc/archive/v1.1.4.tar.gz"
|
|
|
|
sha256 "45ab5bdfa90ea41b17d4d81edbadcff303158b7cccdf9d7ea196ca9e104b214c"
|
2017-02-14 02:58:10 +00:00
|
|
|
head "https://github.com/grpc/grpc.git"
|
|
|
|
|
2017-02-19 00:52:50 +00:00
|
|
|
bottle do
|
2017-03-07 19:50:43 +00:00
|
|
|
sha256 "da75e9100d176ec3933f651ea13de2028dfe315934ce549bf40101d0fc29d17d" => :sierra
|
|
|
|
sha256 "c8a35517d50636b96be79a64e4eed60c14fc3a4ec8b3091908b3a3a93c377c0a" => :el_capitan
|
|
|
|
sha256 "a038ccd59482d632e80bf22d9c5d54a45eae8f41473d6ee709ba8fba143062d5" => :yosemite
|
2017-02-19 00:52:50 +00:00
|
|
|
end
|
|
|
|
|
2017-02-14 02:58:10 +00:00
|
|
|
depends_on "openssl"
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "protobuf"
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "make", "install", "prefix=#{prefix}"
|
|
|
|
|
|
|
|
system "make", "install-plugins", "prefix=#{prefix}"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.cpp").write <<-EOS.undent
|
|
|
|
#include <grpc/grpc.h>
|
|
|
|
int main() {
|
|
|
|
grpc_init();
|
|
|
|
grpc_shutdown();
|
|
|
|
return GRPC_STATUS_OK;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system ENV.cc, "test.cpp", "-L#{lib}", "-lgrpc", "-o", "test"
|
|
|
|
system "./test"
|
|
|
|
end
|
|
|
|
end
|