# HG changeset patch
# User Tatsuro Matsuoka <tmacchant@yahoo.co.jp>
# Date 1470871760 -32400
#      Thu Aug 11 08:29:20 2016 +0900
# Node ID 98e472249bef4fd851a0e9c07e09dc9af6ca9602
# Parent  393571034f2470b9d4375f1269fa7c82b29f94fd
cairo and lua based terminal support for gnuplot for windows

diff -r 393571034f24 -r 98e472249bef src/cairo.mk
--- a/src/cairo.mk	Tue Aug 09 16:50:32 2016 -0400
+++ b/src/cairo.mk	Thu Aug 11 08:29:20 2016 +0900
@@ -3,8 +3,8 @@
 
 PKG             := cairo
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 1.12.14
-$(PKG)_CHECKSUM := 9106ab09b2e7b9f90521b18dd4a7e9577eba6c15
+$(PKG)_VERSION  := 1.14.6
+$(PKG)_CHECKSUM := 0a59324e6cbe031b5b898ff8b9e2ffceb9d114f5
 $(PKG)_SUBDIR   := cairo-$($(PKG)_VERSION)
 $(PKG)_FILE     := cairo-$($(PKG)_VERSION).tar.xz
 $(PKG)_URL      := http://cairographics.org/releases/$($(PKG)_FILE)
@@ -31,32 +31,17 @@
     $(PKG)_EXTRA_CONFIGURE_OPTIONS += ax_cv_c_float_words_bigendian=no
 endif
 
+ifeq ($(MXE_SYSTEM),mingw)
 define $(PKG)_BUILD
-    $(SED) -i 's,libpng12,libpng,g'                          '$(1)/configure'
-    $(SED) -i 's,^\(Libs:.*\),\1 @CAIRO_NONPKGCONFIG_LIBS@,' '$(1)/src/cairo.pc.in'
     cd '$(1)' && ./configure \
         $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
         $(ENABLE_SHARED_OR_STATIC) \
         --prefix='$(HOST_PREFIX)' \
         --disable-gtk-doc \
-        --disable-test-surfaces \
-        --disable-gcov \
-        --disable-xlib \
-        --disable-xlib-xrender \
-        --disable-xcb \
-        --disable-quartz \
-        --disable-quartz-font \
-        --disable-quartz-image \
-        --disable-os2 \
-        --disable-beos \
-        --disable-directfb \
         --enable-win32 \
         --enable-win32-font \
-        --enable-png \
-        --enable-ft \
-        --enable-ps \
-        --enable-pdf \
-        --enable-svg \
+        --disable-test-surfaces \
+        --disable-directfb \
         --disable-pthread \
         $($(PKG)_EXTRA_CONFIGURE_OPTIONS) \
         PKG_CONFIG='$(MXE_PKG_CONFIG)' \
@@ -64,3 +49,19 @@
         && $(CONFIGURE_POST_HOOK)
     $(MAKE) -C '$(1)' -j '$(JOBS)' install noinst_PROGRAMS=
 endef
+else
+define $(PKG)_BUILD
+    cd '$(1)' && ./configure \
+        $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
+        $(ENABLE_SHARED_OR_STATIC) \
+        --prefix='$(HOST_PREFIX)' \
+        ----with-x \
+        --disable-gtk-doc \
+        --disable-directfb \
+        $($(PKG)_EXTRA_CONFIGURE_OPTIONS) \
+        PKG_CONFIG='$(MXE_PKG_CONFIG)' \
+        PKG_CONFIG_PATH='$(HOST_LIBDIR)/pkgconfig' \
+        && $(CONFIGURE_POST_HOOK)
+    $(MAKE) -C '$(1)' -j '$(JOBS)' install noinst_PROGRAMS=
+endef
+endif
diff -r 393571034f24 -r 98e472249bef src/glib.mk
--- a/src/glib.mk	Tue Aug 09 16:50:32 2016 -0400
+++ b/src/glib.mk	Thu Aug 11 08:29:20 2016 +0900
@@ -3,8 +3,8 @@
 
 PKG             := glib
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 2.36.3
-$(PKG)_CHECKSUM := aafba69934b9ba77cc8cb0e5d8105aa1d8463eba
+$(PKG)_VERSION  := 2.48.1
+$(PKG)_CHECKSUM := d59b6daf51dff21c6327734a99f1fb6c5328bcf9
 $(PKG)_SUBDIR   := glib-$($(PKG)_VERSION)
 $(PKG)_FILE     := glib-$($(PKG)_VERSION).tar.xz
 $(PKG)_URL      := http://ftp.gnome.org/pub/gnome/sources/glib/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE)
@@ -48,8 +48,7 @@
         $(ENABLE_SHARED_OR_STATIC) \
         $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
         --prefix='$(HOST_PREFIX)' \
-        --with-threads=win32 \
-        --with-pcre=system \
+        --with-pcre=internal \
         --with-libiconv=gnu \
         --disable-inotify \
         --disable-modular-tests \
diff -r 393571034f24 -r 98e472249bef src/gnuplot-1-fixes.patch
--- a/src/gnuplot-1-fixes.patch	Tue Aug 09 16:50:32 2016 -0400
+++ b/src/gnuplot-1-fixes.patch	Thu Aug 11 08:29:20 2016 +0900
@@ -1,7 +1,25 @@
-diff -ur gnuplot-5.0.4.orig/config/mingw/Makefile gnuplot-5.0.4/config/mingw/Makefile
---- gnuplot-5.0.4.orig/config/mingw/Makefile	2016-07-21 13:47:52.025061617 -0400
-+++ gnuplot-5.0.4/config/mingw/Makefile	2016-07-21 13:48:27.859547002 -0400
-@@ -119,14 +119,14 @@
+diff -ur a/config/mingw/Makefile b/config/mingw/Makefile
+--- a/config/mingw/Makefile	2016-03-31 12:40:56.000000000 +0900
++++ b/config/mingw/Makefile	2016-08-10 10:00:27.437586000 +0900
+@@ -93,8 +93,8 @@
+ # Cairo/Pango terminals
+ # Uncomment the following lines to select the pngcairo and pdfcairo
+ # terminals
+-#CAIROTERMS=1
+-#CAIROLIBS=1
++CAIROTERMS=1
++CAIROLIBS=1
+ 
+ # WXWIDGETS interactive terminal
+ # Requires wxWidgets, Cairo, Pango, and their respective dependencies.
+@@ -113,20 +113,20 @@
+ endif
+ 
+ # Uncomment the following line to select the lua/tikz terminal
+-#LUA=lua
++LUA=lua
+ 
+ # Uncomment the following line to select the caca terminal
  # Requires libcaca version 0.99.beta15 or newer. A post-beta18
  # svn version is recommended since it contains an improved
  # win32 backend.
@@ -114,3 +132,4 @@
  #endif
  
  #ifdef HAVE_STRUCT_EXCEPTION_IN_MATH_H
+
diff -r 393571034f24 -r 98e472249bef src/gnuplot.mk
--- a/src/gnuplot.mk	Tue Aug 09 16:50:32 2016 -0400
+++ b/src/gnuplot.mk	Thu Aug 11 08:29:20 2016 +0900
@@ -8,7 +8,12 @@
 $(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
 $(PKG)_FILE     := gnuplot-$($(PKG)_VERSION).tar.gz
 $(PKG)_URL      := http://sourceforge.net/projects/gnuplot/files/gnuplot/$($(PKG)_VERSION)/$($(PKG)_FILE)
+ifeq ($(MXE_SYSTEM),mingw)
+$(PKG)_DEPS     := cairo pango lua
+else
 $(PKG)_DEPS     :=
+endif
+
 
 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes)
     $(PKG)_EXTRAFLAGS := ICONV_CFLAGS='-I$(HOST_INCDIR)' ICONV_LDFLAGS='-L$(HOST_LIBDIR)'
