packages curl gsoap vmime: gnutls 3 compatibility

Mark Brand 13 years ago
parent 9b8424c30c
commit 159e951648

@ -1,19 +0,0 @@
This file is part of mingw-cross-env.
See doc/index.html for further information.
This patch has been taken from:
http://sourceforge.net/tracker/?func=detail&aid=3016471&group_id=976&atid=100976
diff -r f9016ca5bace include/curl/curlbuild.h.in
--- a/include/curl/curlbuild.h.in Tue Jun 15 13:55:53 2010 +0200
+++ b/include/curl/curlbuild.h.in Tue Jun 15 14:00:13 2010 +0200
@@ -111,6 +111,9 @@
/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
/* ================================================================ */
+/* Configure process defines this to 1 when static linking is requested. */
+#undef CURL_STATICLIB
+
/* Configure process defines this to 1 when it finds out that system */
/* header file ws2tcpip.h must be included by the external interface. */
#undef CURL_PULL_WS2TCPIP_H

@ -0,0 +1,120 @@
This file is part of mingw-cross-env.
See doc/index.html for further information.
Commits backported (cherry-picked) from upstream.
http://github.com/bagder/curl
Also contains mingw-cross-env specific fixes.
From 39817fb04ff2ea4a693a1e853ca5fbd469c2b531 Mon Sep 17 00:00:00 2001
From: Tim Harder <radhermit@gmail.com>
Date: Wed, 19 Oct 2011 10:08:56 +0200
Subject: [PATCH 1/3] gtls: only call gnutls_transport_set_lowat with
<gnutls-2.12.0
The default lowat level for gnutls-2.12* is set to zero to avoid
unnecessary system calls and the gnutls_transport_set_lowat function has
been totally removed in >=gnutls-3 which causes build failures.
Therefore, the function shouldn't be used except for versions that
require it, <gnutls-2.12.0.
(cherry picked from commit 8036da870c5b413a83097b3486c58d13910a471a)
---
lib/gtls.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/gtls.c b/lib/gtls.c
index f75a815..7ca46c8 100644
--- a/lib/gtls.c
+++ b/lib/gtls.c
@@ -476,8 +476,10 @@ gtls_connect_step1(struct connectdata *conn,
gnutls_transport_set_push_function(session, Curl_gtls_push);
gnutls_transport_set_pull_function(session, Curl_gtls_pull);
+#if GNUTLS_VERSION_NUMBER < 0x020c00
/* lowat must be set to zero when using custom push and pull functions. */
gnutls_transport_set_lowat(session, 0);
+#endif
/* This might be a reconnect, so we check for a session ID in the cache
to speed up things */
--
1.7.7
From fd07a074e806ca3b7e2cc8ea4815eadf354add55 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Fri, 28 Oct 2011 13:43:50 +0200
Subject: [PATCH 2/3] gnutls 3.0 compatibility hack
taken from:
http://curl.haxx.se/mail/lib-2011-10/0326.html
---
lib/gtls.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/lib/gtls.c b/lib/gtls.c
index 7ca46c8..b220081 100644
--- a/lib/gtls.c
+++ b/lib/gtls.c
@@ -113,6 +113,31 @@ static int gtls_mapped_sockerrno(void)
}
return gtls_EIO;
}
+#if GNUTLS_VERSION_NUMBER >= 0x030000
+/* fixme: ugly workaround for loss of this gnutls function */
+void
+gnutls_transport_set_global_errno (int err)
+{
+#ifdef _WIN32
+ /* Keep this in sync with system_errno */
+ switch (err)
+ {
+ case EAGAIN:
+ SetLastError (WSAEWOULDBLOCK);
+ break;
+ case EINTR:
+ SetLastError (WSAEINTR);
+ break;
+ default:
+ /* We don't care about anything else */
+ SetLastError (NO_ERROR);
+ break;
+ }
+#else
+ errno = err;
+#endif
+}
+#endif
#endif
static ssize_t Curl_gtls_push(void *s, const void *buf, size_t len)
--
1.7.7
From f31f9e667f09c68e5f0a5ec1781971fe62ce5424 Mon Sep 17 00:00:00 2001
From: Volker Grabsch <vog@notjusthosting.com>
Date: Fri, 28 Oct 2011 13:48:04 +0200
Subject: [PATCH 3/3] static linking for mingw-cross-env
---
include/curl/curlbuild.h.in | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in
index fe348f4..c428273 100644
--- a/include/curl/curlbuild.h.in
+++ b/include/curl/curlbuild.h.in
@@ -111,6 +111,9 @@
/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
/* ================================================================ */
+/* Configure process defines this to 1 when static linking is requested. */
+#undef CURL_STATICLIB
+
/* Configure process defines this to 1 when it finds out that system */
/* header file ws2tcpip.h must be included by the external interface. */
#undef CURL_PULL_WS2TCPIP_H
--
1.7.7

@ -10,7 +10,7 @@ $(PKG)_SUBDIR := gsoap-$(call SHORT_PKG_VERSION,$(PKG))
$(PKG)_FILE := gsoap_$($(PKG)_VERSION).zip
$(PKG)_WEBSITE := http://gsoap2.sourceforge.net/
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/gsoap2/gSOAP/$($(PKG)_FILE)
$(PKG)_DEPS := gcc gnutls libntlm
$(PKG)_DEPS := gcc gnutls libgcrypt libntlm
define $(PKG)_UPDATE
wget -q -O- 'http://sourceforge.net/projects/gsoap2/files/gSOAP/' | \
@ -34,7 +34,7 @@ define $(PKG)_BUILD
# wine confuses the cross-compiling detection, so set it explicitly
$(SED) -i 's,cross_compiling=no,cross_compiling=yes,' '$(1)/configure'
# fix hard-coded gnutls dependencies
$(SED) -i "s/-lgnutls -lgcrypt -lgpg-error -lz/`'$(TARGET)-pkg-config' --libs-only-l gnutls`/g;" '$(1)/configure'
$(SED) -i "s/-lgnutls/`'$(TARGET)-pkg-config' --libs-only-l gnutls`/g;" '$(1)/configure'
# Build for mingw. Static by default.
# Prevent undefined reference to _rpl_malloc.

@ -44,7 +44,7 @@ GITDIR=~/projects/vmime/git/vmime
From c6f077e695b75d9ff9a32d1621f6a320c8ce70f1 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Tue, 30 Nov 2010 14:57:03 +0000
Subject: [PATCH 01/19] Initialize and delete object.
Subject: [PATCH 01/20] Initialize and delete object.
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@577 5301114d-f842-0410-bbdd-996ee0417009
@ -72,13 +72,13 @@ index 0f3e9ec..d71c3ca 100644
void go(IMAPParser& parser, string& line, string::size_type* currentPos)
--
1.7.6
1.7.7
From 41203315eacf53230dd7bdb0cf2b0d1078ddee39 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Wed, 8 Dec 2010 08:52:54 +0000
Subject: [PATCH 02/19] No extra space between ':' and '<' in MAIL FROM and
Subject: [PATCH 02/20] No extra space between ':' and '<' in MAIL FROM and
RCPT TO. Wait for server response after QUIT and
before closing connection.
@ -115,13 +115,13 @@ index 204daae..d9fb7b8 100644
if ((resp = readResponse())->getCode() != 250)
{
--
1.7.6
1.7.7
From 969b56f4bd61ddb8277c04ac2a1e35e029ec058b Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Fri, 10 Dec 2010 16:24:06 +0000
Subject: [PATCH 03/19] Fixed unit test after bug fix.
Subject: [PATCH 03/20] Fixed unit test after bug fix.
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@580 5301114d-f842-0410-bbdd-996ee0417009
@ -139,13 +139,13 @@ index 5015552..6552f9e 100644
localSend("250 OK\r\n");
}
--
1.7.6
1.7.7
From 50743da0712b216533acdc09069f1bfc81f988c6 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Fri, 10 Dec 2010 16:54:38 +0000
Subject: [PATCH 04/19] Fixed boundary parsing (thanks to John van der Kamp,
Subject: [PATCH 04/20] Fixed boundary parsing (thanks to John van der Kamp,
Zarafa).
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@581 5301114d-f842-0410-bbdd-996ee0417009
@ -228,13 +228,13 @@ index 12c4f74..df2bf85 100644
vmime::bodyPart p;
--
1.7.6
1.7.7
From b6d2b4765c9472ff333cace13c57c6af0e866ee0 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Fri, 21 Jan 2011 15:28:06 +0000
Subject: [PATCH 05/19] Fixed possible infinite loop (thanks to John van der
Subject: [PATCH 05/20] Fixed possible infinite loop (thanks to John van der
Kamp, Zarafa).
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@582 5301114d-f842-0410-bbdd-996ee0417009
@ -281,13 +281,13 @@ index b84f376..746ac94 100644
VMIME_TEST_SUITE_END
--
1.7.6
1.7.7
From 022339ab63430d792d0314f51dd7854eabd5736e Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Fri, 28 Jan 2011 12:11:08 +0000
Subject: [PATCH 06/19] Fixed possible read to invalid memory location (thanks
Subject: [PATCH 06/20] Fixed possible read to invalid memory location (thanks
to Alexander Konovalov).
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@583 5301114d-f842-0410-bbdd-996ee0417009
@ -306,13 +306,13 @@ index 1c1c1a6..fa08d33 100644
else
state->lastCharIsSpace = false;
--
1.7.6
1.7.7
From 7f1024917b3df6be013e18a2e0f0f1b13f4d112b Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Wed, 9 Mar 2011 18:03:31 +0000
Subject: [PATCH 07/19] Fixed bug #3174903. Fixed word parsing when buffer
Subject: [PATCH 07/20] Fixed bug #3174903. Fixed word parsing when buffer
does not end with NL. Fixed 'no encoding' when
forced.
@ -514,13 +514,13 @@ index df2bf85..b129913 100644
VMIME_TEST_SUITE_END
--
1.7.6
1.7.7
From 1c0648c2a3ee4072869446755c8a7604614752e1 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Sun, 27 Mar 2011 11:26:55 +0000
Subject: [PATCH 08/19] Allow static linking in mingw-cross-env. Added 'iconv'
Subject: [PATCH 08/20] Allow static linking in mingw-cross-env. Added 'iconv'
and uses 'ws2_32' instead of 'winsock32' (#3213487).
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@585 5301114d-f842-0410-bbdd-996ee0417009
@ -549,13 +549,13 @@ index fb01edf..6e8aba2 100644
# -- getaddrinfo (POSIX)
--
1.7.6
1.7.7
From c6c596b10702a98b59978c81c01dc7f4f33157c9 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Thu, 31 Mar 2011 19:13:03 +0000
Subject: [PATCH 09/19] Flush stateful data from iconv (thanks to John van der
Subject: [PATCH 09/20] Flush stateful data from iconv (thanks to John van der
Kamp, Zarafa).
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@586 5301114d-f842-0410-bbdd-996ee0417009
@ -632,13 +632,13 @@ index 8ad71d7..54a09a7 100644
// Conversion to hexadecimal for easier debugging
static const vmime::string toHex(const vmime::string str)
--
1.7.6
1.7.7
From dce9b255556d59773bbbdd9027fd1b1bd5627886 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Fri, 10 Jun 2011 19:39:09 +0000
Subject: [PATCH 10/19] Requested email change.
Subject: [PATCH 10/20] Requested email change.
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@587 5301114d-f842-0410-bbdd-996ee0417009
(cherry picked from commit 418a39a7d33921672bd1c4beb31c8a31bc87d8dd)
@ -657,13 +657,13 @@ index 20a0181..bbddb30 100644
- Georg Sauthoff <gsauthof@techfak.uni-bielefeld.de>
- Pierre Thierry <nowhere.man@levallois.eu.org> (patches for STL algorithms)
--
1.7.6
1.7.7
From 42612622a7c42aac7bef1605d9ba8117aa651789 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Tue, 14 Jun 2011 18:37:54 +0000
Subject: [PATCH 11/19] Fixed compilation issue following namespace change.
Subject: [PATCH 11/20] Fixed compilation issue following namespace change.
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@588 5301114d-f842-0410-bbdd-996ee0417009
(cherry picked from commit 4008955783ef566b98b16762c7bfa28df26e9198)
@ -695,13 +695,13 @@ index 1ddb3d0..243b1da 100644
std::vector <vmime::string> props = e->getAvailableProperties();
--
1.7.6
1.7.7
From 43346ae2d6c39af2ed16e64cc6d7f89f427a0fee Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Sun, 19 Jun 2011 17:51:33 +0000
Subject: [PATCH 12/19] Fixed parsing of an attachment filename that is
Subject: [PATCH 12/20] Fixed parsing of an attachment filename that is
between 66 and 76 characters long (Zarafa).
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@589 5301114d-f842-0410-bbdd-996ee0417009
@ -722,13 +722,13 @@ index 91a7e5c..f59d5ab 100644
switch (value[i])
{
--
1.7.6
1.7.7
From 5ef189953965b639a9038da337e104592417c465 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Sun, 19 Jun 2011 18:08:12 +0000
Subject: [PATCH 13/19] Correctly generate attachment names which are long and
Subject: [PATCH 13/20] Correctly generate attachment names which are long and
have high characters for Outlook Express (Zarafa).
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@590 5301114d-f842-0410-bbdd-996ee0417009
@ -863,13 +863,13 @@ index f59d5ab..d757e1b 100644
#endif // !VMIME_ALWAYS_GENERATE_7BIT_PARAMETER
--
1.7.6
1.7.7
From caa3cbc0fe9218d3d494bfed1afed2ee620a2e4e Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Sun, 19 Jun 2011 18:16:49 +0000
Subject: [PATCH 14/19] Alias for UTF-7 charset.
Subject: [PATCH 14/20] Alias for UTF-7 charset.
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@591 5301114d-f842-0410-bbdd-996ee0417009
(cherry picked from commit f7ad17cffea462faf8cbe4f785644da0f3ee812a)
@ -900,13 +900,13 @@ index e043186..0fda450 100644
if (newPosition)
--
1.7.6
1.7.7
From 97d992cda306d96a8dda948abb9806ee2c2ce587 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Sun, 19 Jun 2011 18:39:35 +0000
Subject: [PATCH 15/19] Fixed messageBuilder to accept an empty mailbox group
Subject: [PATCH 15/20] Fixed messageBuilder to accept an empty mailbox group
in 'To:' field, to allow for undisclosed-recipients
(Zarafa).
@ -939,13 +939,13 @@ index 870d59e..3597b3a 100644
if (!m_to.isEmpty())
msg->getHeader()->To()->setValue(m_to);
--
1.7.6
1.7.7
From db98569ef427f9f3fac9a9dcc25ab8b6f2b3bd91 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Sun, 19 Jun 2011 18:49:55 +0000
Subject: [PATCH 16/19] Added support for mailboxes that specify an (encoded)
Subject: [PATCH 16/20] Added support for mailboxes that specify an (encoded)
full name with an empty email address, set by a <>
marker (Zarafa).
@ -1014,13 +1014,13 @@ index 8411daa..9ebadca 100644
VMIME_TEST_SUITE_END
--
1.7.6
1.7.7
From aa5ab140e90a6222e5f03b337711444be845fbd0 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Fri, 24 Jun 2011 15:46:23 +0000
Subject: [PATCH 17/19] Added missing libs in pkg-config file.
Subject: [PATCH 17/20] Added missing libs in pkg-config file.
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@594 5301114d-f842-0410-bbdd-996ee0417009
(cherry picked from commit 960f2195516eb776eea7b7e4f92612192edfdcd9)
@ -1039,13 +1039,13 @@ index 6e8aba2..4c0cb0e 100644
vmime_pc_in.write("Cflags: -I${includedir}/ @LIBGNUTLS_CFLAGS@\n")
vmime_pc_in.close()
--
1.7.6
1.7.7
From bf98b31b36ba2228d4f1c25cd3f7680d47cc8910 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Sat, 25 Jun 2011 17:07:53 +0000
Subject: [PATCH 18/19] Fixed parsing of empty body parts (thanks to John van
Subject: [PATCH 18/20] Fixed parsing of empty body parts (thanks to John van
der Kamp, from Zarafa).
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@595 5301114d-f842-0410-bbdd-996ee0417009
@ -1104,13 +1104,13 @@ index b129913..075b8f9 100644
VMIME_TEST_SUITE_END
--
1.7.6
1.7.7
From 35f5f5c7bcaca1a29e470c0e5d777817d1e89612 Mon Sep 17 00:00:00 2001
From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
Date: Sun, 26 Jun 2011 12:47:25 +0000
Subject: [PATCH 19/19] Fixed encoding of whitespace. Fixed old test case.
Subject: [PATCH 19/20] Fixed encoding of whitespace. Fixed old test case.
git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@597 5301114d-f842-0410-bbdd-996ee0417009
(cherry picked from commit 70a0282a3f96febf973475a298ac95ffaab82c3c)
@ -1199,5 +1199,46 @@ index 746ac94..43ec836 100644
VMIME_TEST_SUITE_END
--
1.7.6
1.7.7
From e118e962db814585c9b71e2e067f2c09acb184a3 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Fri, 28 Oct 2011 14:48:03 +0200
Subject: [PATCH 20/20] gnutls 3 error code compatibility
taken from:
https://sourceforge.net/tracker/?func=detail&aid=3429714&group_id=69724&atid=525570
diff --git a/src/net/tls/TLSSession.cpp b/src/net/tls/TLSSession.cpp
index 010c007..bea1156 100644
--- a/src/net/tls/TLSSession.cpp
+++ b/src/net/tls/TLSSession.cpp
@@ -22,7 +22,9 @@
//
#include <gnutls/gnutls.h>
+#if GNUTLS_VERSION_NUMBER < 0x030000
#include <gnutls/extra.h>
+#endif
#include "vmime/config.hpp"
@@ -298,10 +300,14 @@ void TLSSession::throwTLSException(const string& fname, const int code)
ERROR(GNUTLS_E_FILE_ERROR)
ERROR(GNUTLS_E_TOO_MANY_EMPTY_PACKETS)
ERROR(GNUTLS_E_UNKNOWN_PK_ALGORITHM)
+#if GNUTLS_VERSION_NUMBER < 0x030000
ERROR(GNUTLS_E_INIT_LIBEXTRA)
ERROR(GNUTLS_E_LIBRARY_VERSION_MISMATCH)
+#endif
ERROR(GNUTLS_E_NO_TEMPORARY_RSA_PARAMS)
+#if GNUTLS_VERSION_NUMBER < 0x030000
ERROR(GNUTLS_E_LZO_INIT_FAILED)
+#endif
ERROR(GNUTLS_E_NO_COMPRESSION_ALGORITHMS)
ERROR(GNUTLS_E_NO_CIPHER_SUITES)
ERROR(GNUTLS_E_OPENPGP_GETKEY_FAILED)
--
1.7.7

Loading…
Cancel
Save