From 6a2e67f41d65377ec092c6a17afcf8b3d3efe1f7 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Fri, 20 Nov 2015 15:30:53 +0900 Subject: [PATCH] groonga: add suggest-plugin option Closes Homebrew/homebrew#46196. Signed-off-by: Dominyk Tiller --- Formula/groonga.rb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Formula/groonga.rb b/Formula/groonga.rb index eed7d289ffd48..a1367f803cfa7 100644 --- a/Formula/groonga.rb +++ b/Formula/groonga.rb @@ -18,6 +18,7 @@ class Groonga < Formula end option "with-benchmark", "With benchmark program for developer use" + option "with-suggest-plugin", "With suggest plugin for suggesting" deprecated_option "enable-benchmark" => "with-benchmark" @@ -30,15 +31,26 @@ class Groonga < Formula depends_on "mecab-ipadic" if build.with? "mecab" depends_on "glib" if build.with? "benchmark" + if build.with? "suggest-plugin" + depends_on "libevent" + depends_on "zeromq" + end + def install args = %W[ --prefix=#{prefix} --with-zlib - --disable-zeromq --enable-mruby --without-libstemmer ] + # ZeroMQ is an optional dependency that will be auto-detected unless we disable it + if build.with? "suggest-plugin" + args << "--enable-zeromq" + else + args << "--disable-zeromq" + end + args << "--enable-benchmark" if build.with? "benchmark" args << "--with-mecab" if build.with? "mecab" args << "--with-lz4" if build.with? "lz4" @@ -47,7 +59,7 @@ def install args << "--with-ruby" system "./autogen.sh" end - # ZeroMQ is an optional dependency that will be auto-detected unless we disable it + system "./configure", *args system "make", "install" end