kafkacat: add optional json support

Closes Homebrew/homebrew#48463.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
Jeremy Johnstone 2016-01-25 19:12:02 -05:00 committed by Dominyk Tiller
parent fb331c718a
commit e321bcabb0

View file

@ -11,11 +11,20 @@ class Kafkacat < Formula
sha256 "a66d6d312498e117d485d7eea58e412da287be1dc08a1be0cd621d6a77763c7f" => :mavericks
end
option "with-yajl", "Adds JSON support"
depends_on "librdkafka"
depends_on "yajl" => :optional
def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
]
args << "--enable-json" if build.with?("yajl")
system "./configure", *args
system "make"
system "make", "install"
end