summaryrefslogtreecommitdiff
path: root/irc/bitlbee-otr
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-10-10 21:16:47 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-10-10 21:16:47 +0000
commitd4850567f2f9ef9176f7d7765359296908fa5ff2 (patch)
tree53ebea4eaa580c3a8cc5709435c45f35366f8834 /irc/bitlbee-otr
parentThe `exhaust' project is a redcode simulator that is (hopefully) easy to embed (diff)
- Add support to Google Talk
- Add optional patch adding support for various MSN6 features - Add optional patch for LDAP authentication support PR: ports/84929 Submitted by: Ed Schouten <ed@fxq.nl> Approved by: Peter van Dijk <peter@dataloss.nl> (maintainer)
Notes
Notes: svn path=/head/; revision=144869
Diffstat (limited to 'irc/bitlbee-otr')
-rw-r--r--irc/bitlbee-otr/Makefile41
-rw-r--r--irc/bitlbee-otr/distinfo4
-rw-r--r--irc/bitlbee-otr/files/patch-xmpp-google62
3 files changed, 105 insertions, 2 deletions
diff --git a/irc/bitlbee-otr/Makefile b/irc/bitlbee-otr/Makefile
index 3c5ec58582dc..bfe6a9899d6e 100644
--- a/irc/bitlbee-otr/Makefile
+++ b/irc/bitlbee-otr/Makefile
@@ -7,13 +7,24 @@
PORTNAME= bitlbee
PORTVERSION= 0.92
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= irc
-MASTER_SITES= http://get.bitlbee.org/src/
+MASTER_SITES= http://get.bitlbee.org/src/:bitlbee \
+ http://www.bitlbee.be/andy/:msn6 \
+ http://www.il.fontys.nl/~rink/patches/:ldap
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:bitlbee
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= peter@dataloss.nl
COMMENT= An IRC to other chat networks gateway
+.if defined(WITH_MSN) && defined(WITH_MSN6_FEATURES)
+DISTFILES+= ${DISTNAME}-msn6.akke.patch:msn6
+.endif
+.if defined(WITH_LDAP)
+DISTFILES+= ${DISTNAME}-ldap.diff:ldap
+.endif
+
MAN5= bitlbee.conf.5
MAN8= bitlbee.8
@@ -24,6 +35,10 @@ USE_GNOME= glib20
USE_GETOPT_LONG= yes
PKGMESSAGE= ${WRKDIR}/pkg-message
+.if defined(WITH_LDAP)
+USE_OPENLDAP=yes
+.endif
+
.if defined(WITH_MSN)
LIB_DEPENDS+= gnutls.12:${PORTSDIR}/security/gnutls
CONFIGURE_ARGS+= --msn=1
@@ -35,12 +50,34 @@ pre-configure:
@${ECHO_CMD} "Type \"make -DWITH_MSN\" if you want to enable MSN and Jabber/SSL support."
.endif
+.if !defined(WITH_MSN6_FEATURES)
+ @${ECHO_CMD} "Type \"make -DWITH_MSN6_FEATURES\" if you want to enable MSN 6 features, like buddy icons"
+.else
+ @${ECHO_CMD} "MSN 6 features will be enabled."
+.endif
+
.if defined(WITH_FLOOD)
CONFIGURE_ARGS+= --flood=1
.else
@${ECHO_CMD} "Type \"make -DWITH_FLOOD\" if you want to enable flood protection."
.endif
+.if ! defined(WITH_LDAP)
+ @${ECHO_CMD} "Type \"make -DWITH_LDAP\" if you want to enable LDAP authentication."
+.else
+CONFIGURE_ARGS+= --ldap=${LOCALBASE}
+# @${ECHO_CMD} "LDAP authentication will be enabled."
+.endif
+
+post-patch:
+.if defined(WITH_MSN) && defined(WITH_MSN6_FEATURES)
+ @${PATCH} ${PATCH_ARGS} -p1 < ${DISTDIR}/${DISTNAME}-msn6.akke.patch
+.endif
+
+.if defined(WITH_LDAP)
+ @${PATCH} ${PATCH_ARGS} -p1 < ${DISTDIR}/${DISTNAME}-ldap.diff
+.endif
+
post-build:
@${CAT} pkg-message | ${SED} -e 's|%%PREFIX%%|${PREFIX}|' > ${PKGMESSAGE}
diff --git a/irc/bitlbee-otr/distinfo b/irc/bitlbee-otr/distinfo
index 3b71c0ffa882..54493c419074 100644
--- a/irc/bitlbee-otr/distinfo
+++ b/irc/bitlbee-otr/distinfo
@@ -1,2 +1,6 @@
MD5 (bitlbee-0.92.tar.gz) = 0ffec374b76f376f75b2cab95636a0de
SIZE (bitlbee-0.92.tar.gz) = 464110
+MD5 (bitlbee-0.92-msn6.akke.patch) = fd78a28895c73d9afe39ddfed2af7076
+SIZE (bitlbee-0.92-msn6.akke.patch) = 86602
+MD5 (bitlbee-0.92-ldap.diff) = 54c1adfbe2d3222d43240dfb9eeaecd0
+SIZE (bitlbee-0.92-ldap.diff) = 7275
diff --git a/irc/bitlbee-otr/files/patch-xmpp-google b/irc/bitlbee-otr/files/patch-xmpp-google
new file mode 100644
index 000000000000..a9647e34df03
--- /dev/null
+++ b/irc/bitlbee-otr/files/patch-xmpp-google
@@ -0,0 +1,62 @@
+--- protocols/jabber/jabber.c 2004-11-14 22:37:47.000000000 +0100
++++ protocols/jabber/jabber.c 2005-08-24 09:47:25.000000000 +0200
+@@ -565,16 +565,27 @@
+ {
+ struct aim_user *user;
+ int port = -1, ssl = 0;
++ char *server = NULL, *s;
+
+ if (!gjc || gjc->state != JCONN_STATE_OFF)
+ return;
+
+ user = GJ_GC(gjc)->user;
+ if (*user->proto_opt[0]) {
+- if (isdigit(user->proto_opt[0][0]))
+- sscanf(user->proto_opt[0], "%d", &port);
++ /* If there's a dot, assume there's a hostname in the beginning */
++ if (strchr(user->proto_opt[0], '.')) {
++ server = g_strdup(user->proto_opt[0]);
++ if ((s = strchr(server, ':')))
++ *s = 0;
++ }
++
++ /* After the hostname, there can be a port number */
++ s = strchr(user->proto_opt[0], ':');
++ if (s && isdigit(s[1]))
++ sscanf(s + 1, "%d", &port);
+
+- if (strstr(user->proto_opt[0], "ssl"))
++ /* And if there's the string ssl, the user wants an SSL-connection */
++ if (strstr(user->proto_opt[0], ":ssl") || g_strcasecmp(user->proto_opt[0], "ssl") == 0)
+ ssl = 1;
+ }
+
+@@ -582,6 +593,9 @@
+ port = DEFAULT_PORT;
+ else if (port == -1 && ssl)
+ port = DEFAULT_PORT_SSL;
++
++ if (server == NULL)
++ server = g_strdup(gjc->user->server);
+
+ gjc->parser = XML_ParserCreate(NULL);
+ XML_SetUserData(gjc->parser, (void *)gjc);
+@@ -589,14 +603,16 @@
+ XML_SetCharacterDataHandler(gjc->parser, charData);
+
+ if (ssl) {
+- if ((gjc->ssl = ssl_connect(gjc->user->server, port, gjab_connected_ssl, GJ_GC(gjc))))
++ if ((gjc->ssl = ssl_connect(server, port, gjab_connected_ssl, GJ_GC(gjc))))
+ gjc->fd = ssl_getfd(gjc->ssl);
+ else
+ gjc->fd = -1;
+ } else {
+- gjc->fd = proxy_connect(gjc->user->server, port, gjab_connected, GJ_GC(gjc));
++ gjc->fd = proxy_connect(server, port, gjab_connected, GJ_GC(gjc));
+ }
+
++ g_free(server);
++
+ if (!user->gc || (gjc->fd < 0)) {
+ STATE_EVT(JCONN_STATE_OFF)
+ return;