diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-03-31 20:36:42 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-04-28 10:45:46 +0100 |
commit | e3e96e60360e7587ed35e9f371fbdbccaa42f839 (patch) | |
tree | 111097b3609dac2c5b0181ef13b77ba5454deefc /meta/recipes-core/glib-2.0/glib-2.0 | |
parent | b65c8e6e0d963a6fcd11aea27c75b195283ff9b6 (diff) | |
download | poky-e3e96e60360e7587ed35e9f371fbdbccaa42f839.tar.gz |
glib-2.0: Inherit gettext should provide right libintl so remove from DEPENDS
Add no-iconv.patch to provide dummy libiconv in case of uclibc
(From OE-Core rev: f06caba152bed7f0b739ed4d3dd3103034d00000)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/no-iconv.patch | 104 |
1 files changed, 104 insertions, 0 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, | ||