2014-05-04 19:12:41 +00:00
|
|
|
require "formula"
|
2009-09-23 01:45:21 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Gawk < Formula
|
2015-05-03 05:01:44 +00:00
|
|
|
homepage "https://www.gnu.org/software/gawk/"
|
|
|
|
url "http://ftpmirror.gnu.org/gawk/gawk-4.1.2.tar.xz"
|
|
|
|
mirror "https://ftp.gnu.org/gnu/gawk/gawk-4.1.2.tar.xz"
|
|
|
|
sha256 "ea8b53c5834ee27012fecba7273f97fca7104884975cf81ddae6f85c5581f481"
|
2012-03-28 23:30:05 +00:00
|
|
|
|
2014-03-13 20:13:59 +00:00
|
|
|
bottle do
|
2015-05-06 07:12:33 +00:00
|
|
|
sha256 "3870e56454e734670d30e89e45fcb756d14090ca3dc1f831b3ada52c2e10e0d4" => :yosemite
|
|
|
|
sha256 "b4e858452e199ba6993d2d7f4958ab84a58f3775e630cd4f204b5ec56eeda66a" => :mavericks
|
|
|
|
sha256 "61c42778345ee6497511380faa0537eb015d9e9b4625b7c199f8f1e51cca1039" => :mountain_lion
|
2014-03-13 20:13:59 +00:00
|
|
|
end
|
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2326
|
|
|
|
cause "Undefined symbols when linking"
|
|
|
|
end
|
2011-03-21 21:24:22 +00:00
|
|
|
|
2009-09-23 01:45:21 +00:00
|
|
|
def install
|
2013-05-19 15:33:10 +00:00
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--without-readline",
|
|
|
|
"--without-mpfr",
|
|
|
|
"--without-libsigsegv-prefix"
|
2009-09-23 01:45:21 +00:00
|
|
|
system "make"
|
2011-07-02 17:02:12 +00:00
|
|
|
system "make check"
|
2009-09-23 01:45:21 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2014-03-02 03:34:33 +00:00
|
|
|
|
|
|
|
test do
|
2014-05-04 19:12:41 +00:00
|
|
|
output = pipe_output("#{bin}/gawk '{ gsub(/Macro/, \"Home\"); print }' -", "Macrobrew")
|
2014-03-02 03:34:33 +00:00
|
|
|
assert_equal 'Homebrew', output.strip
|
|
|
|
end
|
2009-09-23 01:45:21 +00:00
|
|
|
end
|