From 3f71901f8c228f4de570abed1831ce3ee425343e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 8 Sep 2018 10:50:14 +0100 Subject: gentoo resync 08.09.2018 --- eclass/Manifest.gz | Bin 37772 -> 37779 bytes eclass/mozcoreconf-v6.eclass | 18 +++++++++++++++--- eclass/mozextension.eclass | 30 ++++++++++++++++++++++++++++++ eclass/mozlinguas-v2.eclass | 14 ++++++++++++-- 4 files changed, 57 insertions(+), 5 deletions(-) (limited to 'eclass') diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz index c203efdbf10d..d15fcba28929 100644 Binary files a/eclass/Manifest.gz and b/eclass/Manifest.gz differ diff --git a/eclass/mozcoreconf-v6.eclass b/eclass/mozcoreconf-v6.eclass index 403740c12410..930122fc886f 100644 --- a/eclass/mozcoreconf-v6.eclass +++ b/eclass/mozcoreconf-v6.eclass @@ -1,7 +1,7 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # -# @ECLASS: mozcoreconf-v5.eclass +# @ECLASS: mozcoreconf-v6.eclass # @MAINTAINER: # Mozilla team # @BLURB: core options and configuration functions for mozilla @@ -16,8 +16,11 @@ if [[ ! ${_MOZCORECONF} ]]; then +# for compatibility with packages prior to v1 +if [[ -z ${PYTHON_COMPAT[@]} ]]; then PYTHON_COMPAT=( python2_7 ) PYTHON_REQ_USE='ncurses,sqlite,ssl,threads' +fi inherit multilib toolchain-funcs flag-o-matic python-any-r1 versionator @@ -112,6 +115,11 @@ moz_pkgsetup() { fi python-any-r1_pkg_setup + # workaround to set python3 into PYTHON3 until mozilla doesn't need py2 + if [[ "${PYTHON_COMPAT[@]}" != "${PYTHON_COMPAT[@]#python3*}" ]]; then + export PYTHON3=${PYTHON} + python_export python2_7 PYTHON EPYTHON + fi } # @FUNCTION: mozconfig_init @@ -124,6 +132,7 @@ mozconfig_init() { declare FF=$([[ ${PN} == firefox ]] && echo true || echo false) declare SM=$([[ ${PN} == seamonkey ]] && echo true || echo false) declare TB=$([[ ${PN} == thunderbird ]] && echo true || echo false) + declare TRB=$([[ ${PN} == torbrowser ]] && echo true || echo false) #################################### # @@ -139,6 +148,9 @@ mozconfig_init() { *firefox) cp browser/config/mozconfig .mozconfig \ || die "cp browser/config/mozconfig failed" ;; + *torbrowser) + cp browser/config/mozconfig .mozconfig \ + || die "cp browser/config/mozconfig failed" ;; seamonkey) # Must create the initial mozconfig to enable application : >.mozconfig || die "initial mozconfig creation failed" @@ -158,7 +170,7 @@ mozconfig_init() { #################################### # Set optimization level - if [[ $(gcc-major-version) -ge 7 ]]; then + if [[ $(gcc-major-version) -eq 7 ]]; then mozconfig_annotate "Workaround known breakage" --enable-optimize=-O2 elif [[ ${ARCH} == hppa ]]; then mozconfig_annotate "more than -O0 causes a segfault on hppa" --enable-optimize=-O0 diff --git a/eclass/mozextension.eclass b/eclass/mozextension.eclass index 425da7e85bf1..68f401ee8661 100644 --- a/eclass/mozextension.eclass +++ b/eclass/mozextension.eclass @@ -91,5 +91,35 @@ xpi_install() { doins -r "${x}"/* || die "failed to copy extension" } +xpi_copy() { + local emid + + # You must tell xpi_install which xpi to use + [[ ${#} -ne 1 ]] && die "$FUNCNAME takes exactly one argument, please specify an xpi to unpack" + + x="${1}" + #cd ${x} + # determine id for extension + if [[ -f "${x}"/install.rdf ]]; then + emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)" \ + || die "failed to determine extension id from install.rdf" + elif [[ -f "${x}"/manifest.json ]]; then + emid="$( sed -n 's/.*"id": "\([^"]*\)",.*/\1/p' "${x}"/manifest.json )" \ + || die "failed to determine extension id from manifest.json" + else + die "failed to determine extension id" + fi + + if [[ -n ${MOZEXTENSION_TARGET} ]]; then + insinto "${MOZILLA_FIVE_HOME}"/${MOZEXTENSION_TARGET%/} + elif $(mozversion_extension_location) ; then + insinto "${MOZILLA_FIVE_HOME}"/browser/extensions + else + insinto "${MOZILLA_FIVE_HOME}"/extensions + fi + + newins "${DISTDIR%/}"/${x##*/}.xpi ${emid}.xpi +} + _MOZEXTENSION=1 fi diff --git a/eclass/mozlinguas-v2.eclass b/eclass/mozlinguas-v2.eclass index 77f1d0a439cf..73576e967fa6 100644 --- a/eclass/mozlinguas-v2.eclass +++ b/eclass/mozlinguas-v2.eclass @@ -124,13 +124,18 @@ esac # shouldn't (ie it is an alpha or beta package) : ${MOZ_FORCE_UPSTREAM_L10N:=""} - # @ECLASS-VARIABLE: MOZ_TOO_REGIONALIZED_FOR_L10N # @INTERNAL # @DESCRIPTION: # Upstream identifiers that should not contain region subtags in L10N MOZ_TOO_REGIONALIZED_FOR_L10N=( fy-NL ga-IE gu-IN hi-IN hy-AM nb-NO nn-NO pa-IN sv-SE ) +# @ECLASS-VARIABLE: MOZ_INSTALL_L10N_XPIFILE +# @DESCRIPTION: +# Install langpacks as .xpi file instead of unpacked directory. +# Leave unset to install unpacked +: ${MOZ_INSTALL_L10N_XPIFILE:=""} + # Add l10n_* to IUSE according to available language packs # No language packs for alphas and betas if ! [[ -n ${MOZ_GENERATE_LANGPACKS} ]] ; then @@ -365,8 +370,13 @@ mozlinguas_src_install() { done popd > /dev/null || die fi + for x in "${mozlinguas[@]}"; do - xpi_install "${WORKDIR}/${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}" + if [[ -n ${MOZ_INSTALL_L10N_XPIFILE} ]]; then + xpi_copy "${WORKDIR}/${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}" + else + xpi_install "${WORKDIR}/${MOZ_P}-${x}${MOZ_LANGPACK_UNOFFICIAL:+.unofficial}" + fi done } -- cgit v1.2.3