diff options
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/distutils-r1.eclass | 3 | ||||
-rw-r--r-- | eclass/python-r1.eclass | 22 | ||||
-rw-r--r-- | eclass/python-single-r1.eclass | 27 |
4 files changed, 51 insertions, 7 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index dfe22d57586f..e4eaa76143f5 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.832 2013/05/18 16:22:27 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.833 2013/05/21 01:31:02 floppym Exp $ + + 21 May 2013; Mike Gilbert <floppym@gentoo.org> distutils-r1.eclass, + python-r1.eclass, python-single-r1.eclass: + Set PYTHON_REQUIRED_USE, and add it to REQUIRED_USE in distutils-r1. 18 May 2013; Pacho Ramos <pacho@gentoo.org> readme.gentoo.eclass: Add a note informing people a file is being installed for future reference, diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 47b5b97a3fed..34637665bacd 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.70 2013/04/30 05:36:19 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.71 2013/05/21 01:31:02 floppym Exp $ # @ECLASS: distutils-r1 # @MAINTAINER: @@ -98,6 +98,7 @@ if [[ ! ${_DISTUTILS_R1} ]]; then if [[ ! ${DISTUTILS_OPTIONAL} ]]; then RDEPEND=${PYTHON_DEPS} DEPEND=${PYTHON_DEPS} + REQUIRED_USE=${PYTHON_REQUIRED_USE} fi # @ECLASS-VARIABLE: PATCHES diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 84c923fe2170..1c0f6a722919 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.54 2013/05/10 22:03:30 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.55 2013/05/21 01:31:02 floppym Exp $ # @ECLASS: python-r1 # @MAINTAINER: @@ -150,6 +150,24 @@ fi # python_targets_python2_6(-)?,python_targets_python2_7(-)? # @CODE +# @ECLASS-VARIABLE: PYTHON_REQUIRED_USE +# @DESCRIPTION: +# This is an eclass-generated required-use expression which ensures at +# least one Python implementation has been enabled. +# +# This expression should be utilized in an ebuild by including it in +# REQUIRED_USE, optionally behind a use flag. +# +# Example use: +# @CODE +# REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +# @CODE +# +# Example value: +# @CODE +# || ( python_targets_python2_6 python_targets_python2_7 ) +# @CODE + _python_set_globals() { local impls=() @@ -181,7 +199,7 @@ _python_set_globals() { optflags+=,${flags_st[@]/%/(-)} IUSE=${flags[*]} - #REQUIRED_USE="|| ( ${flags[*]} )" + PYTHON_REQUIRED_USE="|| ( ${flags[*]} )" PYTHON_USEDEP=${optflags// /,} # 1) well, python-exec would suffice as an RDEP diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index e6732a750ae7..ab5b531e360d 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-single-r1.eclass,v 1.17 2013/05/10 22:03:30 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python-single-r1.eclass,v 1.18 2013/05/21 01:31:02 floppym Exp $ # @ECLASS: python-single-r1 # @MAINTAINER: @@ -133,6 +133,27 @@ fi # python_targets_python2_7(-)?,python_single_target_python2_7(+)? # @CODE +# @ECLASS-VARIABLE: PYTHON_REQUIRED_USE +# @DESCRIPTION: +# This is an eclass-generated required-use expression which ensures the following: +# 1. Exactly one PYTHON_SINGLE_TARGET value has been enabled. +# 2. The selected PYTHON_SINGLE_TARGET value is enabled in PYTHON_TARGETS. +# +# This expression should be utilized in an ebuild by including it in +# REQUIRED_USE, optionally behind a use flag. +# +# Example use: +# @CODE +# REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +# @CODE +# +# Example value: +# @CODE +# python_single_target_python2_6? ( python_targets_python2_6 ) +# python_single_target_python2_7? ( python_targets_python2_7 ) +# ^^ ( python_single_target_python2_6 python_single_target_python2_7 ) +# @CODE + _python_single_set_globals() { local impls=() @@ -144,7 +165,7 @@ _python_single_set_globals() { # The chosen targets need to be in PYTHON_TARGETS as well. # This is in order to enforce correct dependencies on packages # supporting multiple implementations. - #REQUIRED_USE+=" python_single_target_${i}? ( python_targets_${i} )" + PYTHON_REQUIRED_USE+=" python_single_target_${i}? ( python_targets_${i} )" python_export "${i}" PYTHON_PKG_DEP PYTHON_DEPS+="python_single_target_${i}? ( ${PYTHON_PKG_DEP} ) " @@ -163,7 +184,7 @@ _python_single_set_globals() { optflags+=,${flags[@]/%/(+)?} IUSE="${flags_mt[*]} ${flags[*]}" - #REQUIRED_USE="|| ( ${flags_mt[*]} ) ^^ ( ${flags[*]} )" + PYTHON_REQUIRED_USE+=" ^^ ( ${flags[*]} )" PYTHON_USEDEP=${optflags// /,} # 1) well, python-exec would suffice as an RDEP |