summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-core/glib-2.0
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core/glib-2.0')
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch66
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb)12
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc15
8 files changed, 132 insertions, 107 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
new file mode 100644
index 000000000..aee96aaa6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
@@ -0,0 +1,42 @@
+From d6501b107940e9f548c89236d773c6d33c15a5c9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 16 Apr 2016 13:28:59 -0700
+Subject: [PATCH 1/2] Do not ignore return value of write()
+
+gcc warns about ignoring return value when compiling
+with fortify turned on.
+
+assert when write() fails
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ glib/tests/unix.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/glib/tests/unix.c b/glib/tests/unix.c
+index 3543458..4e7ed85 100644
+--- a/glib/tests/unix.c
++++ b/glib/tests/unix.c
+@@ -32,14 +32,15 @@ test_pipe (void)
+ GError *error = NULL;
+ int pipefd[2];
+ char buf[1024];
+- ssize_t bytes_read;
++ ssize_t bytes_read, bytes_written;
+ gboolean res;
+
+ res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error);
+ g_assert (res);
+ g_assert_no_error (error);
+
+- write (pipefd[1], "hello", sizeof ("hello"));
++ bytes_written = write (pipefd[1], "hello", sizeof ("hello"));
++ g_assert (bytes_written != -1 && "write() failed");
+ memset (buf, 0, sizeof (buf));
+ bytes_read = read (pipefd[0], buf, sizeof(buf) - 1);
+ g_assert_cmpint (bytes_read, >, 0);
+--
+2.8.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
deleted file mode 100644
index 0be36316b..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit 9b38d507ec37b3d7d4df6095fa7ed16b47d399f7
-Author: Drew Moseley <drew_moseley@mentor.com>
-Date: Sat Mar 29 21:10:43 2014 -0400
-
- configure.ac: Do not use readlink when cross compiling.
-
- Do not use readlink to set ABS_GLIB_RUNTIME_LIBDIR when cross
- compiling. Doing so causes host paths to potentially pollute
- the target.
-
- Note that in this case the path is not converted to absolute if
- it contains any ".." references so it's not completely correct.
-
- Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=727575]
- Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
-
-diff -rub glib-2.38.2.orig/configure.ac glib-2.38.2/configure.ac
---- glib-2.38.2.orig/configure.ac 2014-04-03 20:17:13.035567143 -0400
-+++ glib-2.38.2/configure.ac 2014-04-03 20:19:07.071566057 -0400
-@@ -275,7 +275,11 @@
- [],
- [with_runtime_libdir=""])
- GLIB_RUNTIME_LIBDIR="$with_runtime_libdir"
-+AS_IF([ test $cross_compiling = yes ], [
-+ABS_GLIB_RUNTIME_LIBDIR="$libdir/$with_runtime_libdir"
-+], [
- ABS_GLIB_RUNTIME_LIBDIR="`readlink -m $libdir/$with_runtime_libdir`"
-+])
- AC_SUBST(GLIB_RUNTIME_LIBDIR)
- AC_SUBST(ABS_GLIB_RUNTIME_LIBDIR)
- AM_CONDITIONAL(HAVE_GLIB_RUNTIME_LIBDIR, [test "x$with_runtime_libdir" != "x"])
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch
new file mode 100644
index 000000000..f61fa0ae6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch
@@ -0,0 +1,42 @@
+From b06b22fecc7deda8c65e28670562ca2371e4e725 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 16 Apr 2016 13:43:54 -0700
+Subject: [PATCH 2/2] tests: Ignore y2k warnings
+
+silences
+| ../../../../../../../../workspace/sources/glib-2.0/glib/tests/gdatetime.c: In function 'test_strftime':
+| ../../../../../../../../workspace/sources/glib-2.0/glib/tests/gdatetime.c:1338:3: error: '%c' yields only last 2 digits of year in some locales [-Werror=format-y2k]
+| "a%a A%A b%b B%B c%c C%C d%d e%e F%F g%g G%G h%h H%H I%I j%j m%m M%M "
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ glib/tests/gdatetime.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
+index 16a163c..e6062fc 100644
+--- a/glib/tests/gdatetime.c
++++ b/glib/tests/gdatetime.c
+@@ -1326,6 +1326,9 @@ test_z (void)
+ g_time_zone_unref (tz);
+ }
+
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wformat-y2k"
++
+ static void
+ test_strftime (void)
+ {
+@@ -1351,6 +1354,7 @@ test_strftime (void)
+ }
+ #endif
+ }
++#pragma GCC diagnostic pop
+
+ static void
+ test_find_interval (void)
+--
+2.8.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
index f1e688cac..9b4ded14d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
@@ -46,7 +46,7 @@ index 868873f..533e454 100644
@@ -545,7 +548,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --
EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
- CLEANFILES += test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
+ CLEANFILES += test-generated.txt test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
-endif # !CROSS_COMPILING
BUILT_SOURCES += giotypefuncs.c
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch
deleted file mode 100644
index 9759d11e3..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-configure.ac: change readlink -f to -m
-
-Change "readlink -f" to "readlink -m" since $libdir/$with_runtime_libdir
-may not exist.
-
-This patch should go to the upstream, I will send it sooner.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
---- a/configure.ac
-+++ b/configure.ac
-@@ -271,7 +271,7 @@ AC_ARG_WITH(runtime-libdir,
- [],
- [with_runtime_libdir=""])
- GLIB_RUNTIME_LIBDIR="$with_runtime_libdir"
--ABS_GLIB_RUNTIME_LIBDIR="`readlink -f $libdir/$with_runtime_libdir`"
-+ABS_GLIB_RUNTIME_LIBDIR="`readlink -m $libdir/$with_runtime_libdir`"
- AC_SUBST(GLIB_RUNTIME_LIBDIR)
- AC_SUBST(ABS_GLIB_RUNTIME_LIBDIR)
- AM_CONDITIONAL(HAVE_GLIB_RUNTIME_LIBDIR, [test "x$with_runtime_libdir" != "x"])
---
-1.8.1.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
index f9e3f3dba..65d5b43f9 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
@@ -6,44 +6,42 @@ This solves relocation problems with GIOModule for native builds of glib.
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@intel.com>
+Port patch to 2.48
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ gio/giomodule.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
diff --git a/gio/giomodule.c b/gio/giomodule.c
-index 56c498c..a2e32b7 100644
+index da7c167..cc0bc7c 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
-@@ -47,6 +47,27 @@
- #include "gdesktopappinfo.h"
+@@ -40,6 +40,8 @@
+ #include "gnetworkmonitor.h"
+ #ifdef G_OS_WIN32
+ #include "gregistrysettingsbackend.h"
++#else
++#include <dlfcn.h>
#endif
+ #include <glib/gstdio.h>
-+#include <dlfcn.h>
-+
-+/*
-+ * Generate a GIO module directory based on where glib is installed
-+ */
-+static const char *
-+_get_gio_module_dir (void)
-+{
-+ Dl_info info;
-+
-+ if (dladdr (g_io_module_new, &info)) {
-+ char *libdir = g_path_get_dirname (info.dli_fname);
-+ char *dir = g_build_filename (libdir, "gio", "modules", NULL);
-+ g_free (libdir);
-+ return dir;
-+ } else {
-+ return GIO_MODULE_DIR;
-+ }
-+}
-+
+@@ -1036,7 +1038,15 @@ get_gio_module_dir (void)
+ #endif
+ g_free (install_dir);
+ #else
+- module_dir = g_strdup (GIO_MODULE_DIR);
++ Dl_info info;
+
- /**
- * SECTION:giomodule
- * @short_description: Loadable GIO Modules
-@@ -1057,7 +1078,7 @@ _g_io_modules_ensure_loaded (void)
- /* Then load the compiled in path */
- module_dir = g_getenv ("GIO_MODULE_DIR");
- if (module_dir == NULL)
-- module_dir = GIO_MODULE_DIR;
-+ module_dir = _get_gio_module_dir ();
-
- g_io_modules_scan_all_in_directory_with_scope (module_dir, scope);
++ if (dladdr (g_io_module_new, &info)) {
++ char *libdir = g_path_get_dirname (info.dli_fname);
++ module_dir = g_build_filename (libdir, "gio", "modules", NULL);
++ g_free (libdir);
++ } else {
++ module_dir = g_strdup (GIO_MODULE_DIR);
++ }
+ #endif
+ }
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb
index 8e445b415..a45f64444 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb
@@ -7,20 +7,20 @@ SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://configure-libtool.patch \
file://fix-conflicting-rand.patch \
- file://glib-2.0-configure-readlink.patch \
file://run-ptest \
file://ptest-paths.patch \
file://uclibc_musl_translation.patch \
- file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \
file://allow-run-media-sdX-drive-mount-if-username-root.patch \
- file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
+ file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
file://Enable-more-tests-while-cross-compiling.patch \
file://gi-exclude.patch \
file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
- "
+ file://0001-Do-not-ignore-return-value-of-write.patch \
+ file://0002-tests-Ignore-y2k-warnings.patch \
+ "
SRC_URI_append_class-native = " file://glib-gettextize-dir.patch \
file://relocate-modules.patch"
-SRC_URI[md5sum] = "7f815d6e46df68e070cb421ed7f1139e"
-SRC_URI[sha256sum] = "5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db"
+SRC_URI[md5sum] = "f4ac1aa2efd4f5798c37625ea697ac57"
+SRC_URI[sha256sum] = "f25e751589cb1a58826eac24fbd4186cda4518af772806b666a3f91f66e6d3f4"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
index e764fad13..906e0d4d5 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
@@ -26,7 +26,7 @@ PACKAGES += "${PN}-codegen ${PN}-utils"
LEAD_SONAME = "libglib-2.0.*"
-inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache
+inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache python3native
S = "${WORKDIR}/glib-${PV}"
@@ -44,7 +44,7 @@ EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
EXTRA_OECONF_append_libc-uclibc = " --with-libiconv=gnu"
do_configure_prepend() {
- sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
+ sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
}
FILES_${PN} = "${libdir}/lib*${SOLIBS} \
@@ -59,7 +59,8 @@ FILES_${PN}-dev += "${libdir}/glib-2.0/include \
${bindir}/glib-mkenums \
${bindir}/glib-compile-resources \
${datadir}/glib-2.0/gettext/po/Makefile.in.in \
- ${datadir}/glib-2.0/schemas/gschema.dtd"
+ ${datadir}/glib-2.0/schemas/gschema.dtd \
+ ${datadir}/gettext/its"
FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb"
FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \
${bindir}/gdbus-codegen"
@@ -67,15 +68,19 @@ FILES_${PN}-utils = "${bindir}/*"
ARM_INSTRUCTION_SET_armv4 = "arm"
ARM_INSTRUCTION_SET_armv5 = "arm"
+# Valgrind runtime detection works using hand-written assembly, which
+# doesn't support mips16e
+CPPFLAGS_append_class-target_mips16e = " -DNVALGRIND=1"
USE_NLS = "yes"
do_install_append () {
if [ -f ${D}${bindir}/gtester-report ]; then
- sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python|'
+ sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python3|'
fi
# Remove some unpackaged files
+ rm -rf ${D}${datadir}/glib-2.0/codegen/__pycache__
rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc
rm -f ${D}${datadir}/glib-2.0/codegen/*.pyo
@@ -108,8 +113,6 @@ RDEPENDS_${PN}-ptest += "\
tzdata-asia \
tzdata-europe \
tzdata-posix \
- python-pygobject \
- python-dbus \
shared-mime-info \
"
OpenPOWER on IntegriCloud