summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2011-07-22 09:10:22 +0000
committerHans de Graaff <graaff@gentoo.org>2011-07-22 09:10:22 +0000
commit366047eef5ec81b54d60031465b5a391b556972a (patch)
treea73a6f6322d70a225c345aac321847c9d8fd6b40 /eclass/ruby-ng.eclass
parentLeverage the REQUIRED_USE mechanism to determine at dependency resolution tim... (diff)
downloadgentoo-2-366047eef5ec81b54d60031465b5a391b556972a.tar.gz
gentoo-2-366047eef5ec81b54d60031465b5a391b556972a.tar.bz2
gentoo-2-366047eef5ec81b54d60031465b5a391b556972a.zip
Provide a convenience method to get a list of all ruby targets enabled by the user. Useful in RUBY_OPTIONAL=yes ebuilds to provide custom handling of ruby. Patch by Matthew Schultz in bug 373227.
Diffstat (limited to 'eclass/ruby-ng.eclass')
-rw-r--r--eclass/ruby-ng.eclass13
1 files changed, 12 insertions, 1 deletions
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index a63a285fd907..6a0d1419f810 100644
--- a/eclass/ruby-ng.eclass
+++ b/eclass/ruby-ng.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.36 2011/07/22 09:08:59 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.37 2011/07/22 09:10:22 graaff Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -257,6 +257,17 @@ ruby_add_bdepend() {
RDEPEND="${RDEPEND}"
}
+# @FUNCTION: ruby_get_use_implementations
+# @DESCRIPTION:
+# Gets an array of ruby use targets enabled by the user
+ruby_get_use_implementations() {
+ local i implementation
+ for implementation in ${USE_RUBY}; do
+ use ruby_targets_${implementation} && i+=" ${implementation}"
+ done
+ echo $i
+}
+
# @FUNCTION: ruby_get_use_targets
# @DESCRIPTION:
# Gets an array of ruby use targets that the ebuild sets