diff options
author | Mamoru Komachi <usata@gentoo.org> | 2003-10-11 18:11:41 +0000 |
---|---|---|
committer | Mamoru Komachi <usata@gentoo.org> | 2003-10-11 18:11:41 +0000 |
commit | e26b60d42cce0cfc39b71d25e666952c0fbfa810 (patch) | |
tree | 6dee7bc99a1cf560d0586f277e67b65b16d0a3b0 /eclass | |
parent | changelog (diff) | |
download | gentoo-2-e26b60d42cce0cfc39b71d25e666952c0fbfa810.tar.gz gentoo-2-e26b60d42cce0cfc39b71d25e666952c0fbfa810.tar.bz2 gentoo-2-e26b60d42cce0cfc39b71d25e666952c0fbfa810.zip |
Added WANT_RUBY_1_6 and WANT_RUBY_1_8
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ruby.eclass | 17 |
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 |