Skip to content

Commit

Permalink
groonga: add suggest-plugin option
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#46196.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
  • Loading branch information
cosmo0920 authored and DomT4 committed Nov 21, 2015
1 parent ef1178f commit 6a2e67f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Formula/groonga.rb
Expand Up @@ -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"

Expand All @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 6a2e67f

Please sign in to comment.