summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb Tennis <caleb@gentoo.org>2005-11-04 23:45:36 +0000
committerCaleb Tennis <caleb@gentoo.org>2005-11-04 23:45:36 +0000
commit717a7a1639f6f5e2f9b7e12c01338f97e9dfa7d3 (patch)
treee91c1dc809445add282f4bdb3d429e6cc7dbd75d /eclass/ruby.eclass
parentmove into unstable and quote $ROOT (diff)
downloadgentoo-2-717a7a1639f6f5e2f9b7e12c01338f97e9dfa7d3.tar.gz
gentoo-2-717a7a1639f6f5e2f9b7e12c01338f97e9dfa7d3.tar.bz2
gentoo-2-717a7a1639f6f5e2f9b7e12c01338f97e9dfa7d3.zip
Add examples flag support to ruby eclass, per bug
#111508
Diffstat (limited to 'eclass/ruby.eclass')
-rw-r--r--eclass/ruby.eclass20
1 files changed, 12 insertions, 8 deletions
diff --git a/eclass/ruby.eclass b/eclass/ruby.eclass
index 2e872ecfdc6a..ef0ad5baec93 100644
--- a/eclass/ruby.eclass
+++ b/eclass/ruby.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby.eclass,v 1.48 2005/08/23 14:55:11 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby.eclass,v 1.49 2005/11/04 23:45:36 caleb Exp $
#
# Author: Mamoru KOMACHI <usata@gentoo.org>
#
@@ -43,7 +43,7 @@ EXPORT_FUNCTIONS src_unpack src_compile src_install econf emake einstall
HOMEPAGE="http://raa.ruby-lang.org/list.rhtml?name=${PN}"
SRC_URI="mirror://gentoo/${P}.tar.gz"
-IUSE=""
+IUSE="examples"
SLOT="0"
LICENSE="Ruby"
@@ -148,12 +148,16 @@ erubydoc() {
else
dohtml -r *
fi
- for dir in sample example examples; do
- if [ -d ${dir} ] ; then
- dodir /usr/share/doc/${PF}
- cp -pPR ${dir} ${D}/usr/share/doc/${PF} || die "cp failed"
- fi
- done
+
+ if ( use examples ); then
+ for dir in sample example examples; do
+ if [ -d ${dir} ] ; then
+ dodir /usr/share/doc/${PF}
+ cp -pPR ${dir} ${D}/usr/share/doc/${PF} || die "cp failed"
+ fi
+ done
+ fi
+
for i in ChangeLog* [A-Z][A-Z]* ; do
[ -e $i ] && dodoc $i
done