aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2011-05-05 10:23:04 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2011-05-07 12:37:37 +0200
commit22b4f7926170ec14253a6d60f6d98f5eb3ec7f27 (patch)
tree66cd38f8d4fa8c9db161a46bb4eb3aaab974d284
parent8f718886aedb441827bbd5c355b4437df9b43c5a (diff)
downloadopenembedded-22b4f7926170ec14253a6d60f6d98f5eb3ec7f27.tar.gz
glib-2.0: add git version with 2.29.3 including gdbus-codegen
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--recipes/glib-2.0/glib-2.0-2.29.3/60_wait-longer-for-threads-to-die.patch33
-rw-r--r--recipes/glib-2.0/glib-2.0-2.29.3/configure-libtool.patch38
-rw-r--r--recipes/glib-2.0/glib-2.0-2.29.3/g_once_init_enter.patch24
-rw-r--r--recipes/glib-2.0/glib-2.0-2.29.3/glib-gettextize-dir.patch24
-rw-r--r--recipes/glib-2.0/glib-2.0-2.29.3/remove.test.for.qsort_r.patch54
-rw-r--r--recipes/glib-2.0/glib-2.0_git.bb68
6 files changed, 241 insertions, 0 deletions
diff --git a/recipes/glib-2.0/glib-2.0-2.29.3/60_wait-longer-for-threads-to-die.patch b/recipes/glib-2.0/glib-2.0-2.29.3/60_wait-longer-for-threads-to-die.patch
new file mode 100644
index 0000000000..b65a47462a
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.29.3/60_wait-longer-for-threads-to-die.patch
@@ -0,0 +1,33 @@
+copy from OE, said to borrow from Ubuntu. Not in glib-2.0 upstream yet. Add for sanity.
+Added to poky by Kevin Tian <kevin.tian@intel.com>, 06/25/2010
+Rebased for glib-2.27.3 by Dongxiao Xu <dongxiao.xu@intel.com>, 11/16/2010
+
+Upstream-Status: Inappropriate [patches for test code]
+
+diff -ruN glib-2.27.3-orig/tests/threadpool-test.c glib-2.27.3/tests/threadpool-test.c
+--- glib-2.27.3-orig/tests/threadpool-test.c 2009-04-01 07:04:21.000000000 +0800
++++ glib-2.27.3/tests/threadpool-test.c 2010-11-16 12:28:09.002172678 +0800
+@@ -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.29.3/configure-libtool.patch b/recipes/glib-2.0/glib-2.0-2.29.3/configure-libtool.patch
new file mode 100644
index 0000000000..c21e378491
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.29.3/configure-libtool.patch
@@ -0,0 +1,38 @@
+# 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
+# Rebased to glib-2.27.3 by Dongxiao Xu <dongxiao.xu@intel.com>
+
+Upstream-Status: Inappropriate [configuration]
+
+diff -ruN glib-2.27.3-orig/configure.ac glib-2.27.3/configure.ac
+--- glib-2.27.3-orig/configure.ac 2010-11-03 11:02:05.000000000 +0800
++++ glib-2.27.3/configure.ac 2010-11-16 12:38:12.610485990 +0800
+@@ -1385,7 +1385,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
+@@ -1450,7 +1450,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,[
+@@ -1524,7 +1524,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.29.3/g_once_init_enter.patch b/recipes/glib-2.0/glib-2.0-2.29.3/g_once_init_enter.patch
new file mode 100644
index 0000000000..2eaa19b604
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.29.3/g_once_init_enter.patch
@@ -0,0 +1,24 @@
+fix g_once_init_enter compile failure
+
+Kernelshark trips over a compile bug in glib-2.0 addressed by Open Embedded
+back in the 2.22 timeframe. It appears to still be present in 2.27.
+
+http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg005
+
+Signed-off-by: Darren Hart <dvhart@linux.intel.com>
+
+Upstream-Status: Pending
+
+Index: glib-2.27.5/glib/gthread.h
+===================================================================
+--- glib-2.27.5.orig/glib/gthread.h
++++ glib-2.27.5/glib/gthread.h
+@@ -344,7 +344,7 @@ void g_once_init_leav
+ 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.29.3/glib-gettextize-dir.patch b/recipes/glib-2.0/glib-2.0-2.29.3/glib-gettextize-dir.patch
new file mode 100644
index 0000000000..ee435111fc
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.29.3/glib-gettextize-dir.patch
@@ -0,0 +1,24 @@
+# an very old patch cherry-picked in every glib-2.0 patch directory. The earliest container
+# for it is 2.6.5 in OE. The earliest commit for it is c8e5702127e507e82e6f68a4b8c546803accea9d
+# in OE side which ports from previous bitkeeper SCM. In OE side it's only used til 2.12.4.
+#
+# keep it since it's always cleaner to not hardcode destination path. Use @datadir@ is more
+# portable here. mark for upstream
+#
+# by Kevin Tian <kevin.tian@intel.com>, 06/25/2010
+# Rebased by Dongxiao Xu <dongxiao.xu@intel.com>, 11/16/2010
+
+Upstream-Status: Inappropriate [configuration]
+
+diff -ruN glib-2.27.3-orig/glib-gettextize.in glib-2.27.3/glib-gettextize.in
+--- glib-2.27.3-orig/glib-gettextize.in 2009-04-01 07:04:20.000000000 +0800
++++ glib-2.27.3/glib-gettextize.in 2010-11-16 12:55:06.874605916 +0800
+@@ -52,7 +52,7 @@
+ datadir=@datadir@
+ datarootdir=@datarootdir@
+
+-gettext_dir=$prefix/share/glib-2.0/gettext
++gettext_dir=@datadir@/glib-2.0/gettext
+
+ while test $# -gt 0; do
+ case "$1" in
diff --git a/recipes/glib-2.0/glib-2.0-2.29.3/remove.test.for.qsort_r.patch b/recipes/glib-2.0/glib-2.0-2.29.3/remove.test.for.qsort_r.patch
new file mode 100644
index 0000000000..3300eb0241
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.29.3/remove.test.for.qsort_r.patch
@@ -0,0 +1,54 @@
+while cross compiling we cannot execute run tests
+
+diff --git a/configure.ac b/configure.ac
+index 378b082..3f2a8d3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -580,46 +580,7 @@ AC_FUNC_VPRINTF
+ AC_FUNC_ALLOCA
+ AC_CHECK_FUNCS(mmap posix_memalign memalign valloc fsync pipe2)
+ AC_CHECK_FUNCS(atexit on_exit timegm gmtime_r)
+-# BSD has a qsort_r with wrong argument order
+-AC_CACHE_CHECK([for qsort_r], glib_cv_have_qsort_r, [
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#define _GNU_SOURCE
+-#include <stdlib.h>
+-
+-static int
+-cmp (const void *a, const void *b, void *c)
+-{
+- const int *ia = a;
+- const int *ib = b;
+-
+- if (*ia < *ib)
+- return -1;
+- else if (*ia > *ib)
+- return 1;
+- else
+- return 0;
+-}
+-
+-int
+-main (int argc, char **argv)
+-{
+- int arr[3] = { 1, 2, 0 };
+- int d = 3;
+-
+- qsort_r (arr, 3, sizeof (int), cmp, &d);
+-
+- if (arr[0] == 0 && arr[1] == 1 && arr[2] == 2)
+- return 0;
+- else
+- return 1;
+-}]])],[glib_cv_have_qsort_r=yes],[glib_cv_have_qsort_r=no])])
+-
+-if test $glib_cv_have_qsort_r = yes ; then
+- AC_MSG_RESULT([yes])
+- AC_DEFINE(HAVE_QSORT_R, 1, [Define to 1 if you have the 'qsort_r' function])
+-else
+- AC_MSG_RESULT([no])
+-fi
++AC_DEFINE(HAVE_QSORT_R, 1, [Define to 1 if you have the 'qsort_r' function])
+
+ AC_CHECK_SIZEOF(char)
+ AC_CHECK_SIZEOF(short)
diff --git a/recipes/glib-2.0/glib-2.0_git.bb b/recipes/glib-2.0/glib-2.0_git.bb
new file mode 100644
index 0000000000..025e2005cb
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0_git.bb
@@ -0,0 +1,68 @@
+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"
+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.*"
+
+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 "
+
+inherit autotools pkgconfig gettext
+
+require glib-2.0.inc
+
+acpaths = ""
+
+do_install_append() {
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g ${D}${bindir}/glib-mkenums || true
+}
+
+PE = "1"
+
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_shr = "1"
+
+DEPENDS = "glib-2.0-native gtk-doc zlib"
+# needed for gdbus-codegen
+RDEPENDS_${PN} = "python-argparse"
+DEPENDS_virtclass-native = "gettext-native gtk-doc-native \
+ pkgconfig-native python-argparse-native"
+
+SRC_URI = "git://git.gnome.org/glib;protocol=git;branch=master \
+ file://configure-libtool.patch \
+ file://60_wait-longer-for-threads-to-die.patch \
+ file://g_once_init_enter.patch \
+ file://remove.test.for.qsort_r.patch \
+ "
+SRCREV = "d97cbc6731deab137770bc0fe9c69b06f689f5b4"
+PV = "2.29.3"
+PR_append = "+gitr${SRCPV}"
+S = "${WORKDIR}/git"
+
+# Only apply this patch for target recipe on uclibc
+SRC_URI_append_libc-uclibc = " ${@['', 'file://no-iconv.patch']['${PN}' == '${BPN}']}"
+
+SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch"
+BBCLASSEXTEND = "native"
+
+do_configure_prepend() {
+ # missing ${topdir}/gtk-doc.make and --disable-gtk-doc* is not enough, because it calls gtkdocize (not provided by gtk-doc-native)
+ sed -i '/^docs/d' ${S}/configure.ac
+ sed -i 's/SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs/SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po/g' ${S}/Makefile.am
+}