changeset 2778:daff1938f6b1

Merge pull request #81 from tonytheodore/glib-optional-native Review: Build glib native tools only if they're not installed
author Volker Grabsch <vog@notjusthosting.com>
date Fri, 21 Sep 2012 09:49:59 -0700
parents 1a91124dd342 (diff) abf2a94d035f (current diff)
children 6bc26fc1e74c
files Makefile
diffstat 20 files changed, 578 insertions(+), 163 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Sep 18 17:37:36 2012 +1000
+++ b/Makefile	Fri Sep 21 09:49:59 2012 -0700
@@ -31,7 +31,7 @@
 TMP_DIR     = $(PWD)/tmp-$(1)
 MAKEFILE   := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
 TOP_DIR    := $(patsubst %/,%,$(dir $(MAKEFILE)))
-PKGS       := $(shell $(SED) -n 's/^.* id="\([^"]*\)-package".*$$/\1/p' '$(TOP_DIR)/index.html')
+PKGS       := $(shell $(SED) -n 's/^.* id="\([^"]*\)-package">.*$$/\1/p' '$(TOP_DIR)/index.html')
 PATH       := $(PREFIX)/bin:$(PATH)
 
 CMAKE_TOOLCHAIN_FILE := $(PREFIX)/$(TARGET)/share/cmake/mxe-conf.cmake
--- a/index.html	Tue Sep 18 17:37:36 2012 +1000
+++ b/index.html	Fri Sep 21 09:49:59 2012 -0700
@@ -924,6 +924,11 @@
         <td id="apr-website"><a href="http://apr.apache.org/">APR</a></td>
     </tr>
     <tr>
+        <td id="armadillo-package">armadillo</td>
+        <td id="armadillo-version">3.4.1</td>
+        <td id="armadillo-website"><a href="http://armadillo.sf.net/">Armadillo C++ linear algebra library</a></td>
+    </tr>
+    <tr>
         <td id="atk-package">atk</td>
         <td id="atk-version">2.4.0</td>
         <td id="atk-website"><a href="http://www.gtk.org/">ATK</a></td>
@@ -1040,7 +1045,7 @@
     </tr>
     <tr>
         <td id="ffmpeg-package">ffmpeg</td>
-        <td id="ffmpeg-version">0.11.1</td>
+        <td id="ffmpeg-version">0.11.2</td>
         <td id="ffmpeg-website"><a href="http://www.ffmpeg.org/">ffmpeg</a></td>
     </tr>
     <tr>
@@ -1105,7 +1110,7 @@
     </tr>
     <tr>
         <td id="gcc-package">gcc</td>
-        <td id="gcc-version">4.7.1</td>
+        <td id="gcc-version">4.7.2</td>
         <td id="gcc-website"><a href="http://gcc.gnu.org/">GCC</a></td>
     </tr>
     <tr>
@@ -1180,7 +1185,7 @@
     </tr>
     <tr>
         <td id="gnutls-package">gnutls</td>
-        <td id="gnutls-version">3.0.19</td>
+        <td id="gnutls-version">3.1.1</td>
         <td id="gnutls-website"><a href="http://www.gnu.org/software/gnutls/">GnuTLS</a></td>
     </tr>
     <tr>
@@ -1595,7 +1600,7 @@
     </tr>
     <tr>
         <td id="mdbtools-package">mdbtools</td>
-        <td id="mdbtools-version">0.6pre1</td>
+        <td id="mdbtools-version">0.7</td>
         <td id="mdbtools-website"><a href="http://sourceforge.net/projects/mdbtools/">mdbtools</a></td>
     </tr>
     <tr>
@@ -1699,6 +1704,11 @@
         <td id="pdcurses-website"><a href="http://pdcurses.sourceforge.net/">PDcurses</a></td>
     </tr>
     <tr>
+        <td id="plibc-package">plibc</td>
+        <td id="plibc-version">0.1.7</td>
+        <td id="plibc-website"><a href="http://plibc.sourceforge.net/">Plibc</a></td>
+    </tr>
+    <tr>
         <td id="pdflib_lite-package">pdflib_lite</td>
         <td id="pdflib_lite-version">7.0.5p3</td>
         <td id="pdflib_lite-website"><a href="http://www.pdflib.com/download/free-software/pdflib-lite-7/">PDFlib Lite</a></td>
@@ -1735,7 +1745,7 @@
     </tr>
     <tr>
         <td id="poppler-package">poppler</td>
-        <td id="poppler-version">0.20.2</td>
+        <td id="poppler-version">0.20.4</td>
         <td id="poppler-website"><a href="http://poppler.freedesktop.org/">poppler</a></td>
     </tr>
     <tr>
@@ -1759,6 +1769,11 @@
         <td id="proj-website"><a href="http://trac.osgeo.org/proj/">proj</a></td>
     </tr>
     <tr>
+        <td id="protobuf-package">protobuf</td>
+        <td id="protobuf-version">2.4.1</td>
+        <td id="protobuf-website"><a href="http://code.google.com/p/protobuf"/>protobuf</a></td>
+    </tr>
+    <tr>
         <td id="pthreads-package">pthreads</td>
         <td id="pthreads-version">2-9-1</td>
         <td id="pthreads-website"><a href="http://sourceware.org/pthreads-win32/">Pthreads-w32</a></td>
@@ -1929,6 +1944,11 @@
         <td id="x264-website"><a href="http://www.videolan.org/developers/x264.html">x264</a></td>
     </tr>
     <tr>
+        <td id="xapian-core-package">xapian-core</td>
+        <td id="xapian-core-version">1.2.10</td>
+        <td id="xapian-core-website"><a href="http://xapian.org/">Xapian-Core</a></td>
+    </tr>
+    <tr>
         <td id="xerces-package">xerces</td>
         <td id="xerces-version">3.1.1</td>
         <td id="xerces-website"><a href="http://xerces.apache.org/xerces-c/">Xerces-C++</a></td>
@@ -2039,6 +2059,23 @@
 
     <li>
         <p>
