summaryrefslogtreecommitdiffstats
path: root/source/l/loudmouth
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/loudmouth')
-rwxr-xr-xsource/l/loudmouth/loudmouth.SlackBuild138
-rw-r--r--source/l/loudmouth/loudmouth.async_assertion.diff19
-rw-r--r--source/l/loudmouth/loudmouth.crtpath.diff11
-rw-r--r--source/l/loudmouth/loudmouth.gnutls.configure.ac.diff20
-rw-r--r--source/l/loudmouth/loudmouth.sasl-md5-digest-uri.diff22
-rw-r--r--source/l/loudmouth/loudmouth.stanzadrop.diff45
-rw-r--r--source/l/loudmouth/slack-desc19
7 files changed, 274 insertions, 0 deletions
diff --git a/source/l/loudmouth/loudmouth.SlackBuild b/source/l/loudmouth/loudmouth.SlackBuild
new file mode 100755
index 000000000..650bd1699
--- /dev/null
+++ b/source/l/loudmouth/loudmouth.SlackBuild
@@ -0,0 +1,138 @@
+#!/bin/sh
+# Copyright 2009 Eric Hameleers, Eindhoven, NL
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+PKGNAM=loudmouth
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:" -j4 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+zcat $CWD/loudmouth.crtpath.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/loudmouth.gnutls.configure.ac.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/loudmouth.async_assertion.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/loudmouth.sasl-md5-digest-uri.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/loudmouth.stanzadrop.diff.gz | patch -p1 --verbose || exit 1
+
+# needed after the configure.ac gnutls patch
+autoreconf
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="$SLKLDFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --with-ssl=gnutls \
+ --enable-debug=no \
+ --enable-static=no \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux
+
+# this generates a broken libtool, so use the system version:
+cp /usr/bin/libtool .
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# --enable-static is often ignored
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/lib*.a
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS CONTRIBUTORS COPYING* NEWS README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/l/loudmouth/loudmouth.async_assertion.diff b/source/l/loudmouth/loudmouth.async_assertion.diff
new file mode 100644
index 000000000..bda1d19b1
--- /dev/null
+++ b/source/l/loudmouth/loudmouth.async_assertion.diff
@@ -0,0 +1,19 @@
+diff -urp loudmouth-1.4.3.OLD/loudmouth/lm-socket.c loudmouth-1.4.3/loudmouth/lm-socket.c
+--- loudmouth-1.4.3.OLD/loudmouth/lm-socket.c 2008-10-29 12:29:16.000000000 -0400
++++ loudmouth-1.4.3/loudmouth/lm-socket.c 2008-11-28 19:24:04.000000000 -0500
+@@ -1107,6 +1107,7 @@ lm_socket_create (GMainContext *con
+ _lm_socket_create_phase1 (socket, NULL, 0);
+ }
+
++#ifndef HAVE_ASYNCNS
+ if (socket->connect_data == NULL) {
+ /* Open failed synchronously, probably a DNS lookup problem */
+ lm_socket_unref(socket);
+@@ -1118,6 +1119,7 @@ lm_socket_create (GMainContext *con
+
+ return NULL;
+ }
++#endif
+
+
+ /* If the connection fails synchronously, we don't want to call the
diff --git a/source/l/loudmouth/loudmouth.crtpath.diff b/source/l/loudmouth/loudmouth.crtpath.diff
new file mode 100644
index 000000000..ada600405
--- /dev/null
+++ b/source/l/loudmouth/loudmouth.crtpath.diff
@@ -0,0 +1,11 @@
+--- loudmouth-1.4.3/loudmouth/lm-ssl-gnutls.c.orig 2008-10-29 14:45:10.000000000 +0100
++++ loudmouth-1.4.3/loudmouth/lm-ssl-gnutls.c 2009-11-03 23:49:02.000000000 +0100
+@@ -32,7 +32,7 @@
+
+ #include <gnutls/x509.h>
+
+-#define CA_PEM_FILE "/etc/ssl/certs/ca-certificates.crt"
++#define CA_PEM_FILE "/usr/share/curl/ca-bundle.crt"
+
+ struct _LmSSL {
+ LmSSLBase base;
diff --git a/source/l/loudmouth/loudmouth.gnutls.configure.ac.diff b/source/l/loudmouth/loudmouth.gnutls.configure.ac.diff
new file mode 100644
index 000000000..6719141f5
--- /dev/null
+++ b/source/l/loudmouth/loudmouth.gnutls.configure.ac.diff
@@ -0,0 +1,20 @@
+--- ./configure.ac.orig 2008-10-29 15:23:52.000000000 -0500
++++ ./configure.ac 2010-04-10 15:42:12.000000000 -0500
+@@ -146,10 +146,13 @@
+ 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/source/l/loudmouth/loudmouth.sasl-md5-digest-uri.diff b/source/l/loudmouth/loudmouth.sasl-md5-digest-uri.diff
new file mode 100644
index 000000000..50c796e87
--- /dev/null
+++ b/source/l/loudmouth/loudmouth.sasl-md5-digest-uri.diff
@@ -0,0 +1,22 @@
+diff -urp loudmouth-1.4.3.OLD/loudmouth/lm-connection.c loudmouth-1.4.3/loudmouth/lm-connection.c
+--- loudmouth-1.4.3.OLD/loudmouth/lm-connection.c 2008-10-29 16:38:26.000000000 -0400
++++ loudmouth-1.4.3/loudmouth/lm-connection.c 2009-06-12 19:13:03.183960144 -0400
+@@ -1442,10 +1442,17 @@ lm_connection_authenticate (LmConnection
+ 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/source/l/loudmouth/loudmouth.stanzadrop.diff b/source/l/loudmouth/loudmouth.stanzadrop.diff
new file mode 100644
index 000000000..87b86a998
--- /dev/null
+++ b/source/l/loudmouth/loudmouth.stanzadrop.diff
@@ -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/source/l/loudmouth/slack-desc b/source/l/loudmouth/slack-desc
new file mode 100644
index 000000000..00f7c03f5
--- /dev/null
+++ b/source/l/loudmouth/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+loudmouth: loudmouth (XMPP C programming library)
+loudmouth:
+loudmouth: Loudmouth is a lightweight and easy-to-use C library for programming
+loudmouth: with the Jabber protocol. It is designed to be easy to get started
+loudmouth: with, and yet extensible enough to allow you to do anything that the
+loudmouth: Jabber protocol allows.
+loudmouth:
+loudmouth: loudmouth home: http://www.loudmouth-project.org/
+loudmouth:
+loudmouth:
+loudmouth: