2012-07-17 21:32:30 +00:00
|
|
|
class Genstats < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Generate statistics about stdin or textfiles"
|
2015-10-13 23:39:41 +00:00
|
|
|
homepage "https://www.vanheusden.com/genstats/"
|
2015-10-12 21:38:43 +00:00
|
|
|
url "https://www.vanheusden.com/genstats/genstats-1.2.tgz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "f0fb9f29750cdaa85dba648709110c0bc80988dd6a98dd18a53169473aaa6ad3"
|
2012-07-17 21:32:30 +00:00
|
|
|
|
2015-10-14 07:31:45 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "44502f7a2dfcb1355336db69267d6363d6e8b8767b47628b0d3099743513ed5f" => :el_capitan
|
|
|
|
sha256 "91737ec825ed346716fddcedc4e075b195f214dfb22586a33d46f7ec5ea3a17e" => :yosemite
|
|
|
|
sha256 "d46142a806e13029120bfb1a038805b07dc88b191aed1cd41340f5f868168f92" => :mavericks
|
|
|
|
end
|
|
|
|
|
2013-09-28 04:04:19 +00:00
|
|
|
depends_on :macos => :lion # uses strndup
|
2012-07-17 21:32:30 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
# Tried to make this a patch. Applying the patch hunk would
|
|
|
|
# fail, even though I used "git diff | pbcopy". Tried messing
|
|
|
|
# with whitespace, # lines, etc. Ugh.
|
2015-08-03 12:55:31 +00:00
|
|
|
inreplace "br.cpp" do |s|
|
|
|
|
s.gsub! /if \(_XOPEN_VERSION >= 600\)/, "if (_XOPEN_VERSION >= 600) && !__APPLE__"
|
2012-07-17 21:32:30 +00:00
|
|
|
end
|
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
system "make"
|
|
|
|
bin.install("genstats")
|
|
|
|
man.install("genstats.1")
|
2012-07-17 21:32:30 +00:00
|
|
|
end
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2014-05-20 04:29:59 +00:00
|
|
|
system "#{bin}/genstats -h | grep folkert@vanheusden.com"
|
2012-07-17 21:32:30 +00:00
|
|
|
end
|
|
|
|
end
|