2010-08-14 11:32:43 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Loudmouth < Formula
|
2013-11-07 07:30:30 +00:00
|
|
|
homepage 'http://mcabber.com'
|
|
|
|
url 'http://mcabber.com/files/loudmouth-1.5.0-20121201.tar.bz2'
|
|
|
|
version '1.5.0.20121201'
|
|
|
|
sha1 '502963c3068f7033bb21d788918c1e5cd14f386e'
|
2010-08-14 11:32:43 +00:00
|
|
|
|
2013-11-17 19:16:07 +00:00
|
|
|
option 'with-gnutls', "Use GnuTLS instead of the default OpenSSL"
|
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-08-14 11:32:43 +00:00
|
|
|
depends_on 'glib'
|
2013-11-17 19:16:07 +00:00
|
|
|
depends_on 'gnutls' => :optional
|
2012-02-14 10:16:51 +00:00
|
|
|
depends_on 'libidn'
|
2010-08-14 11:32:43 +00:00
|
|
|
|
2013-11-07 07:53:08 +00:00
|
|
|
# Fix compilation on 10.9. Sent upstream:
|
|
|
|
# https://github.com/mcabber/loudmouth/pull/9
|
|
|
|
def patches; DATA; end
|
|
|
|
|
2010-08-14 11:32:43 +00:00
|
|
|
def install
|
2013-11-17 19:16:07 +00:00
|
|
|
args = ["--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"]
|
|
|
|
if build.with? 'gnutls'
|
|
|
|
args << "--with-ssl=gnutls"
|
|
|
|
else
|
|
|
|
args << "--with-ssl=openssl"
|
|
|
|
end
|
|
|
|
system "./configure", *args
|
2010-08-14 11:32:43 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2013-11-07 07:53:08 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/loudmouth/lm-sock.c b/loudmouth/lm-sock.c
|
|
|
|
index f3a2803..6e99eca 100644
|
|
|
|
--- a/loudmouth/lm-sock.c
|
|
|
|
+++ b/loudmouth/lm-sock.c
|
|
|
|
@@ -314,6 +314,13 @@ gboolean
|
|
|
|
_lm_sock_set_keepalive (LmOldSocketT sock, int delay)
|
|
|
|
{
|
|
|
|
#ifdef USE_TCP_KEEPALIVES
|
|
|
|
+
|
|
|
|
+#ifdef __APPLE__
|
|
|
|
+#ifndef TCP_KEEPIDLE
|
|
|
|
+#define TCP_KEEPIDLE TCP_KEEPALIVE
|
|
|
|
+#endif
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
int opt;
|
|
|
|
|
|
|
|
opt = 1;
|