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 1RshC8-0004zY-9p for garchives@archives.gentoo.org; Wed, 01 Feb 2012 20:54:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 860F2E085C; Wed, 1 Feb 2012 20:54:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 47892E085C for ; Wed, 1 Feb 2012 20:54:13 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AA8B91B4030 for ; Wed, 1 Feb 2012 20:54:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id D350680042 for ; Wed, 1 Feb 2012 20:54:11 +0000 (UTC) From: "Nirbheek Chauhan" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nirbheek Chauhan" Message-ID: <5c86018267cfd9881271c66f43ab418b8ab24f1d.nirbheek@gentoo> Subject: [gentoo-commits] proj/mozilla:master commit in: eclass/ X-VCS-Repository: proj/mozilla X-VCS-Files: eclass/mozlinguas.eclass X-VCS-Directories: eclass/ X-VCS-Committer: nirbheek X-VCS-Committer-Name: Nirbheek Chauhan X-VCS-Revision: 5c86018267cfd9881271c66f43ab418b8ab24f1d Date: Wed, 1 Feb 2012 20:54:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: a6bbaaa8-2158-4687-a2de-7a477e4e0f5a X-Archives-Hash: 1b793acc07d066224ea7c27fab759cec commit: 5c86018267cfd9881271c66f43ab418b8ab24f1d Author: Nirbheek Chauhan gentoo org> AuthorDate: Wed Feb 1 20:54:03 2012 +0000 Commit: Nirbheek Chauhan gentoo org> CommitDate: Wed Feb 1 20:54:03 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/mozilla.git;a= =3Dcommit;h=3D5c860182 mozlinguas.eclass: Add mgorny's suggestions --- eclass/mozlinguas.eclass | 42 +++++++++++++++++++++-------------------= -- 1 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eclass/mozlinguas.eclass b/eclass/mozlinguas.eclass index ebc7de7..d19149d 100644 --- a/eclass/mozlinguas.eclass +++ b/eclass/mozlinguas.eclass @@ -61,39 +61,39 @@ esac # Add linguas_* to IUSE according to available language packs # No language packs for alphas and betas if ! [[ ${PV} =3D~ alpha|beta ]]; then - for X in "${LANGS[@]}" ; do + for x in "${LANGS[@]}" ; do # en and en_US are handled internally - if [[ ${X} =3D en ]] || [[ ${X} =3D en-US ]]; then + if [[ ${x} =3D en ]] || [[ ${x} =3D en-US ]]; then continue fi SRC_URI=3D"${SRC_URI} - linguas_${X/-/_}? - ( ${FTP_URI}/${LANGPACK_PREFIX}${X}${LANGPACK_SUFFIX} -> ${MOZ_P}-${= X}.xpi )" - IUSE=3D"${IUSE} linguas_${X/-/_}" + linguas_${x/-/_}? + ( ${FTP_URI}/${LANGPACK_PREFIX}${x}${LANGPACK_SUFFIX} -> ${MOZ_P}-${= x}.xpi )" + IUSE=3D"${IUSE} linguas_${x/-/_}" # We used to do some magic if specific/generic locales were missing, b= ut # we stopped doing that due to bug 325195. done fi =20 -linguas() { +mozlinguas() { [[ ${PV} =3D~ alpha|beta ]] && return # Generate the list of language packs called "linguas" # This list is used to unpack and install the xpi language packs - local LINGUA - for LINGUA in ${LINGUAS}; do - if has ${LINGUA} en en_US; then + local lingua + for lingua in ${LINGUAS}; do + if has ${lingua} en en_US; then # For mozilla products, en and en_US are handled internally continue # If this language is supported by ${P}, - elif has ${LINGUA} "${LANGS[@]//-/_}"; then + elif has ${lingua} "${LANGS[@]//-/_}"; then # Add the language to linguas, if it isn't already there - has ${LINGUA//_/-} "${linguas[@]}" || linguas+=3D(${LINGUA//_/-}) + has ${lingua//_/-} "${linguas[@]}" || linguas+=3D(${lingua//_/-}) continue - # For each short LINGUA that isn't in LANGS, + # For each short lingua that isn't in LANGS, # We used to add *all* long LANGS to the linguas list, # but we stopped doing that due to bug 325195. fi - ewarn "Sorry, but ${P} does not support the ${LINGUA} locale" + ewarn "Sorry, but ${P} does not support the ${lingua} locale" done } =20 @@ -101,11 +101,11 @@ linguas() { # @DESCRIPTION: # Unpack xpi language packs according to the user's LINGUAS settings mozlinguas_src_unpack() { - local X - linguas - for X in "${linguas[@]}"; do + local x + mozlinguas + for x in "${linguas[@]}"; do # FIXME: Add support for unpacking xpis to portage - xpi_unpack "${MOZ_P}-${X}.xpi" + xpi_unpack "${MOZ_P}-${x}.xpi" done if [[ "${linguas[*]}" !=3D "" && "${linguas[*]}" !=3D "en" ]]; then einfo "Selected language packs (first will be default): ${linguas[*]}" @@ -116,9 +116,9 @@ mozlinguas_src_unpack() { # @DESCRIPTION: # Install xpi language packs according to the user's LINGUAS settings mozlinguas_src_install() { - local X - linguas - for X in "${linguas[@]}"; do - xpi_install "${WORKDIR}/${MOZ_P}-${X}" + local x + mozlinguas + for x in "${linguas[@]}"; do + xpi_install "${WORKDIR}/${MOZ_P}-${x}" done }