summaryrefslogtreecommitdiff
path: root/extra/loudmouth
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/loudmouth
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/loudmouth')
-rw-r--r--extra/loudmouth/01-fix-sasl-md5-digest-uri.patch24
-rw-r--r--extra/loudmouth/03-drop-stanzas-on-fail.patch45
-rw-r--r--extra/loudmouth/04-use-pkg-config-for-gnutls.patch23
-rw-r--r--extra/loudmouth/PKGBUILD35
4 files changed, 127 insertions, 0 deletions
diff --git a/extra/loudmouth/01-fix-sasl-md5-digest-uri.patch b/extra/loudmouth/01-fix-sasl-md5-digest-uri.patch
new file mode 100644
index 000000000..5bca69c0c
--- /dev/null
+++ b/extra/loudmouth/01-fix-sasl-md5-digest-uri.patch
@@ -0,0 +1,24 @@
+diff --git a/loudmouth/lm-connection.c b/loudmouth/lm-connection.c
+index 21c1bc2..ae8de94 100644
+--- a/loudmouth/lm-connection.c
++++ b/loudmouth/lm-connection.c
+@@ -1441,11 +1441,18 @@ lm_connection_authenticate (LmConnection *connection,
+ connection->effective_jid = g_strdup_printf ("%s/%s",
+ connection->jid, connection->resource);
+
+ if (connection->use_sasl) {
++ gchar *domain = NULL;
++
++ if (!connection_get_server_from_jid (connection->jid, &domain)) {
++ domain = g_strdup (connection->server);
++ }
++
+ lm_sasl_authenticate (connection->sasl,
+ username, password,
+- connection->server,
++ domain,
+ connection_sasl_auth_finished);
++ g_free (domain);
+
+ connection->features_cb =
+ lm_message_handler_new (connection_features_cb,
diff --git a/extra/loudmouth/03-drop-stanzas-on-fail.patch b/extra/loudmouth/03-drop-stanzas-on-fail.patch
new file mode 100644
index 000000000..87b86a998
--- /dev/null
+++ b/extra/loudmouth/03-drop-stanzas-on-fail.patch
@@ -0,0 +1,45 @@
+From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
+Date: Tue, 13 Jan 2009 11:28:44 +0000
+Subject: [PATCH] Drop stanzas when failing to convert them to LmMessages
+
+when a stanza comes in that for some reason can't be parsed into an LmMessage,
+just drop them on the floor instead of blocking the parser. I've seen this
+issue happen in practise because some (buggy?) client sending an iq with a
+prefix e.g. <client:iq xmlns:client="jabber:client" ... />
+---
+ loudmouth/lm-parser.c | 15 ++++++---------
+ 1 files changed, 6 insertions(+), 9 deletions(-)
+
+diff --git a/loudmouth/lm-parser.c b/loudmouth/lm-parser.c
+index 1938d56..89f6675 100644
+--- a/loudmouth/lm-parser.c
++++ b/loudmouth/lm-parser.c
+@@ -151,19 +151,16 @@ parser_end_node_cb (GMarkupParseContext *context,
+ if (!m) {
+ g_warning ("Couldn't create message: %s\n",
+ parser->cur_root->name);
+- return;
+- }
+-
+- g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_PARSER,
++ } else {
++ g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_PARSER,
+ "Have a new message\n");
+- if (parser->function) {
+- (* parser->function) (parser, m, parser->user_data);
++ if (parser->function) {
++ (* parser->function) (parser, m, parser->user_data);
++ }
++ lm_message_unref (m);
+ }
+
+- lm_message_unref (m);
+ lm_message_node_unref (parser->cur_root);
+-
+-
+ parser->cur_node = parser->cur_root = NULL;
+ } else {
+ LmMessageNode *tmp_node;
+--
+1.5.6.5
+
diff --git a/extra/loudmouth/04-use-pkg-config-for-gnutls.patch b/extra/loudmouth/04-use-pkg-config-for-gnutls.patch
new file mode 100644
index 000000000..20f388e89
--- /dev/null
+++ b/extra/loudmouth/04-use-pkg-config-for-gnutls.patch
@@ -0,0 +1,23 @@
+Description: use pkg-config to detect gnutls
+Debian: http://bugs.debian.org/529835
+Origin: http://groups.google.com/group/loudmouth-dev/browse_thread/thread/3f78255837048daf#
+
+--- a/configure.ac.orig 2009-08-16 20:29:36.000000000 +0200
++++ b/configure.ac 2009-08-16 20:30:43.000000000 +0200
+@@ -146,10 +146,12 @@ AC_ARG_WITH(openssl-libs,
+ enable_ssl=no
+ if test "x$ac_ssl" = "xgnutls"; then
+ dnl Look for GnuTLS
+- AM_PATH_LM_LIBGNUTLS($GNUTLS_REQUIRED, have_libgnutls=yes, have_libgnutls=no)
+- if test "x$have_libgnutls" = "xyes"; then
+- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
+- LIBS="$LIBS $LIBGNUTLS_LIBS"
++ PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_REQUIRED, have_gnutls=yes, have_gnutls=no)
++ if test "x$have_gnutls" = "xyes"; then
++ AC_SUBST(ASYNCNS_CFLAGS)
++ AC_SUBST(ASYNCNS_LIBS)
++ CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
++ LIBS="$LIBS $GNUTLS_LIBS"
+ AC_DEFINE(HAVE_GNUTLS, 1, [whether to use GnuTSL support.])
+ enable_ssl=GnuTLS
+ else
diff --git a/extra/loudmouth/PKGBUILD b/extra/loudmouth/PKGBUILD
new file mode 100644
index 000000000..ad508d66e
--- /dev/null
+++ b/extra/loudmouth/PKGBUILD
@@ -0,0 +1,35 @@
+ $Id: PKGBUILD,v 1.3 2003/11/06 08:27:17 dorphell Exp
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: damir <damir@archlinux.org>
+# Contributor: Brice Carpentier <brice.carpentier@orange.fr>
+
+pkgname=loudmouth
+pkgver=1.4.3
+pkgrel=2
+pkgdesc="A lightweight Jabber client library written in C/Glib"
+arch=('i686' 'x86_64')
+license=('LGPL')
+url="http://groups.google.com/group/loudmouth-dev"
+depends=('glib2>=2.24.1' 'gnutls>=2.8.6' 'libidn>=1.16')
+options=('!libtool')
+makedepends=('intltool' 'pkgconfig' 'gtk-doc')
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/1.4/${pkgname}-${pkgver}.tar.bz2
+ 01-fix-sasl-md5-digest-uri.patch
+ 03-drop-stanzas-on-fail.patch
+ 04-use-pkg-config-for-gnutls.patch)
+md5sums=('55339ca42494690c3942ee1465a96937'
+ 'dc799cea18b24847b1e008c7424010a3'
+ 'b7b2d81b01a5eee5fd5e21cae67b4af7'
+ 'bffb25b9551df43255fe1706588582f3')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/01-fix-sasl-md5-digest-uri.patch"
+ patch -Np1 -i "${srcdir}/03-drop-stanzas-on-fail.patch"
+ patch -Np1 -i "${srcdir}/04-use-pkg-config-for-gnutls.patch"
+ libtoolize --force
+ autoreconf
+ ./configure --prefix=/usr --disable-static
+ make
+ make DESTDIR="${pkgdir}" install
+}