ruby-fakegem.eclass: change default DOC recipe to use rdoc
authorHans de Graaff <graaff@gentoo.org>
Thu, 25 Jul 2019 06:36:28 +0000 (08:36 +0200)
committerHans de Graaff <graaff@gentoo.org>
Sat, 27 Jul 2019 07:13:16 +0000 (09:13 +0200)
The previous default was "rake" but this turned out to be a poor
choice because many packages do not implement "rake doc" and even if
they do there are usually many local development environment
assumption attached to that task. Using a consistent "rdoc" call that
is handled by the eclass gets more consistent results at the code of
missing out on specific rdoc options set by packages.

Signed-off-by: Hans de Graaff <graaff@gentoo.org>
eclass/ruby-fakegem.eclass

index ab7b36eb7ae716dee62576effdab1a23c90d3b3c..33a9e453f564666ba3b0150bdb7bc43706a5d821 100644 (file)
@@ -57,7 +57,14 @@ RUBY_FAKEGEM_TASK_TEST="${RUBY_FAKEGEM_TASK_TEST-test}"
 #  - rdoc (calls `rdoc-2`, adds dev-ruby/rdoc to the dependencies);
 #  - yard (calls `yard`, adds dev-ruby/yard to the dependencies);
 #  - none
-RUBY_FAKEGEM_RECIPE_DOC="${RUBY_FAKEGEM_RECIPE_DOC-rake}"
+case ${EAPI} in
+       4|5|6)
+               RUBY_FAKEGEM_RECIPE_DOC="${RUBY_FAKEGEM_RECIPE_DOC-rake}"
+               ;;
+       *)
+               RUBY_FAKEGEM_RECIPE_DOC="${RUBY_FAKEGEM_RECIPE_DOC-rdoc}"
+               ;;
+esac
 
 # @ECLASS-VARIABLE: RUBY_FAKEGEM_DOCDIR
 # @DEFAULT_UNSET