changeset 1283:ba8e5317049c

More chipping away at the LFS build. Add basic locale support to uClibc config and hit gettext about the head and shoulders with sed until it compiles despite autoconf still being utterly useless.
author Rob Landley <rob@landley.net>
date Thu, 11 Nov 2010 04:50:39 -0600
parents 44073390f2b3
children 095c9652525e
files sources/baseconfig-uClibc sources/control-images/lfs-bootstrap/mnt/build/gettext.sh sources/control-images/lfs-bootstrap/mnt/build/readline.sh sources/control-images/lfs-bootstrap/mnt/build/setup.nosrc
diffstat 4 files changed, 32 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sources/baseconfig-uClibc	Thu Nov 11 04:49:16 2010 -0600
+++ b/sources/baseconfig-uClibc	Thu Nov 11 04:50:39 2010 -0600
@@ -85,3 +85,9 @@
 UCLIBC_HAS_GNU_GLOB=y
 UCLIBC_BUILD_RELRO=y
 UCLIBC_BUILD_NOEXECSTACK=y
+
+# Optional internationalization stuff
+
+UCLIBC_HAS_LOCALE=y
+UCLIBC_HAS_XLOCALE=y
+UCLIBC_BUILD_MINIMAL_LOCALE=y
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/control-images/lfs-bootstrap/mnt/build/gettext.sh	Thu Nov 11 04:50:39 2010 -0600
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Swap out incestuous knowledge of the internals of glibc for incestuous
+# knowledge of the internals of uClibc.  (Should never trigger anyway.)
+
+sed -i 's/thread_locale->__names\[category]/thread_locale->cur_locale/' \
+  gettext-runtime/intl/localename.c gettext-tools/gnulib-lib/localename.c &&
+sed -i 's%LIBS = @LIBS@%LIBS = @LIBS@ ../libgrep/libgrep.a%' \
+  gettext-tools/src/Makefile.in gettext-tools/tests/Makefile.in &&
+
+./configure --prefix=/usr --docdir=/usr/share/doc/gettext &&
+make -j $CPUS || exit 1
+
+if [ ! -z "$DOCS" ]
+then
+  make check || exit 1
+fi
+
+make install
--- a/sources/control-images/lfs-bootstrap/mnt/build/readline.sh	Thu Nov 11 04:49:16 2010 -0600
+++ b/sources/control-images/lfs-bootstrap/mnt/build/readline.sh	Thu Nov 11 04:50:39 2010 -0600
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-sed -k '/MV.*old/d' Makefile.in &&
+sed -i '/MV.*old/d' Makefile.in &&
 sed -i '/{OLDSUFF}/c:' support/shlib-install &&
 ./configure --prefix=/usr --libdir=/lib &&
 make -j $CPUS SHLIB_LIBS=-lncurses &&
--- a/sources/control-images/lfs-bootstrap/mnt/build/setup.nosrc	Thu Nov 11 04:49:16 2010 -0600
+++ b/sources/control-images/lfs-bootstrap/mnt/build/setup.nosrc	Thu Nov 11 04:50:39 2010 -0600
@@ -1,9 +1,15 @@
 #!/bin/bash
 
+set +h
+
 # Basic setup.  Create directories not in the aboriginal base system.
 
 cd / &&
 
+# The first package (zlib) dies with hush.
+
+ln -sf bash /bin/sh &&
+
 mkdir -p boot etc/opt opt media/floppy media/cdrom srv var/tmp &&
 chmod 0750 root &&
 chmod 1777 tmp var/tmp &&