aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/glib-2.0
diff options
context:
space:
mode:
authorKlaus Kurzmann <mok@fluxnetz.de>2010-12-04 20:04:14 +0100
committerKlaus Kurzmann <mok@fluxnetz.de>2010-12-04 21:00:16 +0100
commit8ed56c77b914739450bf00394a68dc72cce8818d (patch)
tree2dd25fac366d5c270a83d4d58d395a4fa8f85397 /recipes/glib-2.0
parentf7b3b6a2878f2869cacb1bb21342ee5226dfc904 (diff)
downloadopenembedded-8ed56c77b914739450bf00394a68dc72cce8818d.tar.gz
glib-2.0: add 2.26 with DEFAULT_PREFERENCE = "-1" and prefer it for SHR
Signed-off-by: Klaus Kurzmann <mok@fluxnetz.de>
Diffstat (limited to 'recipes/glib-2.0')
-rw-r--r--recipes/glib-2.0/glib-2.0-2.26.1/60_wait-longer-for-threads-to-die.patch26
-rw-r--r--recipes/glib-2.0/glib-2.0-2.26.1/configure-libtool.patch30
-rw-r--r--recipes/glib-2.0/glib-2.0-2.26.1/g_once_init_enter.patch11
-rw-r--r--recipes/glib-2.0/glib-2.0-2.26.1/gatomic-proper-pointer-get-cast.patch12
-rw-r--r--recipes/glib-2.0/glib-2.0_2.26.1.bb76
5 files changed, 155 insertions, 0 deletions
diff --git a/recipes/glib-2.0/glib-2.0-2.26.1/60_wait-longer-for-threads-to-die.patch b/recipes/glib-2.0/glib-2.0-2.26.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.26.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.26.1/configure-libtool.patch b/recipes/glib-2.0/glib-2.0-2.26.1/configure-libtool.patch
new file mode 100644
index 0000000000..8d211dd57e
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.26.1/configure-libtool.patch
@@ -0,0 +1,30 @@
+diff -uri glib-2.26.1.orig/configure.ac glib-2.26.1/configure.ac
+--- glib-2.26.1.orig/configure.ac 2010-11-14 06:59:52.000000000 +0100
++++ glib-2.26.1/configure.ac 2010-12-01 16:48:16.653342967 +0100
+@@ -1386,7 +1386,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
+@@ -1451,7 +1451,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,[
+@@ -1525,7 +1525,7 @@
+
+ AC_MSG_CHECKING(for the suffix of module 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.26.1/g_once_init_enter.patch b/recipes/glib-2.0/glib-2.0-2.26.1/g_once_init_enter.patch
new file mode 100644
index 0000000000..58e410884f
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.26.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.26.1/gatomic-proper-pointer-get-cast.patch b/recipes/glib-2.0/glib-2.0-2.26.1/gatomic-proper-pointer-get-cast.patch
new file mode 100644
index 0000000000..5a8e37d53b
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.26.1/gatomic-proper-pointer-get-cast.patch
@@ -0,0 +1,12 @@
+diff -uri glib-2.26.1.orig/glib/gatomic.h glib-2.26.1/glib/gatomic.h
+--- glib-2.26.1.orig/glib/gatomic.h 2010-07-11 05:56:45.000000000 +0200
++++ glib-2.26.1/glib/gatomic.h 2010-12-01 16:20:33.140009635 +0100
+@@ -70,7 +70,7 @@
+ (g_atomic_int_set) ((volatile gint G_GNUC_MAY_ALIAS *) (volatile 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 *) (volatile 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 *) (volatile void *) (atomic), (newval)))
diff --git a/recipes/glib-2.0/glib-2.0_2.26.1.bb b/recipes/glib-2.0/glib-2.0_2.26.1.bb
new file mode 100644
index 0000000000..d95f894d8e
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0_2.26.1.bb
@@ -0,0 +1,76 @@
+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 = "LGPLv2+"
+SECTION = "libs"
+PRIORITY = "optional"
+DEPENDS = "glib-2.0-native gtk-doc zlib"
+DEPENDS_virtclass-native = "gettext-native gtk-doc-native \
+ pkgconfig-native"
+
+PR = "r0"
+
+SRC_URI = "\
+ http://ftp.gnome.org/pub/GNOME/sources/glib/2.26/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://60_wait-longer-for-threads-to-die.patch \
+ file://glib-mkenums-interpreter.patch \
+"
+
+SRC_URI[archive.md5sum] = "17535accceef55bcb17a74d73f9c2aef"
+SRC_URI[archive.sha256sum] = "7a74ff12b6b9dee1f2d0e520b56b68b621920c4f4250bdf23468e515625c28d5"
+
+inherit autotools gettext
+
+S = "${WORKDIR}/glib-${PV}"
+
+DEFAULT_PREFERENCE = "-1"
+
+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
+}
+
+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 = ""