_ruby_implementation_depend $1
}
+# @FUNCTION: _ruby_get_all_impls
+# @INTERNAL
+# @RETURN: list of valid values in USE_RUBY
+# Return a list of valid implementations in USE_RUBY, skipping the old
+# implementations that are no longer supported.
+_ruby_get_all_impls() {
+ local i
+ for i in ${USE_RUBY}; do
+ case ${i} in
+ *)
+ echo ${i};;
+ esac
+ done
+}
+
# @FUNCTION: ruby_samelib
# @RETURN: use flag string with current ruby implementations
# @DESCRIPTION:
# more complex dependencies.
ruby_samelib() {
local res=
- for _ruby_implementation in $USE_RUBY; do
+ for _ruby_implementation in $(_ruby_get_all_impls); do
has -${_ruby_implementation} $@ || \
res="${res}ruby_targets_${_ruby_implementation}?,"
done
_ruby_atoms_samelib() {
local atoms=$(_ruby_atoms_samelib_generic "$*")
- for _ruby_implementation in $USE_RUBY; do
+ for _ruby_implementation in $(_ruby_get_all_impls); do
echo "${atoms//RUBYTARGET/ruby_targets_${_ruby_implementation}}"
done
}
# Gets an array of ruby use targets enabled by the user
ruby_get_use_implementations() {
local i implementation
- for implementation in ${USE_RUBY}; do
+ for implementation in $(_ruby_get_all_impls); do
use ruby_targets_${implementation} && i+=" ${implementation}"
done
echo $i
# Gets an array of ruby use targets that the ebuild sets
ruby_get_use_targets() {
local t implementation
- for implementation in ${USE_RUBY}; do
+ for implementation in $(_ruby_get_all_impls); do
t+=" ruby_targets_${implementation}"
done
echo $t
# RDEPEND="${DEPEND}"
ruby_implementations_depend() {
local depend
- for _ruby_implementation in ${USE_RUBY}; do
+ for _ruby_implementation in $(_ruby_get_all_impls); do
depend="${depend}${depend+ }ruby_targets_${_ruby_implementation}? ( $(ruby_implementation_depend $_ruby_implementation) )"
done
echo "${depend}"
_ruby_each_implementation() {
local invoked=no
- for _ruby_implementation in ${USE_RUBY}; do
+ for _ruby_implementation in $(_ruby_get_all_impls); do
# only proceed if it's requested
use ruby_targets_${_ruby_implementation} || continue
if [[ ${invoked} == "no" ]]; then
eerror "You need to select at least one compatible Ruby installation target via RUBY_TARGETS in make.conf."
- eerror "Compatible targets for this package are: ${USE_RUBY}"
+ eerror "Compatible targets for this package are: $(_ruby_get_all_impls)"
eerror
eerror "See https://www.gentoo.org/proj/en/prog_lang/ruby/index.xml#doc_chap3 for more information."
eerror