Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:master commit in: eclass/
Date: Wed, 15 Aug 2018 17:18:11
Message-Id: 1534353210.1c6ba8dbc954b16d309fa1f61a833fc5027df320.axs@gentoo
1 commit: 1c6ba8dbc954b16d309fa1f61a833fc5027df320
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 15 17:10:42 2018 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 15 17:13:30 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=1c6ba8db
7
8 eclass/mozcoreconf-v6.eclass: adjust for PYTHON3 support in ebuilds
9
10 As python2 only has one slot, but python3 support is required for v61
11 and newer AND may be different from one mozilla release to another,
12 this commit honours the setting of PYTHON_COMPAT and PYTHON_REQ_USE
13 in the header of ebuilds so that python3 variants can be chosen
14 via python-any-r1. If not specified, the previous python2-only
15 values are set for compatibility.
16
17 If a python3 variant is specified in PYTHON_COMPAT, then
18 after python-any-r1 has chosen the correct python variant to use
19 this value is set in the PYTHON3 environment variable, and then
20 PYTHON itself is forced back to python2 (since mozilla requires
21 both to build for the forseeable future)
22
23 eclass/mozcoreconf-v6.eclass | 14 ++++++++++++--
24 1 file changed, 12 insertions(+), 2 deletions(-)
25
26 diff --git a/eclass/mozcoreconf-v6.eclass b/eclass/mozcoreconf-v6.eclass
27 index 46d9cd3..930122f 100644
28 --- a/eclass/mozcoreconf-v6.eclass
29 +++ b/eclass/mozcoreconf-v6.eclass
30 @@ -1,7 +1,7 @@
31 -# Copyright 1999-2017 Gentoo Foundation
32 +# Copyright 1999-2018 Gentoo Foundation
33 # Distributed under the terms of the GNU General Public License v2
34 #
35 -# @ECLASS: mozcoreconf-v5.eclass
36 +# @ECLASS: mozcoreconf-v6.eclass
37 # @MAINTAINER:
38 # Mozilla team <mozilla@g.o>
39 # @BLURB: core options and configuration functions for mozilla
40 @@ -16,8 +16,11 @@
41
42 if [[ ! ${_MOZCORECONF} ]]; then
43
44 +# for compatibility with packages prior to v1
45 +if [[ -z ${PYTHON_COMPAT[@]} ]]; then
46 PYTHON_COMPAT=( python2_7 )
47 PYTHON_REQ_USE='ncurses,sqlite,ssl,threads'
48 +fi
49
50 inherit multilib toolchain-funcs flag-o-matic python-any-r1 versionator
51
52 @@ -112,6 +115,11 @@ moz_pkgsetup() {
53 fi
54
55 python-any-r1_pkg_setup
56 + # workaround to set python3 into PYTHON3 until mozilla doesn't need py2
57 + if [[ "${PYTHON_COMPAT[@]}" != "${PYTHON_COMPAT[@]#python3*}" ]]; then
58 + export PYTHON3=${PYTHON}
59 + python_export python2_7 PYTHON EPYTHON
60 + fi
61 }
62
63 # @FUNCTION: mozconfig_init
64 @@ -146,10 +154,12 @@ mozconfig_init() {
65 seamonkey)
66 # Must create the initial mozconfig to enable application
67 : >.mozconfig || die "initial mozconfig creation failed"
68 + # NOTE--this is not compatible with mozilla prior to v60
69 mozconfig_annotate "" --enable-application=comm/suite ;;
70 *thunderbird)
71 # Must create the initial mozconfig to enable application
72 : >.mozconfig || die "initial mozconfig creation failed"
73 + # NOTE--this is not compatible with mozilla prior to v60
74 mozconfig_annotate "" --enable-application=comm/mail ;;
75 esac