+            Add your package to the <a href="#packages">list of packages</a>.
+        </p>
+        <p>
+            Each package gets its own table row element with table cells having IDs
+            specifying your .mk file, package version and website:
+        </p>
+        <pre>
+&lt;tr&gt;
+    &lt;td id="gettext-package"&gt;gettext&lt;/td&gt;
+    &lt;td id="gettext-version"&gt;0.18.1.1&lt;/td&gt;
+    &lt;td id="gettext-website"&gt;&lt;a href="http://www.gnu.org/software/gettext/"&gt;gettext&lt;/a&gt;&lt;/td&gt;
+&lt;/tr&gt;
+        </pre>
+    </li>
+
+    <li>
+        <p>
         Write your <code>$(PKG)_BUILD</code>.
         If your library has a <code>./configure</code> script,
         enable/disable all dependency libraries explicitly
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/armadillo-1-staticlib.patch	Fri Sep 21 09:49:59 2012 -0700
@@ -0,0 +1,24 @@
+This file is part of MXE.
+See index.html for further information.
+
+diff -urN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt	2012-09-14 16:43:20.000000000 +0200
++++ b/CMakeLists.txt	2012-09-20 20:39:05.073039124 +0200
+@@ -40,7 +40,7 @@
+ set(ARMA_USE_ATLAS   false)
+ set(ARMA_USE_BOOST   false)
+ set(ARMA_USE_HDF5    false)
+-set(ARMA_USE_WRAPPER true )  # set this to false if you prefer to directly link with LAPACK and/or BLAS (eg. -llapack -lblas) instead of -larmadillo
++set(ARMA_USE_WRAPPER false )  # set this to false if you prefer to directly link with LAPACK and/or BLAS (eg. -llapack -lblas) instead of -larmadillo
+ 
+ 
+ if(WIN32)
+@@ -263,7 +263,7 @@
+ #set(CMAKE_INSTALL_RPATH_USE_LINK_PATH  TRUE)
+ 
+ 
+-add_library( armadillo SHARED src/wrap_libs )
++add_library( armadillo STATIC src/wrap_libs )
+ target_link_libraries( armadillo ${ARMA_LIBS} )
+ 
+ set_target_properties(armadillo PROPERTIES VERSION ${ARMA_MAJOR}.${ARMA_MINOR}.${ARMA_PATCH} SOVERSION 3)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/armadillo-test.cpp	Fri Sep 21 09:49:59 2012 -0700
@@ -0,0 +1,24 @@
+/*
+ * This file is part of MXE.
+ * See index.html for further information.
+ */
+
+#include <armadillo>
+
+using namespace arma;
+
+int main()
+{
+	mat A = randu<mat>(50,50);
+	mat B = trans(A)*A;  // generate a symmetric matrix
+	
+	vec eigval;
+	mat eigvec;
+	
+	// use standard algorithm by default
+	eig_sym(eigval, eigvec, B);
+	
+	// use divide & conquer algorithm
+	eig_sym(eigval, eigvec, B, "dc");
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/armadillo.mk	Fri Sep 21 09:49:59 2012 -0700
@@ -0,0 +1,29 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+# armadillo
+PKG             := armadillo
+$(PKG)_IGNORE   :=
+$(PKG)_CHECKSUM := 16f11ee6e7a545581ab239e7f826e14d7d1c2e3a
+$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
+$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/arma/$($(PKG)_FILE)
+$(PKG)_DEPS     := gcc boost blas lapack
+
+define $(PKG)_UPDATE
+    $(WGET) -q -O- 'http://sourceforge.net/projects/arma/files/' | \
+    $(SED) -n 's,.*/armadillo-\([0-9.]*\)[.]tar.*".*,\1,p' | \
+    head -1
+endef
+
+define $(PKG)_BUILD
+    cd '$(1)' && cmake . -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)'
+    $(MAKE) -C '$(1)' -j '$(JOBS)' install VERBOSE=1
+
+    # note: don't use -Werror with GCC 4.7.0 and .1
+    '$(TARGET)-g++' \
+        -W -Wall \
+        '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-armadillo.exe' \
+        -larmadillo -llapack -lblas -lgfortran
+        -lboost_serialization-mt -lboost_thread_win32-mt -lboost_system-mt
+endef
--- a/src/ffmpeg.mk	Tue Sep 18 17:37:36 2012 +1000
+++ b/src/ffmpeg.mk	Fri Sep 21 09:49:59 2012 -0700
@@ -3,7 +3,7 @@
 
 PKG             := ffmpeg
 $(PKG)_IGNORE   :=
-$(PKG)_CHECKSUM := bf01742be60c2e6280371fc4189d5d28933f1a56
+$(PKG)_CHECKSUM := 5d98729b8368df8145472ae6955ef8d6b9ed0efb
 $(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
 $(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.bz2
 $(PKG)_URL      := http://www.ffmpeg.org/releases/$($(PKG)_FILE)
--- a/src/gcc.mk	Tue Sep 18 17:37:36 2012 +1000
+++ b/src/gcc.mk	Fri Sep 21 09:49:59 2012 -0700
@@ -3,11 +3,11 @@
 
 PKG             := gcc
 $(PKG)_IGNORE   :=
-$(PKG)_CHECKSUM := 3ab74e63a8f2120b4f2c5557f5ffec6907337137
+$(PKG)_CHECKSUM := a464ba0f26eef24c29bcd1e7489421117fb9ee35
 $(PKG)_SUBDIR   := gcc-$($(PKG)_VERSION)
 $(PKG)_FILE     := gcc-$($(PKG)_VERSION).tar.bz2
 $(PKG)_URL      := ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
-$(PKG)_URL_2    := ftp://ftp.cs.tu-berlin.de/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_URL_2    := ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
 $(PKG)_DEPS     := mingwrt w32api binutils gcc-gmp gcc-mpc gcc-mpfr
 
 define $(PKG)_UPDATE
--- a/src/gnutls-1-fixes.patch	Tue Sep 18 17:37:36 2012 +1000
+++ b/src/gnutls-1-fixes.patch	Fri Sep 21 09:49:59 2012 -0700
@@ -3,10 +3,10 @@
 
 Contains ad hoc patches for cross building.
 
-From 18aa82eb060ca9ded9720091300a6c31af8382a9 Mon Sep 17 00:00:00 2001
+From 90387fb055e690a0d47c247f2ec8c2478bc7c942 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Fri, 28 Oct 2011 09:23:41 +0200
-Subject: [PATCH 1/5] add missing static library linking
+Subject: [PATCH 1/7] add missing static library linking
 
 
 diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in
@@ -25,14 +25,14 @@
 1.7.10.4
 
 
-From bd254ee873a2f7d6027661beae5d88372f10aa93 Mon Sep 17 00:00:00 2001
+From 622969864d2c2ae3e96572bae6e64e3d585d86eb Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Thu, 24 Nov 2011 15:06:06 +0100
-Subject: [PATCH 2/5] disable doc and test (mingw-cross-env specific)
+Subject: [PATCH 2/7] disable doc and test (mingw-cross-env specific)
 
 
 diff --git a/Makefile.am b/Makefile.am
-index 0afe4bd..da7436a 100644
+index 2eebb77..1633fcb 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -23,7 +23,7 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-valgrind-tests
@@ -48,24 +48,24 @@
 1.7.10.4
 
 
-From dce8795ce40246c87fc83d1879f02c9923dba2ed Mon Sep 17 00:00:00 2001
+From 922dd8e34aeedfd2130339b037b92b61840d72eb Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Tue, 3 Apr 2012 13:58:42 +0200
-Subject: [PATCH 3/5] Revert "make dist will also make lzip compressed
+Subject: [PATCH 3/7] Revert "make dist will also make lzip compressed
  tarball"
 
 This reverts commit 97ac1bc58274f651338444693bd75441ba12f46f.
 
 diff --git a/configure.ac b/configure.ac
-index 0ad765c..74b778e 100644
+index ccd2729..8797ec7 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -25,7 +25,7 @@ AC_INIT([GnuTLS], [3.0.19], [bug-gnutls@gnu.org])
+@@ -25,7 +25,7 @@ AC_INIT([GnuTLS], [3.1.1], [bug-gnutls@gnu.org])
  AC_CONFIG_AUX_DIR([build-aux])
  AC_CONFIG_MACRO_DIR([m4])
  
--AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz dist-lzip -Wall -Werror -Wno-override])
-+AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz -Wall -Werror -Wno-override])
+-AM_INIT_AUTOMAKE([1.11.3 no-dist-gzip dist-xz dist-lzip -Wall -Werror -Wno-override])
++AM_INIT_AUTOMAKE([1.11.3 no-dist-gzip dist-xz -Wall -Werror -Wno-override])
  m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  AM_CONFIG_HEADER(config.h)
  
