Merge pull request #207012 from Homebrew/bump-tailwindcss-4.0.5
[Homebrew/homebrew-core.git] / Formula / g / go@1.19.rb
blob6def20b1848bd66083ab8b73cbcd02dd28f4eaf0
1 class GoAT119 < Formula
2   desc "Open source programming language to build simple/reliable/efficient software"
3   homepage "https://go.dev/"
4   url "https://go.dev/dl/go1.19.13.src.tar.gz"
5   mirror "https://fossies.org/linux/misc/go1.19.13.src.tar.gz"
6   sha256 "ccf36b53fb0024a017353c3ddb22c1f00bc7a8073c6aac79042da24ee34434d3"
7   license "BSD-3-Clause"
9   bottle do
10     sha256 cellar: :any_skip_relocation, arm64_sonoma:   "32c7123bcc814d8ed1f54c072ab06e4128f82378feee8a3fa78e8475ceb5b55a"
11     sha256 cellar: :any_skip_relocation, arm64_ventura:  "cf10aa203445ad09fcb6e97e91ee75cb41215b3d9b84e1c25e6e24ba45454dbc"
12     sha256 cellar: :any_skip_relocation, arm64_monterey: "ff3535b243ddf16a1176b0d4ac28758c62f779622e1b026f24cfa4bee6cb7546"
13     sha256 cellar: :any_skip_relocation, arm64_big_sur:  "7c65c8386347f9ba16fd7579f8757c8e9ee663126cf1eb01202b9755bf409a6d"
14     sha256 cellar: :any_skip_relocation, sonoma:         "c6c642417aa9afcae02b508edbd943d8fad594d156f5d215e75ad45682d3376d"
15     sha256 cellar: :any_skip_relocation, ventura:        "65b21f9af59dcf256e92b050f53be5045ab2e2b1d24ba78896314ce9f982e31c"
16     sha256 cellar: :any_skip_relocation, monterey:       "3637554cb731fa4f70289bf2b41c5474de93354f4d1712c16f30b2d3d450c323"
17     sha256 cellar: :any_skip_relocation, big_sur:        "acb41f7e734a1302f73d2ea998052aa82e523a4285270f12417fa02f5b2ce30e"
18     sha256 cellar: :any_skip_relocation, x86_64_linux:   "25d23ef810a777c73e48f84ab03c7dd161d5b7706d31010f7ab3b0d595ec13f8"
19   end
21   keg_only :versioned_formula
23   # EOL with Go 1.21 release (2023-08-08)
24   # Ref: https://go.dev/doc/devel/release#policy
25   disable! date: "2024-08-24", because: :unsupported
27   depends_on "go" => :build
29   def install
30     ENV["GOROOT_BOOTSTRAP"] = Formula["go"].opt_libexec
32     cd "src" do
33       ENV["GOROOT_FINAL"] = libexec
34       system "./make.bash", "--no-clean"
35     end
37     rm_r(buildpath/"pkg/obj")
38     libexec.install Dir["*"]
39     bin.install_symlink Dir[libexec/"bin/go*"]
41     system bin/"go", "install", "-race", "std"
43     # Remove useless files.
44     # Breaks patchelf because folder contains weird debug/test files
45     rm_r(libexec/"src/debug/elf/testdata")
46     # Binaries built for an incompatible architecture
47     rm_r(libexec/"src/runtime/pprof/testdata")
48   end
50   test do
51     (testpath/"hello.go").write <<~GO
52       package main
54       import "fmt"
56       func main() {
57           fmt.Println("Hello World")
58       }
59     GO
60     # Run go fmt check for no errors then run the program.
61     # This is a a bare minimum of go working as it uses fmt, build, and run.
62     system bin/"go", "fmt", "hello.go"
63     assert_equal "Hello World\n", shell_output("#{bin}/go run hello.go")
65     ENV["GOOS"] = "freebsd"
66     ENV["GOARCH"] = "amd64"
67     system bin/"go", "build", "hello.go"
68   end
69 end