]> code.ossystems Code Review - openembedded-core.git/commitdiff
glib-2.0: Inherit gettext should provide right libintl so remove from DEPENDS
authorKhem Raj <raj.khem@gmail.com>
Fri, 1 Apr 2011 03:36:42 +0000 (20:36 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 Apr 2011 08:52:30 +0000 (09:52 +0100)
Add no-iconv.patch to provide dummy libiconv in case of uclibc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
meta/recipes-core/glib-2.0/glib-2.0/no-iconv.patch [new file with mode: 0644]
meta/recipes-core/glib-2.0/glib-2.0_2.27.5.bb
meta/recipes-core/glib-2.0/glib-2.0_2.28.6.bb
meta/recipes-core/glib-2.0/glib.inc

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 (file)
index 0000000..cca57d4
--- /dev/null
@@ -0,0 +1,104 @@
+We provide dummy implementation of iconv functionality if it does not find
+iconv which will be case with uclibc. We remove the check for iconv in configure
+
+This is needed when libintl and libiconv is not available. It wont have any
+impact on case when they are available.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+
+Index: glib-2.26.1/glib/gconvert.c
+===================================================================
+--- glib-2.26.1.orig/glib/gconvert.c
++++ glib-2.26.1/glib/gconvert.c
+@@ -23,7 +23,7 @@
+ #include "config.h"
+ #include "glibconfig.h"
+-#ifndef G_OS_WIN32
++#if !defined G_OS_WIN32 && defined HAVE_ICONV_H
+ #include <iconv.h>
+ #endif
+ #include <errno.h>
+@@ -65,6 +65,28 @@
+ #error GNU libiconv not in use but included iconv.h is from libiconv
+ #endif
++#ifndef HAVE_ICONV_H
++typedef void *iconv_t;
++
++iconv_t iconv_open(const char *tocode, const char *fromcode)
++{
++      return (iconv_t)(-1);
++}
++
++int iconv_close(iconv_t cd)
++{
++      free(cd);
++
++      return 0;
++}
++size_t iconv (iconv_t __cd, char **__inbuf,
++                     size_t *__inbytesleft,
++                     char **__outbuf,
++                     size_t *__outbytesleft)
++{
++      return 0;
++}
++#endif
+ /**
+  * SECTION:conversions
+Index: glib-2.26.1/configure.ac
+===================================================================
+--- glib-2.26.1.orig/configure.ac
++++ glib-2.26.1/configure.ac
+@@ -373,46 +373,8 @@ dnl *** Tests for iconv ***
+ dnl ***********************
+ dnl
+ dnl We do this before the gettext checks, to avoid distortion
+-
+-dnl On Windows we use a native implementation
+-
+-if test x"$glib_native_win32" = xyes; then
+-  with_libiconv=native
+-else
+-  AC_ARG_WITH(libiconv,
+-            [AC_HELP_STRING([--with-libiconv=@<:@no/gnu/native@:>@],
+-                            [use the libiconv library])],,
+-            [with_libiconv=maybe])
+-
+-  found_iconv=no
+-  case $with_libiconv in
+-    maybe)
+-      # Check in the C library first
+-      AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes])
+-      # Check if we have GNU libiconv
+-      if test $found_iconv = "no"; then
+-      AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes])
+-      fi
+-      # Check if we have a iconv in -liconv, possibly from vendor
+-      if test $found_iconv = "no"; then
+-      AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes])
+-      fi
+-      ;;
+-    no)
+-      AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes])
+-      ;;
+-    gnu|yes)
+-      AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes])
+-      ;;
+-    native)
+-      AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes])
+-      ;;
+-  esac
+-
+-  if test "x$found_iconv" = "xno" ; then
+-     AC_MSG_ERROR([*** No iconv() implementation found in C library or libiconv])
+-  fi
+-fi
++found_iconv=yes
++with_libiconv=no
+ gl_GLIBC21
+ AC_ARG_ENABLE(iconv-cache, 
index 4014a1b61ba7c10a3f30363e0497d82c80bf23a9..776284e7c028a0acc847b6344e3a3a25e3213a2d 100644 (file)
@@ -1,6 +1,6 @@
 require glib.inc
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "${GNOME_MIRROR}/glib/2.27/glib-${PV}.tar.bz2 \
            file://configure-libtool.patch \
@@ -13,6 +13,9 @@ SRC_URI[sha256sum] = "aad3038db865b762e01b1dc455ffd601b4083c069018d290e5fdfe1a61
 
 SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch"
 
+# Only apply this patch for target recipe on uclibc
+SRC_URI_append_libc-uclibc = " ${@['', 'file://no-iconv.patch']['${PN}' == '${BPN}']}"
+
 BBCLASSEXTEND = "native nativesdk"
 
 DEFAULT_PREFERENCE = "-1"
index 6b6c1f5ab0c1e6f008a2cfc2cc4ea8dd0b1c4d48..ca5f4c8b1c778668b2f0537fa56c8d63c76e0d89 100644 (file)
@@ -1,13 +1,15 @@
 require glib.inc
 
 PE = "1"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "${GNOME_MIRROR}/glib/2.28/glib-${PV}.tar.bz2 \
            file://configure-libtool.patch \
            file://60_wait-longer-for-threads-to-die.patch \
            file://g_once_init_enter.patch \
           "
+# Only apply this patch for target recipe on uclibc
+SRC_URI_append_libc-uclibc = " ${@['', 'file://no-iconv.patch']['${PN}' == '${BPN}']}"
 
 SRC_URI[md5sum] = "7d8fc15ae70d5111c0cf2a79d50ef717"
 SRC_URI[sha256sum] = "557fb7c39d21b9359fbac51fd6b0b883bc97a2561c0166eef993a4078312f578"
index 9b6e17bbf906b40a135f17ea7112c231aed8d5da..83f19907df5e58c0d2cd7cc06ceba69e5e703373 100644 (file)
@@ -15,7 +15,7 @@ SECTION = "libs"
 
 require glib-2.0.inc
 
-DEPENDS = "glib-2.0-native gtk-doc-native virtual/libiconv virtual/libintl zip dbus"
+DEPENDS = "glib-2.0-native gtk-doc-native zip dbus"
 DEPENDS_virtclass-native = "gtk-doc-native pkgconfig-native gettext-native dbus-native"
 DEPENDS_virtclass-nativesdk = "libtool-nativesdk"
 PACKAGES =+ "glib-2.0-utils "