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 r or brew cask install r-app - 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-SP5/MonetDB-11.25.23.tar.xz" sha256 "8f3a39cfcd11dc81746e062795a8e46eb9b1ca9fdf03a3dbd5290826f62d1c07" bottle do sha256 "12d3f6ae822f8ffb1fcd7e0ab96d686b11443b7ebb45479dceef5f544fd80e61" => :sierra sha256 "d592260532f1f7aa0aec9879d9d476d1d0f6c975952240cef888f4d81805b702" => :el_capitan sha256 "66886b1fc8db4d6f3512501f973480459699951d6bac9b7f8ade86c68f6e1840" => :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