2012-04-24 03:57:36 +00:00
|
|
|
class Ent < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Pseudorandom number sequence test program"
|
2015-10-16 15:24:36 +00:00
|
|
|
homepage "https://www.fourmilab.ch/random/"
|
2015-12-19 07:04:09 +00:00
|
|
|
# This tarball is versioned and smaller, though non-official
|
|
|
|
url "https://github.com/psm14/ent/archive/1.0.tar.gz"
|
|
|
|
sha256 "6316b9956f2e0cc39f2b934f3c53019eafe2715316c260fd5c1e5ef4523ae520"
|
|
|
|
|
2015-11-28 03:04:19 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "f5244a065b7aafe3ba60077de0072e9b5d231a7fd1eb348cd7f6583a69a08ad3" => :el_capitan
|
|
|
|
sha256 "072e3e71ee3b6813dafb15e53e8b474c1d15f26865b9cd05652e46c220e3926d" => :yosemite
|
|
|
|
sha256 "cb4bd5766cdb804092f73a908921e034da352b890fdc34f5cc1f0d56a27d3c3a" => :mavericks
|
|
|
|
end
|
|
|
|
|
2012-04-24 03:57:36 +00:00
|
|
|
def install
|
|
|
|
system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}"
|
|
|
|
bin.install "ent"
|
|
|
|
|
|
|
|
# Used in the below test
|
|
|
|
prefix.install "entest.mas", "entitle.gif"
|
|
|
|
end
|
|
|
|
|
2013-02-02 05:12:33 +00:00
|
|
|
test do
|
2012-04-24 03:57:36 +00:00
|
|
|
# Adapted from the test in the Makefile and entest.bat
|
2013-02-02 05:12:33 +00:00
|
|
|
system "#{bin}/ent #{prefix}/entitle.gif > entest.bak"
|
|
|
|
# The single > here was also in entest.bat
|
|
|
|
system "#{bin}/ent -c #{prefix}/entitle.gif > entest.bak"
|
|
|
|
system "#{bin}/ent -fc #{prefix}/entitle.gif >> entest.bak"
|
|
|
|
system "#{bin}/ent -b #{prefix}/entitle.gif >> entest.bak"
|
|
|
|
system "#{bin}/ent -bc #{prefix}/entitle.gif >> entest.bak"
|
|
|
|
system "#{bin}/ent -t #{prefix}/entitle.gif >> entest.bak"
|
|
|
|
system "#{bin}/ent -ct #{prefix}/entitle.gif >> entest.bak"
|
|
|
|
system "#{bin}/ent -ft #{prefix}/entitle.gif >> entest.bak"
|
|
|
|
system "#{bin}/ent -bt #{prefix}/entitle.gif >> entest.bak"
|
|
|
|
system "#{bin}/ent -bct #{prefix}/entitle.gif >> entest.bak"
|
2015-10-05 13:37:16 +00:00
|
|
|
system "diff", "entest.bak", "#{prefix}/entest.mas"
|
2012-04-24 03:57:36 +00:00
|
|
|
end
|
|
|
|
end
|