homebrew-core/Formula/monetdb.rb
2017-03-03 12:40:45 +01:00

74 lines
2.3 KiB
Ruby

class RRequirement < Requirement
fatal true
satisfy { which("r") }
def message; <<-EOS.undent
R not found. The R integration module requires R.
Do one of the following:
- install R
-- run brew install homebrew/science/r or brew install Caskroom/cask/r
- remove the --with-r option
EOS
end
end
class Monetdb < Formula
desc "Column-store database"
homepage "https://www.monetdb.org/"
url "https://www.monetdb.org/downloads/sources/Dec2016-SP2/MonetDB-11.25.9.tar.xz"
sha256 "45bacc0c674060eb1d2ec3dff2a36520d3f42b6c2461d2dd06a19f239a05ab6e"
bottle do
sha256 "863f0929818eba6bbf36a215222ceaca331b6184f769ca7014bfc3c41c94d125" => :sierra
sha256 "4931934f807e3b36f26213af4435d446c5c7f62090e790d3e8c66c127512e17d" => :el_capitan
sha256 "d09dbbce271600b7d05743dead244e5f3c6f49bbe645d1c0a0b2622f18e2b008" => :yosemite
end
head do
url "https://dev.monetdb.org/hg/MonetDB", :using => :hg
depends_on "libtool" => :build
depends_on "gettext" => :build
depends_on "automake" => :build
depends_on "autoconf" => :build
end
option "with-java", "Build the JDBC driver"
option "with-ruby", "Build the Ruby driver"
option "with-r", "Build the R integration module"
depends_on RRequirement => :optional
depends_on "pkg-config" => :build
depends_on :ant => :build
depends_on "libatomic_ops" => [:build, :recommended]
depends_on "pcre"
depends_on "readline" # Compilation fails with libedit.
depends_on "openssl"
depends_on "unixodbc" => :optional # Build the ODBC driver
depends_on "geos" => :optional # Build the GEOM module
depends_on "gsl" => :optional
depends_on "homebrew/science/cfitsio" => :optional
depends_on "homebrew/php/libsphinxclient" => :optional
def install
ENV["M4DIRS"] = "#{Formula["gettext"].opt_share}/aclocal" if build.head?
system "./bootstrap" if build.head?
args = ["--prefix=#{prefix}",
"--enable-debug=no",
"--enable-assert=no",
"--enable-optimize=yes",
"--enable-testing=no",
"--with-readline=#{Formula["readline"].opt_prefix}"]
args << "--with-java=no" if build.without? "java"
args << "--with-rubygem=no" if build.without? "ruby"
args << "--disable-rintegration" if build.without? "r"
system "./configure", *args
system "make", "install"
end
end