changeset 1687:795aba5b9440

upgrade package gnutls
author Mark Brand <mabrand@mabrand.nl>
date Fri, 25 Mar 2011 17:21:46 +0100
parents ad05667dbb18
children 1e4b0f1f9252
files src/gnutls-1-fixes.patch src/gnutls.mk
diffstat 2 files changed, 67 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gnutls-1-fixes.patch	Fri Mar 25 17:21:46 2011 +0100
@@ -0,0 +1,60 @@
+This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+Contains ad hoc patches for cross building.
+
+From e0633729f352fd3ca1dc31e11db0e03b0ec39132 Mon Sep 17 00:00:00 2001
+From: mingw-cross-env
+Date: Fri, 25 Mar 2011 16:09:35 +0100
+Subject: [PATCH 1/2] C++ compatibility fix
+
+
+diff --git a/lib/includes/gnutls/compat.h b/lib/includes/gnutls/compat.h
+index af02d92..6f200db 100644
+--- a/lib/includes/gnutls/compat.h
++++ b/lib/includes/gnutls/compat.h
+@@ -114,6 +114,10 @@
+ #define LIBGNUTLS_VERSION_NUMBER GNUTLS_VERSION_NUMBER
+ #define LIBGNUTLS_EXTRA_VERSION GNUTLS_VERSION
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ /* The gnutls_retr_st was deprecated by gnutls_certificate_retrieve_function()
+  * and gnutls_retr2_st.
+  */
+@@ -345,4 +349,7 @@ gnutls_sign_callback_get (gnutls_session_t session, void **userdata)
+ 
+   void gnutls_transport_set_lowat (gnutls_session_t session, int num) _GNUTLS_GCC_ATTR_DEPRECATED;
+ 
++#ifdef  __cplusplus
++}
++#endif
+ #endif /* _GNUTLS_COMPAT_H */
+-- 
+1.7.4.1
+
+
+From 4e2d2db1c9ca65ddfd59eefa6802177559676328 Mon Sep 17 00:00:00 2001
+From: mingw-cross-env
+Date: Fri, 25 Mar 2011 16:10:53 +0100
+Subject: [PATCH 2/2] add parameter vaiable to avoid gcc error
+
+
+diff --git a/lib/system.c b/lib/system.c
+index f3bed5f..b795fca 100644
+--- a/lib/system.c
++++ b/lib/system.c
+@@ -50,7 +50,7 @@
+ #ifdef _WIN32
+ 
+ int
+-system_errno (gnutls_transport_ptr)
++system_errno (gnutls_transport_ptr p)
+ {
+   int tmperr = WSAGetLastError ();
+   int ret = 0;
+-- 
+1.7.4.1
+
--- a/src/gnutls.mk	Thu Mar 24 09:41:11 2011 +0100
+++ b/src/gnutls.mk	Fri Mar 25 17:21:46 2011 +0100
@@ -4,8 +4,8 @@
 # GnuTLS
 PKG             := gnutls
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 2.10.5
-$(PKG)_CHECKSUM := 4530657082a0e754356de89a5529d1ad7a18e777
+$(PKG)_VERSION  := 2.12.0
+$(PKG)_CHECKSUM := 48f27df66c7a721c5ce2b690ab936a3c9162c40a
 $(PKG)_SUBDIR   := gnutls-$($(PKG)_VERSION)
 $(PKG)_FILE     := gnutls-$($(PKG)_VERSION).tar.bz2
 $(PKG)_WEBSITE  := http://www.gnu.org/software/gnutls/
@@ -23,17 +23,19 @@
 
 define $(PKG)_BUILD
     echo '/* DEACTIVATED */' > '$(1)/gl/gai_strerror.c'
+    $(SED) -i 's/^\(SUBDIRS.*\) tests/\1/;' '$(1)/Makefile.in'
+    $(SED) -i 's/^\(SUBDIRS.*\) doc/\1/;' '$(1)/Makefile.in'
     $(SED) -i 's, sed , $(SED) ,g' '$(1)/gl/tests/Makefile.in'
     cd '$(1)' && ./configure \
         --host='$(TARGET)' \
+        --enable-static \
         --disable-shared \
         --prefix='$(PREFIX)/$(TARGET)' \
-        --with-libgcrypt-prefix='$(PREFIX)/$(TARGET)' \
         --disable-nls \
-        --with-included-opencdk \
         --with-included-libtasn1 \
         --with-included-libcfg \
-        --with-included-lzo \
+        --with-libgcrypt \
+        --with-lzo \
         LIBS='-lz'
     $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= defexec_DATA=
 endef