commit:     f50652d2e2e95edc9a1cca4d4ecf66c95005299f
Author:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 12 19:43:37 2016 +0000
Commit:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Tue Jul 12 19:43:37 2016 +0000
URL:        https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=f50652d2

mozlinguas-v2.eclass: adjust mozlinguas_xpistage_langpacks to support new forms

The packaging of locales in the chatzilla extension uses a form that was not 
taken
into account yet in mozlinguas_xpistage_langpacks(), some additional code was 
added
to take this new form into account and be more careful about extension-langpack
processing in general.

 eclass/mozlinguas-v2.eclass | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/eclass/mozlinguas-v2.eclass b/eclass/mozlinguas-v2.eclass
index 215141c..df4c8b2 100644
--- a/eclass/mozlinguas-v2.eclass
+++ b/eclass/mozlinguas-v2.eclass
@@ -331,6 +331,18 @@ mozlinguas_xpistage_langpacks() {
                        cp -RLp -t "${modpath}/chrome" 
"${srcprefix}-${l}/chrome/${c}-${l}" || die
                        grep "locale ${c} ${l} chrome/" 
"${srcprefix}-${l}/chrome.manifest" \
                                >>"${modpath}/chrome.manifest" || die
+               elif [[ -e "${srcprefix}-${l}/chrome/${c}/locale" ]]; then
+                       if grep "locale ${c} ${l}" 
"${srcprefix}-${l}/chrome.manifest" &>/dev/null; then
+                               grep "locale ${c} ${l} chrome/" 
"${srcprefix}-${l}/chrome.manifest" \
+                                       >>"${modpath}/chrome.manifest" || die
+                               cp -RLp -t "${modpath}/chrome" 
"${srcprefix}-${l}/chrome/${c}" || die
+                       elif grep "locale ${c} ${l}" 
"${srcprefix}-${l}/chrome/${c}.manifest" &>/dev/null ; then
+                               grep "locale ${c} ${l}" 
"${srcprefix}-${l}/chrome/${c}.manifest" \
+                                       >>"${modpath}/chrome/${c}.manifest" || 
die
+                               cp -RLp -t "${modpath}/chrome" 
"${srcprefix}-${l}/chrome/${c}" || die
+                       else
+                               ewarn "Locale ${l} could not be processed for 
${c}, skipping."
+                       fi
                elif [[ -e "${srcprefix}/chrome/${c}-${l}" ]]; then
                        cp -RLp -t "${modpath}/chrome" 
"${srcprefix}/chrome/${c}-${l}" || die
                        grep "locale ${c} ${l} chrome/" 
"${srcprefix}/chrome.manifest" \

Reply via email to