chat/bitlbee: Fix regression due to upgrade to gnutils 3.0

GnuTLS deprecated gnutils_transport_set_lowat function in version 2.12.0
and finally removed it with version 3.0, breaking any packages that
still reference it.

The lowat feature is now disabled permanently I think.
The patch uses the GNUTLS_VERSION_NUMBER macro to appropriately conceal
the function reference.  The same patch is widely seen on the 'net with
other packages that use GnuTLS.
This commit is contained in:
marino 2012-07-18 09:56:02 +00:00
parent 158bca4c2b
commit 1e1d7f815e
3 changed files with 21 additions and 3 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.59 2012/06/12 15:45:55 wiz Exp $
# $NetBSD: Makefile,v 1.60 2012/07/18 09:56:02 marino Exp $
#
DISTNAME= bitlbee-3.0.3
PKGREVISION= 4
PKGREVISION= 5
CATEGORIES= chat
MASTER_SITES= http://get.bitlbee.org/src/

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.28 2011/11/18 21:06:19 tonio Exp $
$NetBSD: distinfo,v 1.29 2012/07/18 09:56:02 marino Exp $
SHA1 (bitlbee-3.0.3.tar.gz) = 4140eb7aaa2c6a39fa059d19f8fbaec0d7a1ebff
RMD160 (bitlbee-3.0.3.tar.gz) = 4b537871eef1bb5b6839105bc7bc9f2567e5b8e1
Size (bitlbee-3.0.3.tar.gz) = 676417 bytes
SHA1 (patch-lib_http__client.c) = 9659b12ee2ad796cab9ac4fa9b29067677df63fe
SHA1 (patch-lib_ssl__gnutls.c) = 48c888182d162c72be03d19f653b67771ac1db88

View file

@ -0,0 +1,17 @@
$NetBSD: patch-lib_ssl__gnutls.c,v 1.1 2012/07/18 09:56:02 marino Exp $
GnuTLS deprecated gnutls_transport_set_lowat in version 2.12.0 and removed it by version 3
The lowat feature is always disabled now.
--- lib/ssl_gnutls.c.orig 2012-07-18 08:30:44.294219000 +0000
+++ lib/ssl_gnutls.c
@@ -134,7 +134,9 @@ static gboolean ssl_connected( gpointer
gnutls_certificate_allocate_credentials( &conn->xcred );
gnutls_init( &conn->session, GNUTLS_CLIENT );
+#if GNUTLS_VERSION_NUMBER < 0x020c00
gnutls_transport_set_lowat( conn->session, 1 );
+#endif
gnutls_set_default_priority( conn->session );
gnutls_credentials_set( conn->session, GNUTLS_CRD_CERTIFICATE, conn->xcred );