aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorBrian Candler2014-12-05 16:29:46 +0000
committerMike McQuaid2014-12-05 17:34:57 +0000
commit9253c0d087b67ee413c7e0e179e89b0033d2acd5 (patch)
tree2154f9127fe2527dd2babc64fbe5d1ceebfc4934 /Library
parent854a770fc5cd4254a644af5ff3156b412a33330b (diff)
downloadhomebrew-9253c0d087b67ee413c7e0e179e89b0033d2acd5.tar.bz2
i2util 1.2 (new formula)
This is a dependency for owamp-3.4 and bwctl Note: i2util includes binaries "aespasswd" and "pfstore" which were previously in owamp-3.3, and therefore will generate link conflicts with that package. Closes #34705. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/i2util.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/Library/Formula/i2util.rb b/Library/Formula/i2util.rb
new file mode 100644
index 000000000..31fa0bfaf
--- /dev/null
+++ b/Library/Formula/i2util.rb
@@ -0,0 +1,29 @@
+require "formula"
+
+class I2util < Formula
+ homepage "http://software.internet2.edu/"
+ url "http://software.internet2.edu/sources/I2util/I2util-1.2.tar.gz"
+ sha1 "56218a6e0f1306a70b641246fa6f63dd686e6766"
+
+ 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