> On 04 Apr 2016, at 04:57, Michael McConville <mm...@mykolab.com> wrote:
> 
> Michael McConville wrote:
>> We last updated net/loudmouth in 2008. Upstream is gone, and the
>> following depend on it:
>> 
>> o net/mcabber
>> o net/irssi-xmpp

irssi-xmpp is not yet ready for newer loudmouth:
https://github.com/cdidier/irssi-xmpp/issues/5

>> o net/freetalk
>> o lang/io (strangly)
>> 
>> I know that at least two of those are pretty common chat clients.
>> Because loudmouth is a network-exposed XMPP library, this is probably a
>> dangerous situation. The best solution is likely to switch to a
>> (somewhat) maintained fork from the mcabber people:
>> 
>> https://github.com/mcabber/loudmouth
>> 
>> Below is an initial patch for that. I haven't tested whether it works
>> with its dependencies yet - I thought I'd get a sanity check first.
>> 
>> A few things to note:
>> 
>> o I have to remove "include $(top_srcdir)/gtk-doc.make" from one of the
>>   Makefile.am's or the build fails
>> 
>> o Their means of checking for strndup(3) support didn't work, so I just
>>   removed their redefinition
>> 
>> o I don't entirely know what I'm doing with the autononsense, so there
>>   may be an easier way of dealing with it
> 
> If someone who actually uses loudmouth or something it depends on wants
> to adopt this patch, it'd be greatly appreciated.
> 
> If so, be sure to consider sthen and landry's comments.
> 
> Thanks,
> Mike
> 
>> Index: Makefile
>> ===================================================================
>> RCS file: /cvs/ports/net/loudmouth/Makefile,v
>> retrieving revision 1.25
>> diff -u -p -r1.25 Makefile
>> --- Makefile 21 Apr 2015 18:24:23 -0000      1.25
>> +++ Makefile 3 Mar 2016 00:09:35 -0000
>> @@ -2,13 +2,16 @@
>> 
>> COMMENT=             lightweight Jabber client library
>> 
>> -V=                  1.4.3
>> -DISTNAME=           loudmouth-$V
>> -REVISION=           6
>> +VERSION =           1.5.0
>> +DISTNAME =          loudmouth-${VERSION}
>> +
>> SHARED_LIBS +=       loudmouth-1          3.0      # .1.0
>> CATEGORIES=          net devel
>> 
>> -HOMEPAGE=           http://groups.google.com/group/loudmouth-dev/
>> +GH_ACCOUNT =                mcabber
>> +GH_PROJECT =                loudmouth
>> +
>> +DISTFILES =         ${VERSION}${EXTRACT_SUFX}
>> 
>> # LGPLv2.1
>> PERMIT_PACKAGE_CDROM=        Yes
>> @@ -17,18 +20,33 @@ WANTLIB += crypto glib-2.0 idn>=16 pcre 
>> 
>> MODULES=             devel/gettext
>> 
>> -MASTER_SITES=       
>> ${MASTER_SITE_GNOME:=sources/loudmouth/${V:C/^([0-9]+\.[0-9]+).*/\1/}/}
>> -EXTRACT_SUFX=       .tar.bz2
>> -
>> LIB_DEPENDS=         devel/glib2 \
>>                      devel/libidn
>> -BUILD_DEPENDS=              ${TEST_DEPENDS}
>> -TEST_DEPENDS=       devel/check
>> 
>> -CONFIGURE_STYLE=    gnu
>> +BUILD_DEPENDS =             ${TEST_DEPENDS} \
>> +                    ${MODGNU_AUTOCONF_DEPENDS} \
>> +                    ${MODGNU_AUTOMAKE_DEPENDS} \
>> +                    devel/libtool
>> +
>> +TEST_DEPENDS =              devel/check
>> +
>> +CONFIGURE_STYLE =   autoconf automake gnu
>> +AUTOCONF_VERSION =  2.69
>> +AUTOMAKE_VERSION =  1.15
>> +# with-compile-warnings=yes prevents it from using -Werror
>> CONFIGURE_ARGS+=     ${CONFIGURE_SHARED} \
>>                      --disable-mono \
>>                      --with-check=${LOCALBASE} \
>> +                    --with-compile-warnings=yes \
>>                      --with-ssl=openssl
>> +
>> +AUTO_ENV =          AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
>> +                    AUTOCONF_VERSION=${AUTOCONF_VERSION}
>> +
>> +post-patch:
>> +    cd ${WRKSRC}; ${AUTO_ENV} aclocal
>> +
>> +pre-configure:
>> +    cd ${WRKSRC}; libtoolize && ${AUTO_ENV} automake --add-missing --foreign
>> 
>> .include <bsd.port.mk>
>> Index: distinfo
>> ===================================================================
>> RCS file: /cvs/ports/net/loudmouth/distinfo,v
>> retrieving revision 1.6
>> diff -u -p -r1.6 distinfo
>> --- distinfo 18 Jan 2015 03:14:42 -0000      1.6
>> +++ distinfo 3 Mar 2016 00:09:35 -0000
>> @@ -1,2 +1,2 @@
>> -SHA256 (loudmouth-1.4.3.tar.bz2) = 
>> lak/XQCbceqBk9mUqhHzEbwzCj7+G3zXTcSPEcf5KeM=
>> -SIZE (loudmouth-1.4.3.tar.bz2) = 366818
>> +SHA256 (1.5.0.tar.gz) = UUAxemOEUMl3pynexUW1lTjqSy5Rndcj07/aEsonhmU=
>> +SIZE (1.5.0.tar.gz) = 124001
>> Index: patches/patch-configure
>> ===================================================================
>> RCS file: patches/patch-configure
>> diff -N patches/patch-configure
>> --- patches/patch-configure  18 Nov 2008 11:41:23 -0000      1.3
>> +++ /dev/null        1 Jan 1970 00:00:00 -0000
>> @@ -1,19 +0,0 @@
>> -$OpenBSD: patch-configure,v 1.3 2008/11/18 11:41:23 jasper Exp $
>> ---- configure.orig  Wed Oct 29 21:25:57 2008
>> -+++ configure       Tue Nov 18 12:33:20 2008
>> -@@ -21423,6 +21423,7 @@ cat >>conftest.$ac_ext <<_ACEOF
>> - 
>> - #include <stdio.h>
>> - #include <stdlib.h>
>> -+#include <string.h>
>> - 
>> - #include <check.h>
>> - 
>> -@@ -21532,6 +21533,7 @@ cat >>conftest.$ac_ext <<_ACEOF
>> - 
>> - #include <stdio.h>
>> - #include <stdlib.h>
>> -+#include <string.h>
>> - 
>> - #include <check.h>
>> - 
>> Index: patches/patch-docs_reference_Makefile_am
>> ===================================================================
>> RCS file: patches/patch-docs_reference_Makefile_am
>> diff -N patches/patch-docs_reference_Makefile_am
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ patches/patch-docs_reference_Makefile_am 3 Mar 2016 00:09:35 -0000
>> @@ -0,0 +1,13 @@
>> +$OpenBSD$
>> +--- docs/reference/Makefile.am.orig Wed Mar  2 14:22:02 2016
>> ++++ docs/reference/Makefile.am      Wed Mar  2 14:22:25 2016
>> +@@ -80,9 +80,6 @@ GTKDOC_LIBS=                                              
>> \
>> +    $(top_builddir)/loudmouth/libloudmouth.la
>> + 
>> + 
>> +-# This includes the standard gtk-doc make rules, copied by gtkdocize.
>> +-include $(top_srcdir)/gtk-doc.make
>> +-
>> + # Other files to distribute
>> + # e.g. EXTRA_DIST += version.xml.in
>> + EXTRA_DIST += 
>> Index: patches/patch-loudmouth_Makefile_in
>> ===================================================================
>> RCS file: patches/patch-loudmouth_Makefile_in
>> diff -N patches/patch-loudmouth_Makefile_in
>> --- patches/patch-loudmouth_Makefile_in      20 Aug 2008 16:11:11 -0000      
>> 1.1
>> +++ /dev/null        1 Jan 1970 00:00:00 -0000
>> @@ -1,13 +0,0 @@
>> -$OpenBSD: patch-loudmouth_Makefile_in,v 1.1 2008/08/20 16:11:11 jasper Exp $
>> ---- loudmouth/Makefile.in.orig      Mon Aug  4 13:37:02 2008
>> -+++ loudmouth/Makefile.in   Mon Aug  4 13:37:12 2008
>> -@@ -306,8 +306,7 @@ libloudmouthinclude_HEADERS = \
>> - 
>> - libloudmouth_1_la_LIBADD = \
>> -    $(LOUDMOUTH_LIBS)               \
>> --   $(LIBIDN_LIBS) \
>> --   -lresolv
>> -+   $(LIBIDN_LIBS)
>> - 
>> - libloudmouth_1_la_LDFLAGS = \
>> -    -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
>> Index: patches/patch-loudmouth_asyncns_c
>> ===================================================================
>> RCS file: patches/patch-loudmouth_asyncns_c
>> diff -N patches/patch-loudmouth_asyncns_c
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ patches/patch-loudmouth_asyncns_c        3 Mar 2016 00:09:35 -0000
>> @@ -0,0 +1,39 @@
>> +$OpenBSD$
>> +--- loudmouth/asyncns.c.orig        Mon Mar  9 19:05:59 2009
>> ++++ loudmouth/asyncns.c     Wed Mar  2 14:31:49 2016
>> +@@ -24,6 +24,7 @@
>> + 
>> + /* #undef HAVE_PTHREAD */
>> + 
>> ++#include <sys/resource.h>
>> + #include <assert.h>
>> + #include <fcntl.h>
>> + #include <signal.h>
>> +@@ -176,27 +177,6 @@ typedef struct res_query_response {
>> +     int _errno;
>> +     int _h_errno;
>> + } res_response_t;
>> +-
>> +-#ifndef HAVE_STRNDUP
>> +-
>> +-static char *strndup(const char *s, size_t l) {
>> +-    size_t a;
>> +-    char *n;
>> +-
>> +-    a = strlen(s);
>> +-    if (a > l)
>> +-        a = l;
>> +-
>> +-    if (!(n = malloc(a+1)))
>> +-        return NULL;
>> +-
>> +-    memcpy(n, s, a);
>> +-    n[a] = 0;
>> +-
>> +-    return n;
>> +-}
>> +-
>> +-#endif
>> + 
>> + #ifndef HAVE_PTHREAD
>> + 
>> Index: patches/patch-loudmouth_lm-error_c
>> ===================================================================
>> RCS file: /cvs/ports/net/loudmouth/patches/patch-loudmouth_lm-error_c,v
>> retrieving revision 1.1
>> diff -u -p -r1.1 patch-loudmouth_lm-error_c
>> --- patches/patch-loudmouth_lm-error_c       23 Mar 2012 13:28:25 -0000      
>> 1.1
>> +++ patches/patch-loudmouth_lm-error_c       3 Mar 2016 00:09:35 -0000
>> @@ -2,9 +2,9 @@ $OpenBSD: patch-loudmouth_lm-error_c,v 1
>> 
>> error: #error "Only <glib.h> can be included directly."
>> 
>> ---- loudmouth/lm-error.c.orig       Sun Mar 18 07:26:55 2012
>> -+++ loudmouth/lm-error.c    Sun Mar 18 07:27:04 2012
>> -@@ -19,7 +19,7 @@
>> +--- loudmouth/lm-error.c.orig       Mon Mar  9 19:05:59 2009
>> ++++ loudmouth/lm-error.c    Wed Mar  2 14:21:01 2016
>> +@@ -25,7 +25,7 @@
>>   */
>> 
>>  #include <config.h>
>> @@ -12,4 +12,4 @@ error: #error "Only <glib.h> can be incl
>> +#include <glib.h>
>>  #include "lm-error.h"
>> 
>> - /**
>> + GQuark
>> Index: patches/patch-loudmouth_lm-resolver_c
>> ===================================================================
>> RCS file: patches/patch-loudmouth_lm-resolver_c
>> diff -N patches/patch-loudmouth_lm-resolver_c
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ patches/patch-loudmouth_lm-resolver_c    3 Mar 2016 00:09:35 -0000
>> @@ -0,0 +1,11 @@
>> +$OpenBSD$
>> +--- loudmouth/lm-resolver.c.orig    Wed Mar  2 14:37:08 2016
>> ++++ loudmouth/lm-resolver.c Wed Mar  2 14:37:26 2016
>> +@@ -27,6 +27,7 @@
>> + #include <arpa/nameser_compat.h>
>> + #endif
>> + 
>> ++#include <netinet/in.h>
>> + #include <arpa/nameser.h>
>> + #include <resolv.h>
>> + 
>> Index: patches/patch-loudmouth_lm-ssl-openssl_c
>> ===================================================================
>> RCS file: patches/patch-loudmouth_lm-ssl-openssl_c
>> diff -N patches/patch-loudmouth_lm-ssl-openssl_c
>> --- patches/patch-loudmouth_lm-ssl-openssl_c 19 Jan 2009 10:54:27 -0000      
>> 1.1
>> +++ /dev/null        1 Jan 1970 00:00:00 -0000
>> @@ -1,18 +0,0 @@
>> -$OpenBSD: patch-loudmouth_lm-ssl-openssl_c,v 1.1 2009/01/19 10:54:27 jasper 
>> Exp $
>> ---- loudmouth/lm-ssl-openssl.c.orig Mon Jan 19 11:50:51 2009
>> -+++ loudmouth/lm-ssl-openssl.c      Mon Jan 19 11:51:45 2009
>> -@@ -305,6 +305,14 @@ _lm_ssl_initialize (LmSSL *ssl) 
>> -            g_warning ("SSL_CTX_new() == NULL");
>> -            abort();
>> -    }
>> -+   /* Set the NO_TICKET option on the context to allow for talk to Google 
>> Talk 
>> -+    * which apparently seems to be having a problem handling empty session 
>> -+    * tickets due to a bug in Java.
>> -+    *
>> -+    * See http://twistedmatrix.com/trac/ticket/3463 and
>> -+    * Loudmouth [#28].
>> -+    */
>> -+   SSL_CTX_set_options (ssl->ssl_ctx, SSL_OP_NO_TICKET);
>> -    /*if (access("/etc/ssl/cert.pem", R_OK) == 0)
>> -            cert_file = "/etc/ssl/cert.pem";
>> -    if (!SSL_CTX_load_verify_locations(ssl->ssl_ctx,
>> Index: patches/patch-tests-Makefile_in
>> ===================================================================
>> RCS file: patches/patch-tests-Makefile_in
>> diff -N patches/patch-tests-Makefile_in
>> --- patches/patch-tests-Makefile_in  20 Aug 2008 16:11:11 -0000      1.2
>> +++ /dev/null        1 Jan 1970 00:00:00 -0000
>> @@ -1,21 +0,0 @@
>> -$OpenBSD: patch-tests-Makefile_in,v 1.2 2008/08/20 16:11:11 jasper Exp $
>> ---- tests/Makefile.in.orig  Mon Aug  4 13:23:35 2008
>> -+++ tests/Makefile.in       Mon Aug  4 13:24:03 2008
>> -@@ -52,7 +52,7 @@ test_objects_LDADD = $(LDADD)
>> - am_test_parser_OBJECTS = test-parser.$(OBJEXT)
>> - test_parser_OBJECTS = $(am_test_parser_OBJECTS)
>> - test_parser_LDADD = $(LDADD)
>> --DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
>> -+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I${TRUEPREFIX}/include
>> - depcomp = $(SHELL) $(top_srcdir)/depcomp
>> - am__depfiles_maybe = depfiles
>> - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
>> -@@ -127,7 +127,7 @@ INSTALL_DATA = @INSTALL_DATA@
>> - INSTALL_PROGRAM = @INSTALL_PROGRAM@
>> - INSTALL_SCRIPT = @INSTALL_SCRIPT@
>> - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
>> --LDFLAGS = @LDFLAGS@
>> -+LDFLAGS = @LDFLAGS@ -lcheck
>> - LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@
>> - LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@
>> - LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@
>> 
> 

Reply via email to