Gentoo Development Guide

MOZLINGUAS.ECLASS

Section: portage (5)
Updated: Aug 2015
Index Return to Main Contents
 

NAME

mozlinguas.eclass - Handle language packs for mozilla products  

DESCRIPTION

Sets IUSE according to MOZ_LANGS (language packs available). Also exports src_unpack, src_compile and src_install for use in ebuilds, and provides supporting functions for langpack generation and installation.  

FUNCTIONS

mozlinguas_src_unpack
Unpack xpi language packs according to the user's LINGUAS settings
mozlinguas_mozconfig
if applicable, add the necessary flag to .mozconfig to support the generation of locales. Note that this function requires mozconfig_annontate to already be declared via an inherit of mozconfig or mozcoreconf.
mozlinguas_src_compile
if applicable, build the selected locales.
mozlinguas_xpistage_langpacks
Add extra langpacks to the xpi-stage dir for prebuilt plugins

First argument is the path to the extension Second argument is the prefix of the source (same as first if unspecified) Remaining arguments are the modules in the extension that are localized
 (basename of first if unspecified)

Example - installing extra langpacks for lightning: src_install() {         ... # general installation steps
        mozlinguas_xpistage_langpacks   "${BUILD_OBJ_DIR}"/dist/xpi-stage/lightning     "${WORKDIR}"/lightning lightning calendar
... # proceed with installation from the xpi-stage dir }

mozlinguas_src_install
Install xpi language packs according to the user's LINGUAS settings NOTE - uses ${BUILD_OBJ_DIR} or PWD if unset, for source-generated langpacks
 

ECLASS VARIABLES

MOZ_LANGS ?= ()
Array containing the list of language pack xpis available for this release. The list can be updated with scripts/get_langs.sh from the mozilla overlay.
MOZ_PV ?= "${PV}"
Ebuild package version converted to equivalent upstream version. Defaults to ${PV}, and should be overridden for alphas, betas, and RCs
MOZ_PN ?= "${PN}"
Ebuild package name converted to equivalent upstream name. Defaults to ${PN}, and should be overridden for binary ebuilds.
MOZ_P ?= "${MOZ_PN}-${MOZ_PV}"
Ebuild package name + version converted to upstream equivalent. Defaults to ${MOZ_PN}-${MOZ_PV}
MOZ_FTP_URI ?= ""
The ftp URI prefix for the release tarballs and language packs.
MOZ_HTTP_URI ?= ""
The http URI prefix for the release tarballs and language packs.
MOZ_LANGPACK_PREFIX ?= "${MOZ_PV}/linux-i686/xpi/"
The relative path till the lang code in the langpack file URI. Defaults to ${MOZ_PV}/linux-i686/xpi/
MOZ_LANGPACK_SUFFIX ?= ".xpi"
The suffix after the lang code in the langpack file URI. Defaults to '.xpi'
MOZ_LANGPACK_UNOFFICIAL ?= ""
The status of the langpack, used to differentiate within Manifests and on Gentoo mirrors as to when the langpacks are generated officially by Mozilla or if they were generated unofficially by others (ie the Gentoo mozilla team). When this var is set, the distfile will have a .unofficial.xpi suffix.
MOZ_GENERATE_LANGPACKS ?= ""
This flag specifies whether or not the langpacks should be generated directly during the build process, rather than being downloaded and installed from upstream pre-built extensions. Primarily it supports pre-release builds. Defaults to empty.
MOZ_L10N_SOURCEDIR ?= "${WORKDIR}/l10n-sources"
The path that l10n sources can be found at, once unpacked. Defaults to ${WORKDIR}/l10n-sources
MOZ_L10N_URI_PREFIX ?= ""
The full URI prefix of the distfile for each l10n locale. The AB_CD and MOZ_L10N_URI_SUFFIX will be appended to this to complete the SRC_URI when MOZ_GENERATE_LANGPACKS is set. If empty, nothing will be added to SRC_URI. Defaults to empty.
MOZ_L10N_URI_SUFFIX ?= ".tar.xz"
The suffix of l10n source distfiles. Defaults to '.tar.xz'
 

AUTHORS

Nirbheek Chauhan <nirbheek@gentoo.org>
Ian Stakenvicius <axs@gentoo.org>
 

MAINTAINERS

mozilla@gentoo.org
 

REPORTING BUGS

Please report bugs via http://bugs.gentoo.org/  

FILES

/usr/portage/eclass/mozlinguas.eclass  

SEE ALSO

ebuild(5)
https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/mozlinguas.eclass


 

Index

NAME
DESCRIPTION
FUNCTIONS
ECLASS VARIABLES
AUTHORS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:25:10 GMT, August 28, 2015