@@ -73,16 +73,16 @@
 1.7.10.4
 
 
-From ae55a00b99a60b65e459ebe7ada215ace70b56db Mon Sep 17 00:00:00 2001
+From fcd06b20700bbf26b740d1c9d22750c829ef6216 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Wed, 6 Jun 2012 09:57:24 +0200
-Subject: [PATCH 4/5] AM_PROG_AR for automake 1.12 compatibility
+Subject: [PATCH 4/7] AM_PROG_AR for automake 1.12 compatibility
 
 Taken from
 http://lists.gnu.org/archive/html/automake/2012-05/msg00014.html
 
 diff --git a/configure.ac b/configure.ac
-index 74b778e..d045aaf 100644
+index 8797ec7..fb167f9 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -37,6 +37,7 @@ dnl Checks for programs.
@@ -97,25 +97,193 @@
 1.7.10.4
 
 
-From dd5b4ce15f94ba9bdbbab9d5036eea0a284e9715 Mon Sep 17 00:00:00 2001
+From 6b6c5670a25161c61c6bc24a45ede8a4daf6590b Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
-Date: Wed, 18 Jul 2012 00:58:59 +0200
-Subject: [PATCH 5/5] relax automake
+Date: Thu, 16 Aug 2012 11:13:47 +0200
+Subject: [PATCH 5/7] allow automake warnings not to be errors
 
 
 diff --git a/configure.ac b/configure.ac
-index d045aaf..e9afeb4 100644
+index fb167f9..36b4026 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -25,7 +25,7 @@ AC_INIT([GnuTLS], [3.0.19], [bug-gnutls@gnu.org])
+@@ -25,7 +25,7 @@ AC_INIT([GnuTLS], [3.1.1], [bug-gnutls@gnu.org])
  AC_CONFIG_AUX_DIR([build-aux])
  AC_CONFIG_MACRO_DIR([m4])
  
--AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz -Wall -Werror -Wno-override])
-+AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz -Wall -Wno-override])
+-AM_INIT_AUTOMAKE([1.11.3 no-dist-gzip dist-xz -Wall -Werror -Wno-override])
++AM_INIT_AUTOMAKE([1.11.3 no-dist-gzip dist-xz -Wall -Wno-override])
  m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  AM_CONFIG_HEADER(config.h)
  
 -- 
 1.7.10.4
 
