summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2013-11-09 10:22:06 +0000
committerHans de Graaff <graaff@gentoo.org>2013-11-09 10:22:06 +0000
commita596ba9a994fd986a5bd03826998e9b1c30d9930 (patch)
tree9f3fc0fc390d257a865a4025c802f189ea01bada /eclass
parentRevert previous and instead include the build log and some other info. Don't (diff)
downloadhistorical-a596ba9a994fd986a5bd03826998e9b1c30d9930.tar.gz
historical-a596ba9a994fd986a5bd03826998e9b1c30d9930.tar.bz2
historical-a596ba9a994fd986a5bd03826998e9b1c30d9930.zip
Add a yard recipe for creating documentation.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/ruby-fakegem.eclass15
2 files changed, 16 insertions, 4 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 2f6a26ae3a72..8e26ff97eccf 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1052 2013/11/09 10:05:12 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1053 2013/11/09 10:22:06 graaff Exp $
+
+ 09 Nov 2013; Hans de Graaff <graaff@gentoo.org> ruby-fakegem.eclass:
+ Add a yard recipe for creating documentation.
09 Nov 2013; Ryan Hill <dirtyepic@gentoo.org> toolchain.eclass:
Revert previous and instead include the build log and some other info. Don't
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
}