summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2018-08-15 13:10:42 -0400
committerIan Stakenvicius <axs@gentoo.org>2018-08-15 13:13:30 -0400
commit1c6ba8dbc954b16d309fa1f61a833fc5027df320 (patch)
treeb11f9b32cd6813b6f2f33cf8b744c8266de4ce7c
parentthunderbird: sync v60 ebuild with tree (diff)
downloadmozilla-1c6ba8dbc954b16d309fa1f61a833fc5027df320.tar.gz
mozilla-1c6ba8dbc954b16d309fa1f61a833fc5027df320.tar.bz2
mozilla-1c6ba8dbc954b16d309fa1f61a833fc5027df320.zip
eclass/mozcoreconf-v6.eclass: adjust for PYTHON3 support in ebuilds
As python2 only has one slot, but python3 support is required for v61 and newer AND may be different from one mozilla release to another, this commit honours the setting of PYTHON_COMPAT and PYTHON_REQ_USE in the header of ebuilds so that python3 variants can be chosen via python-any-r1. If not specified, the previous python2-only values are set for compatibility. If a python3 variant is specified in PYTHON_COMPAT, then after python-any-r1 has chosen the correct python variant to use this value is set in the PYTHON3 environment variable, and then PYTHON itself is forced back to python2 (since mozilla requires both to build for the forseeable future)
-rw-r--r--eclass/mozcoreconf-v6.eclass14
1 files changed, 12 insertions, 2 deletions
diff --git a/eclass/mozcoreconf-v6.eclass b/eclass/mozcoreconf-v6.eclass
index 46d9cd3..930122f 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 <mozilla@gentoo.org>
# @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
@@ -146,10 +154,12 @@ mozconfig_init() {
seamonkey)
# Must create the initial mozconfig to enable application
: >.mozconfig || die "initial mozconfig creation failed"
+ # NOTE--this is not compatible with mozilla prior to v60
mozconfig_annotate "" --enable-application=comm/suite ;;
*thunderbird)
# Must create the initial mozconfig to enable application
: >.mozconfig || die "initial mozconfig creation failed"
+ # NOTE--this is not compatible with mozilla prior to v60
mozconfig_annotate "" --enable-application=comm/mail ;;
esac