+
+From 46635a2529108e077ee2585bd3de5532415cf68b Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
+Date: Sat, 15 Sep 2012 13:43:28 +0200
+Subject: [PATCH 6/7] mingw32 support. Based on patch by LRN. (cherry picked
+ from commit 2cc740eb52abac318176c49f8e8358666c8457cd)
+
+
+diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c
+index 8b84f46..4c9eabf 100644
+--- a/lib/gnutls_global.c
++++ b/lib/gnutls_global.c
+@@ -270,6 +270,13 @@ gnutls_global_init (void)
+       goto out;
+     }
+ 
++  result = gnutls_system_global_init ();
++  if (result < 0)
++    {
++      gnutls_assert ();
++      goto out;
++    }
++
+ #ifdef ENABLE_PKCS11
+   gnutls_pkcs11_init (GNUTLS_PKCS11_FLAG_AUTO, NULL);
+ #endif
+@@ -302,6 +309,7 @@ gnutls_global_deinit (void)
+       asn1_delete_structure (&_gnutls_pkix1_asn);
+       _gnutls_crypto_deregister ();
+       _gnutls_cryptodev_deinit ();
++      gnutls_system_global_deinit ();
+ #ifdef ENABLE_PKCS11
+       gnutls_pkcs11_deinit ();
+ #endif
+diff --git a/lib/system.c b/lib/system.c
+index 067f189..b22e07d 100644
+--- a/lib/system.c
++++ b/lib/system.c
+@@ -31,6 +31,11 @@
+ #ifdef _WIN32
+ # include <windows.h>
+ # include <wincrypt.h>
++#  if defined(__MINGW32__) && !defined(__MINGW64__) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
++typedef PCCRL_CONTEXT WINAPI (*Type_CertEnumCRLsInStore) (HCERTSTORE hCertStore, PCCRL_CONTEXT pPrevCrlContext);
++static Type_CertEnumCRLsInStore Loaded_CertEnumCRLsInStore;
++static HMODULE Crypt32_dll;
++#  endif
+ 
+ #else
+ # ifdef HAVE_PTHREAD_LOCKS
+@@ -51,10 +56,7 @@
+ /* System specific function wrappers.
+  */
+ 
+-/* wrappers for write() and writev()
+- */
+ #ifdef _WIN32
+-
+ int
+ system_errno (gnutls_transport_ptr p)
+ {
+@@ -150,9 +152,6 @@ int fd = GNUTLS_POINTER_TO_INT(ptr);
+ /* Thread stuff */
+ 
+ #ifdef HAVE_WIN32_LOCKS
+-
+-
+-/* FIXME: win32 locks are untested */
+ static int
+ gnutls_system_mutex_init (void **priv)
+ {
+@@ -285,6 +284,41 @@ mutex_deinit_func gnutls_mutex_deinit = gnutls_system_mutex_deinit;
+ mutex_lock_func gnutls_mutex_lock = gnutls_system_mutex_lock;
+ mutex_unlock_func gnutls_mutex_unlock = gnutls_system_mutex_unlock;
+ 
++int
++gnutls_system_global_init ()
++{
++#ifdef _WIN32
++# if defined(__MINGW32__) && !defined(__MINGW64__) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
++  HMODULE crypto;
++  crypto = LoadLibraryA ("Crypt32.dll");
++
++  if (crypto == NULL)
++    return GNUTLS_E_CRYPTO_INIT_FAILED;
++
++  Loaded_CertEnumCRLsInStore = (Type_CertEnumCRLsInStore) GetProcAddress (crypto, "CertEnumCRLsInStore");
++  if (Loaded_CertEnumCRLsInStore == NULL)
++    {
++      FreeLibrary (crypto);
++      return GNUTLS_E_CRYPTO_INIT_FAILED;
++    }
++
++  Crypt32_dll = crypto;
++# endif
++#endif
++  return 0;
++}
++
++void
++gnutls_system_global_deinit ()
++{
++#ifdef _WIN32
++# if defined(__MINGW32__) && !defined(__MINGW64__) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
++  FreeLibrary (Crypt32_dll);
++# endif
++#endif
++}
++
++
+ #define CONFIG_PATH ".gnutls"
+ 
+ /* Returns a path to store user-specific configuration
+@@ -392,7 +426,7 @@ gnutls_x509_trust_list_add_system_trust(gnutls_x509_trust_list_t list,
+     if (store == NULL) return GNUTLS_E_FILE_ERROR;
+ 
+     cert = CertEnumCertificatesInStore(store, NULL);
+-    crl = CertEnumCRLsInStore(store, NULL);
++    crl = Loaded_CertEnumCRLsInStore(store, NULL);
+ 
+     while(cert != NULL) 
+       {
+@@ -414,7 +448,7 @@ gnutls_x509_trust_list_add_system_trust(gnutls_x509_trust_list_t list,
+             data.size = crl->cbCrlEncoded;
+             gnutls_x509_trust_list_add_trust_mem(list, NULL, &data, GNUTLS_X509_FMT_DER, tl_flags, tl_vflags);
+           }
+-        crl = CertEnumCRLsInStore(store, crl);
++        crl = Loaded_CertEnumCRLsInStore(store, crl);
+       }
+     CertCloseStore(store, 0);
+   }
+diff --git a/lib/system.h b/lib/system.h
+index 0178bd5..0afbdd2 100644
+--- a/lib/system.h
++++ b/lib/system.h
+@@ -71,4 +71,7 @@ struct timespec ts;
+ 
+ int _gnutls_find_config_path(char* path, size_t max_size);
+ 
++int gnutls_system_global_init ();
++void gnutls_system_global_deinit ();
++
+ #endif /* SYSTEM_H */
+-- 
+1.7.10.4
+
+
+From ee1fab5fb04a698fb50e6ba2b571424ef40ffbbe Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Thu, 20 Sep 2012 12:59:19 +0200
+Subject: [PATCH 7/7] add missing libs to Libs.private
+
+
+diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in
+index 57d0dbb..02a6ef7 100644
+--- a/lib/gnutls.pc.in
++++ b/lib/gnutls.pc.in
+@@ -19,6 +19,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: @LTLIBNETTLE@ @LIBS@
++Libs.private: @LTLIBNETTLE@ @LIBS@ -lcrypt32 -lws2_32
+ @GNUTLS_REQUIRES_PRIVATE@
+ Cflags: -I${includedir}
+-- 
+1.7.10.4
+
--- a/src/gnutls.mk	Tue Sep 18 17:37:36 2012 +1000
+++ b/src/gnutls.mk	Fri Sep 21 09:49:59 2012 -0700
@@ -2,17 +2,16 @@
 # See index.html for further information.
 
 PKG             := gnutls
-$(PKG)_CHECKSUM := df55f60a0426de1f0efb5c1a902e209b069b3d51
+$(PKG)_CHECKSUM := 4badef78839de0d2606cb1767f44232fb606d941
 $(PKG)_SUBDIR   := gnutls-$($(PKG)_VERSION)
 $(PKG)_FILE     := gnutls-$($(PKG)_VERSION).tar.xz
-$(PKG)_URL      := ftp://ftp.gnutls.org/pub/gnutls/$($(PKG)_FILE)
-$(PKG)_URL_2    := ftp://ftp.gnupg.org/gcrypt/gnutls/$($(PKG)_FILE)
+$(PKG)_URL      := http://ftp.gnu.org/gnu/gnutls/$($(PKG)_FILE)
 $(PKG)_DEPS     := gcc nettle zlib
 
 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) -n 's,.*<a[^>]*>gnutls_\([0-9]*_[0-9]*[012468]_[^<]*\)<.*,\1,p' | \
     $(SED) 's,_,.,g' | \
     grep -v '^2\.' | \
     head -1
@@ -37,7 +36,7 @@
         --with-included-libcfg \
         --without-p11-kit \
         --disable-silent-rules \
-        CPPFLAGS='-DWINVER=0x0501 -DAI_ADDRCONFIG=0x0400' \
+        CPPFLAGS='-DWINVER=0x0501 -DAI_ADDRCONFIG=0x0400 -DIPV6_V6ONLY=27' \
         LIBS='-lws2_32' \
         ac_cv_prog_AR='$(TARGET)-ar'
     $(MAKE) -C '$(1)' -j '$(JOBS)' install
--- a/src/libglade-1-fixes.patch	Tue Sep 18 17:37:36 2012 +1000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-This file is part of MXE.
-See index.html for further information.
-
-Contains ad hoc patches for cross building.
-
-[master 1ae0f2e] new version
- 2 files changed, 11 insertions(+), 9 deletions(-)
-From 1ae0f2e805de5bee3fa36584a87a47fe11893e8f Mon Sep 17 00:00:00 2001
-From: MXE
-Date: Sun, 17 Jun 2012 17:04:04 +0200
-Subject: [PATCH] new version
-
-
-diff --git a/configure.in b/configure.in
-index e0c52a8..e4691a3 100644
---- a/configure.in
-+++ b/configure.in
-@@ -15,6 +15,16 @@ AC_CONFIG_HEADERS([config.h])
- 
- AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])
- 
-+# pkg-config check put earlier in configure.in, because before LIBGLADE did not 
-+# use the cross-compiled-pkg-cfg.
-+PKG_PROG_PKG_CONFIG
-+
-+PKG_CHECK_MODULES(LIBGLADE, [dnl
-+  libxml-2.0 >= required_libxml_version dnl
-+  atk >= required_atk_version dnl
-+  gtk+-2.0 >= required_gtk_version dnl
-+  glib-2.0 >= required_glib_version])
-+
- GNOME_COMMON_INIT
- 
- if test "$enable_debug" != "no"; then
-@@ -40,14 +50,6 @@ AC_CHECK_FUNC(gtk_plug_get_type,
-   AC_DEFINE(HAVE_GTK_PLUG,1,[gtk has GtkPlug/GtkSocket implementation]))
- LIBS=$save_LIBS
- 
--PKG_PROG_PKG_CONFIG
--
--PKG_CHECK_MODULES(LIBGLADE, [dnl
--  libxml-2.0 >= required_libxml_version dnl
--  atk >= required_atk_version dnl
--  gtk+-2.0 >= required_gtk_version dnl
--  glib-2.0 >= required_glib_version])
--
- AC_MSG_CHECKING([for native Win32])
- case "$host" in
-   *-*-mingw*)
-diff --git a/glade/Makefile.am b/glade/Makefile.am
-index f6271f7..0641232 100644
---- a/glade/Makefile.am
-+++ b/glade/Makefile.am
-@@ -13,7 +13,7 @@ if OS_WIN32
- export_symbols = -export-symbols glade.def
- 
- install-libtool-import-lib:
--	$(INSTALL) .libs/libglade-2.0.dll.a $(DESTDIR)$(libdir)
-+#	$(INSTALL) .libs/libglade-2.0.dll.a $(DESTDIR)$(libdir)
- 
- uninstall-libtool-import-lib:
- 	-rm $(DESTDIR)$(libdir)/libglade-2.0.dll.a
--- 
-1.7.9.5
-
--- a/src/libglade.mk	Tue Sep 18 17:37:36 2012 +1000
+++ b/src/libglade.mk	Fri Sep 21 09:49:59 2012 -0700
@@ -16,11 +16,12 @@
 endef
 
 define $(PKG)_BUILD
