95884bae22
Closes Homebrew/homebrew#42407. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
70 lines
2 KiB
Ruby
70 lines
2 KiB
Ruby
class Rethinkdb < Formula
|
|
desc "The open-source database for the realtime web"
|
|
homepage "http://www.rethinkdb.com/"
|
|
url "http://download.rethinkdb.com/dist/rethinkdb-2.0.4.tgz"
|
|
sha256 "f11094093ea0dbe658b4dd3d8837f9c451713bb5d46c717f060a2947898a10a7"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "642588597a0aae028c67c3037073c2573ad8a634dc9d22710c4bcfc5c9bf31ba" => :yosemite
|
|
sha256 "ce8dee78d046056905196253583730dcfb5abd7b23dc87000f0de6bac6637a8d" => :mavericks
|
|
sha256 "13c65c607f4d919076bad2f74c4d8b5c9929dbd784bee6ab5160e5e94bae48cd" => :mountain_lion
|
|
end
|
|
|
|
depends_on :macos => :lion
|
|
depends_on "boost" => :build
|
|
depends_on "openssl"
|
|
depends_on "icu4c"
|
|
|
|
fails_with :gcc do
|
|
build 5666 # GCC 4.2.1
|
|
cause "RethinkDB uses C++0x"
|
|
end
|
|
|
|
def install
|
|
args = ["--prefix=#{prefix}"]
|
|
|
|
# rethinkdb requires that protobuf be linked against libc++
|
|
# but brew's protobuf is sometimes linked against libstdc++
|
|
args += ["--fetch", "protobuf"]
|
|
|
|
system "./configure", *args
|
|
system "make"
|
|
system "make", "install-osx"
|
|
|
|
mkdir_p "#{var}/log/rethinkdb"
|
|
end
|
|
|
|
def plist; <<-EOS.undent
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>#{plist_name}</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>#{opt_bin}/rethinkdb</string>
|
|
<string>-d</string>
|
|
<string>#{var}/rethinkdb</string>
|
|
</array>
|
|
<key>WorkingDirectory</key>
|
|
<string>#{HOMEBREW_PREFIX}</string>
|
|
<key>StandardOutPath</key>
|
|
<string>#{var}/log/rethinkdb/rethinkdb.log</string>
|
|
<key>StandardErrorPath</key>
|
|
<string>#{var}/log/rethinkdb/rethinkdb.log</string>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>KeepAlive</key>
|
|
<true/>
|
|
</dict>
|
|
</plist>
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
shell_output("#{bin}/rethinkdb create -d test")
|
|
assert File.read("test/metadata").start_with?("RethinkDB")
|
|
end
|
|
end
|