From 6498544e7368e962b6c02886cb16b351f54d80eb Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Sun, 8 Nov 2015 16:48:30 +0900 Subject: [PATCH 1/2] groonga: add HEAD support --- Library/Formula/groonga.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Library/Formula/groonga.rb b/Library/Formula/groonga.rb index e2765e7566f9..d0c3c1b3ca08 100644 --- a/Library/Formula/groonga.rb +++ b/Library/Formula/groonga.rb @@ -10,6 +10,13 @@ class Groonga < Formula sha256 "089a97b55ad3733005d3ae5a7f8a9501dfefb0620c1e484e9021ee2bfb438424" => :mavericks end + head do + url "https://github.com/groonga/groonga.git" + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + option "with-benchmark", "With benchmark program for developer use" deprecated_option "enable-benchmark" => "with-benchmark" @@ -32,10 +39,12 @@ def install --without-libstemmer ] + args << "--with-ruby" if build.head? args << "--enable-benchmark" if build.with? "benchmark" args << "--with-mecab" if build.with? "mecab" args << "--with-lz4" if build.with? "lz4" + system "./autogen.sh" if build.head? # ZeroMQ is an optional dependency that will be auto-detected unless we disable it system "./configure", *args system "make", "install" From b3d0a857bc8c1d74bf60c33bdb4aacb1da90f89e Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Sun, 8 Nov 2015 21:44:29 +0900 Subject: [PATCH 2/2] Condense head related code in install --- Library/Formula/groonga.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Formula/groonga.rb b/Library/Formula/groonga.rb index d0c3c1b3ca08..eed7d289ffd4 100644 --- a/Library/Formula/groonga.rb +++ b/Library/Formula/groonga.rb @@ -39,12 +39,14 @@ def install --without-libstemmer ] - args << "--with-ruby" if build.head? args << "--enable-benchmark" if build.with? "benchmark" args << "--with-mecab" if build.with? "mecab" args << "--with-lz4" if build.with? "lz4" - system "./autogen.sh" if build.head? + if build.head? + 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"