summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2012-10-16 10:59:22 +0000
committerEray Aslan <eras@gentoo.org>2012-10-16 10:59:22 +0000
commite6347d684ce76ad7d3d716448a35a36ba2dd63aa (patch)
tree741efeae9271bf33db62e642e71bf1bed237c170 /mail-client/cone/files
parentnet-im/gajim: Fix for broken test, #434818 (diff)
downloadgentoo-2-e6347d684ce76ad7d3d716448a35a36ba2dd63aa.tar.gz
gentoo-2-e6347d684ce76ad7d3d716448a35a36ba2dd63aa.tar.bz2
gentoo-2-e6347d684ce76ad7d3d716448a35a36ba2dd63aa.zip
Fix building with gnutls-3 - bug #421445
(Portage version: 2.2.0_alpha138/cvs/Linux x86_64, signed Manifest commit with key 0x586A3B1F)
Diffstat (limited to 'mail-client/cone/files')
-rw-r--r--mail-client/cone/files/cone-0.90-gnutls3.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/mail-client/cone/files/cone-0.90-gnutls3.patch b/mail-client/cone/files/cone-0.90-gnutls3.patch
new file mode 100644
index 000000000000..23f187bb0182
--- /dev/null
+++ b/mail-client/cone/files/cone-0.90-gnutls3.patch
@@ -0,0 +1,72 @@
+diff --git a/tcpd/configure.in b/tcpd/configure.in
+index 7261515..406914e 100644
+--- a/tcpd/configure.in
++++ b/tcpd/configure.in
+@@ -356,7 +356,7 @@ then
+
+ CPPFLAGS="$save_CPPFLAGS"
+ else
+- have_gnutls="no: pkgconfig --modeversion gnutls failed"
++ have_gnutls="no: pkgconfig --modversion gnutls failed"
+ fi
+ else
+ have_gnutls="no: pkg-config not found"
+@@ -368,7 +368,15 @@ if test "$have_gnutls" = "yes"
+ then
+ LIBCOURIERTLSGNUTLS="libcouriertlsgnutls.la"
+ CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags gnutls`"
+- gnutlsdep="`$PKGCONFIG --libs gnutls` -lgnutls-extra"
++ have_gnutls3=no
++ PKG_CHECK_EXISTS([gnutls >= 3.0], [have_gnutls3=yes])
++ if test "x$have_gnutls3" = "xno"
++ then
++ gnutlsdep="`$PKGCONFIG --libs gnutls` -lgnutls-extra"
++ else
++ gnutlsdep="`$PKGCONFIG --libs gnutls`"
++ AC_DEFINE([HAVE_GNUTLS3], [1], [Use GnuTLS3])
++ fi
+ fi
+
+ AC_CHECK_SIZEOF(gnutls_transport_ptr_t,0, [
+diff --git a/tcpd/libcouriergnutls.c b/tcpd/libcouriergnutls.c
+index 4aa4996..ef8cb70 100644
+--- a/tcpd/libcouriergnutls.c
++++ b/tcpd/libcouriergnutls.c
+@@ -9,7 +9,9 @@
+ #include "tlscache.h"
+ #include "soxwrap/soxwrap.h"
+ #include <gnutls/gnutls.h>
++#ifndef HAVE_GNUTLS3
+ #include <gnutls/extra.h>
++#endif
+ #include <gnutls/x509.h>
+ #include <gnutls/openpgp.h>
+ #include <stdio.h>
+@@ -146,7 +148,11 @@ static const struct intmap {
+ { NULL, 0}
+ }, all_comps[]={
+ { "DEFLATE", GNUTLS_COMP_DEFLATE},
++#ifndef HAVE_GNUTLS3
+ { "LZO", GNUTLS_COMP_LZO},
++#else
++ { "ZLIB", GNUTLS_COMP_ZLIB},
++#endif
+ { "NULL", GNUTLS_COMP_NULL},
+ { NULL, 0}
+ }, all_certs[]={
+@@ -408,6 +414,7 @@ ssl_context tls_create(int isserver, const struct tls_info *info)
+ return (NULL);
+ }
+
++#ifndef HAVE_GNUTLS3
+ if (gnutls_global_init_extra() < 0)
+ {
+ gnutls_global_deinit();
+@@ -416,6 +423,7 @@ ssl_context tls_create(int isserver, const struct tls_info *info)
+ errno=EINVAL;
+ return (NULL);
+ }
++#endif
+ }
+
+ if (!(words=splitwords(safe_getenv(p, "TLS_PROTOCOL",