-    cd '$(1)' && autoreconf -fi
     cd '$(1)' && ./configure \
         --host='$(TARGET)' \
         --build="`config.guess`" \
         --disable-shared \
-        --prefix='$(PREFIX)/$(TARGET)'
-    $(MAKE) -C '$(1)' -j '$(JOBS)' install
+        --prefix='$(PREFIX)/$(TARGET)' \
+        PKG_CONFIG='$(PREFIX)/bin/$(TARGET)-pkg-config'
+    $(MAKE) -C '$(1)' -j '$(JOBS)'
+    $(MAKE) -C '$(1)' -j 1 install-exec
 endef
--- a/src/mdbtools-1-header.patch	Tue Sep 18 17:37:36 2012 +1000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-This file is part of MXE.
-See index.html for further information.
-
-diff -ur mdbtools-0.6pre1-orig//include/mdbtools.h mdbtools-0.6pre1//include/mdbtools.h
---- mdbtools-0.6pre1-orig//include/mdbtools.h	2011-06-01 00:07:12.336088034 +0900
-+++ mdbtools-0.6pre1//include/mdbtools.h	2011-06-01 00:10:51.536088143 +0900
-@@ -147,7 +147,7 @@
- #define IS_JET3(mdb) (mdb->f->jet_version==MDB_VER_JET3)
-
- /* hash to store registered backends */
--extern GHashTable	*mdb_backends;
-+static GHashTable	*mdb_backends;
-
- /* forward declarations */
- typedef struct mdbindex MdbIndex;
--- a/src/mdbtools.mk	Tue Sep 18 17:37:36 2012 +1000
+++ b/src/mdbtools.mk	Fri Sep 21 09:49:59 2012 -0700
@@ -4,21 +4,25 @@
 # mdbtools
 PKG             := mdbtools
 $(PKG)_IGNORE   :=
