2012-04-24 03:57:36 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Ent < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Pseudorandom number sequence test program"
|
2012-04-24 03:57:36 +00:00
|
|
|
homepage 'http://www.fourmilab.ch/random/'
|
|
|
|
# This tarball is versioned and smaller, though non-official
|
2013-03-29 01:03:20 +00:00
|
|
|
url 'https://github.com/psm14/ent/archive/1.0.tar.gz'
|
|
|
|
sha1 'b69eac8c3531ef58b61a9cbd78b506901d1a3192'
|
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"
|
|
|
|
system "diff entest.bak #{prefix}/entest.mas"
|
2012-04-24 03:57:36 +00:00
|
|
|
end
|
|
|
|
end
|