2013-08-23 18:40:56 +00:00
|
|
|
class MongoC < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Official C driver for MongoDB"
|
2015-05-15 20:05:53 +00:00
|
|
|
homepage "https://docs.mongodb.org/ecosystem/drivers/c/"
|
2015-05-18 22:08:34 +00:00
|
|
|
url "https://github.com/mongodb/mongo-c-driver/releases/download/1.1.6/mongo-c-driver-1.1.6.tar.gz"
|
|
|
|
sha256 "231d0d038c848e8871fa03b70f74284dd8481734eac2bf05fb240e94c9279130"
|
2014-01-04 20:24:32 +00:00
|
|
|
|
2014-06-02 18:10:41 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-05-20 14:05:42 +00:00
|
|
|
sha256 "6571abb550a8146d222858b7de9caae8380811ccf8846f27f99c4e50effde596" => :yosemite
|
|
|
|
sha256 "3eb421698b3dd3a4a9ebc0d6a204904e14b8282165e02b539b1618280707d20c" => :mavericks
|
|
|
|
sha256 "c8bbcc45d57d43297b38632b1890e77613509ae3bd497f84ba18dd6e3e9264ba" => :mountain_lion
|
2014-06-02 18:10:41 +00:00
|
|
|
end
|
|
|
|
|
2015-02-21 19:14:31 +00:00
|
|
|
head do
|
|
|
|
url "https://github.com/mongodb/mongo-c-driver.git"
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
2015-02-21 01:14:26 +00:00
|
|
|
|
2014-07-21 02:17:57 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "libbson"
|
2015-02-21 05:03:15 +00:00
|
|
|
depends_on "openssl" => :recommended
|
2013-08-23 18:40:56 +00:00
|
|
|
|
|
|
|
def install
|
2014-10-29 04:09:48 +00:00
|
|
|
# --enable-sasl=no: https://jira.mongodb.org/browse/CDRIVER-447
|
2015-02-21 05:03:15 +00:00
|
|
|
args = ["--prefix=#{prefix}", "--enable-sasl=no"]
|
|
|
|
|
2015-02-21 19:14:31 +00:00
|
|
|
if build.head?
|
|
|
|
system "./autogen.sh"
|
|
|
|
end
|
|
|
|
|
2015-05-15 20:05:53 +00:00
|
|
|
if build.with?("openssl")
|
2015-02-21 05:03:15 +00:00
|
|
|
args << "--enable-ssl=yes"
|
|
|
|
else
|
|
|
|
args << "--enable-ssl=no"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", *args
|
2014-01-04 20:24:32 +00:00
|
|
|
system "make", "install"
|
2013-08-23 18:40:56 +00:00
|
|
|
end
|
|
|
|
end
|