diff options
author | Nirbheek Chauhan <nirbheek@gentoo.org> | 2011-08-21 18:31:32 +0000 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@gentoo.org> | 2011-08-21 18:31:32 +0000 |
commit | 4ef8190c72ffbbbbb03146ba0100339d090bd5df (patch) | |
tree | f5ef6b7d64f203c5881013631802b2db7bc0f2b4 /mail-client | |
parent | Use ftp://ftp.mozilla.org instead of releases.mozilla.org so that old tarball... (diff) | |
download | gentoo-2-4ef8190c72ffbbbbb03146ba0100339d090bd5df.tar.gz gentoo-2-4ef8190c72ffbbbbb03146ba0100339d090bd5df.tar.bz2 gentoo-2-4ef8190c72ffbbbbb03146ba0100339d090bd5df.zip |
Port over linguas changes from firefox-6.0, and updated the language pack list
(Portage version: 2.2.0_alpha51/cvs/Linux x86_64)
Diffstat (limited to 'mail-client')
-rw-r--r-- | mail-client/thunderbird/ChangeLog | 6 | ||||
-rw-r--r-- | mail-client/thunderbird/thunderbird-6.0.ebuild | 68 |
2 files changed, 42 insertions, 32 deletions
diff --git a/mail-client/thunderbird/ChangeLog b/mail-client/thunderbird/ChangeLog index e9360865f4c3..153aa149f45b 100644 --- a/mail-client/thunderbird/ChangeLog +++ b/mail-client/thunderbird/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for mail-client/thunderbird # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/ChangeLog,v 1.87 2011/08/21 17:55:30 anarchy Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/ChangeLog,v 1.88 2011/08/21 18:31:32 nirbheek Exp $ + + 21 Aug 2011; Nirbheek Chauhan <nirbheek@gentoo.org> thunderbird-6.0.ebuild: + Port over linguas changes from firefox-6.0, and updated the language pack + list *thunderbird-6.0 (21 Aug 2011) diff --git a/mail-client/thunderbird/thunderbird-6.0.ebuild b/mail-client/thunderbird/thunderbird-6.0.ebuild index 05d979ce8975..b9dd20c0f117 100644 --- a/mail-client/thunderbird/thunderbird-6.0.ebuild +++ b/mail-client/thunderbird/thunderbird-6.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/thunderbird-6.0.ebuild,v 1.1 2011/08/21 17:55:30 anarchy Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/thunderbird-6.0.ebuild,v 1.2 2011/08/21 18:31:32 nirbheek Exp $ EAPI="3" WANT_AUTOCONF="2.1" @@ -28,23 +28,22 @@ SRC_URI="${FTP_URI}/${TB_PV}/source/${TB_P}.source.tar.bz2 if ! [[ ${PV} =~ alpha|beta ]]; then # This list can be updated using get_langs.sh from the mozilla overlay # Not supported yet bn-BD ro id zh-CN be af el pa-IN bg - LANGS="ar ca cs da de en en-GB en-US es-AR es-ES et eu fi fr \ - fy-NL ga-IE he hu is it ja ko lt nb-NO nl nn-NO pl pt-BR pt-PT ru si \ - sk sl sq sv-SE tr uk zh-TW" - NOSHORTLANGS="en-GB es-AR pt-BR zh-TW" + LANGS=(ar be bn-BD br ca cs da de el en en-GB en-US es-AR es-ES et eu fi fr + fy-NL ga-IE gd gl he hu id is it ja ko lt nb-NO nl nn-NO pl pt-BR pt-PT rm + ru si sk sl sq sv-SE ta-LK tr uk) - for X in ${LANGS} ; do - if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then + for X in "${LANGS[@]}" ; do + # en and en_US are handled internally + if [[ ${X} != en ]] && [[ ${X} != en-US ]]; then SRC_URI="${SRC_URI} linguas_${X/-/_}? ( ${FTP_URI}/${TB_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )" fi IUSE="${IUSE} linguas_${X/-/_}" - # english is handled internally - if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then - if [ "${X}" != "en-US" ]; then - SRC_URI="${SRC_URI} - linguas_${X%%-*}? ( ${FTP_URI}/${TB_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )" - fi + # Install all the specific locale xpis if there's no generic locale xpi + # Example: there's no pt.xpi, so install all pt-*.xpi + if ! has ${X%%-*} "${LANGS[@]}"; then + SRC_URI="${SRC_URI} + linguas_${X%%-*}? ( ${FTP_URI}/${TB_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )" IUSE="${IUSE} linguas_${X%%-*}" fi done @@ -72,28 +71,35 @@ DEPEND="${RDEPEND}" S="${WORKDIR}"/comm-release +# TODO: Move all the linguas crap to an eclass linguas() { - local LANG SLANG - for LANG in ${LINGUAS}; do - if has ${LANG} en en_US; then - has en ${linguas} || linguas="${linguas:+"${linguas} "}en" + # Generate the list of language packs called "linguas" + # This list is used to install the xpi language packs + 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 - elif has ${LANG} ${LANGS//-/_}; then - has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}" + # If this language is supported by ${P}, + elif has ${LINGUA} "${LANGS[@]//-/_}"; then + # Add the language to linguas, if it isn't already there + has ${LINGUA//_/-} "${linguas[@]}" || linguas+=(${LINGUA//_/-}) continue - elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then - for X in ${LANGS}; do - if [[ "${X}" == "${LANG}-"* ]] && \ - [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then - has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}" + # For each short LINGUA that isn't in LANGS, + # add *all* long LANGS to the linguas list + elif ! has ${LINGUA%%-*} "${LANGS[@]}"; then + for LANG in "${LANGS[@]}"; do + if [[ ${LANG} == ${LINGUA}-* ]]; then + has ${LANG} "${linguas[@]}" || linguas+=(${LANG}) continue 2 fi done fi - ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA" + ewarn "Sorry, but ${P} does not support the ${LINGUA} locale" done } + pkg_setup() { moz_pkgsetup @@ -110,12 +116,12 @@ src_unpack() { if ! [[ ${PV} =~ alpha|beta ]]; then linguas - for X in ${linguas}; do + for X in "${linguas[@]}"; do # FIXME: Add support for unpacking xpis to portage - [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi" + xpi_unpack "${P}-${X}.xpi" done - if [[ ${linguas} != "" && ${linguas} != "en" ]]; then - einfo "Selected language packs (first will be default): ${linguas}" + if [[ "${linguas[*]}" != "" ]]; then + einfo "Selected language packs (first will be default): ${linguas[*]}" fi fi } @@ -259,8 +265,8 @@ src_install() { if ! [[ ${PV} =~ alpha|beta ]]; then linguas - for X in ${linguas}; do - [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}" + for X in "${linguas[@]}"; do + xpi_install "${WORKDIR}/${P}-${X}" done fi |