require 'formula' class Primesieve < Formula homepage 'http://code.google.com/p/primesieve/' url 'http://primesieve.googlecode.com/files/primesieve-4.4-src.zip' sha1 '52f1e3161ca82591aee038412069c9845dc54ca7' def install system "make", "bin", "lib", "SHARED=yes", "CXX=#{ENV.cxx}", "CXXFLAGS=#{ENV.cxxflags}" system "make", "PREFIX=#{prefix}", "install" end def test system "#{bin}/primesieve", '2', '1000', '--count=1', '-p2' end end