homebrew-core/Formula/gawk.rb
2019-01-13 12:22:56 +01:00

35 lines
1.1 KiB
Ruby

class Gawk < Formula
desc "GNU awk utility"
homepage "https://www.gnu.org/software/gawk/"
url "https://ftp.gnu.org/gnu/gawk/gawk-4.2.1.tar.xz"
mirror "https://ftpmirror.gnu.org/gawk/gawk-4.2.1.tar.xz"
sha256 "d1119785e746d46a8209d28b2de404a57f983aa48670f4e225531d3bdc175551"
revision 1
bottle do
sha256 "7bb0670da0f508d0cabcb053905b8b59d5aa8f9913b79d654b2e4ae005b5d838" => :mojave
sha256 "b9a0b1d42c5434c062ea3f31c61a902f0e28111115c924e5fdba6c25fef4a2c7" => :high_sierra
end
depends_on "gettext"
depends_on "mpfr"
depends_on "readline"
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--without-libsigsegv-prefix"
system "make"
system "make", "check"
system "make", "install"
(libexec/"gnubin").install_symlink bin/"gawk" => "awk"
(libexec/"gnuman/man1").install_symlink man1/"gawk.1" => "awk.1"
end
test do
output = pipe_output("#{bin}/gawk '{ gsub(/Macro/, \"Home\"); print }' -", "Macrobrew")
assert_equal "Homebrew", output.strip
end
end