From e5dc0a50e6624ff68288b2029690f61014b54c2e Mon Sep 17 00:00:00 2001 From: Stefan Schweizer Date: Mon, 9 Oct 2006 19:11:22 +0000 Subject: [PATCH] actually handle linguas correctly Package-Manager: portage-2.1.2_pre2-r7 --- www-client/mozilla-firefox/Manifest | 8 +++---- .../mozilla-firefox-2.0_rc2.ebuild | 24 ++++++++++--------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/www-client/mozilla-firefox/Manifest b/www-client/mozilla-firefox/Manifest index d78c81f7655e..fc5aa7d777f9 100644 --- a/www-client/mozilla-firefox/Manifest +++ b/www-client/mozilla-firefox/Manifest @@ -162,10 +162,10 @@ EBUILD mozilla-firefox-1.5.0.7.ebuild 9530 RMD160 682a824c87c1fa3885795e29de7e6c MD5 009921ccc2d07dc7b680334d52b5a547 mozilla-firefox-1.5.0.7.ebuild 9530 RMD160 682a824c87c1fa3885795e29de7e6cd4f125d3b1 mozilla-firefox-1.5.0.7.ebuild 9530 SHA256 c3d98ad2848ad054155b8261d839336cdc21771886f04c09decbad6832b8e019 mozilla-firefox-1.5.0.7.ebuild 9530 -EBUILD mozilla-firefox-2.0_rc2.ebuild 7655 RMD160 04255561750b2df105267bfb88eacb15f511e7c1 SHA1 04768f0ed35ab643db265362e7a9323b55faef85 SHA256 b54dc64792e1bed3799ad0a6052504455c107fe855941abef530657d13f04ddb -MD5 82021f9dac7a36bbafc1fc08cbf314d4 mozilla-firefox-2.0_rc2.ebuild 7655 -RMD160 04255561750b2df105267bfb88eacb15f511e7c1 mozilla-firefox-2.0_rc2.ebuild 7655 -SHA256 b54dc64792e1bed3799ad0a6052504455c107fe855941abef530657d13f04ddb mozilla-firefox-2.0_rc2.ebuild 7655 +EBUILD mozilla-firefox-2.0_rc2.ebuild 7749 RMD160 80bb35da0fa53f701f8b4c0a11c0a0f6787cd0cc SHA1 52437ed095181ef82319f4d9e63e48dca8059125 SHA256 5656592284a97ed55c6a06ed76c96c8bae43f29a1c07dd0f4467bc33597fb0c9 +MD5 fd1af9da4f1048d49bcb9ed7bb55b274 mozilla-firefox-2.0_rc2.ebuild 7749 +RMD160 80bb35da0fa53f701f8b4c0a11c0a0f6787cd0cc mozilla-firefox-2.0_rc2.ebuild 7749 +SHA256 5656592284a97ed55c6a06ed76c96c8bae43f29a1c07dd0f4467bc33597fb0c9 mozilla-firefox-2.0_rc2.ebuild 7749 MISC ChangeLog 51634 RMD160 b7fc0a9b74aa3c01ff37ca304cb00d969c1728e4 SHA1 88d075d60f1972348a8ca052c06b6953fb51c6c9 SHA256 1318af330522911ec9f7378ecaf151554ff28d654d2fc185badef729a6c34aa7 MD5 67625689dc2709a130b722fb6f170ad2 ChangeLog 51634 RMD160 b7fc0a9b74aa3c01ff37ca304cb00d969c1728e4 ChangeLog 51634 diff --git a/www-client/mozilla-firefox/mozilla-firefox-2.0_rc2.ebuild b/www-client/mozilla-firefox/mozilla-firefox-2.0_rc2.ebuild index d842af85bea1..c7d1a95df6b0 100644 --- a/www-client/mozilla-firefox/mozilla-firefox-2.0_rc2.ebuild +++ b/www-client/mozilla-firefox/mozilla-firefox-2.0_rc2.ebuild @@ -1,12 +1,13 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-2.0_rc2.ebuild,v 1.2 2006/10/09 09:52:40 genstef Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-2.0_rc2.ebuild,v 1.3 2006/10/09 19:11:22 genstef Exp $ inherit flag-o-matic toolchain-funcs eutils mozconfig-2 mozilla-launcher makeedit multilib fdo-mime mozextension autotools PATCH="mozilla-firefox-2.0_rc1-patches-1.4" LANGS="ar be bg ca cs da de el en-GB es-AR es-ES eu fi fy-NL fr ga-IE gu-IN hu it ja ko lt mk mn nb-NO nl nn-NO pa-IN pl pt-BR pt-PT ru sk sl sv-SE tr zh-CN zh-TW" +NOSHORTLANGS="en-GB es-AR pt-BR zh-TW" MY_PV=${PV/_} DESCRIPTION="Firefox Web Browser" @@ -31,8 +32,7 @@ for X in ${LANGS} ; do linguas_${X/-/_}? ( http://gentooexperimental.org/~genstef/dist/${P}-xpi/${P}-${X}.xpi )" IUSE="${IUSE} linguas_${X/-/_}" # english is handled internally - if [ "${#X}" == 5 ] && [ "${X}" != "en-GB" ] && [ "${X}" != "es-AR" ] && \ - [ "${X}" != "pt-BR" ] && [ "${X}" != "zh-TW" ]; then + if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then SRC_URI="${SRC_URI} linguas_${X%%-*}? ( http://gentooexperimental.org/~genstef/dist/${P}-xpi/${P}-${X}.xpi )" IUSE="${IUSE} linguas_${X%%-*}" @@ -54,22 +54,24 @@ S="${WORKDIR}/mozilla" linguas() { local LANG SLANG for LANG in ${LINGUAS}; do - if hasq ${LANG} en en_US; then - hasq en ${linguas} || linguas="${linguas:+"${linguas} "}en" + if has ${LANG} en en_US; then + has en ${linguas} || linguas="${linguas:+"${linguas} "}en" continue - elif hasq ${LANG} ${LANGS//-/_}; then - hasq ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}" + elif has ${LANG} ${LANGS//-/_}; then + has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}" continue - else - for SLANG in ${SHORTLANGS}; do - if [[ ${LANG} == "${SLANG%%-*}" ]]; then - hasq ${SLANG} ${linguas} || linguas="${linguas:+"${linguas} "}${SLANG}" + elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then + for X in ${LANGS}; do + if [[ "${X}" == "${LANG}-"* ]] && \ + [[ "${NOSHORTLANGS}" != *"${X}"* ]]; then + has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}" continue 2 fi done fi ewarn "Sorry, but mozilla-firefox does not support the ${LANG} LINGUA" done + einfo "Selected language packs (first will be default): $linguas" } src_unpack() { -- 2.26.2