1 |
commit: 5c86018267cfd9881271c66f43ab418b8ab24f1d |
2 |
Author: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 1 20:54:03 2012 +0000 |
4 |
Commit: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 1 20:54:03 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mozilla.git;a=commit;h=5c860182 |
7 |
|
8 |
mozlinguas.eclass: Add mgorny's suggestions |
9 |
|
10 |
--- |
11 |
eclass/mozlinguas.eclass | 42 +++++++++++++++++++++--------------------- |
12 |
1 files changed, 21 insertions(+), 21 deletions(-) |
13 |
|
14 |
diff --git a/eclass/mozlinguas.eclass b/eclass/mozlinguas.eclass |
15 |
index ebc7de7..d19149d 100644 |
16 |
--- a/eclass/mozlinguas.eclass |
17 |
+++ b/eclass/mozlinguas.eclass |
18 |
@@ -61,39 +61,39 @@ esac |
19 |
# Add linguas_* to IUSE according to available language packs |
20 |
# No language packs for alphas and betas |
21 |
if ! [[ ${PV} =~ alpha|beta ]]; then |
22 |
- for X in "${LANGS[@]}" ; do |
23 |
+ for x in "${LANGS[@]}" ; do |
24 |
# en and en_US are handled internally |
25 |
- if [[ ${X} = en ]] || [[ ${X} = en-US ]]; then |
26 |
+ if [[ ${x} = en ]] || [[ ${x} = en-US ]]; then |
27 |
continue |
28 |
fi |
29 |
SRC_URI="${SRC_URI} |
30 |
- linguas_${X/-/_}? |
31 |
- ( ${FTP_URI}/${LANGPACK_PREFIX}${X}${LANGPACK_SUFFIX} -> ${MOZ_P}-${X}.xpi )" |
32 |
- IUSE="${IUSE} linguas_${X/-/_}" |
33 |
+ linguas_${x/-/_}? |
34 |
+ ( ${FTP_URI}/${LANGPACK_PREFIX}${x}${LANGPACK_SUFFIX} -> ${MOZ_P}-${x}.xpi )" |
35 |
+ IUSE="${IUSE} linguas_${x/-/_}" |
36 |
# We used to do some magic if specific/generic locales were missing, but |
37 |
# we stopped doing that due to bug 325195. |
38 |
done |
39 |
fi |
40 |
|
41 |
-linguas() { |
42 |
+mozlinguas() { |
43 |
[[ ${PV} =~ alpha|beta ]] && return |
44 |
# Generate the list of language packs called "linguas" |
45 |
# This list is used to unpack and install the xpi language packs |
46 |
- local LINGUA |
47 |
- for LINGUA in ${LINGUAS}; do |
48 |
- if has ${LINGUA} en en_US; then |
49 |
+ local lingua |
50 |
+ for lingua in ${LINGUAS}; do |
51 |
+ if has ${lingua} en en_US; then |
52 |
# For mozilla products, en and en_US are handled internally |
53 |
continue |
54 |
# If this language is supported by ${P}, |
55 |
- elif has ${LINGUA} "${LANGS[@]//-/_}"; then |
56 |
+ elif has ${lingua} "${LANGS[@]//-/_}"; then |
57 |
# Add the language to linguas, if it isn't already there |
58 |
- has ${LINGUA//_/-} "${linguas[@]}" || linguas+=(${LINGUA//_/-}) |
59 |
+ has ${lingua//_/-} "${linguas[@]}" || linguas+=(${lingua//_/-}) |
60 |
continue |
61 |
- # For each short LINGUA that isn't in LANGS, |
62 |
+ # For each short lingua that isn't in LANGS, |
63 |
# We used to add *all* long LANGS to the linguas list, |
64 |
# but we stopped doing that due to bug 325195. |
65 |
fi |
66 |
- ewarn "Sorry, but ${P} does not support the ${LINGUA} locale" |
67 |
+ ewarn "Sorry, but ${P} does not support the ${lingua} locale" |
68 |
done |
69 |
} |
70 |
|
71 |
@@ -101,11 +101,11 @@ linguas() { |
72 |
# @DESCRIPTION: |
73 |
# Unpack xpi language packs according to the user's LINGUAS settings |
74 |
mozlinguas_src_unpack() { |
75 |
- local X |
76 |
- linguas |
77 |
- for X in "${linguas[@]}"; do |
78 |
+ local x |
79 |
+ mozlinguas |
80 |
+ for x in "${linguas[@]}"; do |
81 |
# FIXME: Add support for unpacking xpis to portage |
82 |
- xpi_unpack "${MOZ_P}-${X}.xpi" |
83 |
+ xpi_unpack "${MOZ_P}-${x}.xpi" |
84 |
done |
85 |
if [[ "${linguas[*]}" != "" && "${linguas[*]}" != "en" ]]; then |
86 |
einfo "Selected language packs (first will be default): ${linguas[*]}" |
87 |
@@ -116,9 +116,9 @@ mozlinguas_src_unpack() { |
88 |
# @DESCRIPTION: |
89 |
# Install xpi language packs according to the user's LINGUAS settings |
90 |
mozlinguas_src_install() { |
91 |
- local X |
92 |
- linguas |
93 |
- for X in "${linguas[@]}"; do |
94 |
- xpi_install "${WORKDIR}/${MOZ_P}-${X}" |
95 |
+ local x |
96 |
+ mozlinguas |
97 |
+ for x in "${linguas[@]}"; do |
98 |
+ xpi_install "${WORKDIR}/${MOZ_P}-${x}" |
99 |
done |
100 |
} |