commit 10ce51e70078f0c5b76d3ee1582d75e43f7f3363
Author: Erik van Pienbroek <epienbro(a)fedoraproject.org>
Date: Sun May 5 00:16:08 2013 +0200
Update to 2.37.0
glib-prefer-constructors-over-DllMain.patch | 36 +++++++++++++++++++++-----
mingw-glib2.spec | 7 +++-
sources | 2 +-
3 files changed, 35 insertions(+), 10 deletions(-)
---
diff --git a/glib-prefer-constructors-over-DllMain.patch b/glib-prefer-constructors-over-DllMain.patch
index 256e8e7..01da75a 100644
--- a/glib-prefer-constructors-over-DllMain.patch
+++ b/glib-prefer-constructors-over-DllMain.patch
@@ -1,6 +1,22 @@
---- glib/glib-init.c.orig 2013-03-23 12:07:27.009718160 +0100
-+++ glib/glib-init.c 2013-03-23 13:00:24.460030271 +0100
-@@ -223,12 +223,14 @@
+From bc90511c1eb333e26e0bc0eaee62375d0e788db6 Mon Sep 17 00:00:00 2001
+From: Erik van Pienbroek <epienbro(a)fedoraproject.org>
+Date: Tue, 16 Apr 2013 11:42:11 +0200
+Subject: [PATCH] win32: Prefer the use of constructors over DllMain
+
+This prevents having to depend on DllMain in static libraries
+
+Constructors are available in both the GCC build (GCC 2.7 and later)
+and the MSVC build (MSVC 2008 and later using _Pragma, earlier
+versions using #pragma)
+---
+ glib/glib-init.c | 22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
+
+diff --git a/glib/glib-init.c b/glib/glib-init.c
+index 0032ee8..dd6ccbf 100644
+--- a/glib/glib-init.c
++++ b/glib/glib-init.c
+@@ -223,12 +223,14 @@ glib_init (void)
#if defined (G_OS_WIN32)
@@ -17,17 +33,19 @@
BOOL WINAPI
DllMain (HINSTANCE hinstDLL,
DWORD fdwReason,
-@@ -238,9 +240,6 @@
+@@ -238,11 +240,6 @@ DllMain (HINSTANCE hinstDLL,
{
case DLL_PROCESS_ATTACH:
glib_dll = hinstDLL;
- g_clock_win32_init ();
+-#ifdef THREADS_WIN32
- g_thread_win32_init ();
+-#endif
- glib_init ();
break;
case DLL_THREAD_DETACH:
-@@ -255,7 +254,10 @@
+@@ -259,7 +256,10 @@ DllMain (HINSTANCE hinstDLL,
return TRUE;
}
@@ -39,14 +57,18 @@
#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(glib_init_ctor)
-@@ -265,6 +267,10 @@
+@@ -269,6 +269,12 @@ G_DEFINE_CONSTRUCTOR(glib_init_ctor)
static void
glib_init_ctor (void)
{
+#if defined (G_OS_WIN32)
+ g_clock_win32_init ();
++#ifdef THREADS_WIN32
+ g_thread_win32_init ();
-+#endif
++#endif /* defined (THREADS_WIN32) */
++#endif /* defined (G_OS_WIN32) */
glib_init ();
}
+--
+1.8.2
diff --git a/mingw-glib2.spec b/mingw-glib2.spec
index 019c18e..4059146 100644
--- a/mingw-glib2.spec
+++ b/mingw-glib2.spec
@@ -1,7 +1,7 @@
%?mingw_package_header
Name: mingw-glib2
-Version: 2.36.1
+Version: 2.37.0
Release: 1%{?dist}
Summary: MinGW Windows GLib2 library
@@ -101,7 +101,7 @@ Static version of the MinGW Windows GLib2 library.
%patch1 -p1
%patch3 -p0
%patch4 -p0
-%patch5 -p0
+%patch5 -p1
%build
@@ -280,6 +280,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
%changelog
+* Sun May 5 2013 Erik van Pienbroek <epienbro(a)fedoraproject.org> - 2.37.0-1
+- Update to 2.37.0
+
* Tue Apr 16 2013 Erik van Pienbroek <epienbro(a)fedoraproject.org> - 2.36.1-1
- Update to 2.36.1
- Dropped upstreamed patches
diff --git a/sources b/sources
index ea6aa07..6fb2e55 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a3bbee44a13facb5a3cab18be5ece14c glib-2.36.1.tar.xz
+a2dabe3887b05abd0fd4ae1c276f080c glib-2.37.0.tar.xz