libusrsctp 0.9.3.0

And added a test.

Closes #158.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2016-04-08 08:29:08 -07:00
parent bd63d80973
commit d2fbdbc10d

View file

@ -1,10 +1,9 @@
class Libusrsctp < Formula
desc "A portable SCTP userland stack"
desc "Portable SCTP userland stack"
homepage "https://github.com/sctplab/usrsctp"
url "https://mirrorservice.org/sites/distfiles.macports.org/libusrsctp/libusrsctp-0.9.1.tar.gz"
mirror "https://mirror.csclub.uwaterloo.ca/MacPorts/mpdistfiles/libusrsctp/libusrsctp-0.9.1.tar.gz"
mirror "https://ftp.fau.de/macports/distfiles/libusrsctp/libusrsctp-0.9.1.tar.gz"
sha256 "63a3abe5f1cb7ddde36cba09d32579b05a98badb06ff88fca87d024925c3ff16"
url "https://github.com/sctplab/usrsctp/archive/0.9.3.0.tar.gz"
sha256 "a4573b1cd7b8fc2fce476df61093736d3fea9eef5c87d72e66768c0a6b1f9e39"
head "https://github.com/sctplab/usrsctp.git"
bottle do
cellar :any
@ -14,20 +13,24 @@ class Libusrsctp < Formula
sha256 "a42402bb65451da92fd33b86ba33a4c1f75d8931830437d866d5298f3c2818cf" => :mavericks
end
head do
url "https://github.com/sctplab/usrsctp.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "cmake" => :build
def install
system "./bootstrap" if build.head?
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "cmake", ".", *std_cmake_args
system "make"
system "make", "install"
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <unistd.h>
#include <usrsctp.h>
int main() {
usrsctp_init(0, NULL, NULL);
return 0;
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-lusrsctp", "-o", "test"
system "./test"
end
end