@@ -45,8 +50,14 @@
     for f in $(1)/term/PostScript/*.txt; do \
       $(INSTALL) -m644 "$$f" '$(3)$(HOST_PREFIX)/share/PostScript/'; \
     done
-
-    ## MG: not sure what to do with these and how to integrate with DESTDIR
+    $(INSTALL) -d '$(3)$(HOST_PREFIX)/share/lua'
+    for f in $(1)/term/lua/*.lua; do \
+      $(INSTALL) -m644 "$$f" '$(3)$(HOST_PREFIX)/share/lua/'; \
+    done
+     for f in $(1)/term/lua/*; do \
+      $(INSTALL) -m644 "$$f" '$(3)$(HOST_PREFIX)/share/lua/'; \
+    done
+   ## MG: not sure what to do with these and how to integrate with DESTDIR
     $(INSTALL) -d '$(TOP_DIR)/gnuplot/bin'
     $(INSTALL) -m755 '$(1)/config/mingw/gnuplot.exe' '$(TOP_DIR)/gnuplot/bin/'
     $(INSTALL) -m755 '$(1)/config/mingw/wgnuplot.exe' '$(TOP_DIR)/gnuplot/bin/'
diff -r 393571034f24 -r 98e472249bef src/libffi.mk
--- a/src/libffi.mk	Tue Aug 09 16:50:32 2016 -0400
+++ b/src/libffi.mk	Thu Aug 11 08:29:20 2016 +0900
@@ -3,8 +3,8 @@
 
 PKG             := libffi
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 3.1
-$(PKG)_CHECKSUM := cb373ef2115ec7c57913b84ca72eee14b10ccdc3
+$(PKG)_VERSION  := 3.2.1
+$(PKG)_CHECKSUM := 280c265b789e041c02e5c97815793dfc283fb1e6
 $(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
 $(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
 $(PKG)_URL      := ftp://sourceware.org/pub/$(PKG)/$($(PKG)_FILE)
diff -r 393571034f24 -r 98e472249bef src/lua.mk
--- a/src/lua.mk	Tue Aug 09 16:50:32 2016 -0400
+++ b/src/lua.mk	Thu Aug 11 08:29:20 2016 +0900
@@ -3,8 +3,8 @@
 
 PKG             := lua
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 5.2.1
-$(PKG)_CHECKSUM := 6bb1b0a39b6a5484b71a83323c690154f86b2021
+$(PKG)_VERSION  := 5.3.3
+$(PKG)_CHECKSUM := a0341bc3d1415b814cc738b2ec01ae56045d64ef
 $(PKG)_SUBDIR   := lua-$($(PKG)_VERSION)
 $(PKG)_FILE     := lua-$($(PKG)_VERSION).tar.gz
 $(PKG)_URL      := http://www.lua.org/ftp/$($(PKG)_FILE)
diff -r 393571034f24 -r 98e472249bef src/mingw-glib-1-fixes.patch
--- a/src/mingw-glib-1-fixes.patch	Tue Aug 09 16:50:32 2016 -0400
+++ b/src/mingw-glib-1-fixes.patch	Thu Aug 11 08:29:20 2016 +0900
@@ -1,1157 +1,12 @@
-This file is part of MXE.
-See index.html for further information.
+--- a/glib/gstrfuncs.c	2016-05-10 17:54:30.000000000 +0900
++++ b/glib/gstrfuncs.c	2016-08-02 17:31:05.512941000 +0900
+@@ -1272,7 +1272,7 @@
+       gchar buf[1024];
+       GError *error = NULL;
+ 
+-#if defined(G_OS_WIN32)
++#if ( defined(G_OS_WIN32) && !defined __MINGW32__) 
+       strerror_s (buf, sizeof (buf), errnum);
+       msg = buf;
+ #elif defined(HAVE_STRERROR_R)
 
-Contains ad hoc patches for cross building.
-
-From 55d5dab8f12c55064b48da8a4a42bfe8fa97f8f9 Mon Sep 17 00:00:00 2001
-From: MXE
-Date: Thu, 23 Sep 2010 21:41:51 +0200
-Subject: [PATCH 1/8] optional gettext
-
-
-diff -ur a/configure.ac b/configure.ac
---- a/configure.ac	2013-06-10 00:53:13.000000000 +0200
-+++ b/configure.ac	2013-06-29 05:15:59.920660258 +0200
-@@ -483,8 +483,8 @@
- GLIB_GNU_GETTEXT
- 
- if test "$gt_cv_have_gettext" != "yes" ; then
--  AC_MSG_ERROR([
--*** You must have either have gettext support in your C library, or use the 
-+  AC_MSG_WARN([
-+*** You should have either have gettext support in your C library, or use the 
- *** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
- ])
- fi
-diff -ur a/glib/gi18n.h b/glib/gi18n.h
---- a/glib/gi18n.h	2011-08-16 02:51:30.000000000 +0200
-+++ b/glib/gi18n.h	2013-06-29 05:17:17.620663625 +0200
-@@ -22,7 +22,12 @@
- 
- #include <glib.h>
- 
-+#ifdef ENABLE_NLS
- #include <libintl.h>
-+#else
-+#define gettext(String) (String)
-+#endif
-+
- #include <string.h>
- 
- #define  _(String) gettext (String)
-
-
-From 4dee17aeb7c45a84a44e3fe2dcca4d8bfd1916a3 Mon Sep 17 00:00:00 2001
-From: MXE
-Date: Thu, 23 Sep 2010 21:42:46 +0200
-Subject: [PATCH 2/8] fix tool paths
-
-
-diff -ur a/glib-2.0.pc.in b/glib-2.0.pc.in
---- a/glib-2.0.pc.in	2012-03-12 01:42:41.000000000 +0100
-+++ b/glib-2.0.pc.in	2013-06-29 05:18:02.624665578 +0200
-@@ -3,9 +3,9 @@
- libdir=@libdir@
- includedir=@includedir@
- 
--glib_genmarshal=glib-genmarshal
--gobject_query=gobject-query
--glib_mkenums=glib-mkenums
-+glib_genmarshal=@bindir@/glib-genmarshal
-+gobject_query=@bindir@/gobject-query
-+glib_mkenums=@bindir@/glib-mkenums
- 
- Name: GLib
- Description: C Utility Library
-
-
-From 981260cfec055fbd58986d9e1b7ef27cdc036e30 Mon Sep 17 00:00:00 2001
-From: MXE
-Date: Fri, 15 Jun 2012 15:25:01 +0200
-Subject: [PATCH 3/8] Avoid DllMain symbol conflict when linking statically
-
-
-diff -ur a/gio/giomodule.c b/gio/giomodule.c
---- a/gio/giomodule.c	2013-06-03 01:20:49.000000000 +0200
-+++ b/gio/giomodule.c	2013-06-29 05:19:55.560670478 +0200
-@@ -900,14 +900,12 @@
- 
- static HMODULE gio_dll = NULL;
- 
--#ifdef DLL_EXPORT
--
--BOOL WINAPI DllMain (HINSTANCE hinstDLL,
-+BOOL WINAPI gio_DllMain (HINSTANCE hinstDLL,
-                      DWORD     fdwReason,
-                      LPVOID    lpvReserved);
- 
- BOOL WINAPI
--DllMain (HINSTANCE hinstDLL,
-+gio_DllMain (HINSTANCE hinstDLL,
- 	 DWORD     fdwReason,
- 	 LPVOID    lpvReserved)
- {
-@@ -917,8 +915,6 @@
-   return TRUE;
- }
- 
--#endif
--
- void *
- _g_io_win32_get_module (void)
- {
-diff -ur a/glib/glib-init.c b/glib/glib-init.c
---- a/glib/glib-init.c	2013-06-10 00:03:17.000000000 +0200
-+++ b/glib/glib-init.c	2013-06-29 05:20:43.480672556 +0200
-@@ -223,14 +223,14 @@
- 
- #if defined (G_OS_WIN32)
- 
--BOOL WINAPI DllMain (HINSTANCE hinstDLL,
-+BOOL WINAPI glib_DllMain (HINSTANCE hinstDLL,
-                      DWORD     fdwReason,
-                      LPVOID    lpvReserved);
- 
- HMODULE glib_dll;
- 
- BOOL WINAPI
--DllMain (HINSTANCE hinstDLL,
-+glib_DllMain (HINSTANCE hinstDLL,
-          DWORD     fdwReason,
-          LPVOID    lpvReserved)
- {
-
-
-From 1b51f3ef3e38d5db3c15cde0fe4429dab1f7a6d0 Mon Sep 17 00:00:00 2001
-From: MXE
-Date: Fri, 15 Jun 2012 15:27:22 +0200
-Subject: [PATCH 4/8] Allow building without inotify support
-
-
-diff -ur a/configure.ac b/configure.ac
---- a/configure.ac	2013-06-10 00:53:13.000000000 +0200
-+++ b/configure.ac	2013-06-29 05:23:45.264680443 +0200
-@@ -1726,11 +1726,17 @@
- dnl ** Check for inotify (GIO) **
- dnl *****************************
- inotify_support=no
--AC_CHECK_HEADERS([sys/inotify.h],
--[
-+AC_ARG_ENABLE(inotify,
-+              AC_HELP_STRING([--disable-inotify],
-+                             [build without inotify support]))
-+
-+if test "x$enable_inotify" != "xno"; then
-+  AC_CHECK_HEADERS([sys/inotify.h],
-+  [
- 	inotify_support=yes
- 	AC_CHECK_FUNCS(inotify_init1)
--])
-+  ])
-+fi
- 
- AM_CONDITIONAL(HAVE_INOTIFY, [test "$inotify_support" = "yes"])
- 
-
-
-From 5ec5d101cb75c096f39228da85d2caba52b9002f Mon Sep 17 00:00:00 2001
-From: MXE
-Date: Fri, 15 Jun 2012 15:28:14 +0200
-Subject: [PATCH 5/8] Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF.
- Backported from upstream
-
-
-diff -ur a/configure.ac b/configure.ac
---- a/configure.ac	2013-06-10 00:53:13.000000000 +0200
-+++ b/configure.ac	2013-06-29 05:24:29.720682366 +0200
-@@ -456,6 +456,8 @@
- 
- AC_MSG_RESULT($enable_iconv_cache)
- 
-+# Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF
-+AS_IF([false], [AC_CHECK_HEADER([stdint.h])])
- 
- dnl
- dnl zlib support
-
-
-From d5c7bf3b57ced0c6dfb416cf7b439fba210d2a8b Mon Sep 17 00:00:00 2001
-From: MXE
-Date: Fri, 15 Jun 2012 15:29:06 +0200
-Subject: [PATCH 6/8] Link with dnsapi
-
-
-diff -ur a/gio-2.0.pc.in b/gio-2.0.pc.in
---- a/gio-2.0.pc.in	2013-01-20 20:48:44.000000000 +0100
-+++ b/gio-2.0.pc.in	2013-06-29 05:25:16.328684390 +0200
-@@ -13,6 +13,6 @@
- Version: @VERSION@
- Requires: glib-2.0 gobject-2.0
- Requires.private: gmodule-no-export-2.0
--Libs: -L${libdir} -lgio-2.0
-+Libs: -L${libdir} -lgio-2.0 -ldnsapi
- Libs.private: @ZLIB_LIBS@ @NETWORK_LIBS@
- Cflags:
-
-
-
-From e0338b4fdd95e8273c84ba1daeea660c589d152a Mon Sep 17 00:00:00 2001
-From: MXE
-Date: Fri, 15 Jun 2012 15:29:38 +0200
-Subject: [PATCH 7/8] Ensure globals are initialized even when DllMain is not
- being run
-
-
-diff -ur a/glib/gmain.c b/glib/gmain.c
---- a/glib/gmain.c	2013-06-10 00:03:18.000000000 +0200
-+++ b/glib/gmain.c	2013-06-29 05:33:10.568704963 +0200
-@@ -2490,12 +2490,15 @@
- #ifdef G_OS_WIN32
- static ULONGLONG (*g_GetTickCount64) (void) = NULL;
- static guint32 g_win32_tick_epoch = 0;
-+static gboolean g_win32_clock_is_initialized;
- 
- void
- g_clock_win32_init (void)
- {
-   HMODULE kernel32;
- 
-+  g_win32_clock_is_initialized = TRUE;
-+
-   g_GetTickCount64 = NULL;
-   kernel32 = GetModuleHandle ("KERNEL32.DLL");
-   if (kernel32 != NULL)
-@@ -2614,6 +2617,9 @@
-    *    timeBeginPeriod() to increase it as much as they want
-    */
- 
-+  if (!g_win32_clock_is_initialized)
-+    g_clock_win32_init ();
-+
-   if (g_GetTickCount64 != NULL)
-     {
-       guint32 ticks_as_32bit;
-diff -ur a/glib/gthread-win32.c b/glib/gthread-win32.c
---- a/glib/gthread-win32.c	2013-06-03 01:20:49.000000000 +0200
-+++ b/glib/gthread-win32.c	2013-06-29 05:49:13.580746730 +0200
-@@ -118,18 +118,28 @@
-   void     (__stdcall * WakeConditionVariable)       (gpointer cond);
- } GThreadImplVtable;
- 
-+/* Needed for static builds where DllMain initializer doesn't get called */
-+static gboolean g_threads_is_initialized;
-+G_GNUC_INTERNAL void g_thread_win32_init (void);
-+
- static GThreadImplVtable g_thread_impl_vtable;
- 
- /* {{{1 GMutex */
- void
- g_mutex_init (GMutex *mutex)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_thread_impl_vtable.InitializeSRWLock (mutex);
- }
- 
- void
- g_mutex_clear (GMutex *mutex)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   if (g_thread_impl_vtable.DeleteSRWLock != NULL)
-     g_thread_impl_vtable.DeleteSRWLock (mutex);
- }
-@@ -137,18 +147,27 @@
- void
- g_mutex_lock (GMutex *mutex)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_thread_impl_vtable.AcquireSRWLockExclusive (mutex);
- }
- 
- gboolean
- g_mutex_trylock (GMutex *mutex)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   return g_thread_impl_vtable.TryAcquireSRWLockExclusive (mutex);
- }
- 
- void
- g_mutex_unlock (GMutex *mutex)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_thread_impl_vtable.ReleaseSRWLockExclusive (mutex);
- }
- 
-@@ -159,6 +178,9 @@
- {
-   CRITICAL_SECTION *cs;
- 
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   cs = g_slice_new (CRITICAL_SECTION);
-   InitializeCriticalSection (cs);
- 
-@@ -169,6 +191,10 @@
- g_rec_mutex_impl_free (CRITICAL_SECTION *cs)
- {
-   DeleteCriticalSection (cs);
-+
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_slice_free (CRITICAL_SECTION, cs);
- }
- 
-@@ -177,6 +203,9 @@
- {
-   CRITICAL_SECTION *impl = mutex->p;
- 
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   if G_UNLIKELY (mutex->p == NULL)
-     {
-       impl = g_rec_mutex_impl_new ();
-@@ -191,30 +220,45 @@
- void
- g_rec_mutex_init (GRecMutex *mutex)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   mutex->p = g_rec_mutex_impl_new ();
- }
- 
- void
- g_rec_mutex_clear (GRecMutex *mutex)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_rec_mutex_impl_free (mutex->p);
- }
- 
- void
- g_rec_mutex_lock (GRecMutex *mutex)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   EnterCriticalSection (g_rec_mutex_get_impl (mutex));
- }
- 
- void
- g_rec_mutex_unlock (GRecMutex *mutex)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   LeaveCriticalSection (mutex->p);
- }
- 
- gboolean
- g_rec_mutex_trylock (GRecMutex *mutex)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   return TryEnterCriticalSection (g_rec_mutex_get_impl (mutex));
- }
- 
-@@ -223,12 +267,18 @@
- void
- g_rw_lock_init (GRWLock *lock)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_thread_impl_vtable.InitializeSRWLock (lock);
- }
- 
- void
- g_rw_lock_clear (GRWLock *lock)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   if (g_thread_impl_vtable.DeleteSRWLock != NULL)
-     g_thread_impl_vtable.DeleteSRWLock (lock);
- }
-@@ -236,36 +286,54 @@
- void
- g_rw_lock_writer_lock (GRWLock *lock)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_thread_impl_vtable.AcquireSRWLockExclusive (lock);
- }
- 
- gboolean
- g_rw_lock_writer_trylock (GRWLock *lock)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   return g_thread_impl_vtable.TryAcquireSRWLockExclusive (lock);
- }
- 
- void
- g_rw_lock_writer_unlock (GRWLock *lock)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_thread_impl_vtable.ReleaseSRWLockExclusive (lock);
- }
- 
- void
- g_rw_lock_reader_lock (GRWLock *lock)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_thread_impl_vtable.AcquireSRWLockShared (lock);
- }
- 
- gboolean
- g_rw_lock_reader_trylock (GRWLock *lock)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   return g_thread_impl_vtable.TryAcquireSRWLockShared (lock);
- }
- 
- void
- g_rw_lock_reader_unlock (GRWLock *lock)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_thread_impl_vtable.ReleaseSRWLockShared (lock);
- }
- 
-@@ -273,12 +341,18 @@
- void
- g_cond_init (GCond *cond)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_thread_impl_vtable.InitializeConditionVariable (cond);
- }
- 
- void
- g_cond_clear (GCond *cond)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   if (g_thread_impl_vtable.DeleteConditionVariable)
-     g_thread_impl_vtable.DeleteConditionVariable (cond);
- }
-@@ -286,12 +360,18 @@
- void
- g_cond_signal (GCond *cond)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_thread_impl_vtable.WakeConditionVariable (cond);
- }
- 
- void
- g_cond_broadcast (GCond *cond)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_thread_impl_vtable.WakeAllConditionVariable (cond);
- }
- 
-@@ -299,6 +379,9 @@
- g_cond_wait (GCond  *cond,
-              GMutex *entered_mutex)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   g_thread_impl_vtable.SleepConditionVariableSRW (cond, entered_mutex, INFINITE, 0);
- }
- 
-@@ -309,6 +392,9 @@
- {
-   gint64 span;
- 
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   span = end_time - g_get_monotonic_time ();
- 
-   if G_UNLIKELY (span < 0)
-@@ -341,6 +427,9 @@
- 
-   if G_UNLIKELY (impl == 0)
-     {
-+      if (!g_threads_is_initialized)
-+        g_thread_win32_init ();
-+
-       EnterCriticalSection (&g_private_lock);
-       impl = (DWORD) key->p;
-       if (impl == 0)
-@@ -434,6 +523,9 @@
- {
-   GThreadWin32 *wt = (GThreadWin32 *) thread;
- 
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   win32_check_for_error (CloseHandle (wt->handle));
-   g_slice_free (GThreadWin32, wt);
- }
-@@ -441,6 +533,9 @@
- void
- g_system_thread_exit (void)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   _endthreadex (0);
- }
- 
-@@ -449,6 +544,9 @@
- {
-   GThreadWin32 *self = data;
- 
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   self->proxy (self);
- 
-   g_system_thread_exit ();
-@@ -466,6 +564,9 @@
-   GThreadWin32 *thread;
-   guint ignore;
- 
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   thread = g_slice_new0 (GThreadWin32);
-   thread->proxy = func;
- 
-@@ -495,6 +596,9 @@
- {
-   GThreadWin32 *wt = (GThreadWin32 *) thread;
- 
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   win32_check_for_error (WAIT_FAILED != WaitForSingleObject (wt->handle, INFINITE));
- }
- 
-@@ -986,6 +1090,8 @@
- void
- g_thread_win32_init (void)
- {
-+  g_threads_is_initialized = TRUE;
-+
-   if (!g_thread_lookup_native_funcs ())
-     g_thread_xp_init ();
- 
-
-
-From ce0f7354ac995f3b21cccabec880413d37f02fb6 Mon Sep 17 00:00:00 2001
-From: MXE
-Date: Mon, 18 Jun 2012 16:02:12 +0200
-Subject: [PATCH 8/8] kill docs and gtk-doc dependence (mxe-specific)
-
-
-diff -urN a/autogen.sh b/autogen.sh
---- a/autogen.sh	2012-08-18 19:32:04.000000000 +0200
-+++ b/autogen.sh	2013-06-29 05:50:43.972750651 +0200
-@@ -7,18 +7,6 @@
- olddir=`pwd`
- cd "$srcdir"
- 
--GTKDOCIZE=$(which gtkdocize 2>/dev/null)
--if test -z $GTKDOCIZE; then
--        echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
--        rm -f gtk-doc.make
--        cat > gtk-doc.make <<EOF
--EXTRA_DIST =
--CLEANFILES =
--EOF
--else
--        gtkdocize || exit $?
--fi
--
- AUTORECONF=`which autoreconf`
- if test -z $AUTORECONF; then
-         echo "*** No autoreconf found, please install it ***"
-diff -urN a/configure.ac b/configure.ac
---- a/configure.ac	2013-06-10 00:53:13.000000000 +0200
-+++ b/configure.ac	2013-06-29 05:52:05.224754174 +0200
-@@ -2645,13 +2645,6 @@
- dnl **************************
- dnl *** Checks for gtk-doc ***
- dnl **************************
--# gtkdocize greps for ^GTK_DOC_CHECK and parses it, so you need to have
--# it on it's own line.
--m4_ifdef([GTK_DOC_CHECK], [
--GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
--],[
--AM_CONDITIONAL([ENABLE_GTK_DOC],[false])
--])
- 
- AC_ARG_ENABLE(man,
-               [AS_HELP_STRING([--enable-man],
-diff -urN a/docs/Makefile.am b/docs/Makefile.am
---- a/docs/Makefile.am	2013-06-10 00:03:17.000000000 +0200
-+++ b/docs/Makefile.am	1970-01-01 01:00:00.000000000 +0100
-@@ -1,11 +0,0 @@
--## Process this file with automake to produce Makefile.in
--include $(top_srcdir)/Makefile.decl
--
--SUBDIRS = reference
--
--EXTRA_DIST += debugging.txt macros.txt
--
--files:
--	@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
--	  echo $$p; \
--	done
-diff -urN a/docs/reference/gio/gdbus-object-manager-example/Makefile.am b/docs/reference/gio/gdbus-object-manager-example/Makefile.am
---- a/docs/reference/gio/gdbus-object-manager-example/Makefile.am	2013-06-10 00:03:17.000000000 +0200
-+++ b/docs/reference/gio/gdbus-object-manager-example/Makefile.am	1970-01-01 01:00:00.000000000 +0100
-@@ -1,68 +0,0 @@
--include $(top_srcdir)/Makefile.decl
--NULL =
--
--# The name of the module.
--DOC_MODULE=gdbus-object-manager-example
--
--# The top-level SGML file.
--DOC_MAIN_SGML_FILE=gdbus-object-manager-example-docs.xml
--
--# Extra options to supply to gtkdoc-scan
--SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED"
--
--# The directory containing the source code. Relative to $(srcdir)
--DOC_SOURCE_DIR=$(top_builddir)/gio/tests/gdbus-object-manager-example
--
--HFILE_GLOB=$(top_builddir)/gio/tests/gdbus-object-manager-example/*.h
--CFILE_GLOB=$(top_builddir)/gio/tests/gdbus-object-manager-example/*.c
--
--# Headers to ignore
--IGNORE_HFILES =				\
--	$(NULL)
--
--# CFLAGS and LDFLAGS for compiling scan program. Only needed
--# if $(DOC_MODULE).types is non-empty.
--AM_CPPFLAGS = 				\
--	$(gio_INCLUDES)			\
--	$(GLIB_DEBUG_FLAGS)
--
--GTKDOC_LIBS = 						\
--	$(top_builddir)/glib/libglib-2.0.la		\
--	$(top_builddir)/gobject/libgobject-2.0.la	\
--	$(top_builddir)/gmodule/libgmodule-2.0.la	\
--	$(top_builddir)/gio/libgio-2.0.la		\
--	$(top_builddir)/gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.la \
--	$(NULL)
--
--# Extra options to supply to gtkdoc-mkdb
--MKDB_OPTIONS = --output-format=xml --sgml-mode --name-space=g \
--	$(NULL)
--
--# Images to copy into HTML directory
--HTML_IMAGES =			\
--	$(NULL)
--
--content_files =			\
--	$(NULL)
--
--expand_content_files =		\
--	$(NULL)
--
--extra_files =			\
--	$(NULL)
--
--include $(top_srcdir)/gtk-doc.make
--
--EXTRA_DIST +=			\
--	$(NULL)
--
--MAINTAINERCLEANFILES = $(BUILT_SOURCES)
--
--dist-hook-local: all-local
--
--gdbus-object-manager-example-docs-clean: clean
--	cd $(srcdir) && rm -rf xml html
--
--# Nuke installed docs (don't know how to avoid installing them)
--install-data-hook :
--	rm -rf $(DESTDIR)$(datadir)/gtk-doc/html/gdbus-object-manager-example
-diff -urN a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am
---- a/docs/reference/gio/Makefile.am	2013-06-10 00:03:17.000000000 +0200
-+++ b/docs/reference/gio/Makefile.am	1970-01-01 01:00:00.000000000 +0100
-@@ -1,179 +0,0 @@
--include $(top_srcdir)/Makefile.decl
--NULL =
--
--SUBDIRS = gdbus-object-manager-example
--
--# The name of the module.
--DOC_MODULE=gio
--
--# The top-level SGML file.
--DOC_MAIN_SGML_FILE=gio-docs.xml
--
--# Extra options to supply to gtkdoc-scan
--SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" \
--             --ignore-decorators="G_GNUC_WARN_UNUSED_RESULT"
--
--# The directory containing the source code. Relative to $(srcdir)
--DOC_SOURCE_DIR=$(top_srcdir)/gio
--
--BUILT_HFILES=gioenumtypes.h
--HFILE_GLOB=$(top_srcdir)/gio/*.h
--CFILE_GLOB=$(top_srcdir)/gio/*.c
--
--IGNORE_HFILES = \
--	fam				\
--	fen				\
--	gdbus-2.0			\
--	gvdb				\
--	inotify				\
--	libasyncns			\
--	tests				\
--	win32				\
--	xdgmime				\
--	gapplicationimpl.h		\
--	gasynchelper.h			\
--	gcontenttypeprivate.h		\
--	gdbusauth.h			\
--	gdbusauthmechanismanon.h	\
--	gdbusauthmechanismexternal.h	\
--	gdbusauthmechanism.h		\
--	gdbusauthmechanismsha1.h	\
--	gdbusprivate.h			\
--	gdelayedsettingsbackend.h	\
--	gdummyfile.h			\
--	gdummyproxyresolver.h		\
--	gdummytlsbackend.h		\
--	gfileattribute-priv.h		\
--	gfileinfo-priv.h		\
--	giomodule-priv.h		\
--	glocaldirectorymonitor.h	\
--	glocalfileenumerator.h		\
--	glocalfile.h			\
--	glocalfileinfo.h		\
--	glocalfileinputstream.h		\
--	glocalfileiostream.h		\
--	glocalfilemonitor.h		\
--	glocalfileoutputstream.h	\
--	glocalvfs.h			\
--	gmountprivate.h			\
--	gnativevolumemonitor.h		\
--	gnetworkingprivate.h		\
--	gnetworkmonitorbase.h		\
--	gnetworkmonitornetlink.h	\
--	gpollfilemonitor.h		\
--	gregistrysettingsbackend.h	\
--	gsettingsbackendinternal.h	\
--	gsettings-mapping.h		\
--	gsettingsschema-internal.h	\
--	gsocketinputstream.h		\
--	gsocketoutputstream.h		\
--	gsocks4aproxy.h			\
--	gsocks4proxy.h			\
--	gsocks5proxy.h			\
--	gthreadedresolver.h		\
--	gunionvolumemonitor.h		\
--	gunixmount.h			\
--	gunixresolver.h			\
--	gunixvolume.h			\
--	gunixvolumemonitor.h		\
--	gwin32appinfo.h			\
--	gwin32mount.h			\
--	gwin32resolver.h		\
--	gwin32volumemonitor.h
--
--
--# CFLAGS and LDFLAGS for compiling scan program. Only needed
--# if $(DOC_MODULE).types is non-empty.
--AM_CPPFLAGS = 				\
--	$(gio_INCLUDES)			\
--	$(GLIB_DEBUG_FLAGS)
--
--GTKDOC_LIBS = \
--	$(top_builddir)/glib/libglib-2.0.la		\
--	$(top_builddir)/gobject/libgobject-2.0.la	\
--	$(top_builddir)/gmodule/libgmodule-2.0.la	\
--	$(top_builddir)/gio/libgio-2.0.la		\
--	$(NULL)
--
--# Extra options to supply to gtkdoc-mkdb
--MKDB_OPTIONS = --output-format=xml --sgml-mode --name-space=g \
--	--ignore-files='libasyncns tests'
--
--# Images to copy into HTML directory
--HTML_IMAGES =			\
--	gvfs-overview.png	\
--	menu-example.png	\
--	menu-model.png
--
--content_files =			\
--	version.xml		\
--	overview.xml		\
--	migrating-posix.xml	\
--	migrating-gnome-vfs.xml	\
--	migrating-gconf.xml	\
--	migrating-gdbus.xml	\
--	gio-querymodules.xml	\
--	glib-compile-schemas.xml\
--	glib-compile-resources.xml	\
--	gsettings.xml		\
--	gresource.xml		\
--	gdbus.xml		\
--	gdbus-codegen.xml	\
--	$(NULL)
--
--expand_content_files =		\
--	overview.xml		\
--	migrating-posix.xml	\
--	migrating-gnome-vfs.xml	\
--	migrating-gconf.xml	\
--	migrating-gdbus.xml	\
--	gdbus-codegen.xml	\
--	$(NULL)
--
--extra_files =			\
--	version.xml.in		\
--	gvfs-overview.odg
--
--# Extra options to supply to gtkdoc-fixref
--FIXXREF_OPTIONS=--extra-dir=$(srcdir)/../glib/html --extra-dir=$(srcdir)/../gobject/html
--
--include $(top_srcdir)/gtk-doc.make
--
--EXTRA_DIST +=			\
--	version.xml.in
--
--man_MANS =
--
--if ENABLE_MAN
--
--man_MANS +=			\
--	gio-querymodules.1	\
--	glib-compile-schemas.1	\
--	glib-compile-resources.1	\
--	gsettings.1		\
--	gresource.1		\
--	gdbus.1			\
--	gdbus-codegen.1
--
--XSLTPROC_FLAGS = \
--        --nonet \
--        --stringparam man.output.quietly 1 \
--        --stringparam funcsynopsis.style ansi \
--        --stringparam man.th.extra1.suppress 1 \
--        --stringparam man.authors.section.enabled 0 \
--        --stringparam man.copyright.section.enabled 0
--
--.xml.1:
--	$(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
--
--endif
--
--CLEANFILES ?=
--CLEANFILES += $(man_MANS)
--
--EXTRA_DIST += $(man_MANS)
--
--dist-hook-local: all-local
--
--gio-docs-clean: clean
--	cd $(srcdir) && rm -rf xml html
-diff -urN a/docs/reference/glib/Makefile.am b/docs/reference/glib/Makefile.am
---- a/docs/reference/glib/Makefile.am	2013-06-10 00:03:17.000000000 +0200
-+++ b/docs/reference/glib/Makefile.am	1970-01-01 01:00:00.000000000 +0100
-@@ -1,128 +0,0 @@
--## Process this file with automake to produce Makefile.in
--include $(top_srcdir)/Makefile.decl
--
--AUTOMAKE_OPTIONS = 1.6
--
--# The name of the module.
--DOC_MODULE=glib
--
--# The top-level SGML file.
--DOC_MAIN_SGML_FILE=glib-docs.xml
--
--# The directory containing the source code. Relative to $(srcdir)
--DOC_SOURCE_DIR=$(top_srcdir)/glib $(top_srcdir)/gmodule
--
--# Extra options to supply to gtkdoc-scan
--SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" --ignore-decorators="GLIB_VAR|G_GNUC_WARN_UNUSED_RESULT"
--
--# Extra options to supply to gtkdoc-mkdb
--MKDB_OPTIONS=--sgml-mode --output-format=xml --name-space=g
--
--# Used for dependencies
--HFILE_GLOB=$(top_srcdir)/glib/*.h $(top_srcdir)/gmodule/*.h
--CFILE_GLOB=$(top_srcdir)/glib/*.c $(top_srcdir)/gmodule/*.c
--
--# Ignore some private headers
--IGNORE_HFILES = \
--	gallocator.h		\
--	gdatasetprivate.h	\
--	glibintl.h		\
--	gbsearcharray.h		\
--	glib-private.h		\
--	gmoduleconf.h		\
--	gthreadprivate.h	\
--	gunibreak.h		\
--	gunicomp.h		\
--	gunidecomp.h		\
--	gunichartables.h	\
--	glib_probes.h		\
--	glib_trace.h		\
--	libcharset.h		\
--	gdebug.h		\
--	gprintfint.h		\
--	gmirroringtable.h	\
--	gscripttable.h		\
--	glib-mirroring-tab	\
--	gnulib			\
--	pcre			\
--	update-pcre		\
--	gbytesprivate.h		\
--	gvariant-internal.h	\
--	gvariant-serialiser.h	\
--	gvariant-core.h		\
--	gvarianttypeinfo.h	\
--	gwakeup.h
--
--# Images to copy into HTML directory
--HTML_IMAGES =  				\
--	file-name-encodings.png		\
--	mainloop-states.gif
--
--# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
--content_files =				\
--	cross.xml			\
--	running.xml			\
--	building.xml			\
--	changes.xml			\
--	compiling.xml			\
--	programming.xml			\
--	resources.xml			\
--	regex-syntax.xml		\
--	version.xml			\
--	glib-gettextize.xml		\
--	gtester.xml			\
--	gtester-report.xml		\
--	gvariant-varargs.xml		\
--	gvariant-text.xml
--
--expand_content_files = 			\
--	compiling.xml
--
--# Extra options to supply to gtkdoc-fixref
--FIXXREF_OPTIONS=--extra-dir=$(srcdir)/../gobject/html --extra-dir=$(srcdir)/../gio/html
--
--# include common portion ...
--include $(top_srcdir)/gtk-doc.make
--
--# Other files to distribute
--EXTRA_DIST +=				\
--	file-name-encodings.png		\
--	file-name-encodings.sxd		\
--	mainloop-states.fig		\
--	mainloop-states.png		\
--	mainloop-states.eps		\
--	version.xml.in
--
--########################################################################
--
--man_MANS =
--
--if ENABLE_MAN
--
--man_MANS += \
--	glib-gettextize.1 	\
--	gtester.1		\
--	gtester-report.1
--
--XSLTPROC_FLAGS = \
--        --nonet \
--        --stringparam man.output.quietly 1 \
--        --stringparam funcsynopsis.style ansi \
--        --stringparam man.th.extra1.suppress 1 \
--        --stringparam man.authors.section.enabled 0 \
--        --stringparam man.copyright.section.enabled 0
--
--.xml.1:
--	$(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
--
--endif
--
--CLEANFILES ?=
--CLEANFILES += $(man_MANS)
--
--EXTRA_DIST += $(man_MANS)
--
--dist-hook-local: all-local
--
--glib-docs-clean: clean
--	cd $(srcdir) && rm -rf xml html
-diff -urN a/docs/reference/gobject/Makefile.am b/docs/reference/gobject/Makefile.am
---- a/docs/reference/gobject/Makefile.am	2013-06-10 00:03:17.000000000 +0200
-+++ b/docs/reference/gobject/Makefile.am	1970-01-01 01:00:00.000000000 +0100
-@@ -1,104 +0,0 @@
--## Process this file with automake to produce Makefile.in
--include $(top_srcdir)/Makefile.decl
--
--AUTOMAKE_OPTIONS = 1.6
--
--# The name of the module.
--DOC_MODULE=gobject
--
--# The top-level SGML file.
--DOC_MAIN_SGML_FILE=gobject-docs.xml
--
--# The directory containing the source code. Relative to $(srcdir)
--DOC_SOURCE_DIR=$(top_srcdir)/gobject
--
--# Extra options to supply to gtkdoc-scan
--SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" \
--             --ignore-decorators="G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT"
--
--# Extra options to supply to gtkdoc-mkdb
--MKDB_OPTIONS=--sgml-mode --output-format=xml --name-space=g
--
--# Used for dependencies
--HFILE_GLOB=$(top_srcdir)/gobject/*.h
--CFILE_GLOB=$(top_srcdir)/gobject/*.c
--
--# Headers to ignore
--IGNORE_HFILES = \
--	tests			\
--	gobject_trace.h		\
--	gtype-private.h		\
--	gatomicarray.h
--
--
--# CFLAGS and LDFLAGS for compiling scan program. Only needed
--# if $(DOC_MODULE).types is non-empty.
--AM_CPPFLAGS = 				\
--	-I$(srcdir) 			\
--	$(gobject_INCLUDES) 		\
--	$(GLIB_DEBUG_FLAGS)
--
--GTKDOC_LIBS = 					\
--	$(top_builddir)/glib/libglib-2.0.la	\
--	$(top_builddir)/gobject/libgobject-2.0.la
--
--# Images to copy into HTML directory
--HTML_IMAGES =  \
--	images/glue.png
--
--# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
--content_files = version.xml 		\
--		glib-mkenums.xml 	\
--		glib-genmarshal.xml	\
--		gobject-query.xml \
--		tut_gobject.xml \
--		tut_gsignal.xml \
--		tut_gtype.xml \
--		tut_howto.xml \
--		tut_intro.xml \
--		tut_tools.xml
--
--# Extra options to supply to gtkdoc-fixref
--FIXXREF_OPTIONS=--extra-dir=$(srcdir)/../glib/html
--
--include $(top_srcdir)/gtk-doc.make
--
--# Other files to distribute
--EXTRA_DIST += 		\
--	gobject.cI	\
--	version.xml.in
--
--########################################################################
--
--man_MANS =
--
--if ENABLE_MAN
--
--man_MANS += 			\
--	glib-mkenums.1 		\
--	glib-genmarshal.1 	\
--	gobject-query.1
--
--
--XSLTPROC_FLAGS = \
--        --nonet \
--        --stringparam man.output.quietly 1 \
--        --stringparam funcsynopsis.style ansi \
--        --stringparam man.th.extra1.suppress 1 \
--        --stringparam man.authors.section.enabled 0 \
--        --stringparam man.copyright.section.enabled 0
--
--.xml.1:
--	$(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
--
--endif
--
--CLEANFILES ?=
--CLEANFILES += $(man_MANS)
--
--EXTRA_DIST += $(man_MANS)
--
--dist-hook-local: all-local
--
--gobject-docs-clean: clean
--	cd $(srcdir) && rm -rf xml html
-diff -urN a/docs/reference/Makefile.am b/docs/reference/Makefile.am
---- a/docs/reference/Makefile.am	2013-06-10 00:03:17.000000000 +0200
-+++ b/docs/reference/Makefile.am	1970-01-01 01:00:00.000000000 +0100
-@@ -1,3 +0,0 @@
--include $(top_srcdir)/Makefile.decl
--
--SUBDIRS = glib gobject gio
-diff -urN a/Makefile.am b/Makefile.am
---- a/Makefile.am	2013-06-10 00:03:17.000000000 +0200
-+++ b/Makefile.am	2013-06-29 05:50:18.224749533 +0200
-@@ -6,7 +6,7 @@
- 
- ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
- 
--SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs
-+SUBDIRS = . m4macros glib gmodule gthread gobject gio po
- DIST_SUBDIRS = $(SUBDIRS) build
- if BUILD_MODULAR_TESTS
- SUBDIRS += tests 
-@@ -71,8 +71,7 @@
- 	README			\
- 	INSTALL			\
- 	ChangeLog		\
--	config.h.win32		\
--	gtk-doc.make
-+	config.h.win32
- 
- CONFIGURE_DEPENDENCIES = acglib.m4
- 
diff -r 393571034f24 -r 98e472249bef src/mingw-pango-1-fixes.patch
--- a/src/mingw-pango-1-fixes.patch	Tue Aug 09 16:50:32 2016 -0400
+++ b/src/mingw-pango-1-fixes.patch	Thu Aug 11 08:29:20 2016 +0900
@@ -1,176 +0,0 @@
-This file is part of MXE.
-See index.html for further information.
-
-From 6dc99b57932d52db33413b9f054ef8843f697ec0 Mon Sep 17 00:00:00 2001
-From: Mark Brand <mabrand@mabrand.nl>
-Date: Wed, 29 Sep 2010 00:52:59 +0200
-Subject: [PATCH 1/4] s,DllMain,static _disabled_DllMain,
-
-
-diff --git a/pango/pango-utils.c b/pango/pango-utils.c
-index 18ffa26..aac59ab 100644
---- a/pango/pango-utils.c
-+++ b/pango/pango-utils.c
-@@ -691,12 +691,12 @@ pango_config_key_get (const char *key)
- 
- #ifdef G_OS_WIN32
- 
--/* DllMain function needed to tuck away the DLL handle */
-+/* static _disabled_DllMain function needed to tuck away the DLL handle */
- 
- static HMODULE pango_dll; /* MT-safe */
- 
- BOOL WINAPI
--DllMain (HINSTANCE hinstDLL,
-+static _disabled_DllMain (HINSTANCE hinstDLL,
- 	 DWORD     fdwReason,
- 	 LPVOID    lpvReserved)
- {
--- 
-1.7.10.4
-
-
-From e5359406f68e5bb4bd5f1b9516f9d28f41e8b38e Mon Sep 17 00:00:00 2001
-From: Mark Brand <mabrand@mabrand.nl>
-Date: Wed, 29 Sep 2010 00:50:08 +0200
-Subject: [PATCH 2/4] add missing lib to pango.pc for static linking
-
-
-diff --git a/pango.pc.in b/pango.pc.in
-index 17a8b7a..16c5981 100644
---- a/pango.pc.in
-+++ b/pango.pc.in
-@@ -10,5 +10,5 @@ Description: Internationalized text handling
- Version: @VERSION@
- Requires: glib-2.0 gobject-2.0
- Requires.private: gmodule-no-export-2.0
--Libs: -L${libdir} -lpango-@PANGO_API_VERSION@ @PKGCONFIG_MATH_LIBS@
-+Libs: -L${libdir} -lpango-@PANGO_API_VERSION@ @PKGCONFIG_MATH_LIBS@ -lusp10
- Cflags: -I${includedir}/pango-1.0
--- 
-1.7.10.4
-
-
-From 8a4c71a44d76896fcdb610f50eaa07be3d108c3d Mon Sep 17 00:00:00 2001
-From: Mark Brand <mabrand@mabrand.nl>
-Date: Fri, 15 Jun 2012 16:21:40 +0200
-Subject: [PATCH 3/4] do not force shared for win32
-
-
-diff --git a/configure.in b/configure.in
-index a0e0057..fe1f7fe 100644
---- a/configure.in
-+++ b/configure.in
-@@ -142,20 +142,6 @@ AC_CHECK_HEADERS(unistd.h sys/mman.h)
- # Win32 stuff
- #
- 
--AC_LIBTOOL_WIN32_DLL
--AM_DISABLE_STATIC
--
--if test "$pango_os_win32" = "yes"; then
--  if test x$enable_static = xyes -o x$enable_static = x; then
--    AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
--    enable_static=no
--  fi
--  if test x$enable_shared = xno; then
--    AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
--  fi
--  enable_shared=yes
--fi
--
- AM_PROG_LIBTOOL
- dnl when using libtool 2.x create libtool early, because it's used in configure
- m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
-diff --git a/modules/Makefile.am b/modules/Makefile.am
-index 73b42f4..19c5a4f 100644
---- a/modules/Makefile.am
-+++ b/modules/Makefile.am
-@@ -21,22 +21,7 @@ RUN_QUERY_MODULES_TEST=true
- all-local: pango.modules
- endif
- 
--install-data-local: $(top_builddir)/pango/pango-querymodules$(EXEEXT)
--	@if $(RUN_QUERY_MODULES_TEST) && test -z "$(DESTDIR)" ; then 	\
--	  echo $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/pango \&\& 	\
--	  $(top_builddir)/pango/pango-querymodules$(EXEEXT) 		\
--		\> $(DESTDIR)$(sysconfdir)/pango/pango.modules ;	\
--	  $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/pango && 		\
--	  $(top_builddir)/pango/pango-querymodules$(EXEEXT) 		\
--		> $(DESTDIR)$(sysconfdir)/pango/pango.modules ;		\
--	else								\
--	  echo "***" ; 							\
--	  echo "*** Warning: $(sysconfdir)/pango/pango.modules" ; 	\
--	  echo "*** not created" ; 					\
--	  echo "*** Generate this file on the target system" ; 		\
--	  echo "*** using pango-querymodules" ; 			\
--	  echo "***" ; 							\
--	fi
-+install-data-local:
- 
- uninstall-local:
- 	$(RM) $(DESTDIR)$(sysconfdir)/pango/pango.modules
--- 
-1.7.10.4
-
-
-From ed84a78833202e38407f47e1fcd28fa8e612d536 Mon Sep 17 00:00:00 2001
-From: Mark Brand <mabrand@mabrand.nl>
-Date: Mon, 18 Jun 2012 21:36:53 +0200
-Subject: [PATCH 4/4] kill gtk-doc (MXE specific)
-
-
-diff --git a/Makefile.am b/Makefile.am
-index 1ac018a..1999723 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,6 +1,6 @@
- ## Process this file with automake to create Makefile.in.
- 
--SUBDIRS= pango modules pango-view examples docs tools tests build
-+SUBDIRS= pango modules pango-view examples tools tests build
- 
- EXTRA_DIST = 			\
- 	autogen.sh		\
-diff --git a/autogen.sh b/autogen.sh
-index bc7c59c..4e1918c 100755
---- a/autogen.sh
-+++ b/autogen.sh
-@@ -7,14 +7,6 @@ test -n "$srcdir" || srcdir=.
- olddir=`pwd`
- cd "$srcdir"
- 
--GTKDOCIZE=`which gtkdocize`
--if test -z $GTKDOCIZE; then
--	echo "*** No GTK-Doc found, please install it ***"
--	exit 1
--else
--	gtkdocize || exit $?
--fi
--
- AUTORECONF=`which autoreconf`
- if test -z $AUTORECONF; then
- 	echo "*** No autoreconf found, please install it ***"
-diff --git a/configure.in b/configure.in
-index fe1f7fe..23c4311 100644
---- a/configure.in
-+++ b/configure.in
-@@ -568,14 +568,7 @@ dnl **************************
- dnl *** Checks for gtk-doc ***
- dnl **************************
- 
--if $have_cairo ; then : ; else
--   if  test x$enable_gtk_doc = xyes ; then
--      AC_MSG_WARN([Cairo not present, disabling doc building])      
--      enable_gtk_doc=no
--   fi
--fi
--
--GTK_DOC_CHECK([1.0])
-+enable_gtk_doc=no
- 
- AC_ARG_ENABLE(man,
-               AC_HELP_STRING([--enable-man],
--- 
-1.7.10.4
-
diff -r 393571034f24 -r 98e472249bef src/pango.mk
--- a/src/pango.mk	Tue Aug 09 16:50:32 2016 -0400
+++ b/src/pango.mk	Thu Aug 11 08:29:20 2016 +0900
@@ -3,12 +3,12 @@
 
 PKG             := pango
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 1.34.1
-$(PKG)_CHECKSUM := a6c224424eb3f0dcc231a8000591c05a85df689c
+$(PKG)_VERSION  := 1.40.1
+$(PKG)_CHECKSUM := 4021b704c2da2ca5ebfc51c714053b7e1907282c
 $(PKG)_SUBDIR   := pango-$($(PKG)_VERSION)
 $(PKG)_FILE     := pango-$($(PKG)_VERSION).tar.xz
 $(PKG)_URL      := http://ftp.gnome.org/pub/gnome/sources/pango/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE)
-$(PKG)_DEPS     := fontconfig freetype cairo glib harfbuzz
+$(PKG)_DEPS     := fontconfig freetype cairo glib
 
 define $(PKG)_UPDATE
     $(WGET) -q -O- 'http://git.gnome.org/browse/pango/refs/tags' | \
@@ -18,16 +18,11 @@
 endef
 
 define $(PKG)_BUILD
-    if [ $(MXE_SYSTEM) = mingw ]; then \
-        rm '$(1)'/docs/Makefile.am && \
-        cd '$(1)' && NOCONFIGURE=1 ./autogen.sh; \
-    fi
     cd '$(1)' && ./configure \
         $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
         $(ENABLE_SHARED_OR_STATIC) \
         --prefix='$(HOST_PREFIX)' \
         --disable-gtk-doc \
-        --without-x \
         --enable-explicit-deps \
         --with-included-modules \
         --without-dynamic-modules \
diff -r 393571034f24 -r 98e472249bef src/pixman.mk
--- a/src/pixman.mk	Tue Aug 09 16:50:32 2016 -0400
+++ b/src/pixman.mk	Thu Aug 11 08:29:20 2016 +0900
@@ -3,8 +3,8 @@
 
 PKG             := pixman
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 0.30.0
-$(PKG)_CHECKSUM := 9c25dd0efa2023216e82033b71fcfe1bae9ebaac
+$(PKG)_VERSION  := 0.34.0
+$(PKG)_CHECKSUM := a1b1683c1a55acce9d928fea1ab6ceb79142ddc7
 $(PKG)_SUBDIR   := pixman-$($(PKG)_VERSION)
 $(PKG)_FILE     := pixman-$($(PKG)_VERSION).tar.gz
 $(PKG)_URL      := http://cairographics.org/snapshots/$($(PKG)_FILE)
@@ -21,7 +21,6 @@
     cd '$(1)' && ./configure \
         $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
         $(ENABLE_SHARED_OR_STATIC) \
-        --prefix='$(HOST_PREFIX)' \
-        && $(CONFIGURE_POST_HOOK)
+        --prefix='$(HOST_PREFIX)' 
     $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
 endef
