+- cd '$(1)' && ./configure \
++ cd '$(1)' && autoreconf -i && ./configure \
+ $(MXE_CONFIGURE_OPTS) \
+ CFLAGS=-D_WIN32_WINNT=0x0500
+ $(MAKE) -C '$(1)' -j '$(JOBS)' install
+diff --git a/src/libusb1-1-fixes.patch b/src/libusb1-1-fixes.patch
+new file mode 100644
+index 00000000..6cdeb0c4
+--- /dev/null
++++ b/src/libusb1-1-fixes.patch
+@@ -0,0 +1,31 @@
++From d4f7a49d77bd8f4ac871a999fc9ec898cb22b8c3 Mon Sep 17 00:00:00 2001
++From: Vlad Ivanov <vlad-mbx@ya.ru>
++Date: Tue, 9 Feb 2016 10:35:23 +0300
++Subject: [PATCH] windows_usb: enable RAW_IO policy by default
++
++libusb should set RAW_IO policy unconditionally because it
++implements the buffer management itself.
++
++Signed-off-by: Vlad Ivanov <vlad-mbx@ya.ru>
++---
++ libusb/os/windows_usb.c | 4 ++++
++ 1 file changed, 4 insertions(+)
++
++diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c
++index 6640ad5..12fdab0 100644
++--- a/libusb/os/windows_usb.c
+++++ b/libusb/os/windows_usb.c
++@@ -2890,6 +2890,10 @@ static int winusbx_configure_endpoints(int sub_api, struct libusb_device_handle
++ AUTO_CLEAR_STALL, sizeof(UCHAR), &policy)) {
++ usbi_dbg("failed to enable AUTO_CLEAR_STALL for endpoint %02X", endpoint_address);
++ }
+++ if (!WinUSBX[sub_api].SetPipePolicy(winusb_handle, endpoint_address,
+++ RAW_IO, sizeof(UCHAR), &policy)) {
+++ usbi_dbg("failed to enable RAW_IO for endpoint %02X", endpoint_address);
+++ }
++ }
++
++ return LIBUSB_SUCCESS;
++--
++2.5.0
++
+diff --git a/src/glib-1-fixes.patch b/src/glib-1-fixes.patch
+index 764ece9e..428cc6a9 100644
+--- a/src/glib-1-fixes.patch
++++ b/src/glib-1-fixes.patch
+@@ -5,7 +5,7 @@ Contains ad hoc patches for cross building.
+ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+ From: Mark Brand <mabrand@mabrand.nl>
+ Date: Thu, 23 Sep 2010 21:42:46 +0200
+-Subject: [PATCH 01/10] fix tool paths
++Subject: [PATCH] fix tool paths
+
+
+ diff --git a/glib-2.0.pc.in b/glib-2.0.pc.in
+@@ -29,17 +29,14 @@ index 1111111..2222222 100644
+ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+ From: Hans Petter Jansson <hpj@cl.no>
+ Date: Fri, 15 Jun 2012 15:25:01 +0200
+-Subject: [PATCH 02/10] Avoid DllMain symbol conflict when linking statically
++Subject: [PATCH] Avoid DllMain symbol conflict when linking statically
+
+-Adjusted by Boris Nagaev on 29-Jan-2017 to fix
+-https://gist.github.com/starius/f4fc85939352cb50122ba29e0f5b140d
+-when updating to glib-2.50.2.
+
+ diff --git a/gio/giomodule.c b/gio/giomodule.c
+ index 1111111..2222222 100644
+ --- a/gio/giomodule.c
+ +++ b/gio/giomodule.c
+-@@ -928,14 +928,12 @@ extern GType g_cocoa_notification_backend_get_type (void);
++@@ -918,14 +918,12 @@ extern GType g_gtk_notification_backend_get_type (void);
+
+ static HMODULE gio_dll = NULL;
+
+@@ -56,7 +53,7 @@ index 1111111..2222222 100644
+ DWORD fdwReason,
+ LPVOID lpvReserved)
+ {
+-@@ -945,8 +943,6 @@ DllMain (HINSTANCE hinstDLL,
++@@ -935,8 +933,6 @@ DllMain (HINSTANCE hinstDLL,
+ return TRUE;
+ }
+
+@@ -69,7 +66,7 @@ diff --git a/glib/glib-init.c b/glib/glib-init.c
+ index 1111111..2222222 100644
+ --- a/glib/glib-init.c
+ +++ b/glib/glib-init.c
+-@@ -245,14 +245,14 @@ glib_init (void)
++@@ -237,14 +237,14 @@ glib_init (void)
+
+ #if defined (G_OS_WIN32)
+
+@@ -86,31 +83,18 @@ index 1111111..2222222 100644
+ DWORD fdwReason,
+ LPVOID lpvReserved)
+ {
+-diff --git a/gobject/gtype.c b/gobject/gtype.c
+-index 1111111..2222222 100644
+---- a/gobject/gtype.c
+-+++ b/gobject/gtype.c
+-@@ -4450,7 +4450,7 @@ gobject_init (void)
+- _g_signal_init ();
+- }
+-
+--#if defined (G_OS_WIN32)
+-+#if 0
+-
+- BOOL WINAPI DllMain (HINSTANCE hinstDLL,
+- DWORD fdwReason,
+
+ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+ From: Hans Petter Jansson <hpj@cl.no>
+ Date: Fri, 15 Jun 2012 15:27:22 +0200
+-Subject: [PATCH 03/10] Allow building without inotify support
++Subject: [PATCH] Allow building without inotify support
+
+
+ diff --git a/configure.ac b/configure.ac
+ index 1111111..2222222 100644
+ --- a/configure.ac
+ +++ b/configure.ac
+-@@ -1599,10 +1599,16 @@ dnl *****************************
++@@ -1659,10 +1659,16 @@ dnl *****************************
+ dnl ** Check for inotify (GIO) **
+ dnl *****************************
+ inotify_support=no
+@@ -131,7 +115,7 @@ index 1111111..2222222 100644
+ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+ From: Hans Petter Jansson <hpj@cl.no>
+ Date: Fri, 15 Jun 2012 15:28:14 +0200
+-Subject: [PATCH 04/10] Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF.
++Subject: [PATCH] Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF.
+ Backported from upstream
+
+
+@@ -139,7 +123,7 @@ diff --git a/configure.ac b/configure.ac
+ index 1111111..2222222 100644
+ --- a/configure.ac
+ +++ b/configure.ac
+-@@ -511,6 +511,8 @@ LT_INIT([disable-static win32-dll])
++@@ -499,6 +499,8 @@ LT_INIT([disable-static win32-dll])
+ dnl when using libtool 2.x create libtool early, because it's used in configure
+ m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
+
+@@ -152,7 +136,7 @@ index 1111111..2222222 100644
+ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+ From: Hans Petter Jansson <hpj@cl.no>
+ Date: Fri, 15 Jun 2012 15:29:06 +0200
+-Subject: [PATCH 05/10] Link with dnsapi
++Subject: [PATCH] Link with dnsapi
+
+
+ diff --git a/gio-2.0.pc.in b/gio-2.0.pc.in
+@@ -171,15 +155,15 @@ index 1111111..2222222 100644
+ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+ From: Hans Petter Jansson <hpj@cl.no>
+ Date: Fri, 15 Jun 2012 15:29:38 +0200
+-Subject: [PATCH 06/10] Ensure globals are initialized even when DllMain is not
+- being run
++Subject: [PATCH] Ensure globals are initialized even when DllMain is not being
++ run
+
+
+ diff --git a/glib/gmain.c b/glib/gmain.c
+ index 1111111..2222222 100644
+ --- a/glib/gmain.c
+ +++ b/glib/gmain.c
+-@@ -2657,12 +2657,15 @@ g_get_real_time (void)
++@@ -2577,12 +2577,15 @@ g_get_real_time (void)
+ #if defined (G_OS_WIN32)
+ static ULONGLONG (*g_GetTickCount64) (void) = NULL;
+ static guint32 g_win32_tick_epoch = 0;
+@@ -195,7 +179,7 @@ index 1111111..2222222 100644
+ g_GetTickCount64 = NULL;
+ kernel32 = GetModuleHandle ("KERNEL32.DLL");
+ if (kernel32 != NULL)
+-@@ -2721,6 +2724,9 @@ g_get_monotonic_time (void)
++@@ -2641,6 +2644,9 @@ g_get_monotonic_time (void)
+ * timeBeginPeriod() to increase it as much as they want
+ */
+
+@@ -535,7 +519,7 @@ index 1111111..2222222 100644
+ win32_check_for_error (WAIT_FAILED != WaitForSingleObject (wt->handle, INFINITE));
+ }
+
+-@@ -1041,6 +1145,8 @@ g_thread_lookup_native_funcs (void)
++@@ -984,6 +1088,8 @@ g_thread_lookup_native_funcs (void)
+ void
+ g_thread_win32_init (void)
+ {
+@@ -548,7 +532,7 @@ index 1111111..2222222 100644
+ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+ From: Gerardo Ballabio <gerardo.ballabio@gmail.com>
+ Date: Sun, 16 Aug 2015 13:18:24 +0200
+-Subject: [PATCH 07/10] Remove an annoying runtime warning
++Subject: [PATCH] Remove an annoying runtime warning
+
+ that pops up when using GtkApplication in Gtk+ 3 programs.
+
+@@ -556,7 +540,7 @@ diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
+ index 1111111..2222222 100644
+ --- a/gio/gdbusaddress.c
+ +++ b/gio/gdbusaddress.c
+-@@ -1387,6 +1387,7 @@ __declspec(dllexport) void CALLBACK g_win32_run_session_bus (HWND hwnd, HINSTANC
++@@ -1325,6 +1325,7 @@ __declspec(dllexport) void CALLBACK g_win32_run_session_bus (HWND hwnd, HINSTANC
+ __declspec(dllexport) void CALLBACK
+ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow)
+ {
+@@ -564,7 +548,7 @@ index 1111111..2222222 100644
+ GDBusDaemon *daemon;
+ GMainLoop *loop;
+ const char *address;
+-@@ -1418,6 +1419,7 @@ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow
++@@ -1354,6 +1355,7 @@ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow
+
+ g_main_loop_unref (loop);
+ g_object_unref (daemon);
+@@ -576,7 +560,7 @@ index 1111111..2222222 100644
+ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+ From: aquiles2k <aj@elane2k.com>
+ Date: Wed, 6 Apr 2016 22:39:53 +0300
+-Subject: [PATCH 08/10] fix error "won't overwrite defined macro" on OSX
++Subject: [PATCH] fix error "won't overwrite defined macro" on OSX
+
+ See https://github.com/mxe/mxe/issues/1281
+
+@@ -596,110 +580,22 @@ index 1111111..2222222 100644
+ dnl At the end, if we're not within glib, we'll define the public
+ dnl definitions in terms of our private definitions.
+
+-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+-From: Tony Theodore <tonyt@logyst.com>
+-Date: Mon, 26 Feb 2018 16:09:53 +1100
+-Subject: [PATCH 09/10] darwin: disable g_cocoa_notification_backend
+
++From: Boris Pek <tehnick-8@mail.ru>
++Date: Thu, 28 Apr 2016 16:48:12 +0300
++Subject: [PATCH] fix build with GCC >= 6.x