2011-04-13 17:58:15 +00:00
|
|
|
class Csmith < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Generates random C programs conforming to the C99 standard"
|
2015-07-10 20:54:51 +00:00
|
|
|
homepage "https://embed.cs.utah.edu/csmith/"
|
|
|
|
url "https://embed.cs.utah.edu/csmith/csmith-2.2.0.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "62fd96d3a5228241d4f3159511ad3ff5b8c4cedb9e9a82adc935830b421c8e37"
|
2011-04-13 17:58:15 +00:00
|
|
|
|
2015-01-12 09:27:32 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2016-02-23 20:20:51 +00:00
|
|
|
sha256 "38f7cf4e3e01431a0b2a32aa723f6862490c5f5580b389d4bad84287c1ff068e" => :el_capitan
|
2015-11-19 15:45:31 +00:00
|
|
|
sha256 "66393d59fae564c88c0040f6d117d7dc5b50400614f1c0b9e235cb54053fe159" => :yosemite
|
|
|
|
sha256 "365711b325bf93d13b6c6c6c430a7b136f4e2962ea18814213911c204db71d37" => :mavericks
|
|
|
|
sha256 "92fbb0c44e5cb1042c22aae462acf6afc22a568b7b446dbccaecb5bbd07b0921" => :mountain_lion
|
2015-01-12 09:27:32 +00:00
|
|
|
end
|
|
|
|
|
2011-04-13 17:58:15 +00:00
|
|
|
def install
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
2012-02-13 06:10:16 +00:00
|
|
|
system "make"
|
2015-01-12 09:12:56 +00:00
|
|
|
system "make", "install"
|
|
|
|
mv "#{bin}/compiler_test.in", share
|
|
|
|
(include/"csmith-#{version}/runtime").install Dir["runtime/*.h"]
|
2011-04-13 17:58:15 +00:00
|
|
|
end
|
|
|
|
|
2012-11-25 19:42:57 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
It is recommended that you set the environment variable 'CSMITH_PATH' to
|
|
|
|
#{include}/csmith-#{version}
|
2011-04-13 17:58:15 +00:00
|
|
|
EOS
|
|
|
|
end
|
2015-01-12 09:12:56 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/csmith", "-o", "test.c"
|
|
|
|
end
|
2011-04-13 17:58:15 +00:00
|
|
|
end
|