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:
parent
743414bfa2
commit
b339c942c1
5 changed files with 41 additions and 5 deletions
16
Config.in
16
Config.in
|
@ -260,7 +260,7 @@ menu "--- BOOK Settings"
|
||||||
default "hppa1.1-unknown-linux-gnu" if PROC_hppa1
|
default "hppa1.1-unknown-linux-gnu" if PROC_hppa1
|
||||||
default "hppa2.0-unknown-linux-gnu" if PROC_hppa2
|
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 "arm-unknown-linux-uclibc" if PROC_ARM
|
||||||
default "armv5l-unknown-linux-uclibc" if PROC_ARM5L
|
default "armv5l-unknown-linux-uclibc" if PROC_ARM5L
|
||||||
|
@ -980,7 +980,19 @@ menu "--- Build Settings"
|
||||||
string "Language"
|
string "Language"
|
||||||
default "$LANG"
|
default "$LANG"
|
||||||
help
|
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
|
#--- Groff page
|
||||||
choice
|
choice
|
||||||
|
|
26
LFS/lfs.xsl
26
LFS/lfs.xsl
|
@ -40,6 +40,9 @@
|
||||||
<!-- Locale settings -->
|
<!-- Locale settings -->
|
||||||
<xsl:param name="lang" select="C"/>
|
<xsl:param name="lang" select="C"/>
|
||||||
|
|
||||||
|
<!-- Install the whole set of locales -->
|
||||||
|
<xsl:param name='full-locale' select='n'/>
|
||||||
|
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:apply-templates select="//sect1"/>
|
<xsl:apply-templates select="//sect1"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
@ -180,8 +183,27 @@ rm -rf $PKG_DEST
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="@id='ch-system-glibc'">
|
<xsl:if test="@id='ch-system-glibc'">
|
||||||
<xsl:copy-of select="//userinput[@remap='locale-full']"/>
|
<xsl:choose>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:when test="$full-locale='y'">
|
||||||
|
<xsl:copy-of select="//userinput[@remap='locale-full']"/>
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:copy-of select="//userinput[@remap='locale-test']"/>
|
||||||
|
<xsl:text>
</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:if>
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select=".//screen[
|
select=".//screen[
|
||||||
|
|
|
@ -141,6 +141,7 @@ extract_commands() { #
|
||||||
--stringparam testsuite $TEST \
|
--stringparam testsuite $TEST \
|
||||||
--stringparam bomb-testsuite $BOMB_TEST \
|
--stringparam bomb-testsuite $BOMB_TEST \
|
||||||
--stringparam vim-lang $VIMLANG \
|
--stringparam vim-lang $VIMLANG \
|
||||||
|
--stringparam full-locale $FULL_LOCALE \
|
||||||
--stringparam timezone $TIMEZONE \
|
--stringparam timezone $TIMEZONE \
|
||||||
--stringparam page $PAGE \
|
--stringparam page $PAGE \
|
||||||
--stringparam lang $LANG \
|
--stringparam lang $LANG \
|
||||||
|
|
|
@ -41,7 +41,7 @@ inline_doc
|
||||||
local -r CLFS3_book="$BOOK_common $BOOK_clfsX PLATFORM MIPS_LEVEL"
|
local -r CLFS3_book="$BOOK_common $BOOK_clfsX PLATFORM MIPS_LEVEL"
|
||||||
|
|
||||||
# Build Settings by book
|
# 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 HLFS_build="$BUILD_chroot $BUILD_common"
|
||||||
local -r CLFS_build="$BUILD_chroot VIMLANG $BUILD_common"
|
local -r CLFS_build="$BUILD_chroot VIMLANG $BUILD_common"
|
||||||
local -r CLFS2_build="STRIP VIMLANG $BUILD_common"
|
local -r CLFS2_build="STRIP VIMLANG $BUILD_common"
|
||||||
|
|
1
jhalfs
1
jhalfs
|
@ -107,6 +107,7 @@ BOMB_TEST=${BOMB_TEST:-n}
|
||||||
STRIP=${STRIP:=n}
|
STRIP=${STRIP:=n}
|
||||||
REPORT=${REPORT:=n}
|
REPORT=${REPORT:=n}
|
||||||
VIMLANG=${VIMLANG:-n}
|
VIMLANG=${VIMLANG:-n}
|
||||||
|
FULL_LOCALE=${FULL_LOCALE:-n}
|
||||||
GRSECURITY_HOST=${GRSECURITY_HOST:-n}
|
GRSECURITY_HOST=${GRSECURITY_HOST:-n}
|
||||||
CUSTOM_TOOLS=${CUSTOM_TOOLS:-n}
|
CUSTOM_TOOLS=${CUSTOM_TOOLS:-n}
|
||||||
REBUILD_MAKEFILE=${REBUILD_MAKEFILE:-n}
|
REBUILD_MAKEFILE=${REBUILD_MAKEFILE:-n}
|
||||||
|
|
Reference in a new issue