commit:     1727e88276251a2868478f4f8b24b5c673d6a7c6
Author:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  9 00:56:25 2016 +0000
Commit:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Sat Jul  9 00:56:25 2016 +0000
URL:        https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=1727e882

mozlinguas-v2.eclass: minor corrections related to L10N migration

Some of the L10N-migrated code did not work properly when generating
langpacks as part of the build process.  This commit fixes those issues
and completes the LINGUAS to L10N migration

 eclass/mozlinguas-v2.eclass | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/eclass/mozlinguas-v2.eclass b/eclass/mozlinguas-v2.eclass
index 9f76d31..240f219 100644
--- a/eclass/mozlinguas-v2.eclass
+++ b/eclass/mozlinguas-v2.eclass
@@ -175,7 +175,7 @@ else
                if [[ -n ${MOZ_L10N_URI_PREFIX} ]]; then
                        SRC_URI+=" l10n_${xflag/[_@]/-}? ( 
${MOZ_L10N_URI_PREFIX}${x}${MOZ_L10N_URI_SUFFIX} )"
                fi
-               IUSE+=" l10n_${x/[_@]/-}"
+               IUSE+=" l10n_${xflag/[_@]/-}"
        done
 fi
 unset x xflag
@@ -348,11 +348,12 @@ mozlinguas_xpistage_langpacks() {
 mozlinguas_src_install() {
        local x
        mozlinguas_export
-       if [[ -n ${MOZ_GENERATE_LANGPACKS} ]]; then
+       if [[ -n ${MOZ_GENERATE_LANGPACKS} ]] && [[ -n ${mozlinguas[*]} ]]; then
                local repopath="${WORKDIR}/${PN}-generated-langpacks"
-               mkdir -p "${repopath}"
+               mkdir -p "${repopath}" || die
                pushd "${BUILD_OBJ_DIR:-.}"/dist/*/xpi > /dev/null || die
                for x in "${mozlinguas[@]}"; do
+                       einfo "${MOZ_P}.${x}.langpack.xpi to 
${repopath}/${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}.xpi"  
                        cp "${MOZ_P}.${x}.langpack.xpi" \
                        
"${repopath}/${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}.xpi" || die
                        xpi_unpack 
"${repopath}/${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}.xpi"

Reply via email to