summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-04-29 14:59:15 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-01 12:38:07 +0100
commitd1dfd24324b464ccc193996eee3f1c20564d9e89 (patch)
tree6e871bd1eb7ea3c520e10741a5cb637b84e5c565 /meta
parent2baaea26917871022fd736d94c511a16be6299b1 (diff)
downloadpoky-d1dfd24324b464ccc193996eee3f1c20564d9e89.tar.gz
glib-2.0: Dont disable iconv for uclibc
Currently we stub out iconv in glib when building for uclibc which is not needed and infact results in building systems with false hope of having iconv and they misbehave during runtime (From OE-Core rev: d13b1dc1897af733cc2ec22df50ae9d1fd0b48af) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/no-iconv.patch106
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.30.3.bb5
2 files changed, 1 insertions, 110 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
deleted file mode 100644
index 9c06fe600e..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/no-iconv.patch
+++ /dev/null
@@ -1,106 +0,0 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3We provide dummy implementation of iconv functionality if it does not find
4iconv which will be case with uclibc. We remove the check for iconv in configure
5
6This is needed when libintl and libiconv is not available. It wont have any
7impact on case when they are available.
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11
12Index: glib-2.26.1/glib/gconvert.c
13===================================================================
14--- glib-2.26.1.orig/glib/gconvert.c
15+++ glib-2.26.1/glib/gconvert.c
16@@ -23,7 +23,7 @@
17 #include "config.h"
18 #include "glibconfig.h"
19
20-#ifndef G_OS_WIN32
21+#if !defined G_OS_WIN32 && defined HAVE_ICONV_H
22 #include <iconv.h>
23 #endif
24 #include <errno.h>
25@@ -65,6 +65,28 @@
26 #error GNU libiconv not in use but included iconv.h is from libiconv
27 #endif
28
29+#ifndef HAVE_ICONV_H
30+typedef void *iconv_t;
31+
32+iconv_t iconv_open(const char *tocode, const char *fromcode)
33+{
34+ return (iconv_t)(-1);
35+}
36+
37+int iconv_close(iconv_t cd)
38+{
39+ free(cd);
40+
41+ return 0;
42+}
43+size_t iconv (iconv_t __cd, char **__inbuf,
44+ size_t *__inbytesleft,
45+ char **__outbuf,
46+ size_t *__outbytesleft)
47+{
48+ return 0;
49+}
50+#endif
51
52 /**
53 * SECTION:conversions
54Index: glib-2.26.1/configure.ac
55===================================================================
56--- glib-2.26.1.orig/configure.ac
57+++ glib-2.26.1/configure.ac
58@@ -373,46 +373,8 @@ dnl *** Tests for iconv ***
59 dnl ***********************
60 dnl
61 dnl We do this before the gettext checks, to avoid distortion
62-
63-dnl On Windows we use a native implementation
64-
65-if test x"$glib_native_win32" = xyes; then
66- with_libiconv=native
67-else
68- AC_ARG_WITH(libiconv,
69- [AC_HELP_STRING([--with-libiconv=@<:@no/gnu/native@:>@],
70- [use the libiconv library])],,
71- [with_libiconv=maybe])
72-
73- found_iconv=no
74- case $with_libiconv in
75- maybe)
76- # Check in the C library first
77- AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes])
78- # Check if we have GNU libiconv
79- if test $found_iconv = "no"; then
80- AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes])
81- fi
82- # Check if we have a iconv in -liconv, possibly from vendor
83- if test $found_iconv = "no"; then
84- AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes])
85- fi
86- ;;
87- no)
88- AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes])
89- ;;
90- gnu|yes)
91- AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes])
92- ;;
93- native)
94- AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes])
95- ;;
96- esac
97-
98- if test "x$found_iconv" = "xno" ; then
99- AC_MSG_ERROR([*** No iconv() implementation found in C library or libiconv])
100- fi
101-fi
102+found_iconv=yes
103+with_libiconv=no
104
105 gl_GLIBC21
106 AC_ARG_ENABLE(iconv-cache,
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.30.3.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.30.3.bb
index f1f9217d1b..405402e7ea 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.30.3.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.30.3.bb
@@ -1,6 +1,6 @@
1require glib.inc 1require glib.inc
2 2
3PR = "r1" 3PR = "r2"
4PE = "1" 4PE = "1"
5 5
6DEPENDS += "libffi python-argparse-native zlib" 6DEPENDS += "libffi python-argparse-native zlib"
@@ -19,9 +19,6 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
19SRC_URI[md5sum] = "0f9fa329c6c1012d0fd861ad3d8a4520" 19SRC_URI[md5sum] = "0f9fa329c6c1012d0fd861ad3d8a4520"
20SRC_URI[sha256sum] = "e6cbb27c71c445993346e785e8609cc75cea2941e32312e544872feba572dd27" 20SRC_URI[sha256sum] = "e6cbb27c71c445993346e785e8609cc75cea2941e32312e544872feba572dd27"
21 21
22# Only apply this patch for target recipe on uclibc
23SRC_URI_append_libc-uclibc = " ${@['', 'file://no-iconv.patch']['${PN}' == '${BPN}']}"
24
25SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch" 22SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch"
26BBCLASSEXTEND = "native nativesdk" 23BBCLASSEXTEND = "native nativesdk"
27 24