2014-09-23 14:30:09 +00:00
|
|
|
require "formula"
|
2013-11-13 17:11:21 +00:00
|
|
|
|
|
|
|
class Libmongoclient < Formula
|
2014-09-23 14:30:09 +00:00
|
|
|
homepage "http://www.mongodb.org"
|
2014-10-27 19:37:11 +00:00
|
|
|
url "https://github.com/mongodb/mongo-cxx-driver/archive/legacy-0.0-26compat-2.6.5.tar.gz"
|
|
|
|
sha1 "1cc66854eac8cb79457ec68ba24153b321263430"
|
2013-11-13 17:11:21 +00:00
|
|
|
|
2014-09-23 14:30:09 +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
|
2014-10-27 20:53:51 +00:00
|
|
|
sha1 "eb587e75d00fb4fd1c54c685862513b10586bc5f" => :yosemite
|
|
|
|
sha1 "4e2c8814b0da3941e1006536aace5328ded68892" => :mavericks
|
|
|
|
sha1 "f784fb305307b81b93ecb19f33daea475e4d3762" => :mountain_lion
|
2014-07-03 19:34:34 +00:00
|
|
|
end
|
|
|
|
|
2014-04-21 07:23:58 +00:00
|
|
|
option :cxx11
|
|
|
|
|
2014-09-23 14:30:09 +00:00
|
|
|
depends_on "scons" => :build
|
2014-04-21 07:23:58 +00:00
|
|
|
|
|
|
|
if build.cxx11?
|
2014-09-23 14:30:09 +00:00
|
|
|
depends_on "boost" => "c++11"
|
2014-04-21 07:23:58 +00:00
|
|
|
else
|
2014-09-23 14:30:09 +00:00
|
|
|
depends_on "boost"
|
2014-04-21 07:23:58 +00:00
|
|
|
end
|
2013-11-13 17:11:21 +00:00
|
|
|
|
2014-10-27 19:37:11 +00:00
|
|
|
# Add 10.10 as a recognised OS X version choice.
|
|
|
|
# https://github.com/mongodb/mongo-cxx-driver/pull/185
|
|
|
|
patch :DATA
|
|
|
|
|
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
|
2014-10-27 19:37:11 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
|
|
|
|
diff --git a/SConstruct b/SConstruct
|
|
|
|
index ae0f270..24c8522 100644
|
|
|
|
--- a/SConstruct
|
|
|
|
+++ b/SConstruct
|
|
|
|
@@ -300,7 +300,7 @@ add_option('propagate-shell-environment',
|
|
|
|
0, False)
|
|
|
|
|
|
|
|
if darwin:
|
|
|
|
- osx_version_choices = ['10.6', '10.7', '10.8', '10.9']
|
|
|
|
+ osx_version_choices = ['10.6', '10.7', '10.8', '10.9', '10.10']
|
|
|
|
add_option("osx-version-min", "minimum OS X version to support", 1, True,
|
|
|
|
type = 'choice', default = osx_version_choices[0], choices = osx_version_choices)
|