To merge glib, I had to create fake iconv and gettext routines, echo "sys-devel/gettext-0.14.4" >>/etc/portage/package.provided and then create the gettext utilities (not the gettext library) using the gnu gettext package:
tar xfv gettext-0.12.1 cd gettext-tools ./configure --prefix=/usr --without-included-gettext --disable-shared --disable-nls make make install
which installs the msg* functions and other stuff that is required to build gtk and other multilingual programs. The msg* functions won't actually produce useful output because they are relying on the gettext and iconv stubs, but they will allow the builds to complete.
Uclibc 0.9.29 doesn't have error print progname in the library, so the tools won't compile. Had to add line to end of error.h, but it looks like it is a problem with uclibc, r13641.
# diff -u lib/error.c.orig lib/error.c --- lib/error.c.orig 2006-05-17 01:17:10 +0000 +++ lib/error.c 2006-05-17 01:17:51 +0000 @@ -408,4 +408,6 @@ weak_alias (__error_at_line, error_at_line) #endif +#else +void (*error_print_progname) (void) = 0; #endif
uClibc has a config option UCLIBC_HAS_GETTEXT_AWARENESS that seems to control its implementation of a libintl stub library. The ebuild for uclibc seems to only enable this when nls is on, so we'll have to hack the ebuild (or use the custom configuration file /etc/uclibc/i686-gentoo-linux-uclibc/uclibc.conf when the savedconfig USE flag is turned on)
If I want to include the iconv stubs in the library directly, it looks like I can do this by adding my fake iconv routines into libc/misc/wchar as stub-iconv.c and changing a makefile definition:
ifeq ($(UCLIBC_HAS_LOCALE),y) CSRC += iconv.c else ifeq ($(UCLIBC_HAS_ICONV_AWARENESS),y) CSRC += stub-iconv.c endif endif
and adding the UCLIBC_HAS_ICONV_AWARENESS flag to the global makefile configuration. Also have to modify include/iconv.h to not print the error message if the stub iconv routines are included.
Looks like Mplayer also needs the iconv program, so might have to build that one from the gnu source as well.