diff options
| -rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/no-iconv.patch | 104 | ||||
| -rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0_2.27.5.bb | 5 | ||||
| -rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0_2.28.6.bb | 4 | ||||
| -rw-r--r-- | meta/recipes-core/glib-2.0/glib.inc | 2 |
4 files changed, 112 insertions, 3 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/no-iconv.patch b/meta/recipes-core/glib-2.0/glib-2.0/no-iconv.patch new file mode 100644 index 0000000000..cca57d4f78 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/no-iconv.patch | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | We provide dummy implementation of iconv functionality if it does not find | ||
| 2 | iconv which will be case with uclibc. We remove the check for iconv in configure | ||
| 3 | |||
| 4 | This is needed when libintl and libiconv is not available. It wont have any | ||
| 5 | impact on case when they are available. | ||
| 6 | |||
| 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 8 | |||
| 9 | |||
| 10 | Index: glib-2.26.1/glib/gconvert.c | ||
| 11 | =================================================================== | ||
| 12 | --- glib-2.26.1.orig/glib/gconvert.c | ||
| 13 | +++ glib-2.26.1/glib/gconvert.c | ||
| 14 | @@ -23,7 +23,7 @@ | ||
| 15 | #include "config.h" | ||
| 16 | #include "glibconfig.h" | ||
| 17 | |||
| 18 | -#ifndef G_OS_WIN32 | ||
| 19 | +#if !defined G_OS_WIN32 && defined HAVE_ICONV_H | ||
| 20 | #include <iconv.h> | ||
| 21 | #endif | ||
| 22 | #include <errno.h> | ||
| 23 | @@ -65,6 +65,28 @@ | ||
| 24 | #error GNU libiconv not in use but included iconv.h is from libiconv | ||
| 25 | #endif | ||
| 26 | |||
| 27 | +#ifndef HAVE_ICONV_H | ||
| 28 | +typedef void *iconv_t; | ||
| 29 | + | ||
| 30 | +iconv_t iconv_open(const char *tocode, const char *fromcode) | ||
| 31 | +{ | ||
| 32 | + return (iconv_t)(-1); | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +int iconv_close(iconv_t cd) | ||
| 36 | +{ | ||
| 37 | + free(cd); | ||
| 38 | + | ||
| 39 | + return 0; | ||
| 40 | +} | ||
| 41 | +size_t iconv (iconv_t __cd, char **__inbuf, | ||
| 42 | + size_t *__inbytesleft, | ||
| 43 | + char **__outbuf, | ||
| 44 | + size_t *__outbytesleft) | ||
| 45 | +{ | ||
| 46 | + return 0; | ||
| 47 | +} | ||
| 48 | +#endif | ||
| 49 | |||
| 50 | /** | ||
| 51 | * SECTION:conversions | ||
| 52 | Index: glib-2.26.1/configure.ac | ||
| 53 | =================================================================== | ||
| 54 | --- glib-2.26.1.orig/configure.ac | ||
| 55 | +++ glib-2.26.1/configure.ac | ||
| 56 | @@ -373,46 +373,8 @@ dnl *** Tests for iconv *** | ||
| 57 | dnl *********************** | ||
| 58 | dnl | ||
| 59 | dnl We do this before the gettext checks, to avoid distortion | ||
| 60 | - | ||
| 61 | -dnl On Windows we use a native implementation | ||
| 62 | - | ||
| 63 | -if test x"$glib_native_win32" = xyes; then | ||
| 64 | - with_libiconv=native | ||
| 65 | -else | ||
| 66 | - AC_ARG_WITH(libiconv, | ||
| 67 | - [AC_HELP_STRING([--with-libiconv=@<:@no/gnu/native@:>@], | ||
| 68 | - [use the libiconv library])],, | ||
| 69 | - [with_libiconv=maybe]) | ||
| 70 | - | ||
| 71 | - found_iconv=no | ||
| 72 | - case $with_libiconv in | ||
| 73 | - maybe) | ||
| 74 | - # Check in the C library first | ||
| 75 | - AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes]) | ||
| 76 | - # Check if we have GNU libiconv | ||
| 77 | - if test $found_iconv = "no"; then | ||
| 78 | - AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes]) | ||
| 79 | - fi | ||
| 80 | - # Check if we have a iconv in -liconv, possibly from vendor | ||
| 81 | - if test $found_iconv = "no"; then | ||
| 82 | - AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes]) | ||
| 83 | - fi | ||
| 84 | - ;; | ||
| 85 | - no) | ||
| 86 | - AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes]) | ||
| 87 | - ;; | ||
| 88 | - gnu|yes) | ||
| 89 | - AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes]) | ||
| 90 | - ;; | ||
| 91 | - native) | ||
| 92 | - AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes]) | ||
| 93 | - ;; | ||
| 94 | - esac | ||
| 95 | - | ||
| 96 | - if test "x$found_iconv" = "xno" ; then | ||
| 97 | - AC_MSG_ERROR([*** No iconv() implementation found in C library or libiconv]) | ||
| 98 | - fi | ||
| 99 | -fi | ||
| 100 | +found_iconv=yes | ||
| 101 | +with_libiconv=no | ||
| 102 | |||
| 103 | gl_GLIBC21 | ||
| 104 | AC_ARG_ENABLE(iconv-cache, | ||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.27.5.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.27.5.bb index 4014a1b61b..776284e7c0 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.27.5.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.27.5.bb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | require glib.inc | 1 | require glib.inc |
| 2 | 2 | ||
| 3 | PR = "r3" | 3 | PR = "r4" |
| 4 | 4 | ||
| 5 | SRC_URI = "${GNOME_MIRROR}/glib/2.27/glib-${PV}.tar.bz2 \ | 5 | SRC_URI = "${GNOME_MIRROR}/glib/2.27/glib-${PV}.tar.bz2 \ |
| 6 | file://configure-libtool.patch \ | 6 | file://configure-libtool.patch \ |
| @@ -13,6 +13,9 @@ SRC_URI[sha256sum] = "aad3038db865b762e01b1dc455ffd601b4083c069018d290e5fdfe1a61 | |||
| 13 | 13 | ||
| 14 | SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch" | 14 | SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch" |
| 15 | 15 | ||
| 16 | # Only apply this patch for target recipe on uclibc | ||
| 17 | SRC_URI_append_libc-uclibc = " ${@['', 'file://no-iconv.patch']['${PN}' == '${BPN}']}" | ||
| 18 | |||
| 16 | BBCLASSEXTEND = "native nativesdk" | 19 | BBCLASSEXTEND = "native nativesdk" |
| 17 | 20 | ||
| 18 | DEFAULT_PREFERENCE = "-1" | 21 | DEFAULT_PREFERENCE = "-1" |
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.28.6.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.28.6.bb index 6b6c1f5ab0..ca5f4c8b1c 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.28.6.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.28.6.bb | |||
| @@ -1,13 +1,15 @@ | |||
| 1 | require glib.inc | 1 | require glib.inc |
| 2 | 2 | ||
| 3 | PE = "1" | 3 | PE = "1" |
| 4 | PR = "r0" | 4 | PR = "r1" |
| 5 | 5 | ||
| 6 | SRC_URI = "${GNOME_MIRROR}/glib/2.28/glib-${PV}.tar.bz2 \ | 6 | SRC_URI = "${GNOME_MIRROR}/glib/2.28/glib-${PV}.tar.bz2 \ |
| 7 | file://configure-libtool.patch \ | 7 | file://configure-libtool.patch \ |
| 8 | file://60_wait-longer-for-threads-to-die.patch \ | 8 | file://60_wait-longer-for-threads-to-die.patch \ |
| 9 | file://g_once_init_enter.patch \ | 9 | file://g_once_init_enter.patch \ |
| 10 | " | 10 | " |
| 11 | # Only apply this patch for target recipe on uclibc | ||
| 12 | SRC_URI_append_libc-uclibc = " ${@['', 'file://no-iconv.patch']['${PN}' == '${BPN}']}" | ||
| 11 | 13 | ||
| 12 | SRC_URI[md5sum] = "7d8fc15ae70d5111c0cf2a79d50ef717" | 14 | SRC_URI[md5sum] = "7d8fc15ae70d5111c0cf2a79d50ef717" |
| 13 | SRC_URI[sha256sum] = "557fb7c39d21b9359fbac51fd6b0b883bc97a2561c0166eef993a4078312f578" | 15 | SRC_URI[sha256sum] = "557fb7c39d21b9359fbac51fd6b0b883bc97a2561c0166eef993a4078312f578" |
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc index 9b6e17bbf9..83f19907df 100644 --- a/meta/recipes-core/glib-2.0/glib.inc +++ b/meta/recipes-core/glib-2.0/glib.inc | |||
| @@ -15,7 +15,7 @@ SECTION = "libs" | |||
| 15 | 15 | ||
| 16 | require glib-2.0.inc | 16 | require glib-2.0.inc |
| 17 | 17 | ||
| 18 | DEPENDS = "glib-2.0-native gtk-doc-native virtual/libiconv virtual/libintl zip dbus" | 18 | DEPENDS = "glib-2.0-native gtk-doc-native zip dbus" |
| 19 | DEPENDS_virtclass-native = "gtk-doc-native pkgconfig-native gettext-native dbus-native" | 19 | DEPENDS_virtclass-native = "gtk-doc-native pkgconfig-native gettext-native dbus-native" |
| 20 | DEPENDS_virtclass-nativesdk = "libtool-nativesdk" | 20 | DEPENDS_virtclass-nativesdk = "libtool-nativesdk" |
| 21 | PACKAGES =+ "glib-2.0-utils " | 21 | PACKAGES =+ "glib-2.0-utils " |
