2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-23 01:45:21 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Gawk < Formula
|
2009-11-26 06:47:25 +00:00
|
|
|
homepage 'http://www.gnu.org/software/gawk/'
|
2014-04-15 16:09:17 +00:00
|
|
|
url 'http://ftpmirror.gnu.org/gawk/gawk-4.1.1.tar.xz'
|
|
|
|
mirror 'http://ftp.gnu.org/gnu/gawk/gawk-4.1.1.tar.xz'
|
|
|
|
sha1 '547feb48d20e923aff58daccee97c94e047fdc18'
|
2012-03-28 23:30:05 +00:00
|
|
|
|
2014-03-13 20:13:59 +00:00
|
|
|
bottle do
|
2014-04-15 16:19:18 +00:00
|
|
|
sha1 "8fa017184dc02cdc122d5681b6824fd12be01def" => :mavericks
|
|
|
|
sha1 "141a930482411bf368444dc214b87bd97a44360a" => :mountain_lion
|
|
|
|
sha1 "a01d86d2749c9757c4e45e48154844f8fa5edce3" => :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-03-02 03:59:55 +00:00
|
|
|
output = `echo "Macrobrew" | '#{bin}/gawk' '{ gsub(/Macro/, "Home"); print }' -`
|
2014-03-02 03:34:33 +00:00
|
|
|
assert_equal 'Homebrew', output.strip
|
|
|
|
assert_equal 0, $?.exitstatus
|
|
|
|
end
|
2009-09-23 01:45:21 +00:00
|
|
|
end
|