2014-12-05 16:29:46 +00:00
|
|
|
class I2util < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Internet2 utility tools"
|
2014-12-05 16:29:46 +00:00
|
|
|
homepage "http://software.internet2.edu/"
|
|
|
|
url "http://software.internet2.edu/sources/I2util/I2util-1.2.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "3b704cdb88e83f7123f3cec0fe3283b0681cc9f80c426c3f761a0eefd1d72c59"
|
2014-12-05 16:29:46 +00:00
|
|
|
|
2014-12-05 17:21:56 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "14336de85e35136a369e889d1072adf866998f09" => :yosemite
|
|
|
|
sha1 "c88dd13937831bab2efd3ad928d54635a48ef129" => :mavericks
|
|
|
|
sha1 "eced6a87c580fe024730ca09fa61c6a5e3cc4d63" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2014-12-05 16:29:46 +00:00
|
|
|
def install
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--mandir=#{man}"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
|
|
#include <I2util/util.h>
|
|
|
|
#include <string.h>
|
|
|
|
int main() {
|
|
|
|
uint8_t buf[2];
|
|
|
|
if (!I2HexDecode("beef", buf, sizeof(buf))) return 1;
|
|
|
|
if (buf[0] != 190 || buf[1] != 239) return 1;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system ENV.cc, "test.c", "-lI2util", "-o", "test"
|
|
|
|
system "./test"
|
|
|
|
end
|
|
|
|
end
|