Changeset b339c94 for LFS/lfs.xsl


Ignore:
Timestamp:
02/10/2012 09:43:23 AM (12 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
f663589
Parents:
743414b
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LFS/lfs.xsl

    r743414b rb339c94  
    4040  <!-- Locale settings -->
    4141  <xsl:param name="lang" select="C"/>
     42
     43  <!-- Install the whole set of locales -->
     44  <xsl:param name='full-locale' select='n'/>
    4245 
    4346  <xsl:template match="/">
     
    181184      </xsl:if>
    182185      <xsl:if test="@id='ch-system-glibc'">
    183         <xsl:copy-of select="//userinput[@remap='locale-full']"/>
    184         <xsl:text>&#xA;</xsl:text>
     186        <xsl:choose>
     187          <xsl:when test="$full-locale='y'">
     188            <xsl:copy-of select="//userinput[@remap='locale-full']"/>
     189            <xsl:text>&#xA;</xsl:text>
     190          </xsl:when>
     191          <xsl:otherwise>
     192            <xsl:copy-of select="//userinput[@remap='locale-test']"/>
     193            <xsl:text>&#xA;</xsl:text>
     194            <xsl:if test="not(contains(string(//userinput[@remap='locale-test']),$lang)) and $lang!='C' and $lang!='POSIX'">
     195              <xsl:text>if LOCALE=`grep "</xsl:text>
     196              <xsl:value-of select="$lang"/>
     197              <xsl:text>/" $PKGDIR/localedata/SUPPORTED`; then
     198  CHARMAP=`echo $LOCALE | sed 's,[^/]*/\([^ ]*\) [\],\1,'`
     199  INPUT=`echo $LOCALE | sed 's,[/.].*,,'`
     200  LOCALE=`echo $LOCALE | sed 's,/.*,,'`
     201  localedef -i $INPUT -f $CHARMAP $LOCALE
     202fi
     203</xsl:text>
     204            </xsl:if>
     205          </xsl:otherwise>
     206        </xsl:choose>
    185207      </xsl:if>
    186208      <xsl:apply-templates
Note: See TracChangeset for help on using the changeset viewer.