This isn't explicitly wrong, but it's a bit ugly in the generated metadata,
and I'm not convinced Portage handles duplicates correctly (see e.g.
the duplicate || ( ... ) issue in *DEPEND).
This doesn't fix all instances and to be honest, it's a bit dubious given has_iuse
doesn't work in global scope, but let's just fix the thing which is definitely wrong (the quoting).
This does change the metadata generated in the way I expected, but it doesn't remove *all* duplicates.
Signed-off-by: Sam James <
sam@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..8d22c4e3ccf7 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+=" doc"
+ 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+=