2010-06-14 11:27:12 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Groonga < Formula
|
2010-06-14 11:27:12 +00:00
|
|
|
homepage 'http://groonga.org/'
|
2014-02-10 01:28:39 +00:00
|
|
|
url 'http://packages.groonga.org/source/groonga/groonga-4.0.0.tar.gz'
|
|
|
|
sha1 '9a64d4c98eda4db563bcaf9464504d24dfdb3ff4'
|
2010-06-14 11:27:12 +00:00
|
|
|
|
2012-08-31 15:49:54 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
depends_on 'pcre'
|
2012-06-20 01:27:09 +00:00
|
|
|
depends_on 'msgpack'
|
2014-02-10 09:50:09 +00:00
|
|
|
depends_on "mecab" => :optional
|
|
|
|
depends_on "mecab-ipadic" if build.with? "mecab"
|
2012-06-20 01:27:09 +00:00
|
|
|
|
2013-12-29 09:17:13 +00:00
|
|
|
depends_on 'glib' if build.include? 'enable-benchmark'
|
|
|
|
|
|
|
|
option 'enable-benchmark', "Enable benchmark program for developer use"
|
|
|
|
|
2010-06-14 11:27:12 +00:00
|
|
|
def install
|
2013-12-29 09:17:13 +00:00
|
|
|
args = %W[
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--with-zlib
|
|
|
|
--disable-zeromq
|
|
|
|
]
|
|
|
|
|
2014-02-10 09:50:09 +00:00
|
|
|
args << "--enable-benchmark" if build.include? "enable-benchmark"
|
|
|
|
args << "--with-mecab" if build.with? "mecab"
|
2013-12-29 09:17:13 +00:00
|
|
|
|
2013-01-29 05:00:08 +00:00
|
|
|
# ZeroMQ is an optional dependency that will be auto-detected unless we disable it
|
2013-12-29 09:17:13 +00:00
|
|
|
system "./configure", *args
|
2010-06-14 11:27:12 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|