summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMamoru Komachi <usata@gentoo.org>2003-10-12 19:07:31 +0000
committerMamoru Komachi <usata@gentoo.org>2003-10-12 19:07:31 +0000
commite501529c5e01b30b2a091fa842c876e72d050de9 (patch)
tree654ba68eb5dc5f5bc0b38775374926d0cc21a2f2 /eclass/ruby.eclass
parentcleanup (diff)
downloadgentoo-2-e501529c5e01b30b2a091fa842c876e72d050de9.tar.gz
gentoo-2-e501529c5e01b30b2a091fa842c876e72d050de9.tar.bz2
gentoo-2-e501529c5e01b30b2a091fa842c876e72d050de9.zip
Suppressed warnings when dodoc'ing no file
Diffstat (limited to 'eclass/ruby.eclass')
-rw-r--r--eclass/ruby.eclass39
1 files changed, 23 insertions, 16 deletions
diff --git a/eclass/ruby.eclass b/eclass/ruby.eclass
index 502fce8feb6f..eefee2a6fd1c 100644
--- a/eclass/ruby.eclass
+++ b/eclass/ruby.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby.eclass,v 1.6 2003/10/12 17:35:00 usata Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby.eclass,v 1.7 2003/10/12 19:07:31 usata Exp $
#
# Author: Mamoru KOMACHI <usata@gentoo.org>
#
@@ -92,7 +92,7 @@ ruby_src_compile() {
}
erubyinstall() {
- local RUBY
+ local RUBY siteruby
if [ "$1" = ruby16 ] ; then
RUBY=ruby16
elif [ "$1" = ruby18 ] ; then
@@ -119,8 +119,26 @@ erubyinstall() {
fi
}
+erubydoc() {
+ local rdbase=/usr/share/doc/${PF}/rd rdfiles=$(find . -name '*.rd*')
+ insinto ${rdbase}
+ [ -n "${rdfiles}" ] && doins ${rdfiles}
+ rmdir --ignore-fail-on-non-empty ${D}${rdbase}
+ if [ -d doc -o -d docs -o examples ] ; then
+ dohtml -r doc/* docs/* examples/*
+ else
+ dohtml -r *
+ fi
+ if [ -d sample ] ; then
+ dodir /usr/share/doc/${PF}
+ cp -a sample ${D}/usr/share/doc/${PF} || "cp failed"
+ fi
+ for i in ChangeLog* [A-Z][A-Z]* ; do
+ [ -e $i ] && dodoc $i
+ done
+}
+
ruby_src_install() {
- local siteruby rdbase=/usr/share/doc/${PF}/rd
if [ "${USE_RUBY_1_6}" -a "${USE_RUBY_1_8}" ] && \
[ ! "${WANT_RUBY_1_6}" -a ! "${WANT_RUBY_1_8}" ] ; then
@@ -131,6 +149,7 @@ ruby_src_install() {
einfo "src_installing for ruby 1.8 ;)"
cd ${S}/1.8/${S#${WORKDIR}}
erubyinstall ruby18
+ S=${S}/1.8/${S#${WORKDIR}}
#cd -
else
einfo "src_installing ;)"
@@ -138,17 +157,5 @@ ruby_src_install() {
fi
einfo "dodoc'ing ;)"
- insinto ${rdbase}
- find . -name '*.rd*' | xargs doins
- rmdir --ignore-fail-on-non-empty ${D}${rdbase}
- if [ -d doc -o -d docs -o examples ] ; then
- dohtml -r doc/* docs/* examples/*
- else
- dohtml -r *
- fi
- if [ -d sample ] ; then
- dodir /usr/share/doc/${PF}
- cp -a sample ${D}/usr/share/doc/${PF} || "cp failed"
- fi
- dodoc ChangeLog* [A-Z][A-Z]*
+ erubydoc
}