diff --git a/Formula/mongodb@3.4.rb b/Formula/mongodb@3.4.rb index 9fa80398d2b..54b567bd6fa 100644 --- a/Formula/mongodb@3.4.rb +++ b/Formula/mongodb@3.4.rb @@ -1,5 +1,3 @@ -require "language/go" - class MongodbAT34 < Formula desc "High-performance, schema-free, document-oriented database" homepage "https://www.mongodb.org/" @@ -24,13 +22,6 @@ class MongodbAT34 < Formula depends_on "scons" => :build depends_on "openssl" => :recommended - go_resource "github.com/mongodb/mongo-tools" do - url "https://github.com/mongodb/mongo-tools.git", - :tag => "r3.4.10", - :revision => "4f093ae71cdb4c6a6e9de7cd1dc67ea4405f0013", - :shallow => false - end - needs :cxx11 def install @@ -42,9 +33,13 @@ class MongodbAT34 < Formula # New Go tools have their own build script but the server scons "install" target is still # responsible for installing them. - Language::Go.stage_deps resources, buildpath/"src" - cd "src/github.com/mongodb/mongo-tools" do + cd "src/mongo/gotools" do + inreplace "build.sh" do |s| + s.gsub! "$(git describe)", version.to_s + s.gsub! "$(git rev-parse HEAD)", "homebrew" + end + args = %w[] if build.with? "openssl" @@ -58,8 +53,7 @@ class MongodbAT34 < Formula system "./build.sh", *args end - mkdir "src/mongo-tools" - cp Dir["src/github.com/mongodb/mongo-tools/bin/*"], "src/mongo-tools/" + (buildpath/"src/mongo-tools").install Dir["src/mongo/gotools/bin/*"] args = %W[ --prefix=#{prefix}