Signed-off-by: Sam James <s...@gentoo.org> --- eclass/ruby-fakegem.eclass | 42 ++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 13 deletions(-)
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass index b3262dc5cdb4..9af96bec319f 100644 --- a/eclass/ruby-fakegem.eclass +++ b/eclass/ruby-fakegem.eclass @@ -150,17 +150,23 @@ RUBY_FAKEGEM_SUFFIX="${RUBY_FAKEGEM_SUFFIX:-}" case ${RUBY_FAKEGEM_RECIPE_DOC} in rake) - IUSE+=" doc" + if ! has doc ${IUSE} ; then + IUSE+=" docc" + fi ruby_add_bdepend "doc? ( dev-ruby/rake )" RUBY_FAKEGEM_DOCDIR="doc" ;; rdoc) - IUSE+=" doc" + if ! has doc ${IUSE} ; then + IUSE+=" doc" + fi ruby_add_bdepend "doc? ( dev-ruby/rdoc )" RUBY_FAKEGEM_DOCDIR="doc" ;; yard) - IUSE+="doc" + if ! has doc ${IUSE} ; then + IUSE+="doc" + fi ruby_add_bdepend "doc? ( dev-ruby/yard )" RUBY_FAKEGEM_DOCDIR="doc" ;; @@ -173,30 +179,40 @@ esac case ${RUBY_FAKEGEM_RECIPE_TEST} in rake) - IUSE+=" test" - RESTRICT+=" !test? ( test )" + if ! has test ${IUSE} ; then + IUSE+=" test" + RESTRICT+=" !test? ( test )" + fi ruby_add_bdepend "test? ( dev-ruby/rake )" ;; rspec) - IUSE+=" test" - RESTRICT+=" !test? ( test )" + if ! has test ${IUSE} ; then + IUSE+=" test" + RESTRICT+=" !test? ( test )" + fi # Also require a new enough rspec-core version that installs the # rspec-2 wrapper. ruby_add_bdepend "test? ( dev-ruby/rspec:2 >=dev-ruby/rspec-core-2.14.8-r2 )" ;; rspec3) - IUSE+=" test" - RESTRICT+=" !test? ( test )" + if ! has test ${IUSE} ; then + IUSE+=" test" + RESTRICT+=" !test? ( test )" + fi ruby_add_bdepend "test? ( dev-ruby/rspec:3 )" ;; cucumber) - IUSE+=" test" - RESTRICT+=" !test? ( test )" + if ! has test ${IUSE} ; then + IUSE+=" test" + RESTRICT+=" !test? ( test )" + fi ruby_add_bdepend "test? ( dev-util/cucumber )" ;; sus) - IUSE+=" test" - RESTRICT+=" !test? ( test )" + if ! has test ${IUSE} ; then + IUSE+=" test" + RESTRICT+=" !test? ( test )" + fi ruby_add_bdepend "test? ( dev-ruby/sus )" ;; none) -- 2.40.0