Add a choice between installing the full set of supported locales

and installing just the minimal set for tests, after glibc build.
If the second option is chosen, the locale specified in LANG is also
installed, if not in the minimal set.
This commit is contained in:
Pierre Labastie 2012-02-10 09:43:23 +00:00
parent 743414bfa2
commit b339c942c1
5 changed files with 41 additions and 5 deletions

View file

@ -260,7 +260,7 @@ menu "--- BOOK Settings"
default "hppa1.1-unknown-linux-gnu" if PROC_hppa1
default "hppa2.0-unknown-linux-gnu" if PROC_hppa2
default "arm-unknown-linux-gnu" if ARCH_ARM && BOOK_CLFS2
default "arm-unknown-linux-gnueabi" if ARCH_ARM && BOOK_CLFS2
default "arm-unknown-linux-uclibc" if PROC_ARM
default "armv5l-unknown-linux-uclibc" if PROC_ARM5L
@ -980,7 +980,19 @@ menu "--- Build Settings"
string "Language"
default "$LANG"
help
#-- Language information in /etc/profile See <locale -a> for values
#-- LANG variable set in /etc/profile
# See http://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED
# for values (or the file localedata/SUPPORTED in glibc tarball)
config FULL_LOCALE
bool "Install the full set of locales"
default n
help
#-- If set to y, the full set of supported locales
# will be installed. Otherwise, only the minimal set
# necessary for the tests will be installed,
# together with the locale associated to the
# LANG you have chosen, if not in the minimal set.
#--- Groff page
choice

View file

@ -40,6 +40,9 @@
<!-- Locale settings -->
<xsl:param name="lang" select="C"/>
<!-- Install the whole set of locales -->
<xsl:param name='full-locale' select='n'/>
<xsl:template match="/">
<xsl:apply-templates select="//sect1"/>
</xsl:template>
@ -180,8 +183,27 @@ rm -rf $PKG_DEST
<xsl:text>&#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='ch-system-glibc'">
<xsl:copy-of select="//userinput[@remap='locale-full']"/>
<xsl:text>&#xA;</xsl:text>
<xsl:choose>
<xsl:when test="$full-locale='y'">
<xsl:copy-of select="//userinput[@remap='locale-full']"/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="//userinput[@remap='locale-test']"/>
<xsl:text>&#xA;</xsl:text>
<xsl:if test="not(contains(string(//userinput[@remap='locale-test']),$lang)) and $lang!='C' and $lang!='POSIX'">
<xsl:text>if LOCALE=`grep "</xsl:text>
<xsl:value-of select="$lang"/>
<xsl:text>/" $PKGDIR/localedata/SUPPORTED`; then
CHARMAP=`echo $LOCALE | sed 's,[^/]*/\([^ ]*\) [\],\1,'`
INPUT=`echo $LOCALE | sed 's,[/.].*,,'`
LOCALE=`echo $LOCALE | sed 's,/.*,,'`
localedef -i $INPUT -f $CHARMAP $LOCALE
fi
</xsl:text>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:apply-templates
select=".//screen[

View file

@ -141,6 +141,7 @@ extract_commands() { #
--stringparam testsuite $TEST \
--stringparam bomb-testsuite $BOMB_TEST \
--stringparam vim-lang $VIMLANG \
--stringparam full-locale $FULL_LOCALE \
--stringparam timezone $TIMEZONE \
--stringparam page $PAGE \
--stringparam lang $LANG \

View file

@ -41,7 +41,7 @@ inline_doc
local -r CLFS3_book="$BOOK_common $BOOK_clfsX PLATFORM MIPS_LEVEL"
# Build Settings by book
local -r LFS_build="$BUILD_chroot VIMLANG $BUILD_common PKGMNGT"
local -r LFS_build="$BUILD_chroot VIMLANG $BUILD_common PKGMNGT FULL_LOCALE"
local -r HLFS_build="$BUILD_chroot $BUILD_common"
local -r CLFS_build="$BUILD_chroot VIMLANG $BUILD_common"
local -r CLFS2_build="STRIP VIMLANG $BUILD_common"

1
jhalfs
View file

@ -107,6 +107,7 @@ BOMB_TEST=${BOMB_TEST:-n}
STRIP=${STRIP:=n}
REPORT=${REPORT:=n}
VIMLANG=${VIMLANG:-n}
FULL_LOCALE=${FULL_LOCALE:-n}
GRSECURITY_HOST=${GRSECURITY_HOST:-n}
CUSTOM_TOOLS=${CUSTOM_TOOLS:-n}
REBUILD_MAKEFILE=${REBUILD_MAKEFILE:-n}