Commit 4ec52188 authored by Ed Reel's avatar Ed Reel

Update go from 1.9.1 to 1.9.3

parent 4e14a5d5
......@@ -3,69 +3,63 @@ require 'package'
class Go < Package
description 'Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.'
homepage 'https://golang.org/'
version '1.9.1'
source_url 'https://storage.googleapis.com/golang/go1.9.1.src.tar.gz'
source_sha256 'a84afc9dc7d64fe0fa84d4d735e2ece23831a22117b50dafc75c1484f1cb550e'
version '1.9.3'
source_url 'https://dl.google.com/go/go1.9.3.src.tar.gz'
source_sha256 '4e3d0ad6e91e02efa77d54e86c8b9e34fbe1cbc2935b6d38784dca93331c47ae'
binary_url ({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/go-1.9-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/go-1.9-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/go-1.9-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/go-1.9-chromeos-x86_64.tar.xz',
})
binary_sha256 ({
aarch64: '5f3f49f4e983af9524115762b6a5533f152328527558b5c42c6d70bfd79aa71b',
armv7l: '5f3f49f4e983af9524115762b6a5533f152328527558b5c42c6d70bfd79aa71b',
i686: '05830ea2da5c99cc0dc6bf2e28b9856f0144400409444dfb638bf588af6764ef',
x86_64: '3d2a2b96b756914ca1612405926196e1058a149bc85641e08f657d345d5593f1',
})
# Tests requires perl
depends_on 'perl' => :build
# go is required to build versions of go > 1.4
unless File.exist? "#{CREW_PREFIX}/lib/go/bin/go"
unless File.exist? "#{CREW_PREFIX}/share/go/bin/go"
depends_on 'go_bootstrap' => :build
end
def self.build
FileUtils.cd('src') do
# install with go_bootstrap if go is not in the path
unless File.exist? "#{CREW_PREFIX}/lib/go/bin/go"
unless File.exist? "#{CREW_PREFIX}/share/go/bin/go"
system "GOROOT_BOOTSTRAP=#{CREW_PREFIX}/lib/go_bootstrap/go \
TMPDIR=#{CREW_PREFIX}/tmp \
GOROOT_FINAL=#{CREW_PREFIX}/lib/go \
GOROOT_FINAL=#{CREW_PREFIX}/share/go \
./make.bash"
else
system "GOROOT_BOOTSTRAP=#{CREW_PREFIX}/lib/go \
system "GOROOT_BOOTSTRAP=#{CREW_PREFIX}/share/go \
TMPDIR=#{CREW_PREFIX}/tmp \
GOROOT_FINAL=#{CREW_PREFIX}/lib/go \
GOROOT_FINAL=#{CREW_PREFIX}/share/go \
./make.bash"
end
end
end
def self.install
dest = "#{CREW_DEST_DIR}#{CREW_PREFIX}/lib/"
dest = "#{CREW_DEST_PREFIX}/share/"
system "mkdir", "-p", dest
FileUtils.cp_r Dir.pwd, dest
# make a symbolic link for /usr/local/bin/{go,gofmt}
system "mkdir", "-p", "#{CREW_DEST_DIR}#{CREW_PREFIX}/bin"
system "ln", "-s", "#{CREW_PREFIX}/lib/go/bin/go", "#{CREW_DEST_DIR}#{CREW_PREFIX}/bin"
system "ln", "-s", "#{CREW_PREFIX}/lib/go/bin/gofmt", "#{CREW_DEST_DIR}#{CREW_PREFIX}/bin"
system "mkdir", "-p", "#{CREW_DEST_PREFIX}/bin"
system "ln", "-s", "#{CREW_PREFIX}/share/go/bin/go", "#{CREW_DEST_PREFIX}/bin"
system "ln", "-s", "#{CREW_PREFIX}/share/go/bin/gofmt", "#{CREW_DEST_PREFIX}/bin"
end
puts "--------"
puts "Installed Go for #{ARCH} in #{CREW_PREFIX}/lib/go"
puts ""
puts "To use `go run`:"
puts "\texport TMPDIR=#{CREW_PREFIX}/tmp"
puts ""
puts "To develop with `go`:"
puts "\tmkdir -p /usr/local/work/go"
puts "\tln -s /usr/local/work/go $HOME/go"
puts "\texport PATH=\"$HOME/go/bin:$PATH\""
puts "\texport TMPDIR=#{CREW_PREFIX}/tmp"
puts ""
def self.postinstall
puts
puts "Installed Go for #{ARCH} in #{CREW_PREFIX}/share/go".lightblue
puts
puts "To use `go run`, execute the following:".lightblue
puts "export TMPDIR=#{CREW_PREFIX}/tmp".lightblue
puts
puts "To develop with `go`, execute the following:".lightblue
puts "mkdir -p #{CREW_PREFIX}/work/go".lightblue
puts "ln -s #{CREW_PREFIX}/work/go $HOME/go".lightblue
puts "export PATH=\"$HOME/go/bin:$PATH\"".lightblue
puts "export TMPDIR=#{CREW_PREFIX}/tmp".lightblue
puts
end
def self.check
......
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