diff options
| author | Adam Vandenberg | 2011-02-21 22:05:21 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2011-02-21 22:05:21 -0800 |
| commit | 82c1a9d96d5af6c22d716231656bb5780575c390 (patch) | |
| tree | c8314a3cd76b98db87b46a8f624a9a635e0a5ff3 /Library/Formula/go.rb | |
| parent | f94e29b800aba8c897cd8dec379cba6d4299faf9 (diff) | |
| download | homebrew-82c1a9d96d5af6c22d716231656bb5780575c390.tar.bz2 | |
go - autodetects build environment now
Diffstat (limited to 'Library/Formula/go.rb')
| -rw-r--r-- | Library/Formula/go.rb | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/Library/Formula/go.rb b/Library/Formula/go.rb index fc9f6bc3d..8e5e76996 100644 --- a/Library/Formula/go.rb +++ b/Library/Formula/go.rb @@ -15,47 +15,18 @@ class Go <Formula skip_clean 'bin' - def which_arch - Hardware.is_64_bit? ? 'amd64' : '386' - end - def install ENV.j1 # https://github.com/mxcl/homebrew/issues/#issue/237 prefix.install %w[src include test doc misc lib favicon.ico] Dir.chdir prefix mkdir %w[pkg bin] - ENV['GOROOT'] = Dir.getwd - ENV['GOBIN'] = bin - ENV['GOARCH'] = which_arch - ENV['GOOS'] = 'darwin' - - ENV.prepend 'PATH', ENV['GOBIN'], ':' - Dir.chdir 'src' do system "./all.bash" - # Keep the makefiles - https://github.com/mxcl/homebrew/issues/issue/1404 end + # Keep the makefiles - https://github.com/mxcl/homebrew/issues/issue/1404 Dir['src/*'].each{|f| rm_rf f unless f.match(/^src\/(pkg|Make)/) } rm_rf %w[include test] end - - def caveats - <<-EOS.undent - The official Go code repository uses mercurial, but a reasonably - up-to-date git mirror is available at https://github.com/tav/go.git. - To use the git mirror for Go builds, use the --use-git-head option. - - In order to use Go, set the following in your ~/.profile: - - export GOROOT=`brew --prefix go` - export GOBIN=#{HOMEBREW_PREFIX}/bin - export GOARCH=#{which_arch} - export GOOS=darwin - - Presumably at some point the Go developers won't require us to - mutilate our shell environments in order to compile Go code... - EOS - end end |
