sigrok-cross-mingw: move libusb1 manipulation out of "MXE fixes"
[sigrok-util.git] / cross-compile / mingw / mxe_fixes.patch
blob72a4dd00219623c32079aa6d30df580e37307c3d
1 These patches are currently required to get a properly working
2 MXE setup for sigrok usage.
4 - We're reverting to glib 2.44.1 for now since more recent
5 versions (e.g. 2.50.2) seem to have a bug. Details:
6 https://sigrok.org/bugzilla/show_bug.cgi?id=1232
7 https://github.com/mxe/mxe/issues/2168
9 - We're patching glib to fix various MinGW compiler warnings. Details:
10 https://sigrok.org/bugzilla/show_bug.cgi?id=986
11 https://gitlab.gnome.org/GNOME/glib/commit/3d7cde654c4c6f3bdad32f5521f28f5802a7c377
13 - Bump MXE's binutils to version 2.35, which added -mbig-obj support
14 for 32bit Windows (64bit was supported already). Required for PulseView.
16 See the other file for a libusb discussion.
18 diff --git a/src/binutils-1-fixes.patch b/src/binutils-1-fixes.patch
19 deleted file mode 100644
20 index 357428fe..00000000
21 --- a/src/binutils-1-fixes.patch
22 +++ /dev/null
23 @@ -1,147 +0,0 @@
24 -This file is part of MXE. See LICENSE.md for licensing information.
26 -Contains ad hoc patches for cross building.
28 -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
29 -From: Stephen Kitt <skitt@debian.org>
30 -Date: Sat, 15 Jul 2017 00:09:40 +1000
31 -Subject: [PATCH 1/1] Allow the PE timestamp to be specified with
32 - SOURCE_DATE_EPOCH
34 -Taken from:
35 -https://sources.debian.net/patches/binutils-mingw-w64/7.4/specify-timestamp.patch/
37 -diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
38 -index 1111111..2222222 100644
39 ---- a/bfd/peXXigen.c
40 -+++ b/bfd/peXXigen.c
41 -@@ -70,6 +70,9 @@
42 - #include <wctype.h>
43 - #endif
45 -+#include <errno.h>
46 -+#include <limits.h>
48 - /* NOTE: it's strange to be including an architecture specific header
49 - in what's supposed to be general (to PE/PEI) code. However, that's
50 - where the definitions are, and they don't vary per architecture
51 -@@ -878,10 +881,38 @@ _bfd_XXi_only_swap_filehdr_out (bfd * abfd, void * in, void * out)
52 - H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
54 - /* Only use a real timestamp if the option was chosen. */
55 -- if ((pe_data (abfd)->insert_timestamp))
56 -- H_PUT_32 (abfd, time (0), filehdr_out->f_timdat);
57 -- else
58 -+ if (pe_data (abfd)->insert_timestamp) {
59 -+ time_t now;
60 -+ char *source_date_epoch;
61 -+ unsigned long long epoch;
62 -+ char *endptr;
64 -+ now = time(NULL);
65 -+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
66 -+ if (source_date_epoch) {
67 -+ errno = 0;
68 -+ epoch = strtoull(source_date_epoch, &endptr, 10);
69 -+ if ((errno == ERANGE && (epoch == ULLONG_MAX || epoch == 0))
70 -+ || (errno != 0 && epoch == 0)) {
71 -+ _bfd_error_handler("Environment variable $SOURCE_DATE_EPOCH: strtoull: %s\n",
72 -+ strerror(errno));
73 -+ } else if (endptr == source_date_epoch) {
74 -+ _bfd_error_handler("Environment variable $SOURCE_DATE_EPOCH: No digits were found: %s\n",
75 -+ endptr);
76 -+ } else if (*endptr != '\0') {
77 -+ _bfd_error_handler("Environment variable $SOURCE_DATE_EPOCH: Trailing garbage: %s\n",
78 -+ endptr);
79 -+ } else if (epoch > ULONG_MAX) {
80 -+ _bfd_error_handler("Environment variable $SOURCE_DATE_EPOCH: value must be smaller than or equal to: %lu but was found to be: %llu\n",
81 -+ ULONG_MAX, epoch);
82 -+ } else {
83 -+ now = epoch;
84 -+ }
85 -+ }
86 -+ H_PUT_32 (abfd, now, filehdr_out->f_timdat);
87 -+ } else {
88 - H_PUT_32 (abfd, 0, filehdr_out->f_timdat);
89 -+ }
91 - PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr,
92 - filehdr_out->f_symptr);
93 -diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
94 -index 1111111..2222222 100644
95 ---- a/ld/emultempl/pe.em
96 -+++ b/ld/emultempl/pe.em
97 -@@ -305,7 +305,7 @@ gld${EMULATION_NAME}_add_options
98 - OPTION_USE_NUL_PREFIXED_IMPORT_TABLES},
99 - {"no-leading-underscore", no_argument, NULL, OPTION_NO_LEADING_UNDERSCORE},
100 - {"leading-underscore", no_argument, NULL, OPTION_LEADING_UNDERSCORE},
101 -- {"insert-timestamp", no_argument, NULL, OPTION_INSERT_TIMESTAMP},
102 -+ {"insert-timestamp", optional_argument, NULL, OPTION_INSERT_TIMESTAMP},
103 - {"no-insert-timestamp", no_argument, NULL, OPTION_NO_INSERT_TIMESTAMP},
104 - #ifdef DLL_SUPPORT
105 - /* getopt allows abbreviations, so we do this to stop it
106 -diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
107 -index 1111111..2222222 100644
108 ---- a/ld/emultempl/pep.em
109 -+++ b/ld/emultempl/pep.em
110 -@@ -321,7 +321,7 @@ gld${EMULATION_NAME}_add_options
111 - {"no-bind", no_argument, NULL, OPTION_NO_BIND},
112 - {"wdmdriver", no_argument, NULL, OPTION_WDM_DRIVER},
113 - {"tsaware", no_argument, NULL, OPTION_TERMINAL_SERVER_AWARE},
114 -- {"insert-timestamp", no_argument, NULL, OPTION_INSERT_TIMESTAMP},
115 -+ {"insert-timestamp", optional_argument, NULL, OPTION_INSERT_TIMESTAMP},
116 - {"no-insert-timestamp", no_argument, NULL, OPTION_NO_INSERT_TIMESTAMP},
117 - {"build-id", optional_argument, NULL, OPTION_BUILD_ID},
118 - {NULL, no_argument, NULL, 0}
119 -diff --git a/ld/pe-dll.c b/ld/pe-dll.c
120 -index 1111111..2222222 100644
121 ---- a/ld/pe-dll.c
122 -+++ b/ld/pe-dll.c
123 -@@ -26,6 +26,8 @@
124 - #include "filenames.h"
125 - #include "safe-ctype.h"
127 -+#include <errno.h>
128 -+#include <limits.h>
129 - #include <time.h>
131 - #include "ld.h"
132 -@@ -1192,8 +1194,36 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
134 - memset (edata_d, 0, edata_sz);
136 -- if (pe_data (abfd)->insert_timestamp)
137 -- H_PUT_32 (abfd, time (0), edata_d + 4);
138 -+ if (pe_data (abfd)->insert_timestamp) {
139 -+ time_t now;
140 -+ char *source_date_epoch;
141 -+ unsigned long long epoch;
142 -+ char *endptr;
144 -+ now = time(NULL);
145 -+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
146 -+ if (source_date_epoch) {
147 -+ errno = 0;
148 -+ epoch = strtoull(source_date_epoch, &endptr, 10);
149 -+ if ((errno == ERANGE && (epoch == ULLONG_MAX || epoch == 0))
150 -+ || (errno != 0 && epoch == 0)) {
151 -+ einfo("Environment variable $SOURCE_DATE_EPOCH: strtoull: %s\n",
152 -+ strerror(errno));
153 -+ } else if (endptr == source_date_epoch) {
154 -+ einfo("Environment variable $SOURCE_DATE_EPOCH: No digits were found: %s\n",
155 -+ endptr);
156 -+ } else if (*endptr != '\0') {
157 -+ einfo("Environment variable $SOURCE_DATE_EPOCH: Trailing garbage: %s\n",
158 -+ endptr);
159 -+ } else if (epoch > ULONG_MAX) {
160 -+ einfo("Environment variable $SOURCE_DATE_EPOCH: value must be smaller than or equal to: %lu but was found to be: %llu\n",
161 -+ ULONG_MAX, epoch);
162 -+ } else {
163 -+ now = epoch;
164 -+ }
165 -+ }
166 -+ H_PUT_32 (abfd, now, edata_d + 4);
167 -+ }
169 - if (pe_def_file->version_major != -1)
171 diff --git a/src/binutils.mk b/src/binutils.mk
172 index 9721b581..8eab8bf3 100644
173 --- a/src/binutils.mk
174 +++ b/src/binutils.mk
175 @@ -3,8 +3,8 @@
176 PKG := binutils
177 $(PKG)_WEBSITE := https://www.gnu.org/software/binutils/
178 $(PKG)_DESCR := GNU Binutils
179 -$(PKG)_VERSION := 2.28
180 -$(PKG)_CHECKSUM := 6297433ee120b11b4b0a1c8f3512d7d73501753142ab9e2daa13c5a3edd32a72
181 +$(PKG)_VERSION := 2.35
182 +$(PKG)_CHECKSUM := 7d24660f87093670738e58bcc7b7b06f121c0fcb0ca8fc44368d675a5ef9cff7
183 $(PKG)_SUBDIR := binutils-$($(PKG)_VERSION)
184 $(PKG)_FILE := binutils-$($(PKG)_VERSION).tar.bz2
185 $(PKG)_URL := https://ftp.gnu.org/gnu/binutils/$($(PKG)_FILE)
186 diff --git a/src/glib-1-fixes.patch b/src/glib-1-fixes.patch
187 index 764ece9e..428cc6a9 100644
188 --- a/src/glib-1-fixes.patch
189 +++ b/src/glib-1-fixes.patch
190 @@ -5,7 +5,7 @@ Contains ad hoc patches for cross building.
191 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
192 From: Mark Brand <mabrand@mabrand.nl>
193 Date: Thu, 23 Sep 2010 21:42:46 +0200
194 -Subject: [PATCH 01/10] fix tool paths
195 +Subject: [PATCH] fix tool paths
198 diff --git a/glib-2.0.pc.in b/glib-2.0.pc.in
199 @@ -29,17 +29,14 @@ index 1111111..2222222 100644
200 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
201 From: Hans Petter Jansson <hpj@cl.no>
202 Date: Fri, 15 Jun 2012 15:25:01 +0200
203 -Subject: [PATCH 02/10] Avoid DllMain symbol conflict when linking statically
204 +Subject: [PATCH] Avoid DllMain symbol conflict when linking statically
206 -Adjusted by Boris Nagaev on 29-Jan-2017 to fix
207 -https://gist.github.com/starius/f4fc85939352cb50122ba29e0f5b140d
208 -when updating to glib-2.50.2.
210 diff --git a/gio/giomodule.c b/gio/giomodule.c
211 index 1111111..2222222 100644
212 --- a/gio/giomodule.c
213 +++ b/gio/giomodule.c
214 -@@ -928,14 +928,12 @@ extern GType g_cocoa_notification_backend_get_type (void);
215 +@@ -918,14 +918,12 @@ extern GType g_gtk_notification_backend_get_type (void);
217 static HMODULE gio_dll = NULL;
219 @@ -56,7 +53,7 @@ index 1111111..2222222 100644
220 DWORD fdwReason,
221 LPVOID lpvReserved)
223 -@@ -945,8 +943,6 @@ DllMain (HINSTANCE hinstDLL,
224 +@@ -935,8 +933,6 @@ DllMain (HINSTANCE hinstDLL,
225 return TRUE;
228 @@ -69,7 +66,7 @@ diff --git a/glib/glib-init.c b/glib/glib-init.c
229 index 1111111..2222222 100644
230 --- a/glib/glib-init.c
231 +++ b/glib/glib-init.c
232 -@@ -245,14 +245,14 @@ glib_init (void)
233 +@@ -237,14 +237,14 @@ glib_init (void)
235 #if defined (G_OS_WIN32)
237 @@ -86,31 +83,18 @@ index 1111111..2222222 100644
238 DWORD fdwReason,
239 LPVOID lpvReserved)
241 -diff --git a/gobject/gtype.c b/gobject/gtype.c
242 -index 1111111..2222222 100644
243 ---- a/gobject/gtype.c
244 -+++ b/gobject/gtype.c
245 -@@ -4450,7 +4450,7 @@ gobject_init (void)
246 - _g_signal_init ();
249 --#if defined (G_OS_WIN32)
250 -+#if 0
252 - BOOL WINAPI DllMain (HINSTANCE hinstDLL,
253 - DWORD fdwReason,
255 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
256 From: Hans Petter Jansson <hpj@cl.no>
257 Date: Fri, 15 Jun 2012 15:27:22 +0200
258 -Subject: [PATCH 03/10] Allow building without inotify support
259 +Subject: [PATCH] Allow building without inotify support
262 diff --git a/configure.ac b/configure.ac
263 index 1111111..2222222 100644
264 --- a/configure.ac
265 +++ b/configure.ac
266 -@@ -1599,10 +1599,16 @@ dnl *****************************
267 +@@ -1659,10 +1659,16 @@ dnl *****************************
268 dnl ** Check for inotify (GIO) **
269 dnl *****************************
270 inotify_support=no
271 @@ -131,7 +115,7 @@ index 1111111..2222222 100644
272 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
273 From: Hans Petter Jansson <hpj@cl.no>
274 Date: Fri, 15 Jun 2012 15:28:14 +0200
275 -Subject: [PATCH 04/10] Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF.
276 +Subject: [PATCH] Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF.
277 Backported from upstream
280 @@ -139,7 +123,7 @@ diff --git a/configure.ac b/configure.ac
281 index 1111111..2222222 100644
282 --- a/configure.ac
283 +++ b/configure.ac
284 -@@ -511,6 +511,8 @@ LT_INIT([disable-static win32-dll])
285 +@@ -499,6 +499,8 @@ LT_INIT([disable-static win32-dll])
286 dnl when using libtool 2.x create libtool early, because it's used in configure
287 m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
289 @@ -152,7 +136,7 @@ index 1111111..2222222 100644
290 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
291 From: Hans Petter Jansson <hpj@cl.no>
292 Date: Fri, 15 Jun 2012 15:29:06 +0200
293 -Subject: [PATCH 05/10] Link with dnsapi
294 +Subject: [PATCH] Link with dnsapi
297 diff --git a/gio-2.0.pc.in b/gio-2.0.pc.in
298 @@ -171,15 +155,15 @@ index 1111111..2222222 100644
299 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
300 From: Hans Petter Jansson <hpj@cl.no>
301 Date: Fri, 15 Jun 2012 15:29:38 +0200
302 -Subject: [PATCH 06/10] Ensure globals are initialized even when DllMain is not
303 - being run
304 +Subject: [PATCH] Ensure globals are initialized even when DllMain is not being
305 + run
308 diff --git a/glib/gmain.c b/glib/gmain.c
309 index 1111111..2222222 100644
310 --- a/glib/gmain.c
311 +++ b/glib/gmain.c
312 -@@ -2657,12 +2657,15 @@ g_get_real_time (void)
313 +@@ -2577,12 +2577,15 @@ g_get_real_time (void)
314 #if defined (G_OS_WIN32)
315 static ULONGLONG (*g_GetTickCount64) (void) = NULL;
316 static guint32 g_win32_tick_epoch = 0;
317 @@ -195,7 +179,7 @@ index 1111111..2222222 100644
318 g_GetTickCount64 = NULL;
319 kernel32 = GetModuleHandle ("KERNEL32.DLL");
320 if (kernel32 != NULL)
321 -@@ -2721,6 +2724,9 @@ g_get_monotonic_time (void)
322 +@@ -2641,6 +2644,9 @@ g_get_monotonic_time (void)
323 * timeBeginPeriod() to increase it as much as they want
326 @@ -535,7 +519,7 @@ index 1111111..2222222 100644
327 win32_check_for_error (WAIT_FAILED != WaitForSingleObject (wt->handle, INFINITE));
330 -@@ -1041,6 +1145,8 @@ g_thread_lookup_native_funcs (void)
331 +@@ -984,6 +1088,8 @@ g_thread_lookup_native_funcs (void)
332 void
333 g_thread_win32_init (void)
335 @@ -548,7 +532,7 @@ index 1111111..2222222 100644
336 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
337 From: Gerardo Ballabio <gerardo.ballabio@gmail.com>
338 Date: Sun, 16 Aug 2015 13:18:24 +0200
339 -Subject: [PATCH 07/10] Remove an annoying runtime warning
340 +Subject: [PATCH] Remove an annoying runtime warning
342 that pops up when using GtkApplication in Gtk+ 3 programs.
344 @@ -556,7 +540,7 @@ diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
345 index 1111111..2222222 100644
346 --- a/gio/gdbusaddress.c
347 +++ b/gio/gdbusaddress.c
348 -@@ -1387,6 +1387,7 @@ __declspec(dllexport) void CALLBACK g_win32_run_session_bus (HWND hwnd, HINSTANC
349 +@@ -1325,6 +1325,7 @@ __declspec(dllexport) void CALLBACK g_win32_run_session_bus (HWND hwnd, HINSTANC
350 __declspec(dllexport) void CALLBACK
351 g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow)
353 @@ -564,7 +548,7 @@ index 1111111..2222222 100644
354 GDBusDaemon *daemon;
355 GMainLoop *loop;
356 const char *address;
357 -@@ -1418,6 +1419,7 @@ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow
358 +@@ -1354,6 +1355,7 @@ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow
360 g_main_loop_unref (loop);
361 g_object_unref (daemon);
362 @@ -576,7 +560,7 @@ index 1111111..2222222 100644
363 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
364 From: aquiles2k <aj@elane2k.com>
365 Date: Wed, 6 Apr 2016 22:39:53 +0300
366 -Subject: [PATCH 08/10] fix error "won't overwrite defined macro" on OSX
367 +Subject: [PATCH] fix error "won't overwrite defined macro" on OSX
369 See https://github.com/mxe/mxe/issues/1281
371 @@ -596,110 +580,22 @@ index 1111111..2222222 100644
372 dnl At the end, if we're not within glib, we'll define the public
373 dnl definitions in terms of our private definitions.
375 -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
376 -From: Tony Theodore <tonyt@logyst.com>
377 -Date: Mon, 26 Feb 2018 16:09:53 +1100
378 -Subject: [PATCH 09/10] darwin: disable g_cocoa_notification_backend
380 +From: Boris Pek <tehnick-8@mail.ru>
381 +Date: Thu, 28 Apr 2016 16:48:12 +0300
382 +Subject: [PATCH] fix build with GCC >= 6.x
384 -diff --git a/gio/Makefile.am b/gio/Makefile.am
385 -index 1111111..2222222 100644
386 ---- a/gio/Makefile.am
387 -+++ b/gio/Makefile.am
388 -@@ -279,10 +279,6 @@ unix_sources = \
390 - appinfo_sources += $(unix_appinfo_sources)
392 --if OS_COCOA
393 --unix_sources += gcocoanotificationbackend.c
394 --endif
396 - giounixincludedir=$(includedir)/gio-unix-2.0/gio
397 - giounixinclude_HEADERS = \
398 - gdesktopappinfo.h \
399 -diff --git a/gio/giomodule.c b/gio/giomodule.c
400 -index 1111111..2222222 100644
401 ---- a/gio/giomodule.c
402 -+++ b/gio/giomodule.c
403 -@@ -918,9 +918,6 @@ extern GType g_proxy_resolver_portal_get_type (void);
404 - extern GType g_network_monitor_portal_get_type (void);
405 - #endif
407 --#ifdef HAVE_COCOA
408 --extern GType g_cocoa_notification_backend_get_type (void);
409 --#endif
410 +See plugins/gcc6/README.md
412 +diff --git a/gio/gregistrysettingsbackend.c b/gio/gregistrysettingsbackend.c
413 +--- a/gio/gregistrysettingsbackend.c
414 ++++ b/gio/gregistrysettingsbackend.c
415 +@@ -228,7 +228,7 @@
416 + if (result_code == ERROR_KEY_DELETED)
417 + trace ("(%s)", win32_message);
418 + else
419 +- g_message (win32_message);
420 ++ g_message ("%s", win32_message);
421 + };
423 - #ifdef G_PLATFORM_WIN32
425 -@@ -1117,9 +1114,6 @@ _g_io_modules_ensure_loaded (void)
426 - g_type_ensure (g_network_monitor_portal_get_type ());
427 - g_type_ensure (g_proxy_resolver_portal_get_type ());
428 - #endif
429 --#ifdef HAVE_COCOA
430 -- g_type_ensure (g_cocoa_notification_backend_get_type ());
431 --#endif
432 - #ifdef G_OS_WIN32
433 - g_type_ensure (_g_winhttp_vfs_get_type ());
434 - #endif
436 -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
437 -From: Ernestas Kulik <ekulik@redhat.com>
438 -Date: Tue, 29 Jan 2019 09:50:46 +0100
439 -Subject: [PATCH 10/10] gdbus: Avoid printing null strings
441 -This mostly affects the 2.56 branch, but, given that GCC 9 is being
442 -stricter about passing null string pointers to printf-like functions, it
443 -might make sense to proactively fix such calls.
445 -gdbusauth.c: In function '_g_dbus_auth_run_server':
446 -gdbusauth.c:1302:11: error: '%s' directive argument is null
447 -[-Werror=format-overflow=]
448 - 1302 | debug_print ("SERVER: WaitingForBegin, read '%s'",
449 - line);
452 -gdbusmessage.c: In function ‘g_dbus_message_to_blob’:
453 -gdbusmessage.c:2730:30: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
454 - 2730 | tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
457 -diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c
458 -index 1111111..2222222 100644
459 ---- a/gio/gdbusauth.c
460 -+++ b/gio/gdbusauth.c
461 -@@ -1295,9 +1295,9 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
462 - &line_length,
463 - cancellable,
464 - error);
465 -- debug_print ("SERVER: WaitingForBegin, read '%s'", line);
466 - if (line == NULL)
467 - goto out;
468 -+ debug_print ("SERVER: WaitingForBegin, read '%s'", line);
469 - if (g_strcmp0 (line, "BEGIN") == 0)
471 - /* YAY, done! */
472 -diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
473 -index 1111111..2222222 100644
474 ---- a/gio/gdbusmessage.c
475 -+++ b/gio/gdbusmessage.c
476 -@@ -2695,7 +2695,6 @@ g_dbus_message_to_blob (GDBusMessage *message,
477 - if (message->body != NULL)
479 - gchar *tupled_signature_str;
480 -- tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
481 - if (signature == NULL)
483 - g_set_error (error,
484 -@@ -2703,10 +2702,10 @@ g_dbus_message_to_blob (GDBusMessage *message,
485 - G_IO_ERROR_INVALID_ARGUMENT,
486 - _("Message body has signature '%s' but there is no signature header"),
487 - signature_str);
488 -- g_free (tupled_signature_str);
489 - goto out;
491 -- else if (g_strcmp0 (tupled_signature_str, g_variant_get_type_string (message->body)) != 0)
492 -+ tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
493 -+ if (g_strcmp0 (tupled_signature_str, g_variant_get_type_string (message->body)) != 0)
495 - g_set_error (error,
496 - G_IO_ERROR,
497 diff --git a/src/glib-2-format.patch b/src/glib-2-format.patch
498 new file mode 100644
499 index 00000000..3d594af0
500 --- /dev/null
501 +++ b/src/glib-2-format.patch
502 @@ -0,0 +1,77 @@
503 +--- a/configure.ac.orig 2018-10-03 16:23:45.065890113 +0200
504 ++++ b/configure.ac 2018-10-03 16:28:04.378188119 +0200
505 +@@ -562,7 +562,7 @@ AS_IF([test x$glib_native_win32 != xyes
506 + # long long is a 64 bit integer.
507 + AC_MSG_CHECKING(for format to printf and scanf a guint64)
508 + AC_CACHE_VAL(glib_cv_long_long_format,[
509 +- for format in ll q I64; do
510 ++ for format in ll q; do
511 + AC_TRY_RUN([#include <stdio.h>
512 + int main()
514 +@@ -588,7 +588,7 @@ AS_IF([test x$glib_native_win32 != xyes
515 + # __int64 is a 64 bit integer.
516 + AC_MSG_CHECKING(for format to printf and scanf a guint64)
517 + # We know this is MSVCRT.DLL, and what the formats are
518 +- glib_cv_long_long_format=I64
519 ++ glib_cv_long_long_format=ll
520 + AC_MSG_RESULT(%${glib_cv_long_long_format}u)
521 + AC_DEFINE(HAVE_LONG_LONG_FORMAT,1,[define if system printf can print long long])
522 + AC_DEFINE(HAVE_INT64_AND_I64,1,[define to support printing 64-bit integers with format I64])
523 +@@ -3176,8 +3176,8 @@ $ac_cv_sizeof___int64)
524 + guint64_format='"'$glib_cv_long_long_format'u"'
525 + fi
526 + glib_extension=
527 +- gint64_constant='(val##i64)'
528 +- guint64_constant='(val##ui64)'
529 ++ gint64_constant='(val##ll)'
530 ++ guint64_constant='(val##ull)'
531 + ;;
532 + esac
533 + glib_size_t=$ac_cv_sizeof_size_t
534 +@@ -3204,8 +3204,8 @@ long)
535 + glib_msize_type='LONG'
536 + ;;
537 + "long long"|__int64)
538 +- gsize_modifier='"I64"'
539 +- gsize_format='"I64u"'
540 ++ gsize_modifier='"ll"'
541 ++ gsize_format='"llu"'
542 + glib_msize_type='INT64'
543 + ;;
544 + esac
545 +@@ -3227,8 +3227,8 @@ long)
546 + glib_mssize_type='LONG'
547 + ;;
548 + "long long"|__int64)
549 +- gssize_modifier='"I64"'
550 +- gssize_format='"I64i"'
551 ++ gssize_modifier='"ll"'
552 ++ gssize_format='"lli"'
553 + glib_mssize_type='INT64'
554 + ;;
555 + esac
556 +@@ -3257,17 +3257,17 @@ $ac_cv_sizeof_long)
557 + ;;
558 + $ac_cv_sizeof_long_long)
559 + glib_intptr_type_define='long long'
560 +- gintptr_modifier='"I64"'
561 +- gintptr_format='"I64i"'
562 +- guintptr_format='"I64u"'
563 ++ gintptr_modifier='"ll"'
564 ++ gintptr_format='"lli"'
565 ++ guintptr_format='"llu"'
566 + glib_gpi_cast='(gint64)'
567 + glib_gpui_cast='(guint64)'
568 + ;;
569 + $ac_cv_sizeof___int64)
570 + glib_intptr_type_define=__int64
571 +- gintptr_modifier='"I64"'
572 +- gintptr_format='"I64i"'
573 +- guintptr_format='"I64u"'
574 ++ gintptr_modifier='"ll"'
575 ++ gintptr_format='"lli"'
576 ++ guintptr_format='"llu"'
577 + glib_gpi_cast='(gint64)'
578 + glib_gpui_cast='(guint64)'
579 + ;;
580 diff --git a/src/glib.mk b/src/glib.mk
581 index 825b86bb..499a45b8 100644
582 --- a/src/glib.mk
583 +++ b/src/glib.mk
584 @@ -3,9 +3,9 @@
585 PKG := glib
586 $(PKG)_WEBSITE := https://gtk.org/
587 $(PKG)_DESCR := GLib
588 -$(PKG)_IGNORE :=
589 -$(PKG)_VERSION := 2.50.2
590 -$(PKG)_CHECKSUM := be68737c1f268c05493e503b3b654d2b7f43d7d0b8c5556f7e4651b870acfbf5
591 +$(PKG)_IGNORE :=
592 +$(PKG)_VERSION := 2.44.1
593 +$(PKG)_CHECKSUM := 8811deacaf8a503d0a9b701777ea079ca6a4277be10e3d730d2112735d5eca07
594 $(PKG)_SUBDIR := glib-$($(PKG)_VERSION)
595 $(PKG)_FILE := glib-$($(PKG)_VERSION).tar.xz
596 $(PKG)_URL := https://download.gnome.org/sources/glib/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE)
597 @@ -27,6 +27,7 @@ define $(PKG)_BUILD_DARWIN
598 cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
599 $(MXE_CONFIGURE_OPTS) \
600 --enable-regex \
601 + --disable-compile-warnings \
602 --disable-threads \
603 --disable-selinux \
604 --disable-inotify \
605 @@ -55,6 +56,7 @@ define $(PKG)_BUILD_NATIVE
606 cd '$(SOURCE_DIR)' && NOCONFIGURE=true ./autogen.sh
607 cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
608 $(MXE_CONFIGURE_OPTS) \
609 + --disable-compile-warnings \
610 --enable-regex \
611 --disable-threads \
612 --disable-selinux \
613 @@ -97,6 +99,7 @@ define $(PKG)_BUILD
614 cd '$(SOURCE_DIR)' && NOCONFIGURE=true ./autogen.sh
615 cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
616 $(MXE_CONFIGURE_OPTS) \
617 + --disable-compile-warnings \
618 --with-threads=win32 \
619 --with-pcre=system \
620 --with-libiconv=gnu \