sylpheed_2.2.4.bb : restore SSL functionality with gnuTLS libraries
authorGraeme Gregory <dp@xora.org.uk>
Fri, 28 Apr 2006 11:01:57 +0000 (11:01 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Fri, 28 Apr 2006 11:01:57 +0000 (11:01 +0000)
packages/sylpheed/files/sylpheed-gnutls_2.2.4.patch [new file with mode: 0644]
packages/sylpheed/sylpheed_2.2.4.bb

diff --git a/packages/sylpheed/files/sylpheed-gnutls_2.2.4.patch b/packages/sylpheed/files/sylpheed-gnutls_2.2.4.patch
new file mode 100644 (file)
index 0000000..05fbbb6
--- /dev/null
@@ -0,0 +1,93 @@
+--- sylpheed-2.2.4/config.h.in.orig    2005-11-16 10:12:37.000000000 +0000
++++ sylpheed-2.2.4/config.h.in 2006-04-28 11:36:36.000000000 +0100
+@@ -251,6 +251,9 @@
+ /* Define to 1 if your <sys/time.h> declares `struct tm'. */
+ #undef TM_IN_SYS_TIME
++/* Define if you use GnuTLS to support SSL. */
++#undef USE_GNUTLS
++
+ /* Define if you use GPGME to support OpenPGP. */
+ #undef USE_GPGME
+@@ -264,6 +267,9 @@
+ #undef USE_LDAP
+ /* Define if you use OpenSSL to support SSL. */
++#undef USE_OPENSSL
++
++/* Define if SSL is supported. */
+ #undef USE_SSL
+ /* Whether to use multithread or not */
+--- sylpheed-2.2.4/configure.in.orig   2006-03-24 04:22:10.000000000 +0000
++++ sylpheed-2.2.4/configure.in        2006-04-28 11:36:36.000000000 +0100
+@@ -231,7 +231,8 @@
+ #include <openssl/opensslv.h>
+ ],            [ return OPENSSL_VERSION_NUMBER; ],
+               [ AC_MSG_RESULT(yes)
+-                AC_DEFINE(USE_SSL, 1, Define if you use OpenSSL to support SSL.) ],
++                AC_DEFINE(USE_SSL, 1, Define if SSL is supported.)
++                AC_DEFINE(USE_OPENSSL, 1, Define if you use OpenSSL to support SSL.) ],
+               [ AC_MSG_RESULT(no)
+                 LIBS="$ac_save_LIBS"
+                 ac_cv_enable_ssl=no ])
+@@ -240,6 +241,27 @@
+       AC_MSG_RESULT(no)
+ fi
++AC_ARG_ENABLE(gnutls,
++      [  --enable-gnutls         Enable SSL support using GnuTLS [default=no]],
++      [ac_cv_enable_gnutls=$enableval], [ac_cv_enable_gnutls=no])
++AC_MSG_CHECKING([whether to use GnuTLS])
++if test $ac_cv_enable_gnutls = yes; then
++      AC_MSG_RESULT(yes)
++      AC_MSG_CHECKING([if GnuTLS is available])
++      LIBS="$LIBS -lgnutls-openssl"
++      AC_TRY_LINK([
++#include <gnutls/openssl.h>
++],    [ return OPENSSL_VERSION_NUMBER; ],
++      [ AC_MSG_RESULT(yes)
++        AC_DEFINE(USE_SSL, 1, Define if SSL is supported.)
++        AC_DEFINE(USE_GNUTLS, 1, Define if you use GnuTLS to support SSL.) ],
++      [ AC_MSG_RESULT(no)
++        LIBS="$ac_save_LIBS"
++        ac_cv_enable_gnutls=no ])
++else
++      AC_MSG_RESULT(no)
++fi
++
+ dnl Check for X-Face support
+ AC_ARG_ENABLE(compface,
+       [  --disable-compface      Do not use compface (X-Face)],
+@@ -400,6 +422,7 @@
+ echo "JPilot        : $ac_cv_enable_jpilot"
+ echo "LDAP          : $ac_cv_enable_ldap"
+ echo "OpenSSL       : $ac_cv_enable_ssl"
++echo "GnuTLS        : $ac_cv_enable_gnutls"
+ echo "iconv         : $am_cv_func_iconv"
+ echo "compface      : $ac_cv_enable_compface"
+ echo "IPv6          : $ac_cv_enable_ipv6"
+--- sylpheed-2.2.4/libsylph/ssl.h.old  2006-04-28 11:36:10.000000000 +0100
++++ sylpheed-2.2.4/libsylph/ssl.h      2006-04-28 11:37:03.000000000 +0100
+@@ -27,11 +27,20 @@
+ #if USE_SSL
+ #include <glib.h>
++#if USE_OPENSSL
+ #include <openssl/crypto.h>
+ #include <openssl/x509.h>
+ #include <openssl/pem.h>
+ #include <openssl/ssl.h>
+ #include <openssl/err.h>
++#else
++#if USE_GNUTLS
++#include <gnutls/openssl.h>
++#define X509_V_OK 0
++#else
++#error Must select either GnuTLS or OpenSSL
++#endif
++#endif
+ #include "socket.h"
index 4756bb2..80ad0b6 100644 (file)
@@ -3,11 +3,12 @@ DESCRIPTION = "Mail user agent"
 DEPENDS = "gtk+ gpgme gnutls"
 MAINTAINER = "Graeme Gregory <dp@xora.org.uk>"
 LICENSE = "GPL"
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "http://sylpheed.good-day.net/sylpheed/v2.2/sylpheed-${PV}.tar.bz2 \
        file://sylpheed-2.2.2-libsylph-Makefile-am.patch;patch=1 \
-       file://sylpheed-2.2.2-src-Makefile-am.patch;patch=1"
+       file://sylpheed-2.2.2-src-Makefile-am.patch;patch=1 \
+       file://sylpheed-gnutls_2.2.4.patch;patch=1"
 
 
 FILES_${PN} = "${bindir} ${datadir}/pixmaps ${datadir}/applications"