mongodb@3.4: remove go_resource

master
commitay 2018-01-09 13:21:03 +10:00 committed by FX Coudert
parent c54047251a
commit 0b051c1d93
1 changed files with 7 additions and 13 deletions

View File

@ -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}