summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Brabec <utx@penguin.cz>2010-07-09 19:28:48 +0000
committerutx@penguin.cz <utx@penguin.cz>2010-07-09 19:28:48 +0000
commit211fb05d665e95192cf4d4b81dfa89fde04359cf (patch)
tree675aaf24bc245e384e1db2dfdaf129ec1b9124b3
parent2f5f6670525bfcf2b6707d28bceb147986c133ef (diff)
glib-2.0: Update to version 2.24.1. 4 bug fixes, 2 of them were included as patches.
-rw-r--r--recipes/glib-2.0/glib-2.0-2.24.1/60_wait-longer-for-threads-to-die.patch26
-rw-r--r--recipes/glib-2.0/glib-2.0-2.24.1/atomic-thumb.patch41
-rw-r--r--recipes/glib-2.0/glib-2.0-2.24.1/configure-libtool.patch34
-rw-r--r--recipes/glib-2.0/glib-2.0-2.24.1/g_once_init_enter.patch11
-rw-r--r--recipes/glib-2.0/glib-2.0-2.24.1/gatomic-proper-pointer-get-cast.patch13
-rw-r--r--recipes/glib-2.0/glib-2.0-2.24.1/gatomic_armv6.patch260
-rw-r--r--recipes/glib-2.0/glib-2.0-2.24.1/gio.patch255
-rw-r--r--recipes/glib-2.0/glib-2.0-2.24.1/gobject.patch99
-rw-r--r--recipes/glib-2.0/glib-2.0_2.24.1.bb78
9 files changed, 817 insertions, 0 deletions
diff --git a/recipes/glib-2.0/glib-2.0-2.24.1/60_wait-longer-for-threads-to-die.patch b/recipes/glib-2.0/glib-2.0-2.24.1/60_wait-longer-for-threads-to-die.patch
new file mode 100644
index 0000000000..02fe9ff0ab
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.24.1/60_wait-longer-for-threads-to-die.patch
@@ -0,0 +1,26 @@
+--- glib/tests/threadpool-test.c.old 2008-02-12 06:11:21.000000000 +0100
++++ glib/tests/threadpool-test.c 2008-02-12 06:11:52.000000000 +0100
+@@ -5,8 +5,8 @@
+
+ #include <glib.h>
+
+-#define DEBUG_MSG(x)
+-/* #define DEBUG_MSG(args) g_printerr args ; g_printerr ("\n"); */
++/* #define DEBUG_MSG(x) */
++#define DEBUG_MSG(args) g_printerr args ; g_printerr ("\n");
+
+ #define WAIT 5 /* seconds */
+ #define MAX_THREADS 10
+@@ -124,10 +124,10 @@
+ DEBUG_MSG (("[unused] stopping unused threads"));
+ g_thread_pool_stop_unused_threads ();
+
+- DEBUG_MSG (("[unused] waiting ONE second for threads to die"));
++ DEBUG_MSG (("[unused] waiting FIVE second for threads to die"));
+
+ /* Some time for threads to die. */
+- g_usleep (G_USEC_PER_SEC);
++ g_usleep (5 * G_USEC_PER_SEC);
+
+ DEBUG_MSG (("[unused] stopped idle threads, %d remain, %d threads still exist",
+ g_thread_pool_get_num_unused_threads (),
diff --git a/recipes/glib-2.0/glib-2.0-2.24.1/atomic-thumb.patch b/recipes/glib-2.0/glib-2.0-2.24.1/atomic-thumb.patch
new file mode 100644
index 0000000000..3c14fd048c
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.24.1/atomic-thumb.patch
@@ -0,0 +1,41 @@
+# gatomic.c uses SWP, which doesn't work in Thumb mode.
+# Put that source file into a separate convenience library which is always built as ARM.
+
+diff -uNr glib-2.23.6.orig//glib/Makefile.am glib-2.23.6/glib/Makefile.am
+--- glib-2.23.6.orig//glib/Makefile.am 2010-03-21 19:05:08.000000000 +0100
++++ glib-2.23.6/glib/Makefile.am 2010-03-26 11:52:49.000000000 +0100
+@@ -87,6 +87,7 @@
+ galiasdef.c
+
+ lib_LTLIBRARIES = libglib-2.0.la
++noinst_LTLIBRARIES = libgatomic.la
+
+ if OS_WIN32_AND_DLL_COMPILATION
+ if MS_LIB_AVAILABLE
+@@ -103,10 +104,14 @@
+ uninstall-ms-lib:
+ $(uninstall_ms_lib_cmd)
+
++libgatomic_la_CFLAGS = $(CFLAGS) -mno-thumb
++
++libgatomic_la_SOURCES = \
++ ${gatomic_c}
++
+ libglib_2_0_la_SOURCES = \
+ garray.c \
+ gasyncqueue.c \
+- $(gatomic_c) \
+ gbacktrace.c \
+ gbase64.c \
+ gbitlock.c \
+@@ -315,8 +320,8 @@
+ pcre_inc =
+ endif
+
+-libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib)
+-libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def)
++libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib) libgatomic.la
++libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) $(glib_def) libgatomic.la
+
+ libglib_2_0_la_LDFLAGS = \
+ $(glib_win32_res_ldflag) \
diff --git a/recipes/glib-2.0/glib-2.0-2.24.1/configure-libtool.patch b/recipes/glib-2.0/glib-2.0-2.24.1/configure-libtool.patch
new file mode 100644
index 0000000000..3ba79b8986
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.24.1/configure-libtool.patch
@@ -0,0 +1,34 @@
+# Poky renames libtool to $host_alias-libtool.
+# ./$host_alias-libtool isn't created until after configure runs with libtool >= 2.2.2
+# so we can't call # it at this point. We can safely assume a version is available
+# from PATH though
+
+--- glib-2.12.10/configure.in.orig 2006-06-05 13:34:08.000000000 +0100
++++ glib-2.12.10/configure.in 2006-06-05 13:34:36.000000000 +0100
+@@ -1174,7 +1174,7 @@
+ G_MODULE_LDFLAGS=
+ else
+ export SED
+- G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
++ G_MODULE_LDFLAGS=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+ fi
+ dnl G_MODULE_IMPL= don't reset, so cmd-line can override
+ G_MODULE_NEED_USCORE=0
+@@ -1265,7 +1265,7 @@
+ LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
+ dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
+ echo "void glib_plugin_test(void) { }" > plugin.c
+- ${SHELL} ./libtool --mode=compile ${CC} -shared \
++ ${SHELL} $host_alias-libtool --mode=compile ${CC} -shared \
+ -export-dynamic -o plugin.o plugin.c 2>&1 >/dev/null
+ AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
+ glib_cv_rtldglobal_broken,[
+@@ -1339,7 +1339,7 @@
+
+ AC_MSG_CHECKING(for the suffix of shared libraries)
+ export SED
+-shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
++shrext_cmds=`$host_alias-libtool --config | grep '^shrext_cmds='`
+ eval $shrext_cmds
+ module=yes eval std_shrext=$shrext_cmds
+ # chop the initial dot
diff --git a/recipes/glib-2.0/glib-2.0-2.24.1/g_once_init_enter.patch b/recipes/glib-2.0/glib-2.0-2.24.1/g_once_init_enter.patch
new file mode 100644
index 0000000000..58e410884f
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.24.1/g_once_init_enter.patch
@@ -0,0 +1,11 @@
+--- glib-2.22.1/glib/gthread.h.orig 2009-10-13 22:53:23.000000000 +0200
++++ glib-2.22.1/glib/gthread.h 2009-10-13 23:34:59.000000000 +0200
+@@ -341,7 +341,7 @@
+ G_INLINE_FUNC gboolean
+ g_once_init_enter (volatile gsize *value_location)
+ {
+- if G_LIKELY ((gpointer) g_atomic_pointer_get (value_location) != NULL)
++ if G_LIKELY ((gpointer) g_atomic_pointer_get ((volatile gpointer *)value_location) != NULL)
+ return FALSE;
+ else
+ return g_once_init_enter_impl (value_location);
diff --git a/recipes/glib-2.0/glib-2.0-2.24.1/gatomic-proper-pointer-get-cast.patch b/recipes/glib-2.0/glib-2.0-2.24.1/gatomic-proper-pointer-get-cast.patch
new file mode 100644
index 0000000000..5e8f836cb2
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.24.1/gatomic-proper-pointer-get-cast.patch
@@ -0,0 +1,13 @@
+Index: glib-2.23.6/glib/gatomic.h
+===================================================================
+--- glib-2.23.6.orig/glib/gatomic.h 2010-03-29 13:01:28.000000000 +0400
++++ glib-2.23.6/glib/gatomic.h 2010-03-29 13:01:35.000000000 +0400
+@@ -70,7 +70,7 @@
+ (g_atomic_int_set) ((volatile gint G_GNUC_MAY_ALIAS *) (void *) (atomic), (newval)))
+ # define g_atomic_pointer_get(atomic) \
+ ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 : -1]), \
+- (g_atomic_pointer_get) ((volatile gpointer G_GNUC_MAY_ALIAS *) (void *) (atomic)))
++ (g_atomic_pointer_get) ((volatile gpointer G_GNUC_MAY_ALIAS *) (volatile void G_GNUC_MAY_ALIAS *) (atomic)))
+ # define g_atomic_pointer_set(atomic, newval) \
+ ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 : -1]), \
+ (g_atomic_pointer_set) ((volatile gpointer G_GNUC_MAY_ALIAS *) (void *) (atomic), (newval)))
diff --git a/recipes/glib-2.0/glib-2.0-2.24.1/gatomic_armv6.patch b/recipes/glib-2.0/glib-2.0-2.24.1/gatomic_armv6.patch
new file mode 100644
index 0000000000..b17f80dbab
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.24.1/gatomic_armv6.patch
@@ -0,0 +1,260 @@
+--- glib-2.23.6.orig/configure.in
++++ glib-2.23.6/configure.in
+@@ -2513,9 +2513,15 @@
+ ;;
+ arm*)
+ AC_MSG_RESULT([arm])
+- AC_DEFINE_UNQUOTED(G_ATOMIC_ARM, 1,
+- [arm atomic implementation])
+- glib_memory_barrier_needed=no
++ AC_MSG_CHECKING(arm atomic operations type)
++ AC_MSG_RESULT(inline asm)
++ AC_DEFINE_UNQUOTED(G_ATOMIC_ARM, 6,
++ [armv6 atomic implementation])
++ glib_memory_barrier_needed=yes
++ dnl AC_MSG_RESULT(kernel helper)
++ dnl AC_DEFINE_UNQUOTED(G_ATOMIC_ARM_LINUX, 1,
++ dnl [special arm linux implementation])
++ dnl glib_memory_barrier_needed=yes
+ ;;
+ crisv32*|etraxfs*)
+ AC_MSG_RESULT([crisv32])
+--- /tmp/gatomic.c 2009-08-27 02:08:32.000000000 +0530
++++ glib-2.21.4/glib/gatomic.c 2009-08-27 02:08:49.000000000 +0530
+@@ -561,6 +561,7 @@ g_atomic_pointer_compare_and_exchange (v
+ # error "Your system has an unsupported pointer size"
+ # endif /* GLIB_SIZEOF_VOID_P */
+ # elif defined (G_ATOMIC_ARM)
++# if (G_ATOMIC_ARM < 6)
+ static volatile int atomic_spin = 0;
+
+ static int atomic_spin_trylock (void)
+@@ -651,6 +652,218 @@ g_atomic_pointer_compare_and_exchange (v
+
+ return result;
+ }
++ # else /* G_ATOMIC_ARM < 6 */
++ gint
++ g_atomic_int_exchange_and_add (volatile gint *atomic,
++ gint val)
++ {
++ unsigned long result;
++ int old, tmp;
++
++ do {
++ asm volatile (
++ "ldrex %0, [%3]\n"
++ "add %1, %0, %4\n"
++ "strex %2, %1, [%3]\n"
++ : "=&r" (old), "=&r" (tmp), "=&r" (result)
++ : "r" (atomic), "Ir" (val)
++ : "cc", "memory");
++ } while (result);
++ return old;
++ }
++
++ void
++ g_atomic_int_add (volatile gint *atomic,
++ gint val)
++ {
++ unsigned long result;
++ int tmp;
++
++ do {
++ asm volatile (
++ "ldrex %0, [%2]\n"
++ "add %0, %0, %3\n"
++ "strex %1, %0, [%2]\n"
++ : "=&r" (tmp), "=&r" (result)
++ : "r" (atomic), "Ir" (val)
++ : "cc", "memory");
++ } while (result);
++ }
++
++ gboolean
++ g_atomic_int_compare_and_exchange (volatile gint *atomic,
++ gint oldval,
++ gint newval)
++ {
++ unsigned long result;
++ int old;
++
++ asm volatile (
++ "ldrex %1, [%2]\n"
++ "mov %0, #1\n"
++ "teq %1, %3\n"
++ "strexeq %0, %4, [%2]\n"
++ : "=&r" (result), "=&r" (old)
++ : "r" (atomic), "Ir" (oldval), "r" (newval)
++ : "cc", "memory");
++ return (result) ? FALSE : TRUE;
++ }
++
++ gboolean
++ g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++ gpointer oldval,
++ gpointer newval)
++ {
++ unsigned long result;
++ void *old;
++
++ asm volatile (
++ "ldrex %1, [%2]\n"
++ "mov %0, #1\n"
++ "teq %1, %3\n"
++ "strexeq %0, %4, [%2]\n"
++ : "=&r" (result), "=&r" (old)
++ : "r" (atomic), "Ir" (oldval), "r" (newval)
++ : "cc", "memory");
++ return (result) ? FALSE : TRUE;
++ }
++
++ gint
++ (g_atomic_int_get) (volatile gint *atomic)
++ {
++ return *atomic;
++ }
++
++ void
++ (g_atomic_int_set) (volatile gint *atomic,
++ gint newval)
++ {
++ unsigned long result;
++
++ do {
++ asm volatile (
++ "ldrex %0, [%1]\n"
++ "strex %0, %2, [%1]\n"
++ : "=&r" (result)
++ : "r" (atomic), "r" (newval)
++ : "cc", "memory");
++ } while (result);
++ }
++
++ gpointer
++ (g_atomic_pointer_get) (volatile gpointer *atomic)
++ {
++ return *atomic;
++ }
++
++ void
++ (g_atomic_pointer_set) (volatile gpointer *atomic,
++ gpointer newval)
++ {
++ unsigned long result;
++
++ do {
++ asm volatile (
++ "ldrex %0, [%1]\n"
++ "strex %0, %2, [%1]\n"
++ : "=&r" (result)
++ : "r" (atomic), "r" (newval)
++ : "cc", "memory");
++ } while (result);
++ }
++# endif /* G_ATOMIC_ARM < 6 */
++ # elif defined(G_ATOMIC_ARM_LINUX)
++ /* use special helper functions provided by the linux kernel */
++
++ typedef void (_khelper_barrier_t)(void);
++ #define _khelper_barrier (*(_khelper_barrier_t *)0xffff0fa0)
++ #define G_ATOMIC_MEMORY_BARRIER _khelper_barrier()
++ /* scratchbox/qemu explodes on barrier */
++ /*#define G_ATOMIC_MEMORY_BARRIER while(0)*/
++ typedef int (_khelper_cmpxchg_t)(int oldval, int newval, volatile int *ptr);
++ #define _khelper_cmpxchg (*(_khelper_cmpxchg_t *)0xffff0fc0)
++
++ gint
++ g_atomic_int_exchange_and_add (volatile gint *atomic,
++ gint val)
++ {
++ int result;
++ int old, new;
++
++ do {
++ old = *atomic;
++ new = old + val;
++ result = _khelper_cmpxchg(old, new, atomic);
++ } while (result);
++ return old;
++ }
++
++ void
++ g_atomic_int_add (volatile gint *atomic,
++ gint val)
++ {
++ int result;
++ int old, new;
++
++ do {
++ old = *atomic;
++ new = old + val;
++ result = _khelper_cmpxchg(old, new, atomic);
++ } while (result);
++ }
++
++ gboolean
++ g_atomic_int_compare_and_exchange (volatile gint *atomic,
++ gint oldval,
++ gint newval)
++ {
++ int result;
++
++ result = _khelper_cmpxchg(oldval, newval, atomic);
++ return (result) ? FALSE : TRUE;
++ }
++
++ gboolean
++ g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++ gpointer oldval,
++ gpointer newval)
++ {
++ int result;
++
++ result = _khelper_cmpxchg(*((int *) &oldval),
++ *((int *) &newval),
++ (int *) atomic);
++ return (result) ? FALSE : TRUE;
++ }
++
++ gint
++ (g_atomic_int_get) (volatile gint *atomic)
++ {
++ return *atomic;
++ }
++
++ void
++ (g_atomic_int_set) (volatile gint *atomic,
++ gint newval)
++ {
++ while (_khelper_cmpxchg(*atomic, newval, atomic));
++ }
++
++ gpointer
++ (g_atomic_pointer_get) (volatile gpointer *atomic)
++ {
++ return *atomic;
++ }
++
++ void
++ (g_atomic_pointer_set) (volatile gpointer *atomic,
++ gpointer newval)
++ {
++ while (_khelper_cmpxchg(*((int *) atomic),
++ *((int *) &newval),
++ (int *) atomic));
++ }
++
+ # elif defined (G_ATOMIC_CRIS) || defined (G_ATOMIC_CRISV32)
+ # ifdef G_ATOMIC_CRIS
+ # define CRIS_ATOMIC_INT_CMP_XCHG(atomic, oldval, newval) \
+@@ -954,7 +1167,8 @@ void
+ g_mutex_unlock (g_atomic_mutex);
+ }
+ #endif /* G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */
+-#elif defined (G_ATOMIC_OP_MEMORY_BARRIER_NEEDED)
++#elif (defined (G_ATOMIC_OP_MEMORY_BARRIER_NEEDED) && \
++ !defined(G_ATOMIC_ARM) && !defined(G_ATOMIC_ARM_LINUX))
+ gint
+ (g_atomic_int_get) (volatile gint G_GNUC_MAY_ALIAS *atomic)
+ {
diff --git a/recipes/glib-2.0/glib-2.0-2.24.1/gio.patch b/recipes/glib-2.0/glib-2.0-2.24.1/gio.patch
new file mode 100644
index 0000000000..37cd300b2e
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.24.1/gio.patch
@@ -0,0 +1,255 @@
+From: Jason Smith <jason.smith@canonical.com>
+Subject: add new extension point in GIO for use with multiple applications
+
+I am providing here a patch for GIO which opens up a new extension point. This
+extension point is useful to do quite a few things, however its primary target
+is a window matching library called wncksync. Wncksync is used to match windows
+by the XID to the .desktop file on the system they were launched from. With
+this patch wncksync becomes incredibly accurate at doing this, having very few
+flaws. Additionally the Zeitgeist developers are aware of this patch and intend
+on using it to improve their application as well.
+
+I will keep this short as I am sure there will need to be a conversation here
+about the patch, its implications, if and how to include it, and of course the
+code itself.
+
+Cheers,
+Jason
+
+https://bugzilla.gnome.org/show_bug.cgi?id=606960
+
+---
+
+*** a/gio/gdesktopappinfo.c 2009-10-16 23:57:29.436561111 -0400
+--- b/gio/gdesktopappinfo.c 2009-10-17 00:06:28.716984254 -0400
+***************
+*** 69,74 ****
+--- 69,78 ----
+ static void mime_info_cache_reload (const char *dir);
+ static gboolean g_desktop_app_info_ensure_saved (GDesktopAppInfo *info,
+ GError **error);
++ static void
++ g_desktop_app_info_launch_handler_on_launched (GDesktopAppInfoLaunchHandler *launch_handler,
++ const char *desktop_file_path,
++ gint pid);
+
+ /**
+ * GDesktopAppInfo:
+***************
+*** 859,864 ****
+--- 863,907 ----
+ g_setenv ("DESKTOP_STARTUP_ID", data->sn_id, TRUE);
+ }
+
++ static void
++ g_desktop_app_info_on_launched (const char *desktop_file_path, gint pid)
++ {
++ static gsize lookup = 0;
++
++ if (g_once_init_enter (&lookup))
++ {
++ gsize setup_value = 1;
++ GDesktopAppInfoLaunchHandler *lookup_instance;
++ GIOExtensionPoint *ep;
++ GIOExtension *extension;
++ GList *l;
++
++ /* Ensure vfs in modules loaded */
++ _g_io_modules_ensure_loaded ();
++
++ ep = g_io_extension_point_lookup (G_DESKTOP_APP_INFO_LAUNCH_HANDLER_EXTENSION_POINT_NAME);
++
++ lookup_instance = NULL;
++ for (l = g_io_extension_point_get_extensions (ep); l != NULL; l = l->next)
++ {
++ extension = l->data;
++ lookup_instance = g_object_new (g_io_extension_get_type (extension), NULL);
++ if (lookup_instance != NULL)
++ break;
++ }
++
++ if (lookup_instance != NULL)
++ setup_value = (gsize)lookup_instance;
++
++ g_once_init_leave (&lookup, setup_value);
++ }
++
++ if (lookup == 1)
++ return;
++
++ g_desktop_app_info_launch_handler_on_launched (G_DESKTOP_APP_INFO_LAUNCH_HANDLER (lookup), desktop_file_path, pid);
++ }
++
+ static gboolean
+ g_desktop_app_info_launch_uris (GAppInfo *appinfo,
+ GList *uris,
+***************
+*** 910,922 ****
+ g_list_free (launched_files);
+ }
+
+ if (!g_spawn_async (info->path,
+ argv,
+ NULL,
+ G_SPAWN_SEARCH_PATH,
+ child_setup,
+ &data,
+! NULL,
+ error))
+ {
+ if (data.sn_id)
+--- 953,966 ----
+ g_list_free (launched_files);
+ }
+
++ gint pid;
+ if (!g_spawn_async (info->path,
+ argv,
+ NULL,
+ G_SPAWN_SEARCH_PATH,
+ child_setup,
+ &data,
+! &pid,
+ error))
+ {
+ if (data.sn_id)
+***************
+*** 927,932 ****
+--- 971,980 ----
+
+ goto out;
+ }
++ else
++ {
++ g_desktop_app_info_on_launched (info->filename, pid);
++ }
+
+ g_free (data.sn_id);
+ g_free (data.display);
+***************
+*** 2692,2696 ****
+--- 2740,2806 ----
+ return (* iface->get_default_for_uri_scheme) (lookup, uri_scheme);
+ }
+
++ /* GDesktopAppInfoLaunchHandler interface: */
++
++ static void g_desktop_app_info_launch_handler_base_init (gpointer g_class);
++ static void g_desktop_app_info_launch_handler_class_init (gpointer g_class,
++ gpointer class_data);
++
++ GType
++ g_desktop_app_info_launch_handler_get_type (void)
++ {
++ static volatile gsize g_define_type_id__volatile = 0;
++
++ if (g_once_init_enter (&g_define_type_id__volatile))
++ {
++ const GTypeInfo desktop_app_info_launch_handler_info =
++ {
++ sizeof (GDesktopAppInfoLaunchHandlerIface), /* class_size */
++ g_desktop_app_info_launch_handler_base_init, /* base_init */
++ NULL, /* base_finalize */
++ g_desktop_app_info_launch_handler_class_init,
++ NULL, /* class_finalize */
++ NULL, /* class_data */
++ 0,
++ 0, /* n_preallocs */
++ NULL
++ };
++ GType g_define_type_id =
++ g_type_register_static (G_TYPE_INTERFACE, I_("GDesktopAppInfoLaunchHandler"),
++ &desktop_app_info_launch_handler_info, 0);
++
++ g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_OBJECT);
++
++ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
++ }
++
++ return g_define_type_id__volatile;
++ }
++
++ static void
++ g_desktop_app_info_launch_handler_class_init (gpointer g_class,
++ gpointer class_data)
++ {
++ }
++
++ static void
++ g_desktop_app_info_launch_handler_base_init (gpointer g_class)
++ {
++ }
++
++ static void
++ g_desktop_app_info_launch_handler_on_launched (GDesktopAppInfoLaunchHandler *launch_handler,
++ const char *desktop_file_path,
++ gint pid)
++ {
++ GDesktopAppInfoLaunchHandlerIface *iface;
++
++ g_return_if_fail (G_IS_DESKTOP_APP_INFO_LAUNCH_HANDLER (launch_handler));
++
++ iface = G_DESKTOP_APP_INFO_LAUNCH_HANDLER_GET_IFACE (launch_handler);
++
++ (* iface->on_launched) (launch_handler, desktop_file_path, pid);
++ }
++
+ #define __G_DESKTOP_APP_INFO_C__
+ #include "gioaliasdef.c"
+
+*** a/gio/gdesktopappinfo.h 2009-03-31 19:04:20.000000000 -0400
+--- b/gio/gdesktopappinfo.h 2009-07-21 20:34:35.565657314 -0400
+***************
+*** 89,94 ****
+--- 89,123 ----
+ GAppInfo *g_desktop_app_info_lookup_get_default_for_uri_scheme (GDesktopAppInfoLookup *lookup,
+ const char *uri_scheme);
+
++
++
++ #define G_TYPE_DESKTOP_APP_INFO_LAUNCH_HANDLER (g_desktop_app_info_launch_handler_get_type ())
++ #define G_DESKTOP_APP_INFO_LAUNCH_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DESKTOP_APP_INFO_LAUNCH_HANDLER, GDesktopAppInfoLaunchHandler))
++ #define G_IS_DESKTOP_APP_INFO_LAUNCH_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DESKTOP_APP_INFO_LAUNCH_HANDLER))
++ #define G_DESKTOP_APP_INFO_LAUNCH_HANDLER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DESKTOP_APP_INFO_LAUNCH_HANDLER, GDesktopAppInfoLaunchHandlerIface))
++
++ /**
++ * G_DESKTOP_APP_INFO_LAUNCH_HANDLER_EXTENSION_POINT_NAME:
++ *
++ * Extension point for default handler to launching. See
++ * <link linkend="extending-gio">Extending GIO</link>.
++ */
++ #define G_DESKTOP_APP_INFO_LAUNCH_HANDLER_EXTENSION_POINT_NAME "gio-desktop-app-info-launch-handler"
++
++ typedef struct _GDesktopAppInfoLaunchHandler GDesktopAppInfoLaunchHandler;
++ typedef struct _GDesktopAppInfoLaunchHandlerIface GDesktopAppInfoLaunchHandlerIface;
++
++ struct _GDesktopAppInfoLaunchHandlerIface
++ {
++ GTypeInterface g_iface;
++
++ void (* on_launched) (GDesktopAppInfoLaunchHandler *launch_handler,
++ const char *desktop_file_path,
++ gint pid);
++ };
++
++ GType g_desktop_app_info_launch_handler_get_type (void) G_GNUC_CONST;
++
+ G_END_DECLS
+
+ #endif /* __G_DESKTOP_APP_INFO_H__ */
+
+*** a/gio/giomodule.c 2009-03-31 19:04:20.000000000 -0400
+--- b/gio/giomodule.c 2009-07-21 20:40:32.738157079 -0400
+***************
+*** 312,317 ****
+--- 312,320 ----
+ #ifdef G_OS_UNIX
+ ep = g_io_extension_point_register (G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME);
+ g_io_extension_point_set_required_type (ep, G_TYPE_DESKTOP_APP_INFO_LOOKUP);
++
++ ep = g_io_extension_point_register (G_DESKTOP_APP_INFO_LAUNCH_HANDLER_EXTENSION_POINT_NAME);
++ g_io_extension_point_set_required_type (ep, G_TYPE_DESKTOP_APP_INFO_LAUNCH_HANDLER);
+ #endif
+
+ ep = g_io_extension_point_register (G_LOCAL_DIRECTORY_MONITOR_EXTENSION_POINT_NAME);
+
diff --git a/recipes/glib-2.0/glib-2.0-2.24.1/gobject.patch b/recipes/glib-2.0/glib-2.0-2.24.1/gobject.patch
new file mode 100644
index 0000000000..d9c7b7e791
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.24.1/gobject.patch
@@ -0,0 +1,99 @@
+diff --git a/gobject/gobject.c b/gobject/gobject.c
+index 454d8c2..60c502b 100644
+--- a/gobject/gobject.c
++++ b/gobject/gobject.c
+@@ -182,7 +182,7 @@ static GQuark quark_closure_array = 0;
+ static GQuark quark_weak_refs = 0;
+ static GQuark quark_toggle_refs = 0;
+ static GParamSpecPool *pspec_pool = NULL;
+-static GObjectNotifyContext property_notify_context = { 0, };
++static GObjectNotifyContext property_notify_context = { G_STATIC_PRIVATE_INIT, };
+ static gulong gobject_signals[LAST_SIGNAL] = { 0, };
+ static guint (*floating_flag_handler) (GObject*, gint) = object_floating_flag_handler;
+ G_LOCK_DEFINE_STATIC (construction_mutex);
+@@ -321,7 +321,6 @@ g_object_do_class_init (GObjectClass *class)
+ quark_weak_refs = g_quark_from_static_string ("GObject-weak-references");
+ quark_toggle_refs = g_quark_from_static_string ("GObject-toggle-references");
+ pspec_pool = g_param_spec_pool_new (TRUE);
+- property_notify_context.quark_notify_queue = g_quark_from_static_string ("GObject-notify-queue");
+ property_notify_context.dispatcher = g_object_notify_dispatcher;
+
+ class->constructor = g_object_constructor;
+diff --git a/gobject/gobjectnotifyqueue.c b/gobject/gobjectnotifyqueue.c
+index 1d5787b..173a8ed 100644
+--- a/gobject/gobjectnotifyqueue.c
++++ b/gobject/gobjectnotifyqueue.c
+@@ -38,7 +38,7 @@ typedef void (*GObjectNotifyQueueDispatcher) (GObject *object,
+ /* --- structures --- */
+ struct _GObjectNotifyContext
+ {
+- GQuark quark_notify_queue;
++ GStaticPrivate key_notify_objects;
+ GObjectNotifyQueueDispatcher dispatcher;
+ GTrashStack *_nqueue_trash; /* unused */
+ };
+@@ -68,16 +68,27 @@ static inline GObjectNotifyQueue*
+ g_object_notify_queue_freeze (GObject *object,
+ GObjectNotifyContext *context)
+ {
++ GHashTable *objects;
+ GObjectNotifyQueue *nqueue;
+
+- nqueue = g_datalist_id_get_data (&object->qdata, context->quark_notify_queue);
++ objects = g_static_private_get (&context->key_notify_objects);
++ if (!objects)
++ {
++ objects = g_hash_table_new_full (g_direct_hash, g_direct_equal,
++ NULL, g_object_notify_queue_free);
++
++ g_static_private_set (&context->key_notify_objects, objects,
++ (GDestroyNotify) g_hash_table_unref);
++ }
++
++ nqueue = g_hash_table_lookup (objects, object);
+ if (!nqueue)
+ {
+ nqueue = (void*) g_list_alloc ();
+ memset (nqueue, 0, sizeof (*nqueue));
+ nqueue->context = context;
+- g_datalist_id_set_data_full (&object->qdata, context->quark_notify_queue,
+- nqueue, g_object_notify_queue_free);
++
++ g_hash_table_insert (objects, object, nqueue);
+ }
+
+ g_return_val_if_fail (nqueue->freeze_count < 65535, nqueue);
+@@ -94,6 +105,7 @@ g_object_notify_queue_thaw (GObject *object,
+ GParamSpec *pspecs_mem[16], **pspecs, **free_me = NULL;
+ GSList *slist;
+ guint n_pspecs = 0;
++ GHashTable *objects;
+
+ g_return_if_fail (nqueue->freeze_count > 0);
+
+@@ -119,7 +131,10 @@ g_object_notify_queue_thaw (GObject *object,
+
+ pspecs[n_pspecs++] = pspec;
+ }
+- g_datalist_id_set_data (&object->qdata, context->quark_notify_queue, NULL);
++ objects = g_static_private_get (&context->key_notify_objects);
++ g_hash_table_remove (objects, object);
++ if (g_hash_table_size (objects) == 0)
++ g_static_private_set (&context->key_notify_objects, NULL, NULL);
+
+ if (n_pspecs)
+ context->dispatcher (object, n_pspecs, pspecs);
+@@ -162,7 +177,13 @@ static inline GObjectNotifyQueue*
+ g_object_notify_queue_from_object (GObject *object,
+ GObjectNotifyContext *context)
+ {
+- return g_datalist_id_get_data (&object->qdata, context->quark_notify_queue);
++ GHashTable *objects;
++
++ objects = g_static_private_get (&context->key_notify_objects);
++ if (objects == NULL)
++ return NULL;
++
++ return g_hash_table_lookup (objects, object);
+ }
+
diff --git a/recipes/glib-2.0/glib-2.0_2.24.1.bb b/recipes/glib-2.0/glib-2.0_2.24.1.bb
new file mode 100644
index 0000000000..a573f0a0ac
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0_2.24.1.bb
@@ -0,0 +1,78 @@
+DESCRIPTION = "GLib is a general-purpose utility library, \
+which provides many useful data types, macros, \
+type conversions, string utilities, file utilities, a main \
+loop abstraction, and so on. It works on many \
+UNIX-like platforms, Windows, OS/2 and BeOS."
+LICENSE = "LGPL"
+SECTION = "libs"
+PRIORITY = "optional"
+DEPENDS = "glib-2.0-native gtk-doc zlib"
+
+PR = "r0"
+
+SRC_URI = "\
+ http://ftp.gnome.org/pub/GNOME/sources/glib/2.24/glib-${PV}.tar.bz2;name=archive \
+ file://glibconfig-sysdefs.h \
+ file://configure-libtool.patch \
+ file://g_once_init_enter.patch \
+ file://gatomic-proper-pointer-get-cast.patch \
+ file://gio.patch \
+ file://60_wait-longer-for-threads-to-die.patch \
+"
+
+SRC_URI[archive.md5sum] = "6a7db81c9a2cffe6a34dadb57d7ba2d2"
+SRC_URI[archive.sha256sum] = "014c3da960bf17117371075c16495f05f36501db990851ceea658f15d2ea6d04"
+
+SRC_URI_append_arm = " file://atomic-thumb.patch"
+SRC_URI_append_armv6 = " file://gatomic_armv6.patch"
+SRC_URI_append_armv7a = " file://gatomic_armv6.patch"
+
+inherit autotools gettext
+
+S = "${WORKDIR}/glib-${PV}"
+
+EXTRA_OECONF = "--disable-debug "
+
+# Add and entry for your favourite arch if your (g)libc has a sane printf
+EXTRA_OECONF_append_glibc_arm = " --enable-included-printf=no "
+
+do_configure_prepend () {
+ install -m 0644 ${WORKDIR}/glibconfig-sysdefs.h .
+}
+
+do_install_append() {
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g ${D}${bindir}/glib-mkenums || true
+}
+
+DEPENDS_virtclass-native = "gettext-native gtk-doc-native \
+ pkgconfig-native"
+EXTRA_OECONF_virtclass-native = ""
+
+do_configure_prepend_virtclass-native() {
+ if [ -e ${S}/${TARGET_SYS}-libtool ] ; then
+ echo "${TARGET_SYS}-libtool already present"
+ else
+ cp ${STAGING_BINDIR}/${TARGET_SYS}-libtool ${S}
+ fi
+
+}
+
+BBCLASSEXTEND = "native"
+
+PACKAGES =+ "gobject-2.0 gmodule-2.0 gthread-2.0 gio-2.0 glib-2.0-utils "
+LEAD_SONAME = "libglib-2.0.*"
+FILES_glib-2.0-utils = "${bindir}/*"
+FILES_${PN} = "${libdir}/lib*so.* ${libdir}/gio/modules/*.so"
+FILES_${PN}-dev += "${libdir}/glib-2.0 ${datadir}/glib-2.0 ${libdir}/gio/modules/*.la"
+FILES_${PN}-dbg += "${libdir}/gio/modules/.debug"
+FILES_gmodule-2.0 = "${libdir}/libgmodule-2.0.so.*"
+FILES_gobject-2.0 = "${libdir}/libgobject-2.0.so.*"
+FILES_gio-2.0 = "${libdir}/libgio-2.0.so.*"
+FILES_gthread-2.0 = "${libdir}/libgthread-2.0.so.*"
+
+# Let various glib components end up in glib package
+# for compatibility (with binary packages from Maemo).
+FILES_gthread-2.0_chinook-compat = ""
+FILES_gmodule-2.0_chinook-compat = ""
+FILES_gobject-2.0_chinook-compat = ""
+FILES_gio-2.0_chinook-compat = ""