summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMamoru Komachi <usata@gentoo.org>2003-10-11 18:11:41 +0000
committerMamoru Komachi <usata@gentoo.org>2003-10-11 18:11:41 +0000
commit51684adedb2b0c424be242a046a6675e07598be5 (patch)
tree97ef504c0fc6c02c3bb5b86f2a11db9cdcf558aa /eclass/ruby.eclass
parentchangelog (diff)
downloadhistorical-51684adedb2b0c424be242a046a6675e07598be5.tar.gz
historical-51684adedb2b0c424be242a046a6675e07598be5.tar.bz2
historical-51684adedb2b0c424be242a046a6675e07598be5.zip
Added WANT_RUBY_1_6 and WANT_RUBY_1_8
Diffstat (limited to 'eclass/ruby.eclass')
-rw-r--r--eclass/ruby.eclass17
1 files changed, 14 insertions, 3 deletions
diff --git a/eclass/ruby.eclass b/eclass/ruby.eclass
index 2bfbcc52ddad..545d50622482 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.4 2003/09/21 21:13:45 usata Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby.eclass,v 1.5 2003/10/11 18:11:41 usata Exp $
#
# Author: Mamoru KOMACHI <usata@gentoo.org>
#
@@ -18,6 +18,11 @@ SLOT="0"
LICENSE="Ruby"
newdepend ">=dev-lang/ruby-1.6.8"
+if [ -n "${WANT_RUBY_1_6}" ] ; then
+ alias ruby=ruby16
+elif [ -n "${WANT_RUBY_1_8}" ] ; then
+ alias ruby=ruby18
+fi
ruby_src_compile() {
if [ -f extconf.rb ] ; then
@@ -47,8 +52,14 @@ ruby_src_install() {
elif [ -f extconf.rb -o -f Makefile ] ; then
einstall DESTDIR=${D} || die "einstall failed"
else
- siteruby=$(ruby -r rbconfig -e 'print Config::CONFIG["sitelibdir"]')
- insinto ${siteruby}/${PN}
+ if [ -n "${WANT_RUBY_1_6}" ] ; then
+ siteruby=$(ruby16 -r rbconfig -e 'print Config::CONFIG["sitelibdir"]')
+ elif [ -n "${WANT_RUBY_1_8}" ]; then
+ siteruby=$(ruby18 -r rbconfig -e 'print Config::CONFIG["sitelibdir"]')
+ else
+ siteruby=$(ruby -r rbconfig -e 'print Config::CONFIG["sitedir"]')
+ fi
+ insinto ${siteruby}
doins *.rb || "doins failed"
fi