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/Jun2016/MonetDB-11.23.3.zip" sha256 "f34e92b2702b8c6c50ccc35cb030b074bdf19f3eb68487968402ced07a76c63c" bottle do sha256 "9e4fe9ea41c4adb006374dde5998b0cbca7a64d4ae37b1f380a60e97a753c7ad" => :el_capitan sha256 "8fa9e1325966f47d2a0533a1c4e39d40fd0f8b580a7888790e556b63a1e4d1ad" => :yosemite sha256 "4d11db1121dab0e69f5003a6f235fe3204f90536ca231f6580eadab0f87138ca" => :mavericks 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 "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