diff options
author | 2013-11-09 10:22:06 +0000 | |
---|---|---|
committer | 2013-11-09 10:22:06 +0000 | |
commit | 42964253963f2947682abe7eb2ba31ab0e01b79e (patch) | |
tree | fce95b8537d0d1d204736e052d8c3c352c65a10b /eclass/ruby-fakegem.eclass | |
parent | Revert previous and instead include the build log and some other info. Don't (diff) | |
download | gentoo-2-42964253963f2947682abe7eb2ba31ab0e01b79e.tar.gz gentoo-2-42964253963f2947682abe7eb2ba31ab0e01b79e.tar.bz2 gentoo-2-42964253963f2947682abe7eb2ba31ab0e01b79e.zip |
Add a yard recipe for creating documentation.
Diffstat (limited to 'eclass/ruby-fakegem.eclass')
-rw-r--r-- | eclass/ruby-fakegem.eclass | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass index c18a11ea5546..05c3fafc1eb2 100644 --- a/eclass/ruby-fakegem.eclass +++ b/eclass/ruby-fakegem.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.39 2013/06/01 13:18:45 graaff Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.40 2013/11/09 10:22:06 graaff Exp $ # @ECLASS: ruby-fakegem.eclass # @MAINTAINER: @@ -51,6 +51,7 @@ inherit ruby-ng # Specify one of the default API doc building function for ruby-fakegem: # - rake (default; see also RUBY_FAKEGEM_TASK_DOC) # - 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="rake" @@ -121,6 +122,11 @@ case ${RUBY_FAKEGEM_RECIPE_DOC} in ruby_add_bdepend "doc? ( dev-ruby/rdoc )" RUBY_FAKEGEM_DOCDIR="doc" ;; + yard) + IUSE+="doc" + ruby_add_bdepend "doc? ( dev-ruby/yard )" + RUBY_FAKEGEM_DOCDIR="doc" + ;; none) [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && IUSE+=" doc" ;; @@ -281,7 +287,7 @@ ruby_fakegem_genspec() { # so better taking this into consideration. local quoted_description=${DESCRIPTION//\"/\\\"} cat - > $1 <<EOF -# generated by ruby-fakegem.eclass $Revision: 1.39 $ +# generated by ruby-fakegem.eclass $Revision: 1.40 $ Gem::Specification.new do |s| s.name = "${RUBY_FAKEGEM_NAME}" s.version = "${RUBY_FAKEGEM_VERSION}" @@ -331,7 +337,7 @@ ruby_fakegem_binwrapper() { #!${rubycmd} # This is a simplified version of the RubyGems wrapper # -# Generated by ruby-fakegem.eclass $Revision: 1.39 $ +# Generated by ruby-fakegem.eclass $Revision: 1.40 $ require 'rubygems' @@ -357,6 +363,9 @@ all_fakegem_compile() { rdoc) rdoc ${RUBY_FAKEGEM_DOC_SOURCES} || die "failed to (re)build documentation" ;; + yard) + yard doc ${RUBY_FAKEGEM_DOC_SOURCES} || die "failed to (re)build documentation" + ;; esac fi } |