From 612de1089fedcfc6fdfbfb98c1b5d42c83423812 Mon Sep 17 00:00:00 2001 From: Caleb Tennis Date: Fri, 4 Nov 2005 23:45:36 +0000 Subject: Add examples flag support to ruby eclass, per bug #111508 --- eclass/ruby.eclass | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'eclass') 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 # @@ -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 -- cgit v1.2.3-65-gdbad