-$(PKG)_CHECKSUM := 37a50d623a444ec690d2677b12b59c2f11e497c0
-$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
+$(PKG)_CHECKSUM := 62fe0703fd8691e4536e1012317406bdb72594cf
+$(PKG)_SUBDIR   := brianb-mdbtools-004cc9f
 $(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
-$(PKG)_URL      := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_URL      := http://github.com/brianb/$(PKG)/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE)
 $(PKG)_DEPS     := gcc glib
 
 define $(PKG)_UPDATE
-    $(WGET) -q -O- 'http://sourceforge.net/projects/mdbtools/files/mdbtools/' | \
-    $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
+    $(WGET) -q -O- 'https://github.com/brianb/mdbtools/tags' | \
+    grep '<a href="/brianb/mdbtools/tarball/' | \
+    $(SED) -n 's,.*href="/brianb/mdbtools/tarball/\([0-9][^"_]*\)".*,\1,p' | \
     head -1
 endef
 
 define $(PKG)_BUILD
+    '$(SED)' -i 's/libtooloze/libtoolize/g;' '$(1)/autogen.sh'
+    cd '$(1)' && NOCONFIGURE=1 ./autogen.sh
     cd '$(1)' && ./configure \
         --host='$(TARGET)' \
+        --build="`config.guess`" \
         --disable-shared \
         --prefix='$(PREFIX)/$(TARGET)' \
         PKG_CONFIG='$(PREFIX)/bin/$(TARGET)-pkg-config'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/plibc.mk	Fri Sep 21 09:49:59 2012 -0700
@@ -0,0 +1,26 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG             := plibc
+$(PKG)_IGNORE   :=
+$(PKG)_CHECKSUM := b545c602dc5b381fcea9d096910dede95168fbeb
+$(PKG)_SUBDIR   := PlibC-$($(PKG)_VERSION)
+$(PKG)_FILE     := plibc-$($(PKG)_VERSION)-src.tar.gz
+$(PKG)_URL      := http://sourceforge.net/projects/plibc/files/plibc/$($(PKG)_VERSION)/$($(PKG)_FILE)/download
+$(PKG)_DEPS     := gcc
+
+define $(PKG)_UPDATE
+    echo 'TODO: Updates for package plibc  need to be fixed.' >&2;
+    echo $(plibc_VERSION)
+endef
+
+define $(PKG)_BUILD
+    chmod 0755 '$(1)/configure'
+    cd '$(1)' && ./configure \
+        --host='$(TARGET)' \
+        --build="`config.guess`" \
+        --prefix='$(PREFIX)/$(TARGET)' \
+        --enable-static \
+        --disable-shared
+    $(MAKE) -C '$(1)' -j '$(JOBS)' install
+endef
--- a/src/poppler.mk	Tue Sep 18 17:37:36 2012 +1000
+++ b/src/poppler.mk	Fri Sep 21 09:49:59 2012 -0700
@@ -3,7 +3,7 @@
 
 PKG             := poppler
 $(PKG)_IGNORE   :=
-$(PKG)_CHECKSUM := 0f745b593e764d27a0e21645e6febd6ad8ad2ab9
+$(PKG)_CHECKSUM := fd808cfcd249b7079a09a97f99ffb08db8c62b93
 $(PKG)_SUBDIR   := poppler-$($(PKG)_VERSION)
 $(PKG)_FILE     := poppler-$($(PKG)_VERSION).tar.gz
 $(PKG)_URL      := http://poppler.freedesktop.org/$($(PKG)_FILE)
@@ -47,6 +47,7 @@
         --disable-gtk-doc-html \
         --disable-gtk-doc-pdf \
         --with-font-configuration=win32 \
+        PKG_CONFIG_PATH_$(subst -,_,$(TARGET))='$(PREFIX)/$(TARGET)/qt/lib/pkgconfig' \
         LIBS="`'$(TARGET)-pkg-config' zlib liblzma --libs` -ljpeg"
     $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/protobuf-test.cpp	Fri Sep 21 09:49:59 2012 -0700
@@ -0,0 +1,9 @@
+#include <google/protobuf/stubs/common.h>
+
+int
+main()
+{
+    GOOGLE_PROTOBUF_VERIFY_VERSION;
+    google::protobuf::ShutdownProtobufLibrary();
+    return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/protobuf.mk	Fri Sep 21 09:49:59 2012 -0700
@@ -0,0 +1,39 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG             := protobuf
+$(PKG)_IGNORE   :=
+$(PKG)_CHECKSUM := df5867e37a4b51fb69f53a8baf5b994938691d6d
+$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
+$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.bz2
+$(PKG)_URL      := http://protobuf.googlecode.com/files/$($(PKG)_FILE)
+$(PKG)_DEPS     := gcc zlib
+
+define $(PKG)_UPDATE
+    $(WGET) -q -O- 'http://code.google.com/p/protobuf/downloads/list?sort=-uploaded' | \
+    $(SED) -n 's,.*protobuf-\([0-9][^<]*\)\.tar.*,\1,p' | \
+    head -1
+endef
+
+define $(PKG)_BUILD
+# First step: Build for host system in order to create "protoc" binary.
+    cd '$(1)' && ./configure \
+        --disable-shared
+    $(MAKE) -C '$(1)' -j '$(JOBS)'
+    cp '$(1)/src/protoc' '$(1)/src/protoc_host'
+    $(MAKE) -C '$(1)' -j 1 distclean
+# Second step: Build for target system.
+    cd '$(1)' && ./configure \
+        --host='$(TARGET)' \
+        --prefix='$(PREFIX)/$(TARGET)' \
+        --disable-shared \
+        --with-zlib \
+        --with-protoc=src/protoc_host
+    $(MAKE) -C '$(1)' -j '$(JOBS)'
+    $(MAKE) -C '$(1)' -j 1 install
+
+    '$(TARGET)-g++' \
+        -W -Wall -Werror -ansi -pedantic \
+        '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-protobuf.exe' \
+        `'$(TARGET)-pkg-config' protobuf --cflags --libs`
+endef
--- a/src/qt-1-cherrypicks.patch	Tue Sep 18 17:37:36 2012 +1000
+++ b/src/qt-1-cherrypicks.patch	Fri Sep 21 09:49:59 2012 -0700
@@ -8,7 +8,7 @@
 From 2a376d8ff643ec0d40fdba68a25c3a323dbd5be4 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Fri, 13 Jan 2012 00:17:48 +0100
-Subject: [PATCH 01/22] remove trailing whitespace
+Subject: [PATCH 01/24] remove trailing whitespace
 
 backported from qt5/qtbase
 Change-Id: If53a0bd1794e69b4856f993c6e2959369bd007d6
@@ -35,7 +35,7 @@
 From f9650fb05bde43a8d710469daa363383e3947e3a Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Thu, 30 Jun 2011 10:22:33 +0200
-Subject: [PATCH 02/22] do not detect or configure iconv for Windows
+Subject: [PATCH 02/24] 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
@@ -69,7 +69,7 @@
 From 04a44c0d6b3272c6edb08d34cecf36825843c2a0 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Wed, 18 Jan 2012 11:43:10 +0100
-Subject: [PATCH 03/22] fix whitespace
+Subject: [PATCH 03/24] fix whitespace
 
 backported from qt5/qtbase
 Change-Id: I0cfccae085c000d4368386a34f288c1e6f01a88f
@@ -143,7 +143,7 @@
 From 043a2cdc024dd19685a1cd3694faa0cdbade5a82 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Mon, 4 Jul 2011 00:42:24 +0200
-Subject: [PATCH 04/22] build and load text codecs regardless of iconv and
+Subject: [PATCH 04/24] build and load text codecs regardless of iconv and
  platform
 
 Otherwise applications linking to static Qt may have to import
@@ -285,7 +285,7 @@
 From c9e946e08850c2ea92c818bcef9b4f0ec47fb86f Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Fri, 13 Jan 2012 00:24:13 +0100
-Subject: [PATCH 05/22] move plugin text codecs to QtCore
+Subject: [PATCH 05/24] move plugin text codecs to QtCore
 
 Having plugin text codecs adds considerable complexity to
 configuring Qt. The plugin interface is designed for optional
@@ -79236,7 +79236,7 @@
 From 7c457dbd99e5865f13499146e9487e9cb4b86868 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Wed, 18 Jan 2012 21:01:26 +0100
-Subject: [PATCH 06/22] update private header references
+Subject: [PATCH 06/24] update private header references
 
 backported from qt5/qtbase
 Change-Id: I092d879653b6900532a0c4534c1eb2be84e9d0f6
@@ -79399,7 +79399,7 @@
 From 2be2accfee23fee3a9d97e5852ff9d2a01a7c33f Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Sun, 3 Jul 2011 21:53:27 +0200
-Subject: [PATCH 07/22] cosmetic adjustments for files moved to core/codecs
+Subject: [PATCH 07/24] cosmetic adjustments for files moved to core/codecs
 
 -update old reference to 'plugin'
 -rename multiple inclusion guards
@@ -79891,7 +79891,7 @@
 From eeecdea8f15353aa0461ec09f7064f456849a3c3 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Thu, 12 Jan 2012 10:43:29 +0100
-Subject: [PATCH 08/22] remove obsolete codec plugin loading code
+Subject: [PATCH 08/24] remove obsolete codec plugin loading code
 
 backported from qt5/qtbase
 Change-Id: I1f3dbb5c10009413f701947b1b89ed3dbc94bf3d
@@ -80428,7 +80428,7 @@
 From c94d9111ef83683ea2b7db6e4070594c4a332f1c Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Mon, 23 Jan 2012 23:12:46 +0100
-Subject: [PATCH 09/22] remove vestiges of text codec plugins
+Subject: [PATCH 09/24] remove vestiges of text codec plugins
 
 follow-up to 3a3356a85079d734dfa57205a00e1996afc033df
 
@@ -80462,7 +80462,7 @@
 From 415466a4ac2a87522569544a9b9ba7115fc4acf7 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Thu, 3 Nov 2011 15:10:26 +0100
-Subject: [PATCH 10/22] use pkg-config for libmng (MXE specific)
+Subject: [PATCH 10/24] use pkg-config for libmng (MXE specific)
 
 Change-Id: Ifce956d5cad06d5273088656b8500b87980063f4
 
@@ -80488,7 +80488,7 @@
 From 1cac3150930d5353455b560792f7e76fe180ad26 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Thu, 3 Nov 2011 14:11:02 +0100
-Subject: [PATCH 11/22] use pkg-config for libtiff-4 (MXE specific)
+Subject: [PATCH 11/24] use pkg-config for libtiff-4 (MXE specific)
 
 Change-Id: I5e89e66fc1606d425553e781c9e62db703136957
 
@@ -80514,7 +80514,7 @@
 From 28ad5f9d9c70feba6475652c6445bbe263998d3d Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Sat, 5 Jun 2010 23:41:04 +0200
-Subject: [PATCH 12/22] restore support for static linking of QtWebKit (MXE
+Subject: [PATCH 12/24] restore support for static linking of QtWebKit (MXE
  specific)
 
 Support was removed by 4221d629e2cf37ee8c5ba7cb595b05ab8c82f113.
@@ -80617,7 +80617,7 @@
 From ab04bc59d7caf5d04bb87bd75d2bbe98da89d599 Mon Sep 17 00:00:00 2001
 From: Tony Theodore <tonyt@logyst.com>
 Date: Thu, 1 Sep 2011 13:47:10 +0200
-Subject: [PATCH 13/22] fix building on GNU/kFreeBSD (MXE specific)
+Subject: [PATCH 13/24] fix building on GNU/kFreeBSD (MXE specific)
 
 This patch has been taken from:
 
@@ -80648,7 +80648,7 @@
 From 28bf082efa51789d404e33bfbfdbe17a8261af87 Mon Sep 17 00:00:00 2001
 From: Tony Theodore <tonyt@logyst.com>
 Date: Thu, 1 Sep 2011 13:49:47 +0200
-Subject: [PATCH 14/22] fix missing platform when building on GNU/kFreeBSD
+Subject: [PATCH 14/24] fix missing platform when building on GNU/kFreeBSD
  (MXE specific)
 
 This patch is inspired by:
@@ -80679,7 +80679,7 @@
 From f32c0852485615d6938d1cde1e0b4dc4e6262a7e Mon Sep 17 00:00:00 2001
 From: Tony Theodore <tonyt@logyst.com>
 Date: Thu, 1 Sep 2011 13:51:50 +0200
-Subject: [PATCH 15/22] fix building on dragonfly (MXE specific)
+Subject: [PATCH 15/24] fix building on dragonfly (MXE 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
@@ -80706,7 +80706,7 @@
 From 67da309cbc542e765d2254bd2e2c64a78c7cd35f Mon Sep 17 00:00:00 2001
 From: Yuchen Deng <loaden@gmail.com>
 Date: Sun, 19 Aug 2012 15:38:44 +0800
-Subject: [PATCH 16/22] Add -pipe option of win32-g++'s QMAKE_CFLAGS
+Subject: [PATCH 16/24] Add -pipe option of win32-g++'s QMAKE_CFLAGS
 
 cherry-picked from qt5/qtbase commit 2b57a8ebfeb6e3495b63fac619631896ca670f11
 
@@ -80734,7 +80734,7 @@
 From eeeadca6963f3dedd6ea3626409199f49afa839f Mon Sep 17 00:00:00 2001
 From: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
 Date: Mon, 10 Sep 2012 12:08:51 +0200
-Subject: [PATCH 17/22] find qdevice.pri even for installed qt builds
+Subject: [PATCH 17/24] find qdevice.pri even for installed qt builds
 
 Change-Id: Ife18068974227d70c52e7cb0d06e6136827ac562
 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
@@ -80759,7 +80759,7 @@
 From 2519a7dd92f14031c7d11775caa0645384febd87 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Wed, 12 Sep 2012 00:22:28 +0200
-Subject: [PATCH 18/22] Partial Revert "Disable pkg-config, when x-compiling
+Subject: [PATCH 18/24] Partial Revert "Disable pkg-config, when x-compiling
  for mingw"
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
@@ -80799,7 +80799,7 @@
 From 03f7a56af4020aaead73c9d0de389d32fd4ddb24 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= <syntheticpp@gmx.net>
 Date: Wed, 12 Sep 2012 11:13:44 +0200
-Subject: [PATCH 19/22] When x-compiling on Linux the host tools doesn't have
+Subject: [PATCH 19/24] When x-compiling on Linux the host tools doesn't have
  Windows' executable suffix
 
 patch not needed for Qt5
@@ -80841,7 +80841,7 @@
 From 32415e3cb482c55b16d5953e37865ded1885869d Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Tue, 11 Sep 2012 23:45:02 +0200
-Subject: [PATCH 20/22] smuggle QT_BUILD_TREE to device_config.prf even during
+Subject: [PATCH 20/24] smuggle QT_BUILD_TREE to device_config.prf even during
  tests
 
 Otherwise CROSS_COMPILE is not available for config.tests
@@ -80877,17 +80877,24 @@
 1.7.10.4
 
 
-From 6a5e0ddd8a49120e14638ff905d7535b3a83d0f9 Mon Sep 17 00:00:00 2001
+From b0481b3c70c42136df1904de68a8f8fc797591e2 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Sun, 16 Sep 2012 00:12:53 +0200
-Subject: [PATCH 21/22] postpone pkg-config detection until after qmake is
- built
-
-pkg-config isn't used before qmake is built, so detecting it can take
-place afterwards. This is preparation for using qmake to resolve
-PKG_CONFIG define in mkspecs.
+Subject: [PATCH 21/24] configure: postpone pkg-config detection until after
+ qmake is built
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+pkg-config isn't used before qmake is built, so these tests can take
+place afterward.
+
+This is preparation for using qmake to resolve PKG_CONFIG in mkspecs.
 
 Change-Id: Icedf9ebd80bbac3fe1e5d7eeca358cb0fc9de072
+Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
+Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
+(cherry picked from commit 1861f0317d4058482667154131f8eb6488db407e)
 
 diff --git a/configure b/configure
 index a0786da..53d0506 100755
@@ -81024,10 +81031,10 @@
 1.7.10.4
 
 
-From 8173e1aed8382a20afcb70ca36615dda67faf95c Mon Sep 17 00:00:00 2001
+From b0638daae7481b9770e4a88bb7509f6cbbfee0e8 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Fri, 14 Sep 2012 10:03:18 +0200
-Subject: [PATCH 22/22] use qmake to get PKG_CONFIG in configure script
+Subject: [PATCH 22/24] use qmake to get PKG_CONFIG in configure script
 
 The value of PKG_CONFIG might depend on device options.
 For example, "-device-option PKG_CONFIG" might be used with configure
@@ -81037,21 +81044,27 @@
 The shell functions of configure for parsing mkspecs do not take
 device options into account, but qmake is pretty good at it now.
 
+backport of qt5/qtbase 01864d4854557d2cf8b067e229d77cd7c9c553ee
+
 Change-Id: I1c9558e550c48e8441ebdac34b82066473c2ce3a
+Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
+(cherry picked from commit d8f1f7a29c277c9a643fd048b87f530e37773676)
 
 diff --git a/configure b/configure
-index 53d0506..211476d 100755
+index 53d0506..723502e 100755
 --- a/configure
 +++ b/configure
-@@ -5015,7 +5015,11 @@ fi
+@@ -5014,8 +5014,12 @@ else
+ fi
  
  if [ -z "$PKG_CONFIG" ]; then
-     # See if PKG_CONFIG is set in the mkspec:
+-    # See if PKG_CONFIG is set in the mkspec:
 -    PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
++    # See if PKG_CONFIG is set in the mkspec or device options
 +    (echo TEMPLATE = subdirs
 +     echo 'message($$PKG_CONFIG)') > "$outpath/dummy.pro"
 +    echo "QT_BUILD_TREE = $outpath" > "$outpath/.qmake.cache.pkgconfig"
-+    PKG_CONFIG="`"$outpath/bin/qmake" -cache "$outpath/.qmake.cache.pkgconfig" -spec "$XQMAKESPEC" "$outpath/dummy.pro" -o /dev/null 2>&1 1>&- | sed -n -e 's,Project MESSAGE: \(.*\),\1,p'`"
++    PKG_CONFIG=`"$outpath/bin/qmake" -cache "$outpath/.qmake.cache.pkgconfig" -spec "$XQMAKESPEC" "$outpath/dummy.pro" -o /dev/null 2>&1 > /dev/null | sed -n -e 's,Project MESSAGE: \(.*\),\1,p'`
 +    rm "$outpath/.qmake.cache.pkgconfig" "$outpath/dummy.pro"
  fi
  if [ -z "$PKG_CONFIG" ]; then
@@ -81059,3 +81072,105 @@
 -- 
 1.7.10.4
 
+
+From 4814e4ff8a6d245eff8761113ac2ae8f37abf71a Mon Sep 17 00:00:00 2001
+From: Richard Moore <rich@kde.org>
+Date: Fri, 14 Sep 2012 00:13:08 +0100
+Subject: [PATCH 23/24] Disable SSL compression by default.
+
+Disable SSL compression by default since this appears to be the a likely
+cause of the currently hyped CRIME attack.
+
+This is a backport of 5ea896fbc63593f424a7dfbb11387599c0025c74
+
+Change-Id: I6eeefb23c6b140a9633b28ed85879459c474348a
+Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
+Reviewed-by: Peter Hartmann <phartmann@rim.com>
+(cherry picked from commit d41dc3e101a694dec98d7bbb582d428d209e5401)
+
+diff --git a/src/network/ssl/qssl.cpp b/src/network/ssl/qssl.cpp
+index 49e086f..9578178 100644
+--- a/src/network/ssl/qssl.cpp
++++ b/src/network/ssl/qssl.cpp
+@@ -148,8 +148,9 @@ QT_BEGIN_NAMESPACE
+ 
+     By default, SslOptionDisableEmptyFragments is turned on since this causes
+     problems with a large number of servers. SslOptionDisableLegacyRenegotiation
+-    is also turned on, since it introduces a security risk. The other options
+-    are turned off.
++    is also turned on, since it introduces a security risk.
++    SslOptionDisableCompression is turned on to prevent the attack publicised by
++    CRIME. The other options are turned off.
+ 
+     Note: Availability of above options depends on the version of the SSL
+     backend in use.
+diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
+index 24c7b77..3a05f54 100644
+--- a/src/network/ssl/qsslconfiguration.cpp
++++ b/src/network/ssl/qsslconfiguration.cpp
+@@ -201,7 +201,9 @@ bool QSslConfiguration::isNull() const
+             d->privateKey.isNull() &&
+             d->peerCertificate.isNull() &&
+             d->peerCertificateChain.count() == 0 &&
+-            d->sslOptions == (QSsl::SslOptionDisableEmptyFragments|QSsl::SslOptionDisableLegacyRenegotiation));
++            d->sslOptions == ( QSsl::SslOptionDisableEmptyFragments
++                              |QSsl::SslOptionDisableLegacyRenegotiation
++                              |QSsl::SslOptionDisableCompression));
+ }
+ 
+ /*!
+diff --git a/src/network/ssl/qsslconfiguration_p.h b/src/network/ssl/qsslconfiguration_p.h
+index 74f17cd..c36b651 100644
+--- a/src/network/ssl/qsslconfiguration_p.h
++++ b/src/network/ssl/qsslconfiguration_p.h
+@@ -83,7 +83,9 @@ public:
+         : protocol(QSsl::SecureProtocols),
+           peerVerifyMode(QSslSocket::AutoVerifyPeer),
+           peerVerifyDepth(0),
+-          sslOptions(QSsl::SslOptionDisableEmptyFragments|QSsl::SslOptionDisableLegacyRenegotiation)
++          sslOptions(QSsl::SslOptionDisableEmptyFragments
++                     |QSsl::SslOptionDisableLegacyRenegotiation
++                     |QSsl::SslOptionDisableCompression)
+     { }
+ 
+     QSslCertificate peerCertificate;
+-- 
+1.7.10.4
+
+
+From 08f8d25243a021fb17bfce06cd2b1f96dea7454d Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Tue, 18 Sep 2012 21:40:22 +0200
+Subject: [PATCH 24/24] configure: mac features don't belong on cross mingw
+ target
+
+CFG_MAC_DWARF2 and CFG_MAC_XARCH options are for targetting macs, not
+bulding on them.
+
+qt5/qtbase commit 7a67c822e3e552d0d881f0409a5316de07dbb8c7
+removed CFG_MAC_DWARF2.
+
+qt5/qtbase commit 59d5c26075724a581ed276d62d884b44d2ca4489
+removed CFG_MAC_XARCH.
+
+Change-Id: Idb789ed9a8aa9b824a4c2191a9c39e741ca49574
+
+diff --git a/configure b/configure
+index 723502e..0978939 100755
+--- a/configure
++++ b/configure
+@@ -3421,6 +3421,11 @@ elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ];
+     CFG_PRECOMPILE=no
+ fi
+ 
++if [ "$XPLATFORM_MINGW" = "yes" ]; then
++    CFG_MAC_DWARF2=no
++    CFG_MAC_XARCH=no
++fi
++
+ #auto-detect DWARF2 on the mac
+ if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
+     if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
+-- 
+1.7.10.4
+
--- a/src/qt.mk	Tue Sep 18 17:37:36 2012 +1000
+++ b/src/qt.mk	Fri Sep 21 09:49:59 2012 -0700
@@ -33,7 +33,7 @@
         -release \
         -exceptions \
         -static \
-        -prefix '$(PREFIX)/$(TARGET)' \
+        -prefix '$(PREFIX)/$(TARGET)/qt' \
         -prefix-install \
         -script \
         -no-iconv \
@@ -65,12 +65,12 @@
         -v
 
     $(MAKE) -C '$(1)' -j '$(JOBS)'
-    rm -rf '$(PREFIX)/$(TARGET)/mkspecs'
+    rm -rf '$(PREFIX)/$(TARGET)/qt'
     $(MAKE) -C '$(1)' -j 1 install
-    $(INSTALL) -m755 '$(1)/bin/moc'   '$(PREFIX)/bin/$(TARGET)-moc'
-    $(INSTALL) -m755 '$(1)/bin/rcc'   '$(PREFIX)/bin/$(TARGET)-rcc'
-    $(INSTALL) -m755 '$(1)/bin/uic'   '$(PREFIX)/bin/$(TARGET)-uic'
-    $(INSTALL) -m755 '$(1)/bin/qmake' '$(PREFIX)/bin/$(TARGET)-qmake'
+    ln -fs '$(PREFIX)/$(TARGET)/qt/bin/moc' '$(PREFIX)/bin/$(TARGET)-moc'
+    ln -fs '$(PREFIX)/$(TARGET)/qt/bin/rcc' '$(PREFIX)/bin/$(TARGET)-roc'
+    ln -fs '$(PREFIX)/$(TARGET)/qt/bin/uic' '$(PREFIX)/bin/$(TARGET)-uic'
+    ln -fs '$(PREFIX)/$(TARGET)/qt/bin/qmake' '$(PREFIX)/bin/$(TARGET)-qmake'
 
     cd '$(1)/tools/assistant' && '$(1)/bin/qmake' assistant.pro
     $(MAKE) -C '$(1)/tools/assistant' -j '$(JOBS)' install
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xapian-core.mk	Fri Sep 21 09:49:59 2012 -0700
@@ -0,0 +1,19 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG             := xapian-core
+$(PKG)_IGNORE   :=
+$(PKG)_CHECKSUM := 1be1896ab11a3a66c6c0ade962c700d96678116e
+$(PKG)_SUBDIR   := xapian-core-$($(PKG)_VERSION)
+$(PKG)_FILE     := xapian-core-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL      := http://oligarchy.co.uk/xapian/$($(PKG)_VERSION)/xapian-core-$($(PKG)_VERSION).tar.gz
+$(PKG)_DEPS     := gcc zlib
+
+define $(PKG)_BUILD
+    cd '$(1)' && ./configure \
+        --host='$(TARGET)' \
+        --build="`config.guess`" \
+        --prefix='$(PREFIX)/$(TARGET)' \
+        --enable-static
+    $(MAKE) -C '$(1)' -j '$(JOBS)' install
+endef