Commit 5abb7bcb authored by Matt Downey's avatar Matt Downey

build go with go_bootstrap when go is not available in the path

parent fa1ad5e6
......@@ -4,10 +4,22 @@ class Go < Package
version '1.7.4'
source_url 'https://storage.googleapis.com/golang/go1.7.4.src.tar.gz'
source_sha1 '0fb305c827c8794cfda7e437befa6101a2d06b2e'
# go is required to build versions of go > 1.4
if `which go` == ''
depends_on 'go_bootstrap'
end
def self.build
FileUtils.cd('src') do
system "TMPDIR=/usr/local/tmp ./make.bash"
# install with go_bootstrap if go is not in the path
if `which go` == ''
system "GOROOT_BOOTSTRAP=/usr/local/lib/go_bootstrap/go \
TMPDIR=/usr/local/tmp \
./make.bash"
else
system "TMPDIR=/usr/local/tmp ./make.bash"
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment