changeset 2095:a008684f09d4

merge
author Volker Grabsch <vog@notjusthosting.com>
date Tue, 15 Nov 2011 16:51:49 +0100
parents 93ed337d4c17 (current diff) 56c578181d21 (diff)
children fe5ce8c1485d
files src/curl-1-fix-static.patch src/gsoap-1-fixes.patch src/libpng.mk src/xine-lib-1-fix-install-def-file.patch src/xine-lib-2-fix-no-undefined.patch src/xine-lib-3-ffmpeg-0.8.patch
diffstat 42 files changed, 1567 insertions(+), 392 deletions(-) [+]
line wrap: on
line diff
--- a/src/curl-1-fix-static.patch	Tue Nov 15 16:43:58 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/curl-1-fixes.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -0,0 +1,117 @@
+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 878969d2e89751ff445b1f6cb6ac05ad0bc07eb6 Mon Sep 17 00:00:00 2001
+From: Yang Tse <yangsita@gmail.com>
+Date: Sat, 29 Oct 2011 14:58:50 +0200
+Subject: [PATCH 2/3] gtls.c: gnutls_transport_set_global_errno() deprecated
+ in version 2.12.3 (cherry picked from commit
+ f5bb37018647f6088398ca127235ce776eec9bbe)
+
+---
+ lib/gtls.c |   13 +++++++++++--
+ 1 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/lib/gtls.c b/lib/gtls.c
+index 7ca46c8..c1e9cae 100644
+--- a/lib/gtls.c
++++ b/lib/gtls.c
+@@ -78,6 +78,17 @@ static void tls_log_func(int level, const char *str)
+ #endif
+ static bool gtls_inited = FALSE;
+ 
++#if defined(GNUTLS_VERSION_NUMBER)
++#  if (GNUTLS_VERSION_NUMBER >= 0x020c00)
++#    undef gnutls_transport_set_lowat
++#    define gnutls_transport_set_lowat(A,B) Curl_nop_stmt
++#  endif
++#  if (GNUTLS_VERSION_NUMBER >= 0x020c03)
++#    undef gnutls_transport_set_global_errno
++#    define gnutls_transport_set_global_errno(A) SET_ERRNO((A))
++#  endif
++#endif
++
+ /*
+  * Custom push and pull callback functions used by GNU TLS to read and write
+  * to the socket.  These functions are simple wrappers to send() and recv()
+@@ -476,10 +487,8 @@ 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 40ebff7ac932dd2c920d02c8a7aa9da584eafda1 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
+
--- a/src/ffmpeg.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/ffmpeg.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -4,8 +4,8 @@
 # ffmpeg
 PKG             := ffmpeg
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 0.8.5
-$(PKG)_CHECKSUM := a69d909958b23f8b2509ddda6cdeba2601edf5ff
+$(PKG)_VERSION  := 0.8.6
+$(PKG)_CHECKSUM := ad7eaefa5072ca3c11778f9186fab35558a04478
 $(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
 $(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.bz2
 $(PKG)_WEBSITE  := http://www.ffmpeg.org/
--- a/src/freetype.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/freetype.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -4,8 +4,8 @@
 # freetype
 PKG             := freetype
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 2.4.7
-$(PKG)_CHECKSUM := e1b2356ebbc6d39d813797572b1e5d8a2635e969
+$(PKG)_VERSION  := 2.4.8
+$(PKG)_CHECKSUM := 1634cef894460ab98dd37eadfcdd055ffda9a27c
 $(PKG)_SUBDIR   := freetype-$($(PKG)_VERSION)
 $(PKG)_FILE     := freetype-$($(PKG)_VERSION).tar.bz2
 $(PKG)_WEBSITE  := http://freetype.sourceforge.net/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gcc-2-darwin-no-pie.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -0,0 +1,28 @@
+This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+mingw-cross-env specific workaround for OSX Lion's new ASLR
+causing problems with pre-compiled headers.
+
+1. more recent native compilers don't solve the problem
+2. there isn't an equivalent sysctl for "kernel.randomize_va_space"
+3. there isn't an equivalent command for "setarch -R"
+4. Apple's version of gcc (based on 4.2) uses custom Makefiles that set "-fno-pic"
+
+Patch below achieves a similar result to 4, without drifting
+too far from standard gcc.
+
+--- a/configure
++++ b/configure
+@@ -30,6 +30,11 @@ else
+ esac
+ fi
+ 
++case `uname -sr` in
++  Darwin*11*)
++    LDFLAGS="$LDFLAGS -Wl,-no_pie"
++  ;;
++esac
+ 
+ as_nl='
+ '
--- a/src/gcc.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/gcc.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -4,8 +4,8 @@
 # GCC
 PKG             := gcc
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 4.6.1
-$(PKG)_CHECKSUM := 8bf66f7a71534ba564563a0ba0b2517aead8ac30
+$(PKG)_VERSION  := 4.6.2
+$(PKG)_CHECKSUM := 691974613b1c1f15ed0182ec539fa54a12dd6f93
 $(PKG)_SUBDIR   := gcc-$($(PKG)_VERSION)
 $(PKG)_FILE     := gcc-$($(PKG)_VERSION).tar.bz2
 $(PKG)_WEBSITE  := http://gcc.gnu.org/
@@ -70,6 +70,7 @@
      echo 'set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)'; \
      echo 'set(CMAKE_C_COMPILER $(PREFIX)/bin/$(TARGET)-gcc)'; \
      echo 'set(CMAKE_CXX_COMPILER $(PREFIX)/bin/$(TARGET)-g++)'; \
+     echo 'set(CMAKE_Fortran_COMPILER $(PREFIX)/bin/$(TARGET)-gfortran)'; \
      echo 'set(CMAKE_RC_COMPILER $(PREFIX)/bin/$(TARGET)-windres)'; \
      echo 'set(PKG_CONFIG_EXECUTABLE $(PREFIX)/bin/$(TARGET)-pkg-config)'; \
      echo 'set(QT_QMAKE_EXECUTABLE $(PREFIX)/bin/$(TARGET)-qmake)'; \
--- a/src/gnutls-1-fixes.patch	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/gnutls-1-fixes.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -3,24 +3,24 @@
 
 Contains ad hoc patches for cross building.
 
-From 2f8e6d6727a6140e12b8af09a64cdec05054162e Mon Sep 17 00:00:00 2001
+From d5d9241c7e40cfc191dfc33c94381a3895e57cd5 Mon Sep 17 00:00:00 2001
 From: mingw-cross-env
-Date: Wed, 17 Aug 2011 14:01:51 +0200
-Subject: [PATCH] adding missing ws2_32 to Libs.private
+Date: Fri, 28 Oct 2011 09:23:41 +0200
+Subject: [PATCH] add missing static library linking
 
 
 diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in
-index bac5f42..eb4e6df 100644
+index 32170b6..6668a5e 100644
 --- a/lib/gnutls.pc.in
 +++ b/lib/gnutls.pc.in
 @@ -20,6 +20,6 @@ Description: Transport Security Layer implementation for the GNU system
  URL: http://www.gnu.org/software/gnutls/
  Version: @VERSION@
  Libs: -L${libdir} -lgnutls
--Libs.private: @LTLIBGCRYPT@ @LTLIBNETTLE@ @NETTLE_LIBS@ @GNUTLS_ZLIB_LIBS_PRIVATE@
-+Libs.private: @LTLIBGCRYPT@ @LTLIBNETTLE@ @NETTLE_LIBS@ @P11_KIT_LIBS@ @GNUTLS_ZLIB_LIBS_PRIVATE@ -lws2_32
+-Libs.private: @LTLIBNETTLE@
++Libs.private: @LTLIBNETTLE@ -lws2_32
  @GNUTLS_REQUIRES_PRIVATE@
  Cflags: -I${includedir}
 -- 
-1.7.6
+1.7.7
 
--- a/src/gnutls.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/gnutls.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -3,21 +3,21 @@
 
 # GnuTLS
 PKG             := gnutls
-$(PKG)_VERSION  := 2.12.12
-$(PKG)_CHECKSUM := 6c87591705b21f7cae845ecdae158a6c5d8f2847
+$(PKG)_VERSION  := 3.0.8
+$(PKG)_CHECKSUM := b62457ff7422034b6f2974633e78c81fca5a8213
 $(PKG)_SUBDIR   := gnutls-$($(PKG)_VERSION)
-$(PKG)_FILE     := gnutls-$($(PKG)_VERSION).tar.bz2
+$(PKG)_FILE     := gnutls-$($(PKG)_VERSION).tar.xz
 $(PKG)_WEBSITE  := http://www.gnu.org/software/gnutls/
 $(PKG)_URL      := ftp://ftp.gnutls.org/pub/gnutls/$($(PKG)_FILE)
 $(PKG)_URL_2    := ftp://ftp.gnupg.org/gcrypt/gnutls/$($(PKG)_FILE)
-$(PKG)_DEPS     := gcc zlib libgcrypt
+$(PKG)_DEPS     := gcc zlib nettle
 
 define $(PKG)_UPDATE
     wget -q -O- 'http://git.savannah.gnu.org/gitweb/?p=gnutls.git;a=tags' | \
     grep '<a class="list name"' | \
     $(SED) -n 's,.*<a[^>]*>gnutls_\([0-9]*_[0-9]*[02468]_[^<]*\)<.*,\1,p' | \
     $(SED) 's,_,.,g' | \
-    grep -v '^3\.' | \
+    grep -v '^2\.' | \
     head -1
 endef
 
@@ -35,11 +35,8 @@
         --disable-guile \
         --with-included-libtasn1 \
         --with-included-libcfg \
-        --with-included-pakchois \
-        --with-libgcrypt \
-        --without-lzo \
         --without-p11-kit \
-        LIBS='-lz' \
+        LIBS='-lz -lws2_32' \
         ac_cv_prog_AR='$(TARGET)-ar'
     $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= defexec_DATA=
 
--- a/src/gsoap-1-fixes.patch	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/gsoap-1-fixes.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -4,10 +4,13 @@
 Contains ad hoc patches for cross building.
 
 From a4e9166bc8d78b2aee3c25757d479d4c2e53c7be Mon Sep 17 00:00:00 2001
-From: mingw-cross-env
+From: Mark Brand <mabrand@mabrand.nl>
 Date: Sun, 23 Oct 2011 21:36:53 +0200
-Subject: [PATCH 1/2] support static linking to ntlm
+Subject: [PATCH 1/3] support static linking to ntlm
 
+---
+ configure |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/configure b/configure
 index ad1830d..be95edf 100755
@@ -27,10 +30,18 @@
 
 
 From da0eb2fc386be0fd914ef8f9a7d6bf73004ea230 Mon Sep 17 00:00:00 2001
-From: mingw-cross-env
+From: Mark Brand <mabrand@mabrand.nl>
 Date: Mon, 24 Oct 2011 11:17:13 +0200
-Subject: [PATCH 2/2] ntlm support in .pc files
+Subject: [PATCH 2/3] ntlm support in .pc files
 
+---
+ gsoap++.pc.in    |    2 +-
+ gsoap.pc.in      |    2 +-
+ gsoapck++.pc.in  |    2 +-
+ gsoapck.pc.in    |    2 +-
+ gsoapssl++.pc.in |    2 +-
+ gsoapssl.pc.in   |    2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/gsoap++.pc.in b/gsoap++.pc.in
 index 035afd9..3411d55 100644
@@ -95,3 +106,117 @@
 -- 
 1.7.7
 
+
+From bdaf871136077ba282b1824eb7765143ccf4b40d Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Mon, 7 Nov 2011 14:43:55 +0100
+Subject: [PATCH 3/3] fix base64 encoding for Basic Authentication
+
+taken from:
+https://sourceforge.net/tracker/?func=detail&aid=3434518&group_id=52781&atid=468023
+---
+ gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp  |    4 ++--
+ gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp |    4 ++--
+ gsoap/stdsoap2.c                                   |    4 ++--
+ gsoap/stdsoap2.cpp                                 |    4 ++--
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp b/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp
+index 83405cd..71838e9 100644
+--- a/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp
++++ b/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp
+@@ -5684,8 +5684,8 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c
+     else
+ #endif
+     { strcpy(soap->tmpbuf, "Basic ");
+-      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+       sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
++      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+     }
+     if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+       return err;
+@@ -5698,8 +5698,8 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c
+     else
+ #endif
+     { strcpy(soap->tmpbuf, "Basic ");
+-      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+       sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
++      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+     }
+     if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+       return err;
+diff --git a/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp b/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp
+index 83405cd..71838e9 100644
+--- a/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp
++++ b/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp
+@@ -5684,8 +5684,8 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c
+     else
+ #endif
+     { strcpy(soap->tmpbuf, "Basic ");
+-      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+       sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
++      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+     }
+     if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+       return err;
+@@ -5698,8 +5698,8 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c
+     else
+ #endif
+     { strcpy(soap->tmpbuf, "Basic ");
+-      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+       sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
++      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+     }
+     if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+       return err;
+diff --git a/gsoap/stdsoap2.c b/gsoap/stdsoap2.c
+index 83405cd..71838e9 100644
+--- a/gsoap/stdsoap2.c
++++ b/gsoap/stdsoap2.c
+@@ -5684,8 +5684,8 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c
+     else
+ #endif
+     { strcpy(soap->tmpbuf, "Basic ");
+-      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+       sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
++      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+     }
+     if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+       return err;
+@@ -5698,8 +5698,8 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c
+     else
+ #endif
+     { strcpy(soap->tmpbuf, "Basic ");
+-      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+       sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
++      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+     }
+     if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+       return err;
+diff --git a/gsoap/stdsoap2.cpp b/gsoap/stdsoap2.cpp
+index 83405cd..71838e9 100644
+--- a/gsoap/stdsoap2.cpp
++++ b/gsoap/stdsoap2.cpp
+@@ -5684,8 +5684,8 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c
+     else
+ #endif
+     { strcpy(soap->tmpbuf, "Basic ");
+-      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+       sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd);
++      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+     }
+     if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf)))
+       return err;
+@@ -5698,8 +5698,8 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c
+     else
+ #endif
+     { strcpy(soap->tmpbuf, "Basic ");
+-      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+       sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd);
++      soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262));
+     }
+     if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf)))
+       return err;
+-- 
+1.7.7
+
--- a/src/gsoap.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/gsoap.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -10,7 +10,7 @@
 $(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 @@
     # 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.
--- a/src/lapack.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/lapack.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -4,8 +4,8 @@
 # lapack
 PKG             := lapack
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 3.3.1
-$(PKG)_CHECKSUM := 3ce437e05f0e9a3c8148ec41922f6efeef0ebdac
+$(PKG)_VERSION  := 3.4.0
+$(PKG)_CHECKSUM := a141a19bebbef2a20d35a26eb9c120b1de747b38
 $(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
 $(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tgz
 $(PKG)_WEBSITE  := http://www.netlib.org/$(PKG)/
@@ -20,13 +20,8 @@
 endef
 
 define $(PKG)_BUILD
-    cp $(1)/make.inc.example  $(1)/make.inc
-    $(SED) -i 's,PLAT =.*,PLAT = _MINGW32,g'    '$(1)/make.inc'
-    $(SED) -i 's,gfortran,$(TARGET)-gfortran,g' '$(1)/make.inc'
-    $(SED) -i 's, ar, $(TARGET)-ar,g'           '$(1)/make.inc'
-    $(SED) -i 's, ranlib, $(TARGET)-ranlib,g'   '$(1)/make.inc'
-
-    $(MAKE) -C '$(1)/SRC' -j '$(JOBS)'
-    $(INSTALL) -d                            '$(PREFIX)/$(TARGET)/lib'
-    $(INSTALL) -m644 '$(1)/lapack_MINGW32.a' '$(PREFIX)/$(TARGET)/lib/liblapack.a'
+    cd '$(1)' && cmake \
+        -DCMAKE_TOOLCHAIN_FILE=$(PREFIX)/$(TARGET)/share/cmake/mingw-cross-env-conf.cmake \
+        .
+    $(MAKE) -C '$(1)/SRC' -j '$(JOBS)' install
 endef
--- a/src/libffi.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/libffi.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -13,7 +13,7 @@
 $(PKG)_DEPS     := gcc
 
 define $(PKG)_UPDATE
-    wget -q --no-check-certificate -O- 'http://github.com/atgreen/libffi/downloads' | \
+    wget -q --no-check-certificate -O- 'http://github.com/atgreen/libffi/tags' | \
     grep '<a href="/atgreen/libffi/tarball/' | \
     $(SED) -n 's,.*href="/atgreen/libffi/tarball/v\([0-9][^"]*\)".*,\1,p' | \
     head -1
--- a/src/libgnurx.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/libgnurx.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -9,11 +9,11 @@
 $(PKG)_SUBDIR   := mingw-libgnurx-$($(PKG)_VERSION)
 $(PKG)_FILE     := mingw-libgnurx-$($(PKG)_VERSION)-src.tar.gz
 $(PKG)_WEBSITE  := http://sourceforge.net/projects/mingw/files/UserContributed/regex/
-$(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/mingw/UserContributed/regex/mingw-regex-$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/mingw/Other/UserContributed/regex/mingw-regex-$($(PKG)_VERSION)/$($(PKG)_FILE)
 $(PKG)_DEPS     := gcc
 
 define $(PKG)_UPDATE
-    wget -q -O- 'http://sourceforge.net/projects/mingw/files/UserContributed/regex/' | \
+    wget -q -O- 'http://sourceforge.net/projects/mingw/files/Other/UserContributed/regex/' | \
     grep 'mingw-regex-' | \
     $(SED) -n 's,.*mingw-regex-\([0-9\.]*\).*,\1,p' | \
     sort | \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libgsasl-1-fixes.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -0,0 +1,37 @@
+This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+Contains ad hoc patches for cross building.
+
+From 1f0955db1bf81de15e1dd04f1fe29f73ef3983c8 Mon Sep 17 00:00:00 2001
+From: mingw-cross-env
+Date: Mon, 7 Nov 2011 18:01:56 +0100
+Subject: [PATCH] use memxor from nettle
+
+
+diff --git a/gl/memxor.c b/gl/memxor.c
+index 7fec454..d9b62cd 100644
+--- a/gl/memxor.c
++++ b/gl/memxor.c
+@@ -23,7 +23,7 @@
+ #include "memxor.h"
+ 
+ void *
+-memxor (void *restrict dest, const void *restrict src, size_t n)
++gsasl_memxor (void *restrict dest, const void *restrict src, size_t n)
+ {
+   char const *s = src;
+   char *d = dest;
+diff --git a/libgsasl.pc.in b/libgsasl.pc.in
+index b0c477d..d8d8ccc 100644
+--- a/libgsasl.pc.in
++++ b/libgsasl.pc.in
+@@ -16,4 +16,5 @@ URL: http://www.gnu.org/software/gsasl/
+ Version: @VERSION@
+ Libs: -L${libdir} -lgsasl
+ Libs.private: @LTLIBGCRYPT@ @LTLIBIDN@ @LTLIBNTLM@
++Requires.private: nettle
+ Cflags: -I${includedir}
+-- 
+1.7.7
+
--- a/src/libgsasl.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/libgsasl.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -10,7 +10,7 @@
 $(PKG)_FILE     := libgsasl-$($(PKG)_VERSION).tar.gz
 $(PKG)_WEBSITE  := http://www.gnu.org/software/gsasl/
 $(PKG)_URL      := http://ftp.gnu.org/gnu/gsasl/$($(PKG)_FILE)
-$(PKG)_DEPS     := gcc libiconv libidn libntlm libgcrypt
+$(PKG)_DEPS     := gcc libiconv libidn libntlm libgcrypt nettle
 
 define $(PKG)_UPDATE
     wget -q -O- 'http://git.savannah.gnu.org/gitweb/?p=gsasl.git;a=tags' | \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libmng-1-fixes.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -0,0 +1,32 @@
+This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+Contains ad hoc patches for cross building.
+
+From 1a94342a8f86ab72b8d6c24b8ecd974d2821be04 Mon Sep 17 00:00:00 2001
+From: mingw-cross-env
+Date: Thu, 3 Nov 2011 14:40:24 +0100
+Subject: [PATCH] add pkg-config file
+
+
+diff --git a/libmng.pc.in b/libmng.pc.in
+new file mode 100644
+index 0000000..1dfc9fa
+--- /dev/null
++++ b/libmng.pc.in
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=${prefix}
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
++
++Name: libmng
++Description:  The MNG library.
++Version: @VERSION@
++Libs: -L${libdir} -lmng
++Libs.private: @mng_libs_private@
++Cflags: -I${includedir}
++Requires.private: @mng_requires_private@
+-- 
+1.7.7
+
--- a/src/libmng.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/libmng.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -27,4 +27,10 @@
     $(INSTALL) -m644 '$(1)/libmng.a' '$(PREFIX)/$(TARGET)/lib/'
     $(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
     $(INSTALL) -m644 '$(1)/libmng.h' '$(1)/libmng_conf.h' '$(1)/libmng_types.h' '$(PREFIX)/$(TARGET)/include/'
+    $(SED) -e 's^@prefix@^$(PREFIX)/$(TARGET)^;' \
+           -e 's^@VERSION@^$(libmng_VERSION)^;' \
+           -e 's^@mng_libs_private@^-ljpeg^;' \
+           -e 's^@mng_requires_private@^lcms zlib^;' \
+           < '$(1)/libmng.pc.in' > '$(1)/libmng.pc'
+    $(INSTALL) -m644 '$(1)/libmng.pc' '$(PREFIX)/$(TARGET)/lib/pkgconfig/'
 endef
--- a/src/libpng.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/libpng.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -4,8 +4,8 @@
 # libpng
 PKG             := libpng
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 1.5.5
-$(PKG)_CHECKSUM := 3583126fdd70a94f4c33c1b717f3ff4201d619af
+$(PKG)_VERSION  := 1.5.6
+$(PKG)_CHECKSUM := d3c4b8c03bf52dceb1637ad508585bcb89b7e187
 $(PKG)_SUBDIR   := libpng-$($(PKG)_VERSION)
 $(PKG)_FILE     := libpng-$($(PKG)_VERSION).tar.xz
 $(PKG)_WEBSITE  := http://www.libpng.org/
--- a/src/librsvg.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/librsvg.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -4,8 +4,8 @@
 # librsvg
 PKG             := librsvg
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 2.34.1
-$(PKG)_CHECKSUM := a48a8228d5c1aabebbacccdfc33f1830c9027419
+$(PKG)_VERSION  := 2.34.2
+$(PKG)_CHECKSUM := 75d0da1136c2c515161799b5dd9d903ed34e552c
 $(PKG)_SUBDIR   := librsvg-$($(PKG)_VERSION)
 $(PKG)_FILE     := librsvg-$($(PKG)_VERSION).tar.bz2
 $(PKG)_WEBSITE  := http://librsvg.sourceforge.net/
--- a/src/libssh2-1-fixes.patch	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/libssh2-1-fixes.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -1,19 +1,19 @@
-This file is part of mingw-cross-env.
-See doc/index.html for further information.
-
-Contains ad hoc patches for cross building.
-
-diff -Naur libssh2-1.3.0.orig/include/libssh2.h libssh2-1.3.0/include/libssh2.h
---- libssh2-1.3.0.orig/include/libssh2.h	2011-09-06 15:56:34.000000000 -0500
-+++ libssh2-1.3.0/include/libssh2.h	2011-10-17 10:10:13.000000000 -0500
-@@ -88,8 +88,8 @@
- extern "C" {
- #endif
- #ifdef _WIN32
--# include <BaseTsd.h>
--# include <WinSock2.h>
-+# include <basetsd.h>
-+# include <winsock2.h>
- #endif
- 
- #include <stddef.h>
+This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+Contains ad hoc patches for cross building.
+
+diff -Naur libssh2-1.3.0.orig/include/libssh2.h libssh2-1.3.0/include/libssh2.h
+--- libssh2-1.3.0.orig/include/libssh2.h	2011-09-06 15:56:34.000000000 -0500
++++ libssh2-1.3.0/include/libssh2.h	2011-10-17 10:10:13.000000000 -0500
+@@ -88,8 +88,8 @@
+ extern "C" {
+ #endif
+ #ifdef _WIN32
+-# include <BaseTsd.h>
+-# include <WinSock2.h>
++# include <basetsd.h>
++# include <winsock2.h>
+ #endif
+ 
+ #include <stddef.h>
--- a/src/mingw-utils.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/mingw-utils.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -9,11 +9,11 @@
 $(PKG)_SUBDIR   := $(PKG)-$(word 1,$(subst -, ,$($(PKG)_VERSION)))
 $(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION)-mingw32-src.tar.lzma
 $(PKG)_WEBSITE  := http://www.mingw.org/
-$(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/mingw/MinGW/Utilities/$(PKG)/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/mingw/MinGW/Extension/$(PKG)/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE)
 $(PKG)_DEPS     := gcc
 
 define $(PKG)_UPDATE
-    wget -q -O- 'http://sourceforge.net/projects/mingw/files/MinGW/Utilities/mingw-utils/' | \
+    wget -q -O- 'http://sourceforge.net/projects/mingw/files/MinGW/Extension/mingw-utils/' | \
     $(SED) -n 's,.*mingw-utils-\([0-9][^"]*\)/".*,\1,p' | \
     head -1
 endef
--- a/src/mingwrt.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/mingwrt.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -9,11 +9,11 @@
 $(PKG)_SUBDIR   := .
 $(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION)-mingw32-dev.tar.gz
 $(PKG)_WEBSITE  := http://www.mingw.org/
-$(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/mingw/MinGW/BaseSystem/RuntimeLibrary/MinGW-RT/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/mingw/MinGW/Base/mingw-rt/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE)
 $(PKG)_DEPS     :=
 
 define $(PKG)_UPDATE
-    wget -q -O- 'http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/RuntimeLibrary/MinGW-RT/' | \
+    wget -q -O- 'http://sourceforge.net/projects/mingw/files/MinGW/Base/mingw-rt/' | \
     $(SED) -n 's,.*mingwrt-\([0-9][^"]*\)/".*,\1,p' | \
     head -1
 endef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/nettle.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -0,0 +1,28 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+# nettle
+PKG             := nettle
+$(PKG)_IGNORE   :=
+$(PKG)_VERSION  := 2.4
+$(PKG)_CHECKSUM := 1df0cd013e83f73b78a5521411a67e331de3dfa6
+$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
+$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
+$(PKG)_WEBSITE  := http://www.lysator.liu.se/~nisse/nettle/
+$(PKG)_URL      := http://www.lysator.liu.se/~nisse/archive/$($(PKG)_FILE)
+$(PKG)_DEPS     := gcc gmp
+
+define $(PKG)_UPDATE
+    wget -q -O- 'http://www.lysator.liu.se/~nisse/archive/' | \
+    $(SED) -n 's,.*nettle-\([0-9][^>]*\)\.tar.*,\1,p' | \
+    tail -1
+endef
+
+define $(PKG)_BUILD
+    cd '$(1)' && ./configure \
+        --host='$(TARGET)' \
+        --enable-static \
+        --disable-shared \
+        --prefix='$(PREFIX)/$(TARGET)'
+    $(MAKE) -C '$(1)' -j '$(JOBS)' install
+endef
--- a/src/pcre.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/pcre.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -4,8 +4,8 @@
 # PCRE
 PKG             := pcre
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 8.12
-$(PKG)_CHECKSUM := 2219b372bff53ee29a7e44ecf5977ad15df01cea
+$(PKG)_VERSION  := 8.20
+$(PKG)_CHECKSUM := 6264472669d8068338cd32128cd4e9742587c676
 $(PKG)_SUBDIR   := pcre-$($(PKG)_VERSION)
 $(PKG)_FILE     := pcre-$($(PKG)_VERSION).tar.bz2
 $(PKG)_WEBSITE  := http://www.pcre.org/
--- a/src/pfstools.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/pfstools.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -4,8 +4,8 @@
 # pfstools
 PKG             := pfstools
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 1.8.4
-$(PKG)_CHECKSUM := 7090fcf05850ad3186d36f750cab6810fac4a753
+$(PKG)_VERSION  := 1.8.5
+$(PKG)_CHECKSUM := dc595438f0fd8b40a05d9f9c498892363a1b3f05
 $(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
 $(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
 $(PKG)_WEBSITE  := http://$(PKG).sourceforge.net/
--- a/src/pixman.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/pixman.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -4,8 +4,8 @@
 # pixman
 PKG             := pixman
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 0.23.6
-$(PKG)_CHECKSUM := 840eacb93152b641904832fa6f462ffd1cc04207
+$(PKG)_VERSION  := 0.23.8
+$(PKG)_CHECKSUM := 2e29552bde39683d37dbfd079c1ffd3103a3d12a
 $(PKG)_SUBDIR   := pixman-$($(PKG)_VERSION)
 $(PKG)_FILE     := pixman-$($(PKG)_VERSION).tar.gz
 $(PKG)_WEBSITE  := http://cairographics.org/
--- a/src/qt-1-cherrypicks.patch	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/qt-1-cherrypicks.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -8,7 +8,7 @@
 From 9ae9b4c7f69482cfb67594044da8444bc70c6f97 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Thu, 30 Jun 2011 10:22:33 +0200
-Subject: [PATCH 1/9] do not detect or configure iconv for Windows
+Subject: [PATCH 01/10] do not detect or configure iconv for Windows
 
 Qt doesn't use iconv on Windows, but configuring it will appear to
 work and the build will complete. The result is that character
@@ -39,7 +39,7 @@
 From 5146d425f67575913f4d988da5cf1daff722e9e7 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Sun, 3 Jul 2011 22:45:15 +0200
-Subject: [PATCH 2/9] add missing multiple inclusion guard
+Subject: [PATCH 02/10] add missing multiple inclusion guard
 
 ---
  src/plugins/codecs/kr/cp949codetbl.h |    5 +++++
@@ -72,7 +72,7 @@
 From d19058417259a1f18c0f0ddcc7c7fad120a88f12 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Mon, 4 Jul 2011 00:42:24 +0200
-Subject: [PATCH 3/9] load plugin codecs regardless of iconv
+Subject: [PATCH 03/10] load plugin codecs regardless of iconv
 
 Otherwise Windows applications linking to static Qt will have to
 import the static plugins to avoid linking failure even if they
@@ -146,7 +146,7 @@
 From 1572988d2a3728505d9bacd204a1e7132d5f7a7d Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Sun, 3 Jul 2011 21:40:11 +0200
-Subject: [PATCH 4/9] move plugin text codecs to QtCore
+Subject: [PATCH 04/10] move plugin text codecs to QtCore
 
 Having plugin text codecs adds considerable complexity to
 configuring Qt. The plugin interface is designed for optional
@@ -79781,26 +79781,27 @@
 1.7.7
 
 
-From dfa9f966e6f4a18d69eb056d17d8ea1b8c5fd663 Mon Sep 17 00:00:00 2001
+From 91577ea4e4c338e24c67c611a4ddefddbfd3ccdc Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
-Date: Tue, 16 Nov 2010 20:06:28 +0100
-Subject: [PATCH 5/9] explicitly include -llcms for -lmng (mingw-cross-env
- specific)
+Date: Thu, 3 Nov 2011 15:10:26 +0100
+Subject: [PATCH 05/10] use pkg-config for libmng
 
 ---
- src/gui/image/qmnghandler.pri |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ src/gui/image/qmnghandler.pri |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
 
 diff --git a/src/gui/image/qmnghandler.pri b/src/gui/image/qmnghandler.pri
-index ffb98de..c213e09 100644
+index ffb98de..6aab68f 100644
 --- a/src/gui/image/qmnghandler.pri
 +++ b/src/gui/image/qmnghandler.pri
-@@ -3,7 +3,7 @@ INCLUDEPATH *= $$PWD
+@@ -3,7 +3,9 @@ INCLUDEPATH *= $$PWD
  HEADERS += $$PWD/qmnghandler_p.h
  SOURCES += $$PWD/qmnghandler.cpp
  contains(QT_CONFIG, system-mng) {
 -        if(unix|win32-g++*):LIBS += -lmng
-+        if(unix|win32-g++*):LIBS += -lmng -llcms
++        CONFIG += link_pkgconfig
++        PKGCONFIG += libmng
++        if(unix|win32-g++*):LIBS *= -lmng
          else:win32:         LIBS += libmng.lib
  } else {
      include($$PWD/../../3rdparty/libmng.pri)
@@ -79808,10 +79809,38 @@
 1.7.7
 
 
-From 71ef8c96b3b0eaa756c8671ce3b0fb742b67915a Mon Sep 17 00:00:00 2001
+From 430bcd7435a32b1058e0a387ba0295c1e0389766 Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Thu, 3 Nov 2011 14:11:02 +0100
+Subject: [PATCH 06/10] use pkg-config for libtiff
+
+---
+ src/gui/image/qtiffhandler.pri |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/src/gui/image/qtiffhandler.pri b/src/gui/image/qtiffhandler.pri
+index e1cc3ee..c692ca9 100644
+--- a/src/gui/image/qtiffhandler.pri
++++ b/src/gui/image/qtiffhandler.pri
+@@ -3,7 +3,9 @@ INCLUDEPATH *= $$PWD
+ HEADERS += $$PWD/qtiffhandler_p.h
+ SOURCES += $$PWD/qtiffhandler.cpp
+ contains(QT_CONFIG, system-tiff) {
+-        if(unix|win32-g++*):LIBS += -ltiff
++        CONFIG += link_pkgconfig
++        PKGCONFIG += libtiff
++        if(unix|win32-g++*):LIBS *= -ltiff
+         else:win32:         LIBS += libtiff.lib
+ } else {
+     include($$PWD/../../3rdparty/libtiff.pri)
+-- 
+1.7.7
+
+
+From 606cc859a6df8e57006f1a51b3bc67ec75e3eb26 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Sat, 5 Jun 2010 23:41:04 +0200
-Subject: [PATCH 6/9] restore support for static linking of QtWebKit
+Subject: [PATCH 07/10] restore support for static linking of QtWebKit
  (mingw-cross-env specific)
 
 Support was removed by 4221d629e2cf37ee8c5ba7cb595b05ab8c82f113.
@@ -79905,10 +79934,10 @@
 1.7.7
 
 
-From 433b214427e41e8cd00757012b3adbe5c956f11c Mon Sep 17 00:00:00 2001
+From 6459ac61c72e148a768b5785b4bf297b982b98ad Mon Sep 17 00:00:00 2001
 From: Tony Theodore <tonyt@logyst.com>
 Date: Thu, 1 Sep 2011 13:47:10 +0200
-Subject: [PATCH 7/9] fix building on GNU/kFreeBSD (mingw-cross-specific)
+Subject: [PATCH 08/10] fix building on GNU/kFreeBSD (mingw-cross-specific)
 
 This patch has been taken from:
 
@@ -79938,10 +79967,10 @@
 1.7.7
 
 
-From 3feafc3e015fa17129dd644ed2da5c1148972216 Mon Sep 17 00:00:00 2001
+From 9ed796a8de712249a2967eb543dec9abdef6bf68 Mon Sep 17 00:00:00 2001
 From: Tony Theodore <tonyt@logyst.com>
 Date: Thu, 1 Sep 2011 13:49:47 +0200
-Subject: [PATCH 8/9] fix missing platform when building on GNU/kFreeBSD
+Subject: [PATCH 09/10] fix missing platform when building on GNU/kFreeBSD
  (mingw-cross-env specific)
 
 This patch is inspired by:
@@ -79970,10 +79999,10 @@
 1.7.7
 
 
-From 867c6f2c8f9a14fcb83b215ed455eae448d6c485 Mon Sep 17 00:00:00 2001
+From 8cc359a585438d16e1ba6199baadf0e16dc1716f Mon Sep 17 00:00:00 2001
 From: Tony Theodore <tonyt@logyst.com>
 Date: Thu, 1 Sep 2011 13:51:50 +0200
-Subject: [PATCH 9/9] fix building on dragonfly (mingw-cross-env specific)
+Subject: [PATCH 10/10] fix building on dragonfly (mingw-cross-env specific)
 
 This patch is inspired by:
 http://cvsweb.NetBSD.org/bsdweb.cgi/pkgsrc/x11/qt4-libs/Makefile.common?rev=1.27&content-type=text/x-cvsweb-markup
--- a/src/qt.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/qt.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -22,11 +22,6 @@
 define $(PKG)_BUILD
     cd '$(1)' && QTDIR='$(1)' ./bin/syncqt
 
-    # We prefer static mingw-cross-env system libs for static build:
-    # -system-zlib -system-libpng -system-libjpeg -system-libtiff -system-libmng -system-sqlite
-    # There is no -system-gif option.
-    #
-    # For shared Qt with qt-zlib, add -lQtCore4 to end of OPENSSL_LIBS to satisfy zlib dependency.
     cd '$(1)' && \
         OPENSSL_LIBS="`'$(TARGET)-pkg-config' --libs-only-l openssl`" \
         PSQL_LIBS="-lpq -lsecur32 `'$(TARGET)-pkg-config' --libs-only-l openssl` -lws2_32" \
@@ -84,8 +79,7 @@
     $(MAKE) -C '$(1)/tools/qdbus' -j '$(JOBS)' install
 
     mkdir            '$(1)/test-qt'
-    cp '$(2)'*       '$(1)/test-qt/'
-    cd               '$(1)/test-qt' && '$(TARGET)-qmake'
+    cd               '$(1)/test-qt' && '$(TARGET)-qmake' '$(PWD)/$(2).pro'
     $(MAKE)       -C '$(1)/test-qt' -j '$(JOBS)'
     $(INSTALL) -m755 '$(1)/test-qt/release/test-qt.exe' '$(PREFIX)/$(TARGET)/bin/'
 endef
--- a/src/sqlite.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/sqlite.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -4,8 +4,8 @@
 # SQLite
 PKG             := sqlite
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 3070800
-$(PKG)_CHECKSUM := 34852cfd49ddea440eb26a35ad32deee0176a724
+$(PKG)_VERSION  := 3070900
+$(PKG)_CHECKSUM := a9da98a4bde4d9dae5c29a969455d11a03600e11
 $(PKG)_SUBDIR   := $(PKG)-autoconf-$($(PKG)_VERSION)
 $(PKG)_FILE     := $(PKG)-autoconf-$($(PKG)_VERSION).tar.gz
 $(PKG)_WEBSITE  := http://www.sqlite.org/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tiff-1-fixes.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -0,0 +1,97 @@
+This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+Contains ad hoc patches for cross building.
+
+From 17fe30e6f97895b276a1d6efe87096bb665bc5de Mon Sep 17 00:00:00 2001
+From: mingw-cross-env
+Date: Thu, 3 Nov 2011 13:49:55 +0100
+Subject: [PATCH] backported pkg-config file from libtiff 4.0.0 beta
+
+
+diff --git a/Makefile.am b/Makefile.am
+index 7069094..cb3c51e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -43,7 +43,8 @@ EXTRA_DIST = \
+ 	SConstruct \
+ 	autogen.sh \
+ 	configure.com \
+-	nmake.opt
++	nmake.opt \
++	libtiff.pc.in
+ 
+ dist_doc_DATA = $(docfiles)
+ 
+@@ -54,3 +55,5 @@ release:
+ 	(rm -f $(top_srcdir)/VERSION && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION)
+ 	(rm -f $(top_srcdir)/libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(LIBTIFF_RELEASE_DATE),' $(top_srcdir)/libtiff/tiffvers.h.in > $(top_srcdir)/libtiff/tiffvers.h)
+ 
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = libtiff.pc
+diff --git a/configure.ac b/configure.ac
+index b89f373..114aa5a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -109,6 +109,9 @@ case "${host_os}" in
+         ;;
+ esac
+ 
++tiff_libs_private=
++AC_SUBST(tiff_libs_private)
++
+ dnl Checks for header files.
+ AC_CHECK_HEADERS([assert.h fcntl.h io.h limits.h malloc.h search.h sys/time.h unistd.h])
+ 
+@@ -373,6 +376,7 @@ fi
+ if test "$HAVE_ZLIB" = "yes" ; then
+   AC_DEFINE(ZIP_SUPPORT,1,[Support Deflate compression])
+   LIBS="-lz $LIBS"
++  tiff_libs_private="-lz ${tiff_libs_private}"
+ 
+   if test "$HAVE_RPATH" = "yes" -a "x$with_zlib_lib_dir" != "x" ; then
+     LIBDIR="-R $with_zlib_lib_dir $LIBDIR"
+@@ -441,6 +445,7 @@ fi
+ if test "$HAVE_JPEG" = "yes" ; then
+   AC_DEFINE(JPEG_SUPPORT,1,[Support JPEG compression (requires IJG JPEG library)])
+   LIBS="-ljpeg $LIBS"
++  tiff_libs_private="-ljpeg ${tiff_libs_private}"
+ 
+   if test "$HAVE_RPATH" = "yes" -a "x$with_jpeg_lib_dir" != "x" ; then
+     LIBDIR="-R $with_jpeg_lib_dir $LIBDIR"
+@@ -509,6 +514,7 @@ fi
+ if test "$HAVE_JBIG" = "yes" ; then
+   AC_DEFINE(JBIG_SUPPORT,1,[Support ISO JBIG compression (requires JBIG-KIT library)])
+   LIBS="-ljbig $LIBS"
++  tiff_libs_private="-ljbig ${tiff_libs_private}"
+ 
+   if test "$HAVE_RPATH" = "yes" -a "x$with_jbig_lib_dir" != "x" ; then
+     LIBDIR="-R $with_jbig_lib_dir $LIBDIR"
+@@ -659,6 +665,7 @@ AC_CONFIG_FILES([Makefile \
+                  html/Makefile \
+ 		 html/images/Makefile \
+ 		 html/man/Makefile \
++                 libtiff.pc \
+                  libtiff/Makefile \
+                  man/Makefile \
+ 		 port/Makefile \
+diff --git a/libtiff.pc.in b/libtiff.pc.in
+new file mode 100644
+index 0000000..abe75a6
+--- /dev/null
++++ b/libtiff.pc.in
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: libtiff
++Description:  Tag Image File Format (TIFF) library.
++Version: @VERSION@
++Libs: -L${libdir} -ltiff
++Libs.private: @tiff_libs_private@
++Cflags: -I${includedir}
+-- 
+1.7.7
+
--- a/src/tiff.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/tiff.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -20,6 +20,7 @@
 endef
 
 define $(PKG)_BUILD
+    cd '$(1)' && ./autogen.sh
     cd '$(1)' && ./configure \
         --host='$(TARGET)' \
         --disable-shared \
--- a/src/vmime-1-fixes.patch	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/vmime-1-fixes.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -28,23 +28,61 @@
 # get updates
 #git svn fetch
 #git svn rebase
-#git checkout v0.9.1
-#git checkout -b 0.9.1-fixes
-#git cherry-pick
 
 GITDIR=~/projects/vmime/git/vmime
 
 (
   cd $GITDIR
   echo
-  git format-patch -p --relative=vmime --stdout v0.9.1..0.9.1-fixes
+  git format-patch -p --relative=vmime --stdout ":/Version 0.9.1"..master-fixed
 ) >> src/vmime-1-fixes.patch
 #--------------------------------------------------------------------#
 
-From c6f077e695b75d9ff9a32d1621f6a320c8ce70f1 Mon Sep 17 00:00:00 2001
+From ed4451fd3c86faf9ecc03a59ba9f1ad78417a9f9 Mon Sep 17 00:00:00 2001
+From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
+Date: Tue, 16 Nov 2010 13:28:05 +0000
+Subject: [PATCH 01/27] Started version 0.9.2.
+
+git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@576 5301114d-f842-0410-bbdd-996ee0417009
+
+diff --git a/ChangeLog b/ChangeLog
+index 871d055..8fdcdb0 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,4 +1,12 @@
+ 
++VERSION 0.9.2svn
++================
++
++2010-11-16  Vincent Richard  <vincent@vincent-richard.net>
++
++ * Started version 0.9.2.
++
++
+ VERSION 0.9.1
+ =============
+ 
+diff --git a/SConstruct b/SConstruct
+index fb01edf..55f9223 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -29,7 +29,7 @@ import string
+ # Package version number
+ packageVersionMajor = 0
+ packageVersionMinor = 9
+-packageVersionMicro = 1
++packageVersionMicro = 2
+ 
+ # API version number (libtool)
+ #
+-- 
+1.7.7
+
+
+From bf282a05cdbbb538a1cafbd7305cece14f5b1571 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 02/27] Initialize and delete object.
 
 git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@577 5301114d-f842-0410-bbdd-996ee0417009
 
@@ -72,13 +110,25 @@
  
  		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 941b10bca8e89ca61eebee1345ee3e5cbebd7530 Mon Sep 17 00:00:00 2001
+From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
+Date: Mon, 6 Dec 2010 11:57:44 +0000
+Subject: [PATCH 03/27] Updated deprecated function.
+
+git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@578 5301114d-f842-0410-bbdd-996ee0417009
+
+SKIPPED
+-- 
+1.7.7
+
+
+From 4a4c3a94db671ff7750b32ebf2c998a914717367 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 04/27] No extra space between ':' and '<' in MAIL FROM and
  RCPT TO. Wait for server response after QUIT and
  before closing connection.
 
@@ -115,13 +165,13 @@
  		if ((resp = readResponse())->getCode() != 250)
  		{
 -- 
-1.7.6
+1.7.7
 
 
-From 969b56f4bd61ddb8277c04ac2a1e35e029ec058b Mon Sep 17 00:00:00 2001
+From 4ea325c953f0cdc669b932aa4961a434656f3ecf 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 05/27] 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 +189,13 @@
  				localSend("250 OK\r\n");
  			}
 -- 
-1.7.6
+1.7.7
 
 
-From 50743da0712b216533acdc09069f1bfc81f988c6 Mon Sep 17 00:00:00 2001
+From ff207927a5aab002f38af0224133b345ab458144 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 06/27] 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 +278,13 @@
  
  		vmime::bodyPart p;
 -- 
-1.7.6
+1.7.7
 
 
-From b6d2b4765c9472ff333cace13c57c6af0e866ee0 Mon Sep 17 00:00:00 2001
+From 3f5172e47f75f64952adef349bec875416ae9b89 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 07/27] 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 +331,13 @@
  VMIME_TEST_SUITE_END
  
 -- 
-1.7.6
+1.7.7
 
 
-From 022339ab63430d792d0314f51dd7854eabd5736e Mon Sep 17 00:00:00 2001
+From 4e9eb3191066dec7f17592c2ce099b16e6329941 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 08/27] 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,18 +356,17 @@
  					else
  						state->lastCharIsSpace = false;
 -- 
-1.7.6
+1.7.7
 
 
-From 7f1024917b3df6be013e18a2e0f0f1b13f4d112b Mon Sep 17 00:00:00 2001
+From 07ebf241115eba44675223e307d212c772e1cc08 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 09/27] Fixed bug #3174903. Fixed word parsing when buffer
  does not end with NL. Fixed 'no encoding' when
  forced.
 
 git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@584 5301114d-f842-0410-bbdd-996ee0417009
-(cherry picked from commit 07ebf241115eba44675223e307d212c772e1cc08)
 
 diff --git a/src/body.cpp b/src/body.cpp
 index 738d3e7..8596833 100644
@@ -514,20 +563,19 @@
  VMIME_TEST_SUITE_END
  
 -- 
-1.7.6
+1.7.7
 
 
-From 1c0648c2a3ee4072869446755c8a7604614752e1 Mon Sep 17 00:00:00 2001
+From 22ca7dc23b6bbbc8cc6aedd569ec938ecae96e92 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 10/27] 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
-(cherry picked from commit 22ca7dc23b6bbbc8cc6aedd569ec938ecae96e92)
 
 diff --git a/SConstruct b/SConstruct
-index fb01edf..6e8aba2 100644
+index 55f9223..177f5b4 100644
 --- a/SConstruct
 +++ b/SConstruct
 @@ -1089,7 +1089,7 @@ def generateAutotools(target, source, env):
@@ -549,17 +597,16 @@
  
  # -- getaddrinfo (POSIX)
 -- 
-1.7.6
+1.7.7
 
 
-From c6c596b10702a98b59978c81c01dc7f4f33157c9 Mon Sep 17 00:00:00 2001
+From 9e06cc39d47e2eba8f554b337d472cc995be0d9d 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 11/27] 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
-(cherry picked from commit 9e06cc39d47e2eba8f554b337d472cc995be0d9d)
 
 diff --git a/src/charsetConverter.cpp b/src/charsetConverter.cpp
 index 38b9e5e..2135788 100644
@@ -632,16 +679,15 @@
  	// 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 418a39a7d33921672bd1c4beb31c8a31bc87d8dd 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 12/27] 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)
 
 diff --git a/AUTHORS b/AUTHORS
 index 20a0181..bbddb30 100644
@@ -657,16 +703,15 @@
   - 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 4008955783ef566b98b16762c7bfa28df26e9198 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 13/27] 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)
 
 diff --git a/examples/example7.cpp b/examples/example7.cpp
 index 1ddb3d0..243b1da 100644
@@ -695,17 +740,16 @@
  		std::vector <vmime::string> props = e->getAvailableProperties();
  
 -- 
-1.7.6
+1.7.7
 
 
-From 43346ae2d6c39af2ed16e64cc6d7f89f427a0fee Mon Sep 17 00:00:00 2001
+From e80db1ce802a45b71659d16d77ea47368beeabc1 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 14/27] 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
-(cherry picked from commit e80db1ce802a45b71659d16d77ea47368beeabc1)
 
 diff --git a/src/parameter.cpp b/src/parameter.cpp
 index 91a7e5c..f59d5ab 100644
@@ -722,17 +766,16 @@
  		switch (value[i])
  		{
 -- 
-1.7.6
+1.7.7
 
 
-From 5ef189953965b639a9038da337e104592417c465 Mon Sep 17 00:00:00 2001
+From 58316dddddbfe8a7c582aa52e9abff8ca3a227b6 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 15/27] 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
-(cherry picked from commit 58316dddddbfe8a7c582aa52e9abff8ca3a227b6)
 
 diff --git a/src/parameter.cpp b/src/parameter.cpp
 index f59d5ab..d757e1b 100644
@@ -863,16 +906,15 @@
  #endif // !VMIME_ALWAYS_GENERATE_7BIT_PARAMETER
  
 -- 
-1.7.6
+1.7.7
 
 
-From caa3cbc0fe9218d3d494bfed1afed2ee620a2e4e Mon Sep 17 00:00:00 2001
+From f7ad17cffea462faf8cbe4f785644da0f3ee812a 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 16/27] 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)
 
 diff --git a/src/charset.cpp b/src/charset.cpp
 index e043186..0fda450 100644
@@ -900,18 +942,17 @@
  
  	if (newPosition)
 -- 
-1.7.6
+1.7.7
 
 
-From 97d992cda306d96a8dda948abb9806ee2c2ce587 Mon Sep 17 00:00:00 2001
+From eac20f47a33a7fdd617f9fd905b8029621259269 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 17/27] Fixed messageBuilder to accept an empty mailbox group
  in 'To:' field, to allow for undisclosed-recipients
  (Zarafa).
 
 git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@592 5301114d-f842-0410-bbdd-996ee0417009
-(cherry picked from commit eac20f47a33a7fdd617f9fd905b8029621259269)
 
 diff --git a/src/messageBuilder.cpp b/src/messageBuilder.cpp
 index 870d59e..3597b3a 100644
@@ -939,18 +980,17 @@
  	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 1e5dfa80a63b0a7fe90406ce4a3de1593f2e4045 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 18/27] Added support for mailboxes that specify an (encoded)
  full name with an empty email address, set by a <>
  marker (Zarafa).
 
 git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@593 5301114d-f842-0410-bbdd-996ee0417009
-(cherry picked from commit 1e5dfa80a63b0a7fe90406ce4a3de1593f2e4045)
 
 diff --git a/src/mailbox.cpp b/src/mailbox.cpp
 index 5cb0139..fea7479 100644
@@ -1014,19 +1054,18 @@
  VMIME_TEST_SUITE_END
  
 -- 
-1.7.6
+1.7.7
 
 
-From aa5ab140e90a6222e5f03b337711444be845fbd0 Mon Sep 17 00:00:00 2001
+From 960f2195516eb776eea7b7e4f92612192edfdcd9 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 19/27] 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)
 
 diff --git a/SConstruct b/SConstruct
-index 6e8aba2..4c0cb0e 100644
+index 177f5b4..37c0ac6 100644
 --- a/SConstruct
 +++ b/SConstruct
 @@ -1089,7 +1089,7 @@ def generateAutotools(target, source, env):
@@ -1039,17 +1078,16 @@
  	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 9f9084b71b4e3c96edc6513020984ef76fe26e0c 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 20/27] 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
-(cherry picked from commit 9f9084b71b4e3c96edc6513020984ef76fe26e0c)
 
 diff --git a/src/body.cpp b/src/body.cpp
 index 8596833..9d7d57f 100644
@@ -1104,16 +1142,125 @@
  VMIME_TEST_SUITE_END
  
 -- 
-1.7.6
+1.7.7
 
 
-From 35f5f5c7bcaca1a29e470c0e5d777817d1e89612 Mon Sep 17 00:00:00 2001
+From 318848aa87761214a6f21c1ea1a9776a7bcbf83c Mon Sep 17 00:00:00 2001
+From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
+Date: Sun, 26 Jun 2011 08:19:11 +0000
+Subject: [PATCH 21/27] Use gnutls_priority_set_direct() instead of GNUTLS
+ deprecated functions.
+
+git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@596 5301114d-f842-0410-bbdd-996ee0417009
+
+diff --git a/SConstruct b/SConstruct
+index 37c0ac6..01ad3f3 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -816,6 +816,7 @@ else:
+ config_hpp.write('// -- TLS/SSL support\n')
+ if env['with_tls'] == 'yes':
+ 	config_hpp.write('#define VMIME_HAVE_TLS_SUPPORT 1\n')
++	config_hpp.write('#define HAVE_GNUTLS_PRIORITY_FUNCS 1\n')
+ else:
+ 	config_hpp.write('#define VMIME_HAVE_TLS_SUPPORT 0\n')
+ 
+@@ -1626,11 +1627,42 @@ if test "x$conf_tls" = "xyes"; then
+ 	else
+ 		AC_MSG_ERROR(can't find an usable version of GNU TLS library)
+ 	fi
++
++	# -- check for gnutls_priority_set_direct() function
++	if test "x$have_gnutls" = "xyes"; then
++		AC_MSG_CHECKING(for gnutls_priority_set_direct)
++
++		LIBS_save="$LIBS"
++		LIBS="$LIBS $LIBGNUTLS_LIBS"
++		CPPFLAGS_save="$CPPFLAGS"
++		CPPFLAGS="$CPPFLAGS $LIBGNUTLS_CFLAGS"
++
++		AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <gnutls/gnutls.h>],
++		                                [gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL);])],
++		               [have_gnutls_priority_funcs=yes],
++		               [have_gnutls_priority_funcs=no])
++
++		CPPFLAGS="$CPPFLAGS_save"
++		LIBS="$LIBS_save"
++
++		AC_MSG_RESULT([$have_gnutls_priority_funcs])
++
++		if test "x$have_gnutls_priority_funcs" = "xyes"; then
++			AM_CONDITIONAL(HAVE_GNUTLS_PRIORITY_FUNCS, true)
++			HAVE_GNUTLS_PRIORITY_FUNCS=1
++		else
++			AM_CONDITIONAL(HAVE_GNUTLS_PRIORITY_FUNCS, false)
++			HAVE_GNUTLS_PRIORITY_FUNCS=0
++		fi
++	fi
+ else
+ 	AM_CONDITIONAL(VMIME_HAVE_TLS_SUPPORT, false)
+ 	VMIME_HAVE_TLS_SUPPORT=0
+ fi
+ 
++AC_SUBST(LIBGNUTLS_CFLAGS)
++AC_SUBST(LIBGNUTLS_LIBS)
++
+ # ** platform handlers
+ 
+ VMIME_BUILTIN_PLATFORMS=''
+@@ -1919,6 +1951,7 @@ typedef unsigned ${VMIME_TYPE_INT32} vmime_uint32;
+ #define VMIME_HAVE_SASL_SUPPORT ${VMIME_HAVE_SASL_SUPPORT}
+ // -- TLS support
+ #define VMIME_HAVE_TLS_SUPPORT ${VMIME_HAVE_TLS_SUPPORT}
++#define HAVE_GNUTLS_PRIORITY_FUNCS ${HAVE_GNUTLS_PRIORITY_FUNCS}
+ // -- Messaging support
+ #define VMIME_HAVE_MESSAGING_FEATURES ${VMIME_HAVE_MESSAGING_FEATURES}
+ """)
+diff --git a/src/net/tls/TLSSession.cpp b/src/net/tls/TLSSession.cpp
+index 010c007..af73a05 100644
+--- a/src/net/tls/TLSSession.cpp
++++ b/src/net/tls/TLSSession.cpp
+@@ -123,6 +123,21 @@ TLSSession::TLSSession(ref <security::cert::certificateVerifier> cv)
+ 
+ 	// Sets some default priority on the ciphers, key exchange methods,
+ 	// macs and compression methods.
++#if HAVE_GNUTLS_PRIORITY_FUNCS
++
++	if ((res = gnutls_priority_set_direct
++		(*m_gnutlsSession, "NORMAL:%SSL3_RECORD_VERSION", NULL)) != 0)
++	{
++		if ((res = gnutls_priority_set_direct
++			(*m_gnutlsSession, "NORMAL", NULL)) != 0)
++		{
++			throwTLSException
++				("gnutls_priority_set_direct", res);
++		}
++	}
++
++#else  // !HAVE_GNUTLS_PRIORITY_FUNCS
++
+ 	gnutls_set_default_priority(*m_gnutlsSession);
+ 
+ 	// Sets the priority on the certificate types supported by gnutls.
+@@ -197,6 +212,8 @@ TLSSession::TLSSession(ref <security::cert::certificateVerifier> cv)
+ 
+ 	gnutls_compression_set_priority(*m_gnutlsSession, compressionPriority);
+ 
++#endif // !HAVE_GNUTLS_PRIORITY_FUNCS
++
+ 	// Initialize credentials
+ 	gnutls_credentials_set(*m_gnutlsSession,
+ 		GNUTLS_CRD_ANON, g_gnutlsGlobal.anonCred);
+-- 
+1.7.7
+
+
+From 70a0282a3f96febf973475a298ac95ffaab82c3c 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 22/27] 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)
 
 diff --git a/src/text.cpp b/src/text.cpp
 index 2454456..66c3b35 100644
@@ -1199,5 +1346,305 @@
  VMIME_TEST_SUITE_END
  
 -- 
-1.7.6
+1.7.7
+
+
+From 7d399583a458abe5cd16ce0974bd4dc11daba9f6 Mon Sep 17 00:00:00 2001
+From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
+Date: Sat, 20 Aug 2011 06:35:06 +0000
+Subject: [PATCH 23/27] Use gnutls_strerror() for reporting errors.
+
+git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@598 5301114d-f842-0410-bbdd-996ee0417009
 
+diff --git a/src/net/tls/TLSSession.cpp b/src/net/tls/TLSSession.cpp
+index af73a05..7426a73 100644
+--- a/src/net/tls/TLSSession.cpp
++++ b/src/net/tls/TLSSession.cpp
+@@ -41,6 +41,9 @@
+ //#define GNUTLS_DEBUG 1
+ 
+ 
++#include <sstream>
++#include <iomanip>
++
+ #if VMIME_DEBUG && GNUTLS_DEBUG
+ 	#include <iostream>
+ #endif // VMIME_DEBUG && GNUTLS_DEBUG
+@@ -257,119 +260,14 @@ ref <security::cert::certificateVerifier> TLSSession::getCertificateVerifier()
+ 
+ void TLSSession::throwTLSException(const string& fname, const int code)
+ {
+-	string msg = fname + "() returned ";
+-
+-#define ERROR(x) \
+-	case x: msg += #x; break;
+-
+-	switch (code)
+-	{
+-	ERROR(GNUTLS_E_SUCCESS)
+-	ERROR(GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM)
+-	ERROR(GNUTLS_E_UNKNOWN_CIPHER_TYPE)
+-	ERROR(GNUTLS_E_LARGE_PACKET)
+-	ERROR(GNUTLS_E_UNSUPPORTED_VERSION_PACKET)
+-	ERROR(GNUTLS_E_UNEXPECTED_PACKET_LENGTH)
+-	ERROR(GNUTLS_E_INVALID_SESSION)
+-	ERROR(GNUTLS_E_FATAL_ALERT_RECEIVED)
+-	ERROR(GNUTLS_E_UNEXPECTED_PACKET)
+-	ERROR(GNUTLS_E_WARNING_ALERT_RECEIVED)
+-	ERROR(GNUTLS_E_ERROR_IN_FINISHED_PACKET)
+-	ERROR(GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET)
+-	ERROR(GNUTLS_E_UNKNOWN_CIPHER_SUITE)
+-	ERROR(GNUTLS_E_UNWANTED_ALGORITHM)
+-	ERROR(GNUTLS_E_MPI_SCAN_FAILED)
+-	ERROR(GNUTLS_E_DECRYPTION_FAILED)
+-	ERROR(GNUTLS_E_MEMORY_ERROR)
+-	ERROR(GNUTLS_E_DECOMPRESSION_FAILED)
+-	ERROR(GNUTLS_E_COMPRESSION_FAILED)
+-	ERROR(GNUTLS_E_AGAIN)
+-	ERROR(GNUTLS_E_EXPIRED)
+-	ERROR(GNUTLS_E_DB_ERROR)
+-	ERROR(GNUTLS_E_SRP_PWD_ERROR)
+-	ERROR(GNUTLS_E_INSUFFICIENT_CREDENTIALS)
+-	ERROR(GNUTLS_E_HASH_FAILED)
+-	ERROR(GNUTLS_E_BASE64_DECODING_ERROR)
+-	ERROR(GNUTLS_E_MPI_PRINT_FAILED)
+-	ERROR(GNUTLS_E_REHANDSHAKE)
+-	ERROR(GNUTLS_E_GOT_APPLICATION_DATA)
+-	ERROR(GNUTLS_E_RECORD_LIMIT_REACHED)
+-	ERROR(GNUTLS_E_ENCRYPTION_FAILED)
+-	ERROR(GNUTLS_E_PK_ENCRYPTION_FAILED)
+-	ERROR(GNUTLS_E_PK_DECRYPTION_FAILED)
+-	ERROR(GNUTLS_E_PK_SIGN_FAILED)
+-	ERROR(GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION)
+-	ERROR(GNUTLS_E_KEY_USAGE_VIOLATION)
+-	ERROR(GNUTLS_E_NO_CERTIFICATE_FOUND)
+-	ERROR(GNUTLS_E_INVALID_REQUEST)
+-	ERROR(GNUTLS_E_SHORT_MEMORY_BUFFER)
+-	ERROR(GNUTLS_E_INTERRUPTED)
+-	ERROR(GNUTLS_E_PUSH_ERROR)
+-	ERROR(GNUTLS_E_PULL_ERROR)
+-	ERROR(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER)
+-	ERROR(GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE)
+-	ERROR(GNUTLS_E_PKCS1_WRONG_PAD)
+-	ERROR(GNUTLS_E_RECEIVED_ILLEGAL_EXTENSION)
+-	ERROR(GNUTLS_E_INTERNAL_ERROR)
+-	ERROR(GNUTLS_E_DH_PRIME_UNACCEPTABLE)
+-	ERROR(GNUTLS_E_FILE_ERROR)
+-	ERROR(GNUTLS_E_TOO_MANY_EMPTY_PACKETS)
+-	ERROR(GNUTLS_E_UNKNOWN_PK_ALGORITHM)
+-	ERROR(GNUTLS_E_INIT_LIBEXTRA)
+-	ERROR(GNUTLS_E_LIBRARY_VERSION_MISMATCH)
+-	ERROR(GNUTLS_E_NO_TEMPORARY_RSA_PARAMS)
+-	ERROR(GNUTLS_E_LZO_INIT_FAILED)
+-	ERROR(GNUTLS_E_NO_COMPRESSION_ALGORITHMS)
+-	ERROR(GNUTLS_E_NO_CIPHER_SUITES)
+-	ERROR(GNUTLS_E_OPENPGP_GETKEY_FAILED)
+-	ERROR(GNUTLS_E_PK_SIG_VERIFY_FAILED)
+-	ERROR(GNUTLS_E_ILLEGAL_SRP_USERNAME)
+-	ERROR(GNUTLS_E_SRP_PWD_PARSING_ERROR)
+-	ERROR(GNUTLS_E_NO_TEMPORARY_DH_PARAMS)
+-	ERROR(GNUTLS_E_ASN1_ELEMENT_NOT_FOUND)
+-	ERROR(GNUTLS_E_ASN1_IDENTIFIER_NOT_FOUND)
+-	ERROR(GNUTLS_E_ASN1_DER_ERROR)
+-	ERROR(GNUTLS_E_ASN1_VALUE_NOT_FOUND)
+-	ERROR(GNUTLS_E_ASN1_GENERIC_ERROR)
+-	ERROR(GNUTLS_E_ASN1_VALUE_NOT_VALID)
+-	ERROR(GNUTLS_E_ASN1_TAG_ERROR)
+-	ERROR(GNUTLS_E_ASN1_TAG_IMPLICIT)
+-	ERROR(GNUTLS_E_ASN1_TYPE_ANY_ERROR)
+-	ERROR(GNUTLS_E_ASN1_SYNTAX_ERROR)
+-	ERROR(GNUTLS_E_ASN1_DER_OVERFLOW)
+-	//ERROR(GNUTLS_E_OPENPGP_TRUSTDB_VERSION_UNSUPPORTED)
+-	ERROR(GNUTLS_E_OPENPGP_UID_REVOKED)
+-	ERROR(GNUTLS_E_CERTIFICATE_ERROR)
+-	//ERROR(GNUTLS_E_X509_CERTIFICATE_ERROR)
+-	ERROR(GNUTLS_E_CERTIFICATE_KEY_MISMATCH)
+-	ERROR(GNUTLS_E_UNSUPPORTED_CERTIFICATE_TYPE)
+-	ERROR(GNUTLS_E_X509_UNKNOWN_SAN)
+-	ERROR(GNUTLS_E_OPENPGP_FINGERPRINT_UNSUPPORTED)
+-	ERROR(GNUTLS_E_X509_UNSUPPORTED_ATTRIBUTE)
+-	ERROR(GNUTLS_E_UNKNOWN_HASH_ALGORITHM)
+-	ERROR(GNUTLS_E_UNKNOWN_PKCS_CONTENT_TYPE)
+-	ERROR(GNUTLS_E_UNKNOWN_PKCS_BAG_TYPE)
+-	ERROR(GNUTLS_E_INVALID_PASSWORD)
+-	ERROR(GNUTLS_E_MAC_VERIFY_FAILED)
+-	ERROR(GNUTLS_E_CONSTRAINT_ERROR)
+-	ERROR(GNUTLS_E_BASE64_ENCODING_ERROR)
+-	ERROR(GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY)
+-	//ERROR(GNUTLS_E_INCOMPATIBLE_CRYPTO_LIBRARY)
+-	ERROR(GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY)
+-	ERROR(GNUTLS_E_OPENPGP_KEYRING_ERROR)
+-	ERROR(GNUTLS_E_X509_UNSUPPORTED_OID)
+-	//ERROR(GNUTLS_E_RANDOM_FAILED)
+-	ERROR(GNUTLS_E_UNIMPLEMENTED_FEATURE)
+-
+-	default:
+-
+-		msg += "unknown error";
+-		break;
+-	}
++	std::ostringstream msg;
+ 
+-#undef ERROR
++	msg << fname + "() returned code ";
++	msg << std::hex << code;
++	msg << ": ";
++	msg << gnutls_strerror(code);
+ 
+-	throw exceptions::tls_exception(msg);
++	throw exceptions::tls_exception(msg.str());
+ }
+ 
+ 
+-- 
+1.7.7
+
+
+From aae321dede5e725140534a08a8b2ee997faa30be Mon Sep 17 00:00:00 2001
+From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
+Date: Sun, 21 Aug 2011 08:55:46 +0000
+Subject: [PATCH 24/27] Removed dependency on gcrypt for gnutls version >=
+ 2.12.
+
+git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@599 5301114d-f842-0410-bbdd-996ee0417009
+
+diff --git a/src/net/tls/TLSSession.cpp b/src/net/tls/TLSSession.cpp
+index 7426a73..d3f6d49 100644
+--- a/src/net/tls/TLSSession.cpp
++++ b/src/net/tls/TLSSession.cpp
+@@ -26,9 +26,17 @@
+ 
+ #include "vmime/config.hpp"
+ 
++// Dependency on gcrypt is not needed since GNU TLS version 2.12.
++// See here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638651
++#if GNUTLS_VERSION_NUMBER <= 0x020b00
++#	define VMIME_GNUTLS_NEEDS_GCRYPT  1
++#endif
++
+ #if VMIME_HAVE_PTHREAD
+ #	include <pthread.h>
+-#	include <gcrypt.h>
++#	if VMIME_GNUTLS_NEEDS_GCRYPT
++#		include <gcrypt.h>
++#	endif
+ #	include <errno.h>
+ #endif // VMIME_HAVE_PTHREAD
+ 
+@@ -49,7 +57,7 @@
+ #endif // VMIME_DEBUG && GNUTLS_DEBUG
+ 
+ 
+-#if VMIME_HAVE_PTHREAD && defined(GCRY_THREAD_OPTION_PTHREAD_IMPL)
++#if VMIME_HAVE_PTHREAD && VMIME_GNUTLS_NEEDS_GCRYPT && defined(GCRY_THREAD_OPTION_PTHREAD_IMPL)
+ extern "C"
+ {
+ 	GCRY_THREAD_OPTION_PTHREAD_IMPL;
+@@ -70,7 +78,9 @@ struct TLSGlobal
+ 	TLSGlobal()
+ 	{
+ #if VMIME_HAVE_PTHREAD && defined(GCRY_THREAD_OPTION_PTHREAD_IMPL)
++	#if VMIME_GNUTLS_NEEDS_GCRYPT
+ 		gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
++	#endif // VMIME_GNUTLS_NEEDS_GCRYPT
+ #endif // VMIME_HAVE_PTHREAD && defined(GCRY_THREAD_OPTION_PTHREAD_IMPL
+ 
+ 		gnutls_global_init();
+-- 
+1.7.7
+
+
+From af1e5664afb663fb7d26d468adf675fb1b3f8737 Mon Sep 17 00:00:00 2001
+From: vincent-richard <vincent-richard@5301114d-f842-0410-bbdd-996ee0417009>
+Date: Sun, 21 Aug 2011 09:04:46 +0000
+Subject: [PATCH 25/27] Fixed HAVE_GNUTLS_PRIORITY_FUNCS never defined when
+ configured with no TLS support.
+
+git-svn-id: https://vmime.svn.sourceforge.net/svnroot/vmime/trunk@600 5301114d-f842-0410-bbdd-996ee0417009
+
+diff --git a/SConstruct b/SConstruct
+index 01ad3f3..11e884b 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1654,10 +1654,16 @@ if test "x$conf_tls" = "xyes"; then
+ 			AM_CONDITIONAL(HAVE_GNUTLS_PRIORITY_FUNCS, false)
+ 			HAVE_GNUTLS_PRIORITY_FUNCS=0
+ 		fi
++	else
++		AM_CONDITIONAL(HAVE_GNUTLS_PRIORITY_FUNCS, false)
++		HAVE_GNUTLS_PRIORITY_FUNCS=0
+ 	fi
+ else
+ 	AM_CONDITIONAL(VMIME_HAVE_TLS_SUPPORT, false)
+ 	VMIME_HAVE_TLS_SUPPORT=0
++
++	AM_CONDITIONAL(HAVE_GNUTLS_PRIORITY_FUNCS, false)
++	HAVE_GNUTLS_PRIORITY_FUNCS=0
+ fi
+ 
+ AC_SUBST(LIBGNUTLS_CFLAGS)
+-- 
+1.7.7
+
+
+From df003ef728016558f366533a5c79d8382d412895 Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Mon, 7 Nov 2011 21:07:03 +0100
+Subject: [PATCH 26/27] no extra in gnutls 3
+
+Taken from:
+https://sourceforge.net/tracker/?func=detail&aid=3434631&group_id=69724&atid=525570
+
+diff --git a/src/net/tls/TLSSession.cpp b/src/net/tls/TLSSession.cpp
+index d3f6d49..cb50acc 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"
+ 
+-- 
+1.7.7
+
+
+From 96fa903697c4cdcc2018c3f4f6af9470fe346087 Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Tue, 8 Nov 2011 09:54:03 +0100
+Subject: [PATCH 27/27] fix smtps verification failure
+
+Fixes problem on gnutls 3. Vmime svn revision 600.
+
+Using smtps in examples/example6.cpp fails with a typical
+mail server:
+
+    vmime::exceptions::tls_exception
+    what = gnutls_handshake() returned code ffffffc1:
+    The Diffie-Hellman prime sent by the server is not acceptable
+    (not long enough).
+
+Setting the expected size of the prime solves the problem.
+
+Taken from:
+https://sourceforge.net/tracker/?func=detail&atid=525570&aid=3434852&group_id=69724
+
+diff --git a/src/net/tls/TLSSession.cpp b/src/net/tls/TLSSession.cpp
+index cb50acc..6fbc4b4 100644
+--- a/src/net/tls/TLSSession.cpp
++++ b/src/net/tls/TLSSession.cpp
+@@ -139,6 +139,7 @@ TLSSession::TLSSession(ref <security::cert::certificateVerifier> cv)
+ 	// Sets some default priority on the ciphers, key exchange methods,
+ 	// macs and compression methods.
+ #if HAVE_GNUTLS_PRIORITY_FUNCS
++        gnutls_dh_set_prime_bits(*m_gnutlsSession, 128);
+ 
+ 	if ((res = gnutls_priority_set_direct
+ 		(*m_gnutlsSession, "NORMAL:%SSL3_RECORD_VERSION", NULL)) != 0)
+-- 
+1.7.7
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/vtk-1-tryrun.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -0,0 +1,103 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+--- blubb	1970-01-01 01:00:00.000000000 +0100
++++ VTK/TryRunResults.cmake	2011-09-27 08:44:04.563613261 +0200
+@@ -0,0 +1,97 @@
++SET( VTK_TYPE_CHAR_IS_SIGNED 
++     "1"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++SET( VTK_ANSI_STREAM_EOF_RESULT 
++     "1"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++SET( KWSYS_CHAR_IS_SIGNED 
++     "0"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++
++SET( KWSYS_CHAR_IS_SIGNED__TRYRUN_OUTPUT 
++     ""
++     CACHE STRING "Output from TRY_RUN" FORCE)
++SET( HDF5_PRINTF_LL_TEST_RUN 
++     "0"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++
++SET( HDF5_PRINTF_LL_TEST_RUN__TRYRUN_OUTPUT 
++     "PRINTF_LL_WIDTH=[ll]"
++     CACHE STRING "Output from TRY_RUN" FORCE)
++SET( H5_LDOUBLE_TO_INTEGER_WORKS_RUN 
++     "0"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++
++SET( H5_LDOUBLE_TO_INTEGER_WORKS_RUN__TRYRUN_OUTPUT 
++     ""
++     CACHE STRING "Output from TRY_RUN" FORCE)
++SET( H5_ULONG_TO_FLOAT_ACCURATE_RUN 
++     "0"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++
++SET( H5_ULONG_TO_FLOAT_ACCURATE_RUN__TRYRUN_OUTPUT 
++     ""
++     CACHE STRING "Output from TRY_RUN" FORCE)
++SET( H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE_RUN 
++     "1"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++
++SET( H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE_RUN__TRYRUN_OUTPUT 
++     ""
++     CACHE STRING "Output from TRY_RUN" FORCE)
++SET( H5_FP_TO_ULLONG_ACCURATE_RUN 
++     "0"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++
++SET( H5_FP_TO_ULLONG_ACCURATE_RUN__TRYRUN_OUTPUT 
++     ""
++     CACHE STRING "Output from TRY_RUN" FORCE)
++SET( H5_FP_TO_ULLONG_RIGHT_MAXIMUM_RUN 
++     "0"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++
++SET( H5_FP_TO_ULLONG_RIGHT_MAXIMUM_RUN__TRYRUN_OUTPUT 
++     ""
++     CACHE STRING "Output from TRY_RUN" FORCE)
++SET( H5_LDOUBLE_TO_UINT_ACCURATE_RUN 
++     "0"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++
++SET( H5_LDOUBLE_TO_UINT_ACCURATE_RUN__TRYRUN_OUTPUT 
++     ""
++     CACHE STRING "Output from TRY_RUN" FORCE)
++SET( H5_ULLONG_TO_LDOUBLE_PRECISION_RUN 
++     "0"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++
++SET( H5_ULLONG_TO_LDOUBLE_PRECISION_RUN__TRYRUN_OUTPUT 
++     ""
++     CACHE STRING "Output from TRY_RUN" FORCE)
++SET( H5_FP_TO_INTEGER_OVERFLOW_WORKS_RUN 
++     "0"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++
++SET( H5_FP_TO_INTEGER_OVERFLOW_WORKS_RUN__TRYRUN_OUTPUT 
++     ""
++     CACHE STRING "Output from TRY_RUN" FORCE)
++SET( H5_LDOUBLE_TO_LLONG_ACCURATE_RUN 
++     "0"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++
++SET( H5_LDOUBLE_TO_LLONG_ACCURATE_RUN__TRYRUN_OUTPUT 
++     ""
++     CACHE STRING "Output from TRY_RUN" FORCE)
++SET( H5_LLONG_TO_LDOUBLE_CORRECT_RUN 
++     "0"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++
++SET( H5_LLONG_TO_LDOUBLE_CORRECT_RUN__TRYRUN_OUTPUT 
++     ""
++     CACHE STRING "Output from TRY_RUN" FORCE)
++SET( H5_NO_ALIGNMENT_RESTRICTIONS_RUN 
++     "0"
++     CACHE STRING "Result from TRY_RUN" FORCE)
++SET( H5_NO_ALIGNMENT_RESTRICTIONS_RUN__TRYRUN_OUTPUT 
++     ""
++     CACHE STRING "Output from TRY_RUN" FORCE)
++
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/vtk-2-findfreetype.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -0,0 +1,16 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+This patch has been taken from:
+http://www.vtk.org/Bug/view.php?id=12688
+
+--- VTK/CMake/FindFREETYPE.cmake.orig	2011-08-24 15:37:07.000000000 +0200
++++ VTK/CMake/FindFREETYPE.cmake	2011-10-25 22:55:52.265702464 +0200
+@@ -15,6 +15,7 @@
+ FIND_PATH(FREETYPE_INCLUDE_DIR_FTHEADER freetype/config/ftheader.h
+   /usr/include/freetype2
+   /usr/local/include/freetype2
++  PATH_SUFFIXES freetype2
+ )
+ 
+ FIND_LIBRARY(FREETYPE_LIBRARY freetype)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/vtk-3-compile-tools.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -0,0 +1,140 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+This patch has been taken from:
+http://www.vtk.org/Bug/view.php?id=12686
+
+--- VTK/Utilities/kwsys/CMakeLists.txt	2011-08-24 15:37:12.000000000 +0200
++++ VTK/Utilities/kwsys/CMakeLists.txt	2011-10-30 00:06:06.402085234 +0200
+@@ -937,13 +937,20 @@
+ # file and build it into the library.  Win9x platforms reproduce the
+ # executable into a temporary directory when it is needed.
+ IF(KWSYS_USE_Process)
+-  IF(NOT UNIX)
++  IF(NOT CMAKE_CROSSCOMPILING)
+     # Build the forwarding executable itself and a program that will
+     # encode it into a C file.
+-    ADD_EXECUTABLE(${KWSYS_NAMESPACE}ProcessFwd9x ProcessFwd9x.c)
+     ADD_EXECUTABLE(${KWSYS_NAMESPACE}EncodeExecutable EncodeExecutable.c)
+-    KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE})
+     KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}EncodeExecutable PROPERTY LABELS ${KWSYS_LABELS_EXE})
++    EXPORT(TARGETS ${KWSYS_NAMESPACE}EncodeExecutable FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
++    IF(COMPILE_TOOLS_TARGET)
++      ADD_DEPENDENCIES(${COMPILE_TOOLS_TARGET} ${KWSYS_NAMESPACE}EncodeExecutable)
++    ENDIF(COMPILE_TOOLS_TARGET)
++  ENDIF(NOT CMAKE_CROSSCOMPILING)
++  
++  IF(NOT UNIX)  
++    ADD_EXECUTABLE(${KWSYS_NAMESPACE}ProcessFwd9x ProcessFwd9x.c)
++    KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE})
+ 
+     # Construct the location of the executable to be encoded.
+     SET(BIN_DIR ${CMAKE_CURRENT_BINARY_DIR})
+@@ -957,24 +964,23 @@
+     ENDIF(CMAKE_BUILD_TOOL MATCHES "make")
+ 
+     # Take advantage of a better custom command syntax if possible.
+-    SET(CMD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}EncodeExecutable.exe)
+     SET(FWD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}ProcessFwd9x.exe)
+     IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6)
+       ADD_CUSTOM_COMMAND(
+         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
+-        COMMAND ${CMD}
++        COMMAND ${KWSYS_NAMESPACE}EncodeExecutable
+         ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
+              ${KWSYS_NAMESPACE} ProcessFwd9x
+-        DEPENDS ${CMD} ${FWD})
++        DEPENDS ${KWSYS_NAMESPACE}EncodeExecutable ${FWD})
+     ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6)
+       ADD_CUSTOM_COMMAND(
+         TARGET ${KWSYS_NAMESPACE}
+         SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/ProcessFwd9x.c
+-        COMMAND ${CMD}
++        COMMAND ${KWSYS_NAMESPACE}EncodeExecutable
+         ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
+              ${KWSYS_NAMESPACE} ProcessFwd9x
+         OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
+-        DEPENDS ${CMD} ${FWD})
++        DEPENDS ${KWSYS_NAMESPACE}EncodeExecutable ${FWD})
+     ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6)
+ 
+     # Make sure build occurs in proper order.
+     
+--- VTK/Utilities/vtkhdf5/src/CMakeLists.txt	2011-08-24 15:37:13.000000000 +0200
++++ VTK/Utilities/vtkhdf5/src/CMakeLists.txt	2011-10-30 00:13:16.798098058 +0200
+@@ -572,34 +572,40 @@
+ # Setup the H5Detect utility which generates H5Tinit with platform
+ # specific type checks inside
+ #-----------------------------------------------------------------------------
+-SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5detect${EXE_EXT})
+-IF (XCODE)
+-  SET (CMD "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${CONFIGURATION}/H5detect")
+-ENDIF (XCODE)
+-ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c)
+-IF (WIN32)
+-  TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib")
+-ENDIF (WIN32)
++IF(NOT CMAKE_CROSSCOMPILING)
++  ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c)
++  IF (WIN32)
++    TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib")
++  ENDIF (WIN32)
++
++  EXPORT(TARGETS H5detect FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
++  IF(COMPILE_TOOLS_TARGET)
++    ADD_DEPENDENCIES(${COMPILE_TOOLS_TARGET} H5detect)
++  ENDIF(COMPILE_TOOLS_TARGET)
++ENDIF(NOT CMAKE_CROSSCOMPILING)
+ 
+ ADD_CUSTOM_COMMAND (
+     OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c
+-    COMMAND ${CMD}
++    COMMAND H5detect
+     ARGS > ${HDF5_BINARY_DIR}/H5Tinit.c
+     DEPENDS H5detect
+ )
+ 
+-SET (CMDL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5make_libsettings${EXE_EXT})
+-IF (XCODE)
+-  SET (CMDL "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${CONFIGURATION}/H5make_libsettings")
+-ENDIF (XCODE)
+-ADD_EXECUTABLE (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
+-IF (WIN32)
+-  TARGET_LINK_LIBRARIES (H5make_libsettings "ws2_32.lib")
+-ENDIF (WIN32)
++IF(NOT CMAKE_CROSSCOMPILING)
++  ADD_EXECUTABLE (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
++  IF (WIN32)
++    TARGET_LINK_LIBRARIES (H5make_libsettings "ws2_32.lib")
++  ENDIF (WIN32)
+ 
++  EXPORT(TARGETS H5make_libsettings FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
++  IF(COMPILE_TOOLS_TARGET)
++    ADD_DEPENDENCIES(${COMPILE_TOOLS_TARGET} H5make_libsettings)
++  ENDIF(COMPILE_TOOLS_TARGET)
++ENDIF(NOT CMAKE_CROSSCOMPILING)
++  
+ ADD_CUSTOM_COMMAND (
+     OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c
+-    COMMAND ${CMDL}
++    COMMAND H5make_libsettings
+     ARGS > ${HDF5_BINARY_DIR}/H5lib_settings.c
+     DEPENDS H5make_libsettings
+ )
+ 
+--- VTK/CMakeLists.txt	2011-08-24 15:37:07.000000000 +0200
++++ VTK/CMakeLists.txt	2011-10-31 09:12:59.451958504 +0100
+@@ -42,8 +42,13 @@
+   FILE(WRITE "${EXPORT_EXECUTABLES_FILE}" "#generated by VTK, do not edit\n")
+ ENDIF(NOT EXPORT_EXECUTABLES_FILE)
+ 
++# Add a target for building only the compile tools
++ADD_CUSTOM_TARGET(CompileTools)
++SET(COMPILE_TOOLS_TARGET "CompileTools")
++
+ GET_PROPERTY(VTK_TARGET_SUPPORTS_SHARED_LIBS
+   GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
++  
+ 
+ # Warn when using "old style" CMake install commands... But only when
+ # building VTK itself.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/vtk.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -0,0 +1,50 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+# vtk
+PKG             := vtk
+$(PKG)_IGNORE   :=
+$(PKG)_VERSION  := 5.8.0
+$(PKG)_CHECKSUM := ece52f4fa92811fe927581e60ecb39a8a5f68cd9
+$(PKG)_SUBDIR   := VTK
+$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
+$(PKG)_WEBSITE  := http://www.vtk.org/
+$(PKG)_URL      := $($(PKG)_WEBSITE)files/release/5.8/$($(PKG)_FILE)
+$(PKG)_DEPS     := qt expat freetype jpeg libxml2 libpng tiff zlib libodbc++ postgresql
+
+define $(PKG)_UPDATE
+    wget -q -O- 'http://vtk.org/gitweb?p=VTK.git;a=tags' | \
+    grep 'refs/tags/v[0-9.]*"' | \
+    $(SED) 's,.*refs/tags/v\(.*\)".*,\1,g;' | \
+    head -1
+endef
+
+define $(PKG)_BUILD
+
+    # first we need a native build to create the compile tools
+    mkdir '$(1)/native_build'
+    cd '$(1)/native_build' && cmake -DCMAKE_BUILD_TYPE='Release' ..
+    
+    # only the newly created CompileTools target need to be built
+    $(MAKE) -C '$(1)/native_build' -j '$(JOBS)' VERBOSE=1 CompileTools
+        
+    # now for the cross compilation
+    mkdir '$(1)/cross_build'
+    cd '$(1)/cross_build' && cmake \
+        -C '$(1)/TryRunResults.cmake'\
+        -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)'\
+        -DBUILD_TESTING=FALSE\
+        -DVTKCompileTools_DIR='$(1)/native_build'\
+        -DVTK_USE_SYSTEM_EXPAT=TRUE\
+        -DVTK_USE_SYSTEM_FREETYPE=TRUE\
+        -DVTK_USE_SYSTEM_JPEG=TRUE\
+        -DVTK_USE_SYSTEM_LIBXML2=TRUE\
+        -DVTK_USE_SYSTEM_PNG=TRUE\
+        -DVTK_USE_SYSTEM_TIFF=TRUE\
+        -DVTK_USE_SYSTEM_ZLIB=TRUE\
+        -DVTK_USE_QT=TRUE\
+        -DVTK_USE_POSTGRES=TRUE\
+        -DVTK_USE_ODBC=TRUE\
+        ..
+    $(MAKE) -C '$(1)/cross_build' -j '$(JOBS)' install VERBOSE=1
+endef
--- a/src/w32api.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/w32api.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -5,15 +5,15 @@
 PKG             := w32api
 $(PKG)_IGNORE   :=
 $(PKG)_VERSION  := 3.17
-$(PKG)_CHECKSUM := add0c6088d94cf283fdc1181f8b70dccd5714a3a
+$(PKG)_CHECKSUM := 1eb60b0cd546bf3efdc3fb89a4118df11da2314a
 $(PKG)_SUBDIR   := .
-$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION)-1-mingw32-dev.tar.lzma
+$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION)-2-mingw32-dev.tar.lzma
 $(PKG)_WEBSITE  := http://www.mingw.org/
-$(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/mingw/MinGW/BaseSystem/RuntimeLibrary/Win32-API/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/mingw/MinGW/Base/$(PKG)/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE)
 $(PKG)_DEPS     :=
 
 define $(PKG)_UPDATE
-    wget -q -O- 'http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/RuntimeLibrary/Win32-API/' | \
+    wget -q -O- 'http://sourceforge.net/projects/mingw/files/MinGW/Base/w32api/' | \
     $(SED) -n 's,.*w32api-\([0-9][^"]*\)/".*,\1,p' | \
     head -1
 endef
--- a/src/xine-lib-1-fix-install-def-file.patch	Tue Nov 15 16:43:58 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-This file is part of mingw-cross-env.
-See doc/index.html for further information.
-
-diff -r 42ff50f9d875 src/xine-engine/Makefile.am
---- a/src/xine-engine/Makefile.am	Mon Apr 26 17:53:49 2010 +0200
-+++ b/src/xine-engine/Makefile.am	Tue Apr 27 11:57:54 2010 +0200
-@@ -45,10 +45,10 @@
- 
- if WIN32
- install-exec-local:
--	cp -p $(DEF_FILE) $(DESTDIR)$(libdir)
-+	-cp -p $(DEF_FILE) $(DESTDIR)$(libdir)
- 
- uninstall-local:
--	rm -f $(DEF_FILE)
-+	-rm -f $(DESTDIR)$(libdir)/$(DEF_FILE)
- endif
- 
- $(XINEUTILS_LIB):
-diff -r 42ff50f9d875 src/xine-engine/Makefile.in
---- a/src/xine-engine/Makefile.in	Mon Apr 26 17:53:49 2010 +0200
-+++ b/src/xine-engine/Makefile.in	Tue Apr 27 11:57:54 2010 +0200
-@@ -898,10 +898,10 @@
- 	$(MAKE) -C $(top_builddir)/lib libxineposix.la
- 
- @WIN32_TRUE@install-exec-local:
--@WIN32_TRUE@	cp -p $(DEF_FILE) $(DESTDIR)$(libdir)
-+@WIN32_TRUE@	-cp -p $(DEF_FILE) $(DESTDIR)$(libdir)
- 
- @WIN32_TRUE@uninstall-local:
--@WIN32_TRUE@	rm -f $(DEF_FILE)
-+@WIN32_TRUE@	-rm -f $(DESTDIR)$(libdir)/$(DEF_FILE)
- 
- $(XINEUTILS_LIB):
- 	$(MAKE) -C $(top_builddir)/src/xine-utils libxineutils.la
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xine-lib-1-fixes.patch	Tue Nov 15 16:51:49 2011 +0100
@@ -0,0 +1,133 @@
+This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+Contains ad hoc patches for cross building.
+
+From 10c6f4cb18b2b8e710a89ac36e360f3bb414a81c Mon Sep 17 00:00:00 2001
+From: mingw-cross-env
+Date: Sun, 13 Nov 2011 11:48:07 +0100
+Subject: [PATCH 1/3] fix-install-def-file
+
+
+diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am
+index 67ae63f..0f94abf 100644
+--- a/src/xine-engine/Makefile.am
++++ b/src/xine-engine/Makefile.am
+@@ -45,10 +45,10 @@ noinst_HEADERS = bswap.h ffmpeg_bswap.h xine_private.h
+ 
+ if WIN32
+ install-exec-local:
+-	cp -p $(DEF_FILE) $(DESTDIR)$(libdir)
++	-cp -p $(DEF_FILE) $(DESTDIR)$(libdir)
+ 
+ uninstall-local:
+-	rm -f $(DEF_FILE)
++	-rm -f $(DESTDIR)$(libdir)/$(DEF_FILE)
+ endif
+ 
+ $(XINEUTILS_LIB):
+diff --git a/src/xine-engine/Makefile.in b/src/xine-engine/Makefile.in
+index 167a32b..0664e1f 100644
+--- a/src/xine-engine/Makefile.in
++++ b/src/xine-engine/Makefile.in
+@@ -905,10 +905,10 @@ $(LIBXINEPOSIX):
+ 	$(MAKE) -C $(top_builddir)/lib libxineposix.la
+ 
+ @WIN32_TRUE@install-exec-local:
+-@WIN32_TRUE@	cp -p $(DEF_FILE) $(DESTDIR)$(libdir)
++@WIN32_TRUE@	-cp -p $(DEF_FILE) $(DESTDIR)$(libdir)
+ 
+ @WIN32_TRUE@uninstall-local:
+-@WIN32_TRUE@	rm -f $(DEF_FILE)
++@WIN32_TRUE@	-rm -f $(DESTDIR)$(libdir)/$(DEF_FILE)
+ 
+ $(XINEUTILS_LIB):
+ 	$(MAKE) -C $(top_builddir)/src/xine-utils libxineutils.la
+-- 
+1.7.7
+
+
+From 536bda7f4b05f9a70bfbeca9578565a03b54c94e Mon Sep 17 00:00:00 2001
+From: mingw-cross-env
+Date: Sun, 13 Nov 2011 12:05:22 +0100
+Subject: [PATCH 2/3] fake missing definitions for WIN32
+
+Taken from:
+https://bugs.xine-project.org/show_bug.cgi?id=433
+
+diff --git a/src/audio_out/audio_file_out.c b/src/audio_out/audio_file_out.c
+index 0895a2e..51f8855 100644
+--- a/src/audio_out/audio_file_out.c
++++ b/src/audio_out/audio_file_out.c
+@@ -40,6 +40,18 @@
+ 
+ #define GAP_TOLERANCE        INT_MAX
+ 
++#ifdef WIN32
++#ifndef S_IWUSR
++#define S_IWUSR 0x0000
++#endif
++#ifndef S_IRGRP
++#define S_IRGRP 0x0000
++#endif
++#ifndef S_IROTH
++#define S_IROTH 0x0000
++#endif
++#endif
++
+ /* Taken (hStudlyCapsAndAll) from sox's wavwritehdr */
+ 
+ struct wavhdr {
+@@ -116,7 +128,6 @@ static int ao_file_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
+ 		this->fname = "xine-out.wav";
+ 
+ 	this->fd = xine_create_cloexec(this->fname, O_WRONLY|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
+-
+ 	if (this->fd == -1) {
+ 		xprintf (this->xine, XINE_VERBOSITY_LOG, "audio_file_out: Failed to open file '%s': %s\n",
+ 			 this->fname, strerror(errno));
+-- 
+1.7.7
+
+
+From 68609a4508116803346b4fd962f3ed3141c70316 Mon Sep 17 00:00:00 2001
+From: mingw-cross-env
+Date: Sun, 13 Nov 2011 13:45:21 +0100
+Subject: [PATCH 3/3] force graphicsmagick over imagemagick
+
+
+diff --git a/configure.ac b/configure.ac
+index 6af7ef7..2682e39 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1419,21 +1419,12 @@ AC_ARG_WITH([imagemagick],
+ 	AS_HELP_STRING([--without-imagemagick], [Build without ImageMagick image decoder (or GraphicsMagick's compat layer)]))
+ 
+ if test "x$with_imagemagick" != "xno"; then
+-   PKG_CHECK_MODULES([WAND], [Wand], [have_imagemagick=yes], [AC_MSG_RESULT([no]); have_imagemagick=no])
+-   if test "x$have_imagemagick" = 'xno'; then
+-      PKG_CHECK_MODULES([MAGICKWAND], [MagickWand], [have_imagemagick=yes], [AC_MSG_RESULT([no]); have_imagemagick=no])
+-      dnl Avoid $(WAND_FLAGS) $(MAGICKWAND_FLAGS) ...
+-      WAND_CFLAGS="$MAGICKWAND_CFLAGS"
+-      WAND_LIBS="$MAGICKWAND_LIBS"
+-   fi
+-   if test "x$have_imagemagick" = 'xno'; then
+-      PKG_CHECK_MODULES([GRAPHICSMAGICK], [ImageMagick], [have_imagemagick=yes], [AC_MSG_RESULT([no]); have_imagemagick=no])
+-      PKG_CHECK_MODULES([GRAPHICSMAGICKWAND], [GraphicsMagickWand], [have_imagemagick=yes], [AC_MSG_RESULT([no]); have_imagemagick=no])
+-      dnl The following assignments are safe, since they include
+-      dnl the flags for plain GraphicsMagick
+-      WAND_CFLAGS="$GRAPHICSMAGICKWAND_CFLAGS"
+-      WAND_LIBS="$GRAPHICSMAGICKWAND_LIBS"
+-   fi
++   PKG_CHECK_MODULES([GRAPHICSMAGICK], [ImageMagick], [have_imagemagick=yes], [AC_MSG_RESULT([no]); have_imagemagick=no])
++   PKG_CHECK_MODULES([GRAPHICSMAGICKWAND], [GraphicsMagickWand], [have_imagemagick=yes], [AC_MSG_RESULT([no]); have_imagemagick=no])
++   dnl The following assignments are safe, since they include
++   dnl the flags for plain GraphicsMagick
++   WAND_CFLAGS="$GRAPHICSMAGICKWAND_CFLAGS"
++   WAND_LIBS="$GRAPHICSMAGICKWAND_LIBS"
+    if test "x$with_imagemagick" = "xyes" && test "x$have_imagemagick" = "xno"; then
+       AC_MSG_ERROR([ImageMagick support requested, but neither Wand, MagickWand, nor GraphicsMagick were found])
+    elif test "x$have_imagemagick" = "xyes"; then
+-- 
+1.7.7
+
--- a/src/xine-lib-2-fix-no-undefined.patch	Tue Nov 15 16:43:58 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-# This file is part of mingw-cross-env.
-# See doc/index.html for further information.
-
-This patch has been taken from:
-https://bugs.xine-project.org/show_bug.cgi?id=411
-
-diff --git a/configure.ac b/configure.ac
-index dc53a73..90f23a8 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -281,7 +281,6 @@ case "$host_os" in
-       GOOM_LIBS="-liberty"
-       LDFLAGS="-Wl,--enable-stdcall-fixup $LDFLAGS"
-     fi
--    LDFLAGS="-no-undefined $LDFLAGS"
-     ;;
- esac
- AC_SUBST(GOOM_LIBS)
-@@ -2877,6 +2876,19 @@ mv -f libtool.tmp libtool
- chmod +x libtool
- 
- dnl ---------------------------------------------
-+dnl Libtool flag for Windows:
-+dnl
-+dnl The "-no-undefined" flag must be added after all other
-+dnl configure checks, because it is only for libtool and
-+dnl must not be passed to GCC by accident.
-+dnl ---------------------------------------------
-+case "$host_os" in
-+  mingw* | cygwin*)
-+    LDFLAGS="-no-undefined $LDFLAGS"
-+    ;;
-+esac
-+
-+dnl ---------------------------------------------
- dnl Some infos:
- dnl ---------------------------------------------
- 
--- a/src/xine-lib-3-ffmpeg-0.8.patch	Tue Nov 15 16:43:58 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-This file is part of mingw-cross-env.
-See doc/index.html for further information.
-
-This patch taken from:
-http://www.nntpnews.info/threads/20303026-packages-xine-lib-xine-lib.spec-xine-lib-xine-lib-ffmpeg-0.8.patch-%28NEW%29-UTF-8-Q-20-...
-
-diff -urN a/src/combined/ffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c
---- a/src/combined/ffmpeg/ff_audio_decoder.c	2010-03-23 16:41:49.000000000 +0100
-+++ b/src/combined/ffmpeg/ff_audio_decoder.c	2011-07-11 10:48:48.967401526 +0200
-@@ -255,6 +255,7 @@
-       buf->decoder_info[2]);
- 
-   } else if (!(buf->decoder_flags & BUF_FLAG_SPECIAL)) {
-+ AVPacket avpkt;
- 
-     if( !this->decoder_ok ) {
-       if ( ! this->context || ! this->codec ) {
-@@ -286,11 +287,13 @@
-     if (!this->output_open) {
-       if (!this->audio_bits || !this->audio_sample_rate || !this->audio_channels) {
-         decode_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
--        avcodec_decode_audio2 (this->context,
--                              (int16_t *)this->decode_buffer,
--                              &decode_buffer_size,
--                              &this->buf[0],
--                              this->size);
-+ av_init_packet(&avpkt);
-+ avpkt.data = (uint8_t *)&this->buf[0];
-+ avpkt.size = this->size;
-+ avpkt.flags = AV_PKT_FLAG_KEY;
-+ avcodec_decode_audio3 (this->context,
-+ (int16_t *)this->decode_buffer,
-+ &decode_buffer_size, &avpkt);
- 	this->audio_bits = this->context->bits_per_sample;
- 	this->audio_sample_rate = this->context->sample_rate;
- 	this->audio_channels = this->context->channels;
-@@ -311,11 +314,13 @@
-       offset = 0;
-       while (this->size>0) {
-         decode_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
--        bytes_consumed = avcodec_decode_audio2 (this->context,
--                                               (int16_t *)this->decode_buffer,
--                                               &decode_buffer_size,
--                                               &this->buf[offset],
--                                               this->size);
-+ av_init_packet(&avpkt);
-+ avpkt.data = (uint8_t *)&this->buf[offset];
-+ avpkt.size = this->size;
-+ avpkt.flags = AV_PKT_FLAG_KEY;
-+ bytes_consumed = avcodec_decode_audio3 (this->context,
-+ (int16_t *)this->decode_buffer,
-+ &decode_buffer_size, &avpkt);
- 
-         if (bytes_consumed<0) {
-           xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
-diff -urN a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c
---- a/src/combined/ffmpeg/ff_video_decoder.c	2010-03-10 20:07:15.000000000 +0100
-+++ b/src/combined/ffmpeg/ff_video_decoder.c	2011-07-11 10:48:48.967401526 +0200
-@@ -1055,12 +1055,16 @@
-     }
- 
-     /* skip decoding b frames if too late */
--    this->context->hurry_up = (this->skipframes > 0);
-+ this->context->skip_frame = (this->skipframes > 0) ? AVDISCARD_NONREF : AVDISCARD_DEFAULT;
- 
-     lprintf("avcodec_decode_video: size=%d\n", this->mpeg_parser->buffer_size);
--    len = avcodec_decode_video (this->context, this->av_frame,
--                                &got_picture, this->mpeg_parser->chunk_buffer,
--                                this->mpeg_parser->buffer_size);
-+ AVPacket avpkt;
-+ av_init_packet(&avpkt);
-+ avpkt.data = (uint8_t *)this->mpeg_parser->chunk_buffer;
-+ avpkt.size = this->mpeg_parser->buffer_size;
-+ avpkt.flags = AV_PKT_FLAG_KEY;
-+ len = avcodec_decode_video2 (this->context, this->av_frame,
-+ &got_picture, &avpkt);
-     lprintf("avcodec_decode_video: decoded_size=%d, got_picture=%d\n",
-             len, got_picture);
-     len = current - buf->content - offset;
-@@ -1112,7 +1116,7 @@
- 
-     } else {
- 
--      if (this->context->hurry_up) {
-+ if (this->context->skip_frame != AVDISCARD_DEFAULT) {
-         /* skipped frame, output a bad frame */
-         img = this->stream->video_out->get_frame (this->stream->video_out,
-                                                   this->bih.biWidth,
-@@ -1304,12 +1308,16 @@
-         got_picture = 0;
-       } else {
-         /* skip decoding b frames if too late */
--        this->context->hurry_up = (this->skipframes > 0);
-+ this->context->skip_frame = (this->skipframes > 0) ? AVDISCARD_NONREF : AVDISCARD_DEFAULT;
- 
-         lprintf("buffer size: %d\n", this->size);
--        len = avcodec_decode_video (this->context, this->av_frame,
--                                    &got_picture, &chunk_buf[offset],
--                                    this->size);
-+ AVPacket avpkt;
-+ av_init_packet(&avpkt);
-+ avpkt.data = (uint8_t *)&chunk_buf[offset];
-+ avpkt.size = this->size;
-+ avpkt.flags = AV_PKT_FLAG_KEY;
-+ len = avcodec_decode_video2 (this->context, this->av_frame,
-+ &got_picture, &avpkt);
- 
- #ifdef AVCODEC_HAS_REORDERED_OPAQUE
-         /* reset consumed pts value */
--- a/src/xine-lib.mk	Tue Nov 15 16:43:58 2011 +0100
+++ b/src/xine-lib.mk	Tue Nov 15 16:51:49 2011 +0100
@@ -4,13 +4,13 @@
 # xine-lib
 PKG             := xine-lib
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 1.1.19
-$(PKG)_CHECKSUM := 5afcc28c5cf2bdaab99d951960f6587797e1e5a0
+$(PKG)_VERSION  := 1.1.20
+$(PKG)_CHECKSUM := 60ce1cea9bf7a6b7d8c60141593a8ed0c54f9445
 $(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
 $(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.bz2
 $(PKG)_WEBSITE  := http://www.xine-project.org/
 $(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/xine/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE)
-$(PKG)_DEPS     := gcc faad2 ffmpeg flac fontconfig freetype libiconv libmng pthreads sdl speex theora vorbis zlib
+$(PKG)_DEPS     := gcc faad2 ffmpeg flac fontconfig freetype graphicsmagick libiconv libmng pthreads sdl speex theora vorbis zlib
 
 define $(PKG)_UPDATE
     wget -q -O- 'http://hg.debian.org/hg/xine-lib/xine-lib/tags' | \
@@ -45,7 +45,6 @@
         --without-external-a52dec \
         --without-external-libmad \
         --without-external-libmpcdec \
-        --without-imagemagick \
         --with-freetype \
         --with-fontconfig \
         --without-alsa \
@@ -57,7 +56,8 @@
         --without-external-libdts \
         --without-wavpack \
         CFLAGS='-I$(1)/win32/include' \
-        PTHREAD_LIBS='-lpthread -lws2_32'
+        PTHREAD_LIBS='-lpthread -lws2_32' \
+        LIBS="`$(TARGET)-pkg-config --libs libmng`"
     $(MAKE) -C '$(1)' -j '$(JOBS)'
     $(MAKE) -C '$(1)' -j 1 install
 endef