From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RvASG-0001uo-AJ for garchives@archives.gentoo.org; Wed, 08 Feb 2012 16:33:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3A9E5E080D; Wed, 8 Feb 2012 16:33:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B60BCE07B2 for ; Wed, 8 Feb 2012 16:32:25 +0000 (UTC) Received: from mail-pz0-f53.google.com (mail-pz0-f53.google.com [209.85.210.53]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 43D0D1B4013 for ; Wed, 8 Feb 2012 16:32:25 +0000 (UTC) Received: by dady25 with SMTP id y25so832517dad.40 for ; Wed, 08 Feb 2012 08:32:23 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Received: by 10.68.138.167 with SMTP id qr7mr71042340pbb.0.1328718743856; Wed, 08 Feb 2012 08:32:23 -0800 (PST) Received: by 10.142.132.3 with HTTP; Wed, 8 Feb 2012 08:32:23 -0800 (PST) Date: Wed, 8 Feb 2012 11:32:23 -0500 Message-ID: Subject: [gentoo-dev] Understanding the LINGUAS variable and use-expand From: Mike Gilbert To: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 8accae1b-6d2a-4815-a99e-1078dbb4f507 X-Archives-Hash: 598bb18721330e7ac3b53ca76c7d48d6 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.