hamsterdb 2.1.10

Closes Homebrew/homebrew#39066.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Alex Dunn 2015-04-25 17:30:38 -07:00 committed by Mike McQuaid
parent 295e9a297c
commit 26e76252b1

View file

@ -1,7 +1,14 @@
class Hamsterdb < Formula
homepage "http://hamsterdb.com"
url "http://files.hamsterdb.com/dl/hamsterdb-2.1.9.tar.gz"
sha1 "036817e4ccc9c4b23affb987c149ebd04696f1d0"
url "http://files.hamsterdb.com/dl/hamsterdb-2.1.10.tar.gz"
sha256 "8fced5607847e234133b2baa379e7ff3d763ffa51546b27f1e3c5f1aef33493e"
head do
url "https://github.com/cruppstahl/hamsterdb.git"
depends_on "automake" => :build
depends_on "autoconf" => :build
depends_on "libtool" => :build
end
bottle do
cellar :any
@ -13,48 +20,38 @@ class Hamsterdb < Formula
option "without-java", "Do not build the Java wrapper"
option "without-remote", "Disable access to remote databases"
head do
url "https://github.com/cruppstahl/hamsterdb.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "boost"
depends_on "gnutls"
depends_on :java => :recommended
depends_on "protobuf" if build.with? "remote"
resource "libuv" do
url "https://github.com/libuv/libuv/archive/v0.10.31.tar.gz"
sha1 "9ab8ecb10f90ce13404ff58ff85cb774472e2cb9"
end
stable do
# patch upstream commits:
# https://github.com/cruppstahl/hamsterdb/commit/6a8dd20ec9bd2ec718d1136db7667e0e58911003
# https://github.com/cruppstahl/hamsterdb/commit/1447ba4eb217532e8fb49c4a84a0dc3b982a3ffe
patch do
url "https://gist.githubusercontent.com/xu-cheng/0d5fa0b6b81426f68271/raw/47ff326c43a1865cda8e9fa9d00434c68efa7e13/hamsterdb.diff"
sha1 "e83346c3afc92d6450ceef1c34adce1a515b245e"
end
url "https://github.com/libuv/libuv/archive/v0.10.36.tar.gz"
sha256 "421087044cab642f038c190f180d96d6a1157be89adb4630881930495b8f5228"
end
fails_with :clang do
build 503
cause "error: member access into incomplete type 'const std::type_info'"
cause "error: member access into incomplete type 'const std::type_info"
end
fails_with :llvm do
build 2336
cause "error: forward declaration of 'const struct std::type_info'"
end
def install
system "/bin/sh", "bootstrap.sh" if build.head?
system "./bootstrap.sh" if build.head?
features = []
args = %W[
--disable-debug
--disable-dependency-tracking
--prefix=#{prefix}
]
if build.with? "java"
features << "JDK=#{ENV["JAVA_HOME"]}"
args << "JDK=#{ENV["JAVA_HOME"]}"
else
features << "--disable-java"
args << "--disable-java"
end
if build.with? "remote"
@ -68,16 +65,19 @@ class Hamsterdb < Formula
ENV.prepend "CFLAGS", "-I#{libexec}/libuv/include"
ENV.prepend "CPPFLAGS", "-I#{libexec}/libuv/include"
else
features << "--disable-remote"
args << "--disable-remote"
end
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}",
*features
system "./configure", *args
system "make", "install"
share.install "samples"
end
test do
system "#{bin}/ham_info -h"
system bin/"ham_info", "-h"
system ENV.cc, "-I#{include}", "-L#{lib}", "-lhamsterdb",
share/"samples/db1.c", "-o", "test"
system "./test"
end
end