From: Mike Gilbert <floppym@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Understanding the LINGUAS variable and use-expand
Date: Wed, 8 Feb 2012 11:32:23 -0500 [thread overview]
Message-ID: <CAJ0EP43+=qVsJqLmSUqZexq209-im5emVRm=JgnBF20v3-fORw@mail.gmail.com> (raw)
I just want to sanity-check my brain here.
LINGUAS seems to be mainly a variable to control the behavior of
gettext's autoconf code, installed as /usr/share/aclocal/po.m4.
If LINGUAS is set to a list of language codes, the build system will
only build/install MO files for those languages. If LINGUAS is unset,
the build system will build/install MO files for all available
languages.
Portage will also use-expand LINGUAS, so an ebuild *can* make use of
it where USE flags are needed. For example, in SRC_URI, where the USE
flags may be used to control downloading of extra language packs.
Given this information, I come to a few conclusions:
1. There is technically no need to define IUSE="linguas_$x" if an
ebuild is not using the USE flags in other ebuild metadata (like
SRC_URI).
2. In cases where the USE flags are needed, they should be enabled by
default to emulate the "default-all" behavior of the autoconf macros.
For example: IUSE="+linguas_fr_FR +linguas_de_DE".
3. An ebuild could use LINGUAS to control installation of translation
information which does not come from gettext PO files. It does not
necessarily need to make use of the linguas_$x USE flags to do so.
Does all of that make sense?
I am considering simplifying www-client/chromium from the current mess
based on the linguas USE flags to basically just this:
if [[ ${LINGUAS} ]]; then
for x in *.pak; do
mylang=${x%.pak}
mylang=%{x/-/_}
has $mylang $LINGUAS || rm $x
done
fi
As well, there are probably a few other places in the tree where
conclusion #1 and #2 should be applied.
next reply other threads:[~2012-02-08 16:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 16:32 Mike Gilbert [this message]
2012-02-08 17:04 ` [gentoo-dev] Understanding the LINGUAS variable and use-expand Mart Raudsepp
2012-02-24 16:36 ` Mike Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ0EP43+=qVsJqLmSUqZexq209-im5emVRm=JgnBF20v3-fORw@mail.gmail.com' \
--to=floppym@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox