Package: gnome-vfs / 1:2.24.4-6

gnutls3.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Description: Switch to gnutls28.
Author: Dimitri John Ledkov <xnox@ubuntu.com>

--- a/configure.in
+++ b/configure.in
@@ -671,10 +671,6 @@
   if test "x${OPENSSL_LIBS}" != "x"; then
     AC_MSG_ERROR([*** Can't use both openssl and gnutls at the same time. Please pick one only. ***])
   else
-    AM_PATH_LIBGCRYPT
-    if test "x${LIBGCRYPT_LIBS}" = "x"; then
-      AC_MSG_ERROR([Unable to find LIBGRYPT])
-    fi
     PKG_CHECK_MODULES(LIBGNUTLS, gnutls >= 1.0.0, [AC_DEFINE(HAVE_GNUTLS, 1, [Define to 1 if GnuTLS is available])
     				 	   	  have_ssl=true])
     if test "x${LIBGNUTLS_LIBS}" = "x"; then
@@ -1048,8 +1044,8 @@
 dnl ==============================================================================
 
 PKG_CHECK_MODULES(LIBGNOMEVFS, glib-2.0 >= $GLIB_REQUIRED gmodule-no-export-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libxml-2.0 >= $XML_REQUIRED gnome-mime-data-2.0 $dbus_requirement)
-LIBGNOMEVFS_CFLAGS="$LIBGNOMEVFS_CFLAGS $OPENSSL_CFLAGS $LIBGNUTLS_CFLAGS $LIBGCRYPT_CFLAGS $HOWL_CFLAGS $AVAHI_CFLAGS"
-LIBGNOMEVFS_LIBS="$LIBGNOMEVFS_LIBS $OPENSSL_LIBS $LIBGNUTLS_LIBS $LIBGCRYPT_LIBS $HOWL_LIBS $AVAHI_LIBS $RESOLVER_LIBS"
+LIBGNOMEVFS_CFLAGS="$LIBGNOMEVFS_CFLAGS $OPENSSL_CFLAGS $LIBGNUTLS_CFLAGS $HOWL_CFLAGS $AVAHI_CFLAGS"
+LIBGNOMEVFS_LIBS="$LIBGNOMEVFS_LIBS $OPENSSL_LIBS $LIBGNUTLS_LIBS $HOWL_LIBS $AVAHI_LIBS $RESOLVER_LIBS"
 AC_SUBST(LIBGNOMEVFS_CFLAGS)
 AC_SUBST(LIBGNOMEVFS_LIBS)
 
--- a/libgnomevfs/gnome-vfs-ssl.c
+++ b/libgnomevfs/gnome-vfs-ssl.c
@@ -42,8 +42,10 @@
 #include <openssl/x509.h>
 #include <openssl/err.h>
 #elif defined HAVE_GNUTLS
-#include <gcrypt.h>
 #include <gnutls/gnutls.h>
+#if GNUTLS_VERSION_NUMBER <= 0x020b00
+#include <gcrypt.h>
+#endif
 #endif
 #if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS)
 #include <sys/time.h>
@@ -82,7 +84,7 @@
 	GnomeVFSSSLPrivate *private;
 };
 
-#ifdef HAVE_GNUTLS
+#if defined(HAVE_GNUTLS) && GNUTLS_VERSION_NUMBER <= 0x020b00
 static int gcry_gthread_mutex_init (void **priv)			      
 {									      
 	GMutex* lock = g_mutex_new();
@@ -127,7 +129,9 @@
 #ifdef HAVE_OPENSSL
 	SSL_library_init ();
 #elif defined HAVE_GNUTLS
+#if GNUTLS_VERSION_NUMBER <= 0x020b00
 	gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_gthread);
+#endif
 	gnutls_global_init();
 #endif
 	return NULL;