Skip to content

Commit

Permalink
i2util 1.2 (new formula)
Browse files Browse the repository at this point in the history
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 Homebrew/legacy-homebrew#34705.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information
candlerb authored and MikeMcQuaid committed Dec 5, 2014
1 parent ed89a8d commit 435ac6f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Formula/i2util.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 435ac6f

Please sign in to comment.