commit 4a3b876ad7bb71a7d61c86968d131b0442062e89
Author: Kalev Lember <[email protected]>
Date: Thu Nov 29 02:17:33 2012 +0100
Backport patches for adding Win32 versions of the new content type APIs
This fixes the build for glibmm 2.34 where the new symbols are used.
...32-versions-of-some-new-content-type-APIs.patch | 39 ++++++++++++++++
...ally-use-g_content_type_get_symbolic_icon.patch | 47 ++++++++++++++++++++
mingw-glib2.spec | 14 +++++-
3 files changed, 99 insertions(+), 1 deletions(-)
---
diff --git a/0001-Add-Win32-versions-of-some-new-content-type-APIs.patch
b/0001-Add-Win32-versions-of-some-new-content-type-APIs.patch
new file mode 100644
index 0000000..5f007be
--- /dev/null
+++ b/0001-Add-Win32-versions-of-some-new-content-type-APIs.patch
@@ -0,0 +1,39 @@
+From dace477c92ea3a9111cef73159a6a1fcaaf0f497 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <[email protected]>
+Date: Mon, 15 Oct 2012 19:22:50 -0400
+Subject: [PATCH] Add Win32 versions of some new content type APIs
+
+This commit adds minimal versions of
+g_content_type_get_symbolic_icon and
+g_content_type_get_generic_icon_name.
+https://bugzilla.gnome.org/show_bug.cgi?id=683642
+---
+ gio/gcontenttype-win32.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/gio/gcontenttype-win32.c b/gio/gcontenttype-win32.c
+index 40c8cf4..e7e9785 100644
+--- a/gio/gcontenttype-win32.c
++++ b/gio/gcontenttype-win32.c
+@@ -244,6 +244,18 @@ g_content_type_get_icon (const gchar *type)
+ return G_ICON (themed_icon);
+ }
+
++GIcon *
++g_content_type_get_symbolic_icon (const gchar *type)
++{
++ return g_content_type_get_icon (type);
++}
++
++gchar *
++g_content_type_get_generic_icon_name (const gchar *type)
++{
++ return NULL;
++}
++
+ gboolean
+ g_content_type_can_be_executable (const gchar *type)
+ {
+--
+1.8.0
+
diff --git a/0001-Unconditionally-use-g_content_type_get_symbolic_icon.patch
b/0001-Unconditionally-use-g_content_type_get_symbolic_icon.patch
new file mode 100644
index 0000000..e389c60
--- /dev/null
+++ b/0001-Unconditionally-use-g_content_type_get_symbolic_icon.patch
@@ -0,0 +1,47 @@
+From ce586ba991967b1a663a9082312a45725da6fe5b Mon Sep 17 00:00:00 2001
+From: Kalev Lember <[email protected]>
+Date: Wed, 28 Nov 2012 23:25:52 +0100
+Subject: [PATCH] Unconditionally use g_content_type_get_symbolic_icon()
+
+... and g_content_type_get_generic_icon_name(). The new functions are
+implemented for Win32 since commit dace477c, so we no longer need to
+guard them with G_OS_UNIX.
+---
+ gio/gio.symbols | 2 --
+ gio/glocalfileinfo.c | 2 --
+ 2 files changed, 4 deletions(-)
+
+diff --git a/gio/gio.symbols b/gio/gio.symbols
+index 860e3cb..6788fc1 100644
+--- a/gio/gio.symbols
++++ b/gio/gio.symbols
+@@ -165,10 +165,8 @@ g_content_type_is_unknown
+ g_content_type_get_description
+ g_content_type_get_mime_type
+ g_content_type_get_icon
+-#ifdef G_OS_UNIX
+ g_content_type_get_symbolic_icon
+ g_content_type_get_generic_icon_name
+-#endif
+ g_content_type_can_be_executable
+ g_content_type_from_mime_type
+ g_content_type_guess
+diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
+index 9c97495..9cfa041 100644
+--- a/gio/glocalfileinfo.c
++++ b/gio/glocalfileinfo.c
+@@ -1535,11 +1535,9 @@ get_icon (const char *path,
+ }
+ else
+ {
+-#ifdef G_OS_UNIX
+ if (use_symbolic)
+ icon = g_content_type_get_symbolic_icon (content_type);
+ else
+-#endif
+ icon = g_content_type_get_icon (content_type);
+
+ if (G_IS_THEMED_ICON (icon) && is_folder)
+--
+1.8.0
+
diff --git a/mingw-glib2.spec b/mingw-glib2.spec
index 52dded0..3020567 100644
--- a/mingw-glib2.spec
+++ b/mingw-glib2.spec
@@ -2,7 +2,7 @@
Name: mingw-glib2
Version: 2.34.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: MinGW Windows GLib2 library
License: LGPLv2+
@@ -47,6 +47,13 @@ Patch1:
0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=684145
Patch2: glib-build-dbus-proxy-testcase-only-on-unix.patch
+# Backport from upstream git
+# https://bugzilla.gnome.org/show_bug.cgi?id=683642
+Patch3: 0001-Add-Win32-versions-of-some-new-content-type-APIs.patch
+
+# Backport from upstream git
+Patch4: 0001-Unconditionally-use-g_content_type_get_symbolic_icon.patch
+
%description
MinGW Windows Glib2 library.
@@ -90,6 +97,8 @@ Static version of the MinGW Windows GLib2 library.
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
+%patch4 -p1
autoreconf -i --force
@@ -270,6 +279,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
%changelog
+* Thu Nov 29 2012 Kalev Lember <[email protected]> - 2.34.3-2
+- Backport a patch for adding Win32 versions of the new content type APIs
+
* Wed Nov 28 2012 Kalev Lember <[email protected]> - 2.34.3-1
- Update to 2.34.3
_______________________________________________
mingw mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/mingw