diff options
| author | Jack Nagel | 2014-05-19 13:57:37 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-05-19 14:00:23 -0500 |
| commit | 3e0bad211a4b5682d36f9d8081bd6607ee738ffb (patch) | |
| tree | 7990835ad6d644d7d71afa32e0cd19cb08c0ad43 /Library | |
| parent | 21dcf58a8043b88a97c35f9119fafaad0e707940 (diff) | |
| download | homebrew-3e0bad211a4b5682d36f9d8081bd6607ee738ffb.tar.bz2 | |
mongodb: always pass --osx-version-min
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/mongodb.rb | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/Library/Formula/mongodb.rb b/Library/Formula/mongodb.rb index b9847c821..5158b5c07 100644 --- a/Library/Formula/mongodb.rb +++ b/Library/Formula/mongodb.rb @@ -1,4 +1,4 @@ -require 'formula' +require "formula" class Mongodb < Formula homepage "http://www.mongodb.org/" @@ -16,9 +16,7 @@ class Mongodb < Formula sha1 "43449a69c3386e13fdb6abb2b13933f3ba607cc5" end - head do - url "https://github.com/mongodb/mongo.git" - end + head "https://github.com/mongodb/mongo.git" option "with-boost", "Compile using installed boost, not the version shipped with mongodb" depends_on "boost" => :optional @@ -27,37 +25,31 @@ class Mongodb < Formula depends_on "openssl" => :optional def install - args = ["--prefix=#{prefix}", "-j#{ENV.make_jobs}"] - - if ENV.compiler == :clang && MacOS.version >= :mavericks - # when building on Mavericks with libc++ - # Use --osx-version-min=10.9 such that the compiler defaults to libc++. - # Upstream issue discussing the default flags: - # https://jira.mongodb.org/browse/SERVER-12682 - args << "--osx-version-min=10.9" - end - - args << '--64' if MacOS.prefer_64_bit? - args << "--cc=#{ENV.cc}" - args << "--cxx=#{ENV.cxx}" + args = %W[ + --prefix=#{prefix} + -j#{ENV.make_jobs} + --cc=#{ENV.cc} + --cxx=#{ENV.cxx} + --osx-version-min=#{MacOS.version} + ] # --full installs development headers and client library, not just binaries # (only supported pre-2.7) args << "--full" if build.stable? args << "--use-system-boost" if build.with? "boost" + args << "--64" if MacOS.prefer_64_bit? - if build.with? 'openssl' - args << '--ssl' - args << "--extrapath=#{Formula["openssl"].opt_prefix}" + if build.with? "openssl" + args << "--ssl" << "--extrapath=#{Formula["openssl"].opt_prefix}" end - scons 'install', *args + scons "install", *args (buildpath+"mongod.conf").write mongodb_conf etc.install "mongod.conf" - (var+'mongodb').mkpath - (var+'log/mongodb').mkpath + (var+"mongodb").mkpath + (var+"log/mongodb").mkpath end def mongodb_conf; <<-EOS.undent @@ -114,6 +106,6 @@ class Mongodb < Formula end test do - system "#{bin}/mongod", '--sysinfo' + system "#{bin}/mongod", "--sysinfo" end end |
