Skip to content

Commit

Permalink
groonga 4.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmo0920 authored and jacknagel committed Dec 7, 2014
1 parent 97bbedc commit d5ebf04
Showing 1 changed file with 63 additions and 3 deletions.
66 changes: 63 additions & 3 deletions Formula/groonga.rb
Expand Up @@ -2,9 +2,8 @@

class Groonga < Formula
homepage "http://groonga.org/"
url "http://packages.groonga.org/source/groonga/groonga-4.0.7.tar.gz"
sha1 "b00c56c6d7318fe1a87f6f55366182ace4014a2a"
revision 1
url "http://packages.groonga.org/source/groonga/groonga-4.0.8.tar.gz"
sha1 "894bf426c79aaab6e3b1f19811db4634aecdc4c2"

bottle do
sha1 "a9ca194411a8cbac26a7d2fa4083edb802cb445a" => :yosemite
Expand All @@ -13,6 +12,9 @@ class Groonga < Formula
end

depends_on "pkg-config" => :build
depends_on "libtool" => :build
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "pcre"
depends_on "msgpack"
depends_on "mecab" => :optional
Expand All @@ -24,6 +26,16 @@ class Groonga < Formula

option "enable-benchmark", "Enable benchmark program for developer use"

# These patches are already merged into upstream.
# Please remove next version of Groonga Formula.
# pull #253 https://github.com/groonga/groonga/pull/253
# fixed at: https://github.com/groonga/groonga/commit/c019cfbfbf5365c28ce727a46448aa6f77de8543
# issue #254: https://github.com/groonga/groonga/issues/254
# fixed at: https://github.com/groonga/groonga/commit/340085f132c640f03e32a7878f0bd31de9f74eaa
# issue #256: https://github.com/groonga/groonga/issues/256
# fixed at: https://github.com/groonga/groonga/commit/e2aa5217f0967457ae4f7edf799dbf8767400916
patch :DATA

def install
args = %W[
--prefix=#{prefix}
Expand All @@ -37,8 +49,56 @@ def install
args << "--with-mecab" if build.with? "mecab"
args << "--with-lz4" if build.with? "lz4"

# autoreconf must be run, otherwise prebuilt configure may complain
# about a version mismatch between included automake and Homebrew's
system "autoreconf", "--force", "--install"
# ZeroMQ is an optional dependency that will be auto-detected unless we disable it
system "./configure", *args
system "make install"
end
end

__END__
diff --git a/lib/ii.c b/lib/ii.c
index 8f9f9a8..e82dc7f 100644
--- a/lib/ii.c
+++ b/lib/ii.c
@@ -37,6 +37,10 @@
# include <oniguruma.h>
#endif

+#ifndef O_DIRECT
+# define O_DIRECT 0
+#endif
+
#define MAX_PSEG 0x20000
#define S_CHUNK (1 << GRN_II_W_CHUNK)
#define W_SEGMENT 18
diff --git a/lib/grn.h b/lib/grn.h
index ab720ef..868133c 100644
--- a/lib/grn.h
+++ b/lib/grn.h
@@ -174,6 +174,10 @@ typedef SOCKET grn_sock;
# include <unistd.h>
# endif /* HAVE_UNISTD_H */

+# ifndef __off64_t_defined
+typedef off_t off64_t;
+# endif
+
# ifndef PATH_MAX
# if defined(MAXPATHLEN)
# define PATH_MAX MAXPATHLEN
diff --git a/vendor/onigmo/Makefile.am b/vendor/onigmo/Makefile.am
index 03083bd..9219783 100644
--- a/vendor/onigmo/Makefile.am
+++ b/vendor/onigmo/Makefile.am
@@ -7,7 +7,7 @@ CONFIGURE_DEPENDENCIES = \
ALL_DEPEND_TARGETS = onigmo-all
CLEAN_DEPEND_TARGETS = onigmo-clean

-INSTALL_DEPEND_TARGETS =
+INSTALL_DEPEND_TARGETS = onigmo-all
if WITH_SHARED_ONIGMO
INSTALL_DEPEND_TARGETS += onigmo-install
endif

0 comments on commit d5ebf04

Please sign in to comment.