Skip to content

Commit

Permalink
[email protected]: remove options
Browse files Browse the repository at this point in the history
  • Loading branch information
commitay committed Oct 31, 2018
1 parent 5ab06dc commit d7a87dc
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ class GoAT19 < Formula

keg_only :versioned_formula

option "without-cgo", "Build without cgo (also disables race detector)"
option "without-race", "Build without race detector"

depends_on :macos => :mountain_lion

resource "gotools" do
Expand Down Expand Up @@ -45,7 +42,6 @@ def install
cd "src" do
ENV["GOROOT_FINAL"] = libexec
ENV["GOOS"] = "darwin"
ENV["CGO_ENABLED"] = "0" if build.without?("cgo")
system "./make.bash", "--no-clean"
end

Expand All @@ -54,11 +50,7 @@ def install
libexec.install Dir["*"]
bin.install_symlink Dir[libexec/"bin/go*"]

# Race detector only supported on amd64 platforms.
# https://golang.org/doc/articles/race_detector.html
if build.with?("cgo") && build.with?("race") && MacOS.prefer_64_bit?
system bin/"go", "install", "-race", "std"
end
system bin/"go", "install", "-race", "std"

# Build and install godoc
ENV.prepend_path "PATH", bin
Expand Down Expand Up @@ -100,9 +92,7 @@ def caveats; <<~EOS
assert_predicate libexec/"bin/godoc", :exist?
assert_predicate libexec/"bin/godoc", :executable?

if build.with? "cgo"
ENV["GOOS"] = "freebsd"
system bin/"go", "build", "hello.go"
end
ENV["GOOS"] = "freebsd"
system bin/"go", "build", "hello.go"
end
end

0 comments on commit d7a87dc

Please sign in to comment.