libosip 5.1.0

Closes #42514.

Signed-off-by: Thierry Moisan <thierry.moisan@gmail.com>
This commit is contained in:
Caleb Xu 2019-07-26 22:57:09 -04:00 committed by Thierry Moisan
parent 9915acd4de
commit 2470d79bae
No known key found for this signature in database
GPG key ID: A9A4CB593D38CDD0

View file

@ -1,9 +1,9 @@
class Libosip < Formula
desc "Implementation of the eXosip2 stack"
homepage "https://www.gnu.org/software/osip/"
url "https://ftp.gnu.org/gnu/osip/libosip2-5.0.0.tar.gz"
mirror "https://ftpmirror.gnu.org/osip/libosip2-5.0.0.tar.gz"
sha256 "18a13c954f7297978e7bf1a0cdadde7c531e519d61a045dae304e054f3b2df03"
url "https://ftp.gnu.org/gnu/osip/libosip2-5.1.0.tar.gz"
mirror "https://ftpmirror.gnu.org/osip/libosip2-5.1.0.tar.gz"
sha256 "40573a997a656f967b2b5ebafbd36d7f1d4a4634abcf312643854057d061f145"
bottle do
cellar :any
@ -19,4 +19,21 @@ class Libosip < Formula
"--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/"test.c").write <<~EOS
#include <sys/time.h>
#include <osip2/osip.h>
int main() {
osip_t *osip;
int i = osip_init(&osip);
if (i != 0)
return -1;
return 0;
}
EOS
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-losip2", "-o", "test"
system "./test"
end
end