glib: update to 2.50.2

See https://github.com/mxe/mxe/issues/1647#issuecomment-275888417
This commit is contained in:
Boris Nagaev 2017-01-31 02:11:46 +01:00
parent ef2faa7039
commit a5fee7a4c5
2 changed files with 30 additions and 34 deletions

View File

@ -31,12 +31,15 @@ From: Hans Petter Jansson <hpj@cl.no>
Date: Fri, 15 Jun 2012 15:25:01 +0200
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
@@ -918,14 +918,12 @@ extern GType g_gtk_notification_backend_get_type (void);
@@ -928,14 +928,12 @@ extern GType g_cocoa_notification_backend_get_type (void);
static HMODULE gio_dll = NULL;
@ -53,7 +56,7 @@ index 1111111..2222222 100644
DWORD fdwReason,
LPVOID lpvReserved)
{
@@ -935,8 +933,6 @@ DllMain (HINSTANCE hinstDLL,
@@ -945,8 +943,6 @@ DllMain (HINSTANCE hinstDLL,
return TRUE;
}
@ -66,7 +69,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
@@ -237,14 +237,14 @@ glib_init (void)
@@ -245,14 +245,14 @@ glib_init (void)
#if defined (G_OS_WIN32)
@ -83,6 +86,19 @@ 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>
@ -94,7 +110,7 @@ diff --git a/configure.ac b/configure.ac
index 1111111..2222222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1659,10 +1659,16 @@ dnl *****************************
@@ -1599,10 +1599,16 @@ dnl *****************************
dnl ** Check for inotify (GIO) **
dnl *****************************
inotify_support=no
@ -123,7 +139,7 @@ diff --git a/configure.ac b/configure.ac
index 1111111..2222222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -499,6 +499,8 @@ LT_INIT([disable-static win32-dll])
@@ -511,6 +511,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])
@ -155,15 +171,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] 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
@@ -2577,12 +2577,15 @@ g_get_real_time (void)
@@ -2657,12 +2657,15 @@ g_get_real_time (void)
#if defined (G_OS_WIN32)
static ULONGLONG (*g_GetTickCount64) (void) = NULL;
static guint32 g_win32_tick_epoch = 0;
@ -179,7 +195,7 @@ index 1111111..2222222 100644
g_GetTickCount64 = NULL;
kernel32 = GetModuleHandle ("KERNEL32.DLL");
if (kernel32 != NULL)
@@ -2641,6 +2644,9 @@ g_get_monotonic_time (void)
@@ -2721,6 +2724,9 @@ g_get_monotonic_time (void)
* timeBeginPeriod() to increase it as much as they want
*/
@ -519,7 +535,7 @@ index 1111111..2222222 100644
win32_check_for_error (WAIT_FAILED != WaitForSingleObject (wt->handle, INFINITE));
}
@@ -984,6 +1088,8 @@ g_thread_lookup_native_funcs (void)
@@ -1041,6 +1145,8 @@ g_thread_lookup_native_funcs (void)
void
g_thread_win32_init (void)
{
@ -540,7 +556,7 @@ diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
index 1111111..2222222 100644
--- a/gio/gdbusaddress.c
+++ b/gio/gdbusaddress.c
@@ -1325,6 +1325,7 @@ __declspec(dllexport) void CALLBACK g_win32_run_session_bus (HWND hwnd, HINSTANC
@@ -1387,6 +1387,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)
{
@ -548,7 +564,7 @@ index 1111111..2222222 100644
GDBusDaemon *daemon;
GMainLoop *loop;
const char *address;
@@ -1354,6 +1355,7 @@ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow
@@ -1418,6 +1419,7 @@ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow
g_main_loop_unref (loop);
g_object_unref (daemon);
@ -579,23 +595,3 @@ index 1111111..2222222 100644
dnl
dnl At the end, if we're not within glib, we'll define the public
dnl definitions in terms of our private definitions.
From: Boris Pek <tehnick-8@mail.ru>
Date: Thu, 28 Apr 2016 16:48:12 +0300
Subject: [PATCH] fix build with GCC >= 6.x
See plugins/gcc6/README.md
diff --git a/gio/gregistrysettingsbackend.c b/gio/gregistrysettingsbackend.c
--- a/gio/gregistrysettingsbackend.c
+++ b/gio/gregistrysettingsbackend.c
@@ -228,7 +228,7 @@
if (result_code == ERROR_KEY_DELETED)
trace ("(%s)", win32_message);
else
- g_message (win32_message);
+ g_message ("%s", win32_message);
};

View File

@ -4,8 +4,8 @@ PKG := glib
$(PKG)_WEBSITE := http://www.gtk.org/
$(PKG)_DESCR := GLib
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.44.1
$(PKG)_CHECKSUM := 8811deacaf8a503d0a9b701777ea079ca6a4277be10e3d730d2112735d5eca07
$(PKG)_VERSION := 2.50.2
$(PKG)_CHECKSUM := be68737c1f268c05493e503b3b654d2b7f43d7d0b8c5556f7e4651b870acfbf5
$(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)