diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2020-11-16 14:11:54 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2020-11-29 23:11:56 +0100 |
commit | 5abad977c06b94becddc9e1e7b3244570a6a3bc6 (patch) | |
tree | d1c694d1d3611876346cc6550e7502afa1babd39 /eclass/trinity-base-2.eclass | |
parent | 2a9e89c1c4e8e6855fc39ae8310c84eb78f9779e (diff) | |
download | tde-packaging-gentoo-5abad977c06b94becddc9e1e7b3244570a6a3bc6.tar.gz tde-packaging-gentoo-5abad977c06b94becddc9e1e7b3244570a6a3bc6.zip |
trinity-base-2.eclass: Move TRINITY_NEED_ARTS+setup from trinity-functions-2
Assign IUSE, DEPEND and RDEPEND here instead of in need-arts() function
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass/trinity-base-2.eclass')
-rw-r--r-- | eclass/trinity-base-2.eclass | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/eclass/trinity-base-2.eclass b/eclass/trinity-base-2.eclass index 3c5a213d..580ccc38 100644 --- a/eclass/trinity-base-2.eclass +++ b/eclass/trinity-base-2.eclass @@ -241,6 +241,37 @@ if [[ -n "${TRINITY_EXTRAGEAR_PACKAGING}" ]]; then fi fi +# @ECLASS-VARIABLE: TRINITY_NEED_ARTS +# @DESCRIPTION: +# Default value is "no". If set to "yes", add an unconditional dependency on +# trinity-base/arts and trinity-base/tdelibs[arts], if "optional" add both +# dependencies with IUSE="arts". +# TODO: This variable was set by the need-arts function but all invocations of +# need-arts should be replaced by setting TRINITY_NEED_ARTS directly in ebuild +# before inheriting this eclass. +: ${TRINITY_NEED_ARTS:=no} + +case ${TRINITY_NEED_ARTS} in + no) ;; + yes) + COMMON_DEPEND+=" + ~trinity-base/arts-${PV} + ~trinity-base/tdelibs-${PV}[arts] + " + ;; + optional) + IUSE+=" arts" + COMMON_DEPEND+=" arts? ( + ~trinity-base/arts-${PV} + ~trinity-base/tdelibs-${PV}[arts] + )" + ;; + *) + eerror "Unknown value for \${TRINITY_NEED_ARTS}" + die "Value ${TRINITY_NEED_ARTS} is not supported" + ;; +esac + DEPEND+=" ${COMMON_DEPEND}" RDEPEND+=" ${COMMON_DEPEND}" unset COMMON_DEPEND |