commit: b0fe71627ccbdf8567e87cde4dfecdda395caab0
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 16 17:43:29 2015 +0000
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Thu Jul 16 17:43:32 2015 +0000
URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=b0fe7162
minor fixes to mozlinguas.eclass
First, dropped any form of inherit on mozcoreconf-v3. Instead,
mozlinguas_mozconfig will error if mozconfig_annotate isn't declared in the
very rare cases that it is actually needed. It has to be anyways, otherwise
the .mozconfig file itself isn't being eclass managed in the first place.
Second, ensured the target dir for the additional locales for extensions
will exist, thus allowing the function to be used in thunderbird-bin
for installing alt locales into its bundled lightning (and likely others).
eclass/mozlinguas.eclass | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/eclass/mozlinguas.eclass b/eclass/mozlinguas.eclass
index a399254..3645cd5 100644
--- a/eclass/mozlinguas.eclass
+++ b/eclass/mozlinguas.eclass
@@ -16,12 +16,6 @@
inherit mozextension
-# Binary packages do not modify .mozconfig and so do not need mozcoreconf-v3
-# which is important since mozcoreconf-v3 adds to IUSE and *DEPEND
-if ! [[ ${PN} = *-bin ]]; then
- inherit mozcoreconf-v3
-fi
-
case "${EAPI:-0}" in
0|1)
die "EAPI ${EAPI:-0} does not support the '->' SRC_URI
operator";;
@@ -213,10 +207,16 @@ mozlinguas_src_unpack() {
# @FUNCTION: mozlinguas_mozconfig
# @DESCRIPTION:
# if applicable, add the necessary flag to .mozconfig to support
-# the generation of locales
+# the generation of locales. Note that this function requires
+# mozconfig_annontate to already be declared via an inherit of
+# mozconfig or mozcoreconf.
mozlinguas_mozconfig() {
if [[ -n ${MOZ_GENERATE_LANGPACKS} ]]; then
- mozconfig_annotate 'for building locales'
--with-l10n-base=${MOZ_L10N_SOURCEDIR}
+ if declare -f mozconfig_annotate >/dev/null ; then
+ mozconfig_annotate 'for building locales'
--with-l10n-base=${MOZ_L10N_SOURCEDIR}
+ else
+ die "Could not configure l10n-base, mozconfig_annotate
not declared -- missing inherit?"
+ fi
fi
}
@@ -275,6 +275,7 @@ mozlinguas_xpistage_langpacks() {
if [[ -n ${1} ]] ; then modules=( $@ ) ; fi
mozlinguas_export
+ mkdir -p "${modpath}/chrome" || die
for l in "${mozlinguas[@]}"; do for c in "${modules[@]}" ; do
if [[ -e "${srcprefix}-${l}/chrome/${c}-${l}" ]]; then
cp -RLp -t "${modpath}/chrome"
"${srcprefix}-${l}/chrome/${c}-${l}" || die