32 lines
818 B
Ruby
32 lines
818 B
Ruby
|
class Ivykis < Formula
|
||
|
desc "Async I/O-assisting library"
|
||
|
homepage "https://sourceforge.net/projects/libivykis"
|
||
|
url "https://downloads.sourceforge.net/project/libivykis/0.41/ivykis-0.41.tar.gz"
|
||
|
sha256 "2c934539a59029851b1332c8143ba9f21b79fb0185dd68d6eb259ae1b61ef3c5"
|
||
|
|
||
|
depends_on "automake" => :build
|
||
|
depends_on "autoconf" => :build
|
||
|
depends_on "libtool" => :build
|
||
|
|
||
|
def install
|
||
|
system "autoreconf", "-i"
|
||
|
system "./configure", "--prefix=#{prefix}"
|
||
|
system "make", "install"
|
||
|
end
|
||
|
|
||
|
test do
|
||
|
(testpath/"test_ivykis.c").write <<-EOS.undent
|
||
|
#include <stdio.h>
|
||
|
#include <iv.h>
|
||
|
int main()
|
||
|
{
|
||
|
iv_init();
|
||
|
iv_deinit();
|
||
|
return 0;
|
||
|
}
|
||
|
EOS
|
||
|
system ENV.cc, "test_ivykis.c", "-livykis", "-o", "test_ivykis"
|
||
|
system "./test_ivykis"
|
||
|
end
|
||
|
end
|