From 31180a56d1b6981fa9d5588ad3538f34e339e0fe Mon Sep 17 00:00:00 2001 From: Kevin Tian Date: Fri, 25 Jun 2010 15:07:01 +0800 Subject: glib-2.0: upgrade to 2.24.1 (borrow from OE 2.24.0, with study about reason for detail changes) [Patches-Poky] KEEP _configure-libtool.patch_: fix cross-build env REMOVE _glibconfig-sysdefs.h_: introduced in glib-1.2.10, which is actually not valid today KEEP _glib-gettexize-dir.patch_: another quite old patch added before 2.10.3 add history info, and mark for upstream [Patches-OE] NOTAKE _gio.patch_: a private extension for a window matching library (wncksync) NOTAKE _gvavriant.patch_: in 2.24.1 now NOTAKE _gasync.patch_: in 2.24.1 now TAKE _60_wait-longer-for-threads-to-die.patch: said to fix anonying warning TAKE _gatomic-proper-get-cast.patch_: fix error about type casting. Instead of using OE's patch, I found a better one from latest repo NOTAKE _g_once_init_enter.patch_: in OE since 2.22.1, not quite sure of its purpose, also it's not in upstream yet [Recipe] - fix metadata - keep glib-2.inc which is for python optimization - remove PRIORITY since 'optional' is the default - no need to specially install glibconfig.h in ad hoc path, which is only relied by 'obexpush' which poky doesn't have and can be fixed in 'obexpush' itself as what OE does - no need to manually create glib2.0/glib, which is handled by current code - remove 'acpaths' which only applies to versions before 2.12.4 - below lines are not taken from OE * glib-mkenums tweaks, which exists in OE for a long time but never in poky. since there's no way to find out original commit, keep poky's style instead. * host libtool check. not sure about its purpose, and it's also in OE for quite long time Signed-off-by Kevin Tian --- .../glib-2.0-2.22.3/configure-libtool.patch | 34 ------------------ .../glib-2.0-2.22.3/glib-gettextize-dir.patch | 11 ------ .../glib-2.0/glib-2.0-2.22.3/glibconfig-sysdefs.h | 6 ---- .../60_wait-longer-for-threads-to-die.patch | 29 +++++++++++++++ .../glib-2.0-2.24.1/configure-libtool.patch | 34 ++++++++++++++++++ .../gatomic-proper-pointer-get-cast.patch | 37 +++++++++++++++++++ .../glib-2.0-2.24.1/glib-gettextize-dir.patch | 19 ++++++++++ meta/packages/glib-2.0/glib-2.0_2.22.3.bb | 11 ------ meta/packages/glib-2.0/glib-2.0_2.24.1.bb | 11 ++++++ meta/packages/glib-2.0/glib.inc | 41 ++++++++++------------ 10 files changed, 149 insertions(+), 84 deletions(-) delete mode 100644 meta/packages/glib-2.0/glib-2.0-2.22.3/configure-libtool.patch delete mode 100644 meta/packages/glib-2.0/glib-2.0-2.22.3/glib-gettextize-dir.patch delete mode 100644 meta/packages/glib-2.0/glib-2.0-2.22.3/glibconfig-sysdefs.h create mode 100644 meta/packages/glib-2.0/glib-2.0-2.24.1/60_wait-longer-for-threads-to-die.patch create mode 100644 meta/packages/glib-2.0/glib-2.0-2.24.1/configure-libtool.patch create mode 100644 meta/packages/glib-2.0/glib-2.0-2.24.1/gatomic-proper-pointer-get-cast.patch create mode 100644 meta/packages/glib-2.0/glib-2.0-2.24.1/glib-gettextize-dir.patch delete mode 100644 meta/packages/glib-2.0/glib-2.0_2.22.3.bb create mode 100644 meta/packages/glib-2.0/glib-2.0_2.24.1.bb (limited to 'meta/packages') diff --git a/meta/packages/glib-2.0/glib-2.0-2.22.3/configure-libtool.patch b/meta/packages/glib-2.0/glib-2.0-2.22.3/configure-libtool.patch deleted file mode 100644 index 3ba79b898..000000000 --- a/meta/packages/glib-2.0/glib-2.0-2.22.3/configure-libtool.patch +++ /dev/null @@ -1,34 +0,0 @@ -# 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/meta/packages/glib-2.0/glib-2.0-2.22.3/glib-gettextize-dir.patch b/meta/packages/glib-2.0/glib-2.0-2.22.3/glib-gettextize-dir.patch deleted file mode 100644 index efe332557..000000000 --- a/meta/packages/glib-2.0/glib-2.0-2.22.3/glib-gettextize-dir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- glib-2.10.3/glib-gettextize.in.old 2006-06-21 12:46:45.000000000 +0100 -+++ glib-2.10.3/glib-gettextize.in 2006-06-21 12:48:14.000000000 +0100 -@@ -49,7 +49,7 @@ - ;; - esac - --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/meta/packages/glib-2.0/glib-2.0-2.22.3/glibconfig-sysdefs.h b/meta/packages/glib-2.0/glib-2.0-2.22.3/glibconfig-sysdefs.h deleted file mode 100644 index 1329e7f21..000000000 --- a/meta/packages/glib-2.0/glib-2.0-2.22.3/glibconfig-sysdefs.h +++ /dev/null @@ -1,6 +0,0 @@ -#define GLIB_SYSDEF_POLLIN =1 -#define GLIB_SYSDEF_POLLOUT =4 -#define GLIB_SYSDEF_POLLPRI =2 -#define GLIB_SYSDEF_POLLERR =8 -#define GLIB_SYSDEF_POLLHUP =16 -#define GLIB_SYSDEF_POLLNVAL =32 diff --git a/meta/packages/glib-2.0/glib-2.0-2.24.1/60_wait-longer-for-threads-to-die.patch b/meta/packages/glib-2.0/glib-2.0-2.24.1/60_wait-longer-for-threads-to-die.patch new file mode 100644 index 000000000..1676b3e25 --- /dev/null +++ b/meta/packages/glib-2.0/glib-2.0-2.24.1/60_wait-longer-for-threads-to-die.patch @@ -0,0 +1,29 @@ +# copy from OE, said to borrow from Ubuntu. Not in glib-2.0 upstream yet. Add for sanity. +# +# by Kevin Tian , 06/25/2010 +--- 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 + +-#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/meta/packages/glib-2.0/glib-2.0-2.24.1/configure-libtool.patch b/meta/packages/glib-2.0/glib-2.0-2.24.1/configure-libtool.patch new file mode 100644 index 000000000..3ba79b898 --- /dev/null +++ b/meta/packages/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/meta/packages/glib-2.0/glib-2.0-2.24.1/gatomic-proper-pointer-get-cast.patch b/meta/packages/glib-2.0/glib-2.0-2.24.1/gatomic-proper-pointer-get-cast.patch new file mode 100644 index 000000000..1f3920f03 --- /dev/null +++ b/meta/packages/glib-2.0/glib-2.0-2.24.1/gatomic-proper-pointer-get-cast.patch @@ -0,0 +1,37 @@ +# handle cast warning. borrow from OE, but updated with a better fix from glib +# developing tree. +# +# by Kevin Tian , 06/25/2010 +commit bf2719c815d719d1899b4bdb1b81ff6798471094 +Author: Lars Ellenberg +Date: Thu Apr 15 19:03:05 2010 +0200 + + Cast to volatile to avoid warnings from -Wcast-qual + + https://bugzilla.gnome.org/show_bug.cgi?id=457641 + +diff --git a/glib/gatomic.h b/glib/gatomic.h +index 7d9c318..22b28d9 100644 +--- a/glib/gatomic.h ++++ b/glib/gatomic.h +@@ -64,16 +64,16 @@ void g_atomic_pointer_set (volatile gpointer G_GNUC_MAY_ALI + #else + # define g_atomic_int_get(atomic) \ + ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gint) ? 1 : -1]), \ +- (g_atomic_int_get) ((volatile gint G_GNUC_MAY_ALIAS *) (void *) (atomic))) ++ (g_atomic_int_get) ((volatile gint G_GNUC_MAY_ALIAS *) (volatile void *) (atomic))) + # define g_atomic_int_set(atomic, newval) \ + ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gint) ? 1 : -1]), \ +- (g_atomic_int_set) ((volatile gint G_GNUC_MAY_ALIAS *) (void *) (atomic), (newval))) ++ (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 *) (void *) (atomic))) ++ (g_atomic_pointer_get) ((volatile gpointer G_GNUC_MAY_ALIAS *) (volatile void *) (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))) ++ (g_atomic_pointer_set) ((volatile gpointer G_GNUC_MAY_ALIAS *) (volatile void *) (atomic), (newval))) + #endif /* G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */ + + #define g_atomic_int_inc(atomic) (g_atomic_int_add ((atomic), 1)) diff --git a/meta/packages/glib-2.0/glib-2.0-2.24.1/glib-gettextize-dir.patch b/meta/packages/glib-2.0/glib-2.0-2.24.1/glib-gettextize-dir.patch new file mode 100644 index 000000000..c44e49155 --- /dev/null +++ b/meta/packages/glib-2.0/glib-2.0-2.24.1/glib-gettextize-dir.patch @@ -0,0 +1,19 @@ +# 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 , 06/25/2010 +--- glib-2.10.3/glib-gettextize.in.old 2006-06-21 12:46:45.000000000 +0100 ++++ glib-2.10.3/glib-gettextize.in 2006-06-21 12:48:14.000000000 +0100 +@@ -49,7 +49,7 @@ + ;; + esac + +-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/meta/packages/glib-2.0/glib-2.0_2.22.3.bb b/meta/packages/glib-2.0/glib-2.0_2.22.3.bb deleted file mode 100644 index 26d91a9cf..000000000 --- a/meta/packages/glib-2.0/glib-2.0_2.22.3.bb +++ /dev/null @@ -1,11 +0,0 @@ -require glib.inc - -PR = "r1" - -SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glib/2.22/glib-${PV}.tar.bz2 \ - file://glibconfig-sysdefs.h \ - file://configure-libtool.patch;patch=1" - -SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch;patch=1" - -BBCLASSEXTEND = "native" diff --git a/meta/packages/glib-2.0/glib-2.0_2.24.1.bb b/meta/packages/glib-2.0/glib-2.0_2.24.1.bb new file mode 100644 index 000000000..d8d1cc52d --- /dev/null +++ b/meta/packages/glib-2.0/glib-2.0_2.24.1.bb @@ -0,0 +1,11 @@ +require glib.inc + +PR = "r0" + +SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glib/2.24/glib-${PV}.tar.bz2 \ + file://configure-libtool.patch \ + file://gatomic-proper-pointer-get-cast.patch \ + file://60_wait-longer-for-threads-to-die.patch" + +SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch" +BBCLASSEXTEND = "native" diff --git a/meta/packages/glib-2.0/glib.inc b/meta/packages/glib-2.0/glib.inc index f4167e8bf..6e7f6a334 100644 --- a/meta/packages/glib-2.0/glib.inc +++ b/meta/packages/glib-2.0/glib.inc @@ -1,35 +1,32 @@ -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" +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" +# pcre is under BSD; +# docs/reference/COPYING is with a 'public domai'-like license! +LICENSE = "LGPLv2+ & BSD & public domain" +LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \ + file://glib/glib.h;startline=4;endline=17;md5=a4332fe58b076f29d07c9c066d2967b6 \ + file://gmodule/COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \ + file://gmodule/gmodule.h;startline=4;endline=17;md5=76ab161b37202cd004073c42fac276ed \ + file://glib/pcre/COPYING;md5=266ebc3ff74ee9ce6fad65577667c0f4 \ + file://glib/pcre/pcre.h;startline=11;endline=35;md5=000109ccf7c4c470b74046e2cc59f7e3 \ + file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc" +BUGTRACKER = "http://bugzilla.gnome.org" SECTION = "libs" -PRIORITY = "optional" -DEPENDS = "glib-2.0-native gtk-doc-native virtual/libiconv virtual/libintl" + +require glib-2.0.inc + +DEPENDS = "glib-2.0-native gtk-doc-native virtual/libiconv virtual/libintl zip" DEPENDS_virtclass-native = "gtk-doc-native pkgconfig-native gettext-native" PACKAGES =+ "glib-2.0-utils " LEAD_SONAME = "libglib-2.0.*" FILES_glib-2.0-utils = "${bindir}/*" -EXTRA_OECONF = "--enable-included-printf=no" - -S = "${WORKDIR}/glib-${PV}" - inherit autotools pkgconfig gettext -require glib-2.0.inc - -acpaths = "" -do_configure_prepend () { - install -m 0644 ${WORKDIR}/glibconfig-sysdefs.h . -} +S = "${WORKDIR}/glib-${PV}" -do_install_append () { - install -d ${D}${includedir}/glib-2.0/glib - install -m 0755 ${S}/glibconfig.h ${D}${includedir}/glib-2.0/glibconfig.h -} +EXTRA_OECONF = "--disable-debug --enable-included-printf=no" +EXTRA_OECONF_virtclass-native = "" FILES_${PN} = "${libdir}/lib*${SOLIBS}" FILES_${PN}-dev += "${libdir}/glib-2.0/include" -- cgit v1.2.3