-# 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 <mozilla@gentoo.org>
# @BLURB: core options and configuration functions for mozilla
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
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
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)
####################################
#
*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"
####################################
# 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