serdes 5.3.1 (new formula)

Closes #44391.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Dave Thomas 2019-09-18 09:55:51 -07:00 committed by FX Coudert
parent 3bda9ab8f3
commit 6a3bb63802
2 changed files with 45 additions and 2 deletions

View file

@ -13,12 +13,14 @@ class Kafkacat < Formula
sha256 "e09845976996cd838656e0065309e06f65e8446e1f0eb01f471bda2da36553ed" => :sierra
end
depends_on "librdkafka"
depends_on "avro-c"
depends_on "libserdes"
depends_on "yajl"
def install
system "./configure", "--prefix=#{prefix}",
"--enable-json"
"--enable-json",
"--enable-avro"
system "make"
system "make", "install"
end

41
Formula/libserdes.rb Normal file
View file

@ -0,0 +1,41 @@
class Libserdes < Formula
desc "Schema ser/deserializer lib for Avro + Confluent Schema Registry"
homepage "https://github.com/confluentinc/libserdes"
url "https://github.com/confluentinc/libserdes.git",
:tag => "v5.3.1",
:revision => "b259d15f68dce65591700b0ccccb73311db1de3d"
bottle do
cellar :any
end
depends_on "avro-c"
depends_on "librdkafka"
def install
system "./configure", "--prefix=#{prefix}"
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<~EOS
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <librdkafka/rdkafka.h>
#include <serdes-avro.h>
#include <serdes.h>
int main()
{
rd_kafka_conf_t *rk_conf;
rk_conf = rd_kafka_conf_new();
return 0;
}
EOS
system ENV.cc, "test.c", "-I#{include}/libserdes", "-L/usr/local/lib/", "-L#{lib}", "-lrdkafka", "-lserdes", "-o", "test"
system "./test"
end
end