Ent 1.0
Closes Homebrew/homebrew#11860. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
0a3bd92393
commit
57dd157092
1 changed files with 34 additions and 0 deletions
34
Formula/ent.rb
Normal file
34
Formula/ent.rb
Normal file
|
@ -0,0 +1,34 @@
|
|||
require 'formula'
|
||||
|
||||
class Ent < Formula
|
||||
homepage 'http://www.fourmilab.ch/random/'
|
||||
# This tarball is versioned and smaller, though non-official
|
||||
url 'http://github.com/psm14/ent/tarball/1.0'
|
||||
sha1 'ab45969decd8e79031e9cd1a74dbec3edb802e98'
|
||||
|
||||
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
|
||||
|
||||
def test
|
||||
# Adapted from the test in the Makefile and entest.bat
|
||||
mktemp do
|
||||
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"
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue