2013-11-13 17:11:21 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libmongoclient < Formula
|
|
|
|
homepage 'http://www.mongodb.org'
|
2014-05-06 13:24:31 +00:00
|
|
|
url 'https://github.com/mongodb/mongo-cxx-driver/archive/legacy-0.0-26compat-2.6.1.tar.gz'
|
|
|
|
sha1 'a45e66d5182ede6b3a0f5bd5e020ebeb48dbddbe'
|
2013-11-13 17:11:21 +00:00
|
|
|
|
2014-04-18 22:51:08 +00:00
|
|
|
head 'https://github.com/mongodb/mongo-cxx-driver.git', :branch => "26compat"
|
2013-11-13 17:11:21 +00:00
|
|
|
|
2014-07-03 19:34:34 +00:00
|
|
|
bottle do
|
|
|
|
sha1 "794336b0ae7cc2b867954e690ac640e299d063fd" => :mavericks
|
|
|
|
sha1 "6301b5f949e5b17b3e8d620bf17a9981cf5a6add" => :mountain_lion
|
|
|
|
sha1 "ba48eff313704008c2bb581174b1cb7dffe866d4" => :lion
|
|
|
|
end
|
|
|
|
|
2014-04-21 07:23:58 +00:00
|
|
|
option :cxx11
|
|
|
|
|
2013-11-13 17:11:21 +00:00
|
|
|
depends_on 'scons' => :build
|
2014-04-21 07:23:58 +00:00
|
|
|
|
|
|
|
if build.cxx11?
|
|
|
|
depends_on 'boost' => 'c++11'
|
|
|
|
else
|
|
|
|
depends_on 'boost'
|
|
|
|
end
|
2013-11-13 17:11:21 +00:00
|
|
|
|
|
|
|
def install
|
2014-04-21 07:23:58 +00:00
|
|
|
ENV.cxx11 if build.cxx11?
|
|
|
|
|
2014-02-26 04:50:50 +00:00
|
|
|
boost = Formula["boost"].opt_prefix
|
2013-12-06 04:08:13 +00:00
|
|
|
|
2013-11-13 17:11:21 +00:00
|
|
|
args = [
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"-j#{ENV.make_jobs}",
|
|
|
|
"--cc=#{ENV.cc}",
|
|
|
|
"--cxx=#{ENV.cxx}",
|
2013-12-18 15:42:33 +00:00
|
|
|
"--extrapath=#{boost}",
|
2013-11-13 17:11:21 +00:00
|
|
|
"--full",
|
|
|
|
"--use-system-all",
|
2014-04-21 07:23:58 +00:00
|
|
|
"--sharedclient",
|
|
|
|
# --osx-version-min is required to override --osx-version-min=10.6 added
|
|
|
|
# by SConstruct which causes "invalid deployment target for -stdlib=libc++"
|
|
|
|
# when using libc++
|
|
|
|
"--osx-version-min=#{MacOS.version}",
|
2013-11-13 17:11:21 +00:00
|
|
|
]
|
|
|
|
|
2014-04-21 07:23:58 +00:00
|
|
|
args << "--libc++" if MacOS.version >= :mavericks
|
2013-11-13 17:11:21 +00:00
|
|
|
|
2014-04-18 22:51:08 +00:00
|
|
|
scons *args
|
2013-11-13 17:11:21 +00:00
|
|
|
end
|
|
|
|
end
|