From 796a07219dc1fbfa06957f7f6607e836947b3f92 Mon Sep 17 00:00:00 2001 From: Thomas Sailer Date: Thu, 2 Jul 2015 16:09:47 +0200 Subject: [PATCH] update to 2.45.3 --- ...tialize-backend-before-withdrawing-n.patch | 38 ++++++++++++ ....c-Fix-Windows-XP-inet_pton-Emulatio.patch | 42 -------------- glib-win64-compile.patch | 58 +++++++++++++++++++ mingw-glib2.spec | 19 +++--- sources | 2 +- 5 files changed, 109 insertions(+), 50 deletions(-) create mode 100644 0001-gapplication-Initialize-backend-before-withdrawing-n.patch delete mode 100644 gio-ginetaddress.c-Fix-Windows-XP-inet_pton-Emulatio.patch create mode 100644 glib-win64-compile.patch diff --git a/0001-gapplication-Initialize-backend-before-withdrawing-n.patch b/0001-gapplication-Initialize-backend-before-withdrawing-n.patch new file mode 100644 index 0000000..f1d78f2 --- /dev/null +++ b/0001-gapplication-Initialize-backend-before-withdrawing-n.patch @@ -0,0 +1,38 @@ +From c612fcab0fb2d3f0bdaf011d5b566dc949dbd18a Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Mon, 22 Jun 2015 19:56:38 +0200 +Subject: [PATCH] gapplication: Initialize backend before withdrawing + notifications + +Make sure to initialize the notification backend in +g_application_withdraw_notification() the same way as is done in +g_application_send_notification(). + +This makes it possible for an app to withdraw notifications it has sent +in a previous execution of the application. + +https://bugzilla.gnome.org/show_bug.cgi?id=750625 +--- + gio/gapplication.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/gio/gapplication.c b/gio/gapplication.c +index be7127a..37a8258 100644 +--- a/gio/gapplication.c ++++ b/gio/gapplication.c +@@ -2715,8 +2715,10 @@ g_application_withdraw_notification (GApplication *application, + g_return_if_fail (G_IS_APPLICATION (application)); + g_return_if_fail (id != NULL); + +- if (application->priv->notifications) +- g_notification_backend_withdraw_notification (application->priv->notifications, id); ++ if (application->priv->notifications == NULL) ++ application->priv->notifications = g_notification_backend_new_default (application); ++ ++ g_notification_backend_withdraw_notification (application->priv->notifications, id); + } + + /* Busy binding {{{1 */ +-- +2.4.3 + diff --git a/gio-ginetaddress.c-Fix-Windows-XP-inet_pton-Emulatio.patch b/gio-ginetaddress.c-Fix-Windows-XP-inet_pton-Emulatio.patch deleted file mode 100644 index 6e411e5..0000000 --- a/gio-ginetaddress.c-Fix-Windows-XP-inet_pton-Emulatio.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 3e29dadae46fe4d1e26ff91c30d9d3b84eb6d84e Mon Sep 17 00:00:00 2001 -From: Chun-wei Fan -Date: Tue, 23 Jun 2015 13:52:25 +0800 -Subject: [PATCH] gio/ginetaddress.c: Fix Windows XP inet_pton() Emulation - -We need to be more careful when we try to assign values to gpointers, so -that means we have to assign the value to the properly-dereference -gpointer, so that the assigned value will be retained after the function -returns. This code will be dropped soon, but it is done for XP -compatibility's sake for 2.44. - -Should fix the issue reported in bug 730352 comment #24. ---- - gio/ginetaddress.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/gio/ginetaddress.c b/gio/ginetaddress.c -index 8723c28..39610ae 100644 ---- a/gio/ginetaddress.c -+++ b/gio/ginetaddress.c -@@ -417,7 +417,8 @@ inet_pton (gint family, - /* XXX: Figure out when WSAStringToAddress() accepts a IPv4 address but the - numbers-and-dots address is actually not complete. This code will be - removed once XP/Server 2003 support is dropped... */ -- addr = &sin->sin_addr; -+ *(IN_ADDR *) addr = sin->sin_addr; -+ - return 1; - } - } -@@ -425,7 +426,7 @@ inet_pton (gint family, - { - if (WSAStringToAddress ((LPTSTR) addr_string, AF_INET6, NULL, (LPSOCKADDR) &sa, &len) == 0) - { -- addr = &sin6->sin6_addr; -+ *(IN6_ADDR *) addr = sin6->sin6_addr; - return 1; - } - } --- -2.4.4 - diff --git a/glib-win64-compile.patch b/glib-win64-compile.patch new file mode 100644 index 0000000..8a82ead --- /dev/null +++ b/glib-win64-compile.patch @@ -0,0 +1,58 @@ +--- gio/gwin32appinfo.c.orig 2015-07-02 15:24:05.477775270 +0200 ++++ gio/gwin32appinfo.c 2015-07-02 15:41:07.799486302 +0200 +@@ -2935,7 +2935,7 @@ + GWin32AppInfoURLSchema *schema; + gchar *ext_folded; + GWin32AppInfoFileExtension *ext; +- gsize unhandled_exts; ++ gulong unhandled_exts; + + g_hash_table_iter_init (&sup_iter, urls); + while (g_hash_table_iter_next (&sup_iter, +@@ -3095,7 +3095,7 @@ + } + } + +- g_debug ("%u undefhandled extensions\n", unhandled_exts); ++ g_debug ("%lu undefhandled extensions\n", unhandled_exts); + unhandled_exts= 0; + g_hash_table_iter_init (&sup_iter, extensions); + while (g_hash_table_iter_next (&sup_iter, +@@ -3109,7 +3109,7 @@ + unhandled_exts += 1; + } + } +- g_debug ("%u undefhandled extensions\n", unhandled_exts); ++ g_debug ("%lu undefhandled extensions\n", unhandled_exts); + } + + static void +@@ -3382,7 +3382,7 @@ + static void + g_win32_appinfo_init (void) + { +- static gboolean initialized = FALSE; ++ static gsize initialized; + + if (g_once_init_enter (&initialized)) + { +@@ -3415,7 +3415,7 @@ + + update_registry_data (); + +- g_once_init_leave (&initialized, TRUE); ++ g_once_init_leave (&initialized, 1); + } + + if ((url_associations_key && g_win32_registry_key_has_changed (url_associations_key)) || +--- gio/glocalfile.c.orig 2015-07-02 15:56:37.156751108 +0200 ++++ gio/glocalfile.c 2015-07-02 15:56:58.187344740 +0200 +@@ -2682,7 +2682,7 @@ + (!g_path_is_absolute (filename) || len > g_path_skip_root (filename) - filename)) + wfilename[len] = '\0'; + +- retval = _wstat32i64 (wfilename, &buf); ++ retval = _wstati64 (wfilename, &buf); + save_errno = errno; + + g_free (wfilename); diff --git a/mingw-glib2.spec b/mingw-glib2.spec index c20923f..5b1038c 100644 --- a/mingw-glib2.spec +++ b/mingw-glib2.spec @@ -1,8 +1,8 @@ %?mingw_package_header Name: mingw-glib2 -Version: 2.44.0 -Release: 4%{?dist} +Version: 2.45.3 +Release: 1%{?dist} Summary: MinGW Windows GLib2 library License: LGPLv2+ @@ -33,7 +33,10 @@ BuildRequires: mingw64-zlib # Native version required for msgfmt use in build BuildRequires: gettext # Native version required for glib-genmarshal -BuildRequires: glib2-devel >= 2.31.20 +BuildRequires: glib2-devel >= 2.45.3 + +# Patch from native package +Patch0: 0001-gapplication-Initialize-backend-before-withdrawing-n.patch # https://bugzilla.gnome.org/show_bug.cgi?id=674214 Patch1: 0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch @@ -57,8 +60,7 @@ Patch5: glib-prefer-constructors-over-DllMain.patch # https://bugzilla.gnome.org/show_bug.cgi?id=733338 Patch8: 0002-GNetworkMonitorBase-don-t-fail-when-IPv6-support-is-.patch -# https://bugzilla.gnome.org/show_bug.cgi?id=730352#c27 -Patch9: gio-ginetaddress.c-Fix-Windows-XP-inet_pton-Emulatio.patch +Patch9: glib-win64-compile.patch %description MinGW Windows Glib2 library. @@ -101,12 +103,12 @@ Static version of the MinGW Windows GLib2 library. %prep %setup -q -n glib-%{version} +%patch0 -p1 %patch1 -p1 %patch3 -p0 %patch5 -p1 %patch8 -p1 -%patch9 -p1 - +%patch9 -p0 %build #GLib can't build static and shared libraries in one go, so we build GLib twice @@ -286,6 +288,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Thu Jul 2 2015 Thomas Sailer - 2.45.3-1 +- Update to 2.45.3 + * Tue Jun 23 2015 Fabiano FidĂȘncio - 2.44.0-4 - gio/ginetaddress.c: Fix Windows XP inet_pton() Emulation (https://bugzilla.gnome.org/show_bug.cgi?id=730352#c24) diff --git a/sources b/sources index ba5668e..d2d3e84 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -74cf7b4ea200b76e42a4c22c8daf0f93 glib-2.44.0.tar.xz +fa6273d970d8f1026cbd47f4649349e0 glib-2.45.3.tar.xz