/[gentoo-x86]/eclass/ruby.eclass
Gentoo

Diff of /eclass/ruby.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.12 Revision 1.13
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/ruby.eclass,v 1.12 2003/11/15 18:02:29 usata Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/ruby.eclass,v 1.13 2003/11/15 21:12:23 usata Exp $
4# 4#
5# Author: Mamoru KOMACHI <usata@gentoo.org> 5# Author: Mamoru KOMACHI <usata@gentoo.org>
6# 6#
7# The ruby eclass is designed to allow easier installation of ruby 7# The ruby eclass is designed to allow easier installation of ruby
8# softwares, and their incorporation into the Gentoo Linux system. 8# softwares, and their incorporation into the Gentoo Linux system.
130 ruby_emake $@ || die 130 ruby_emake $@ || die
131} 131}
132 132
133erubyinstall() { 133erubyinstall() {
134 local RUBY siteruby 134 local RUBY siteruby
135 if [ "$1" = ruby16 ] ; then 135 if [ "$1" = ruby16 -a -x /usr/bin/ruby16 ] ; then
136 RUBY=ruby16 136 RUBY=ruby16
137 elif [ "$1" = ruby18 ] ; then 137 elif [ "$1" = ruby18 -a -x /usr/bin/ruby18 ] ; then
138 RUBY=ruby18 138 RUBY=ruby18
139 else 139 else
140 RUBY=ruby 140 RUBY=ruby
141 fi 141 fi
142 shift 142 shift
158 doins *.rb || "doins failed" 158 doins *.rb || "doins failed"
159 fi 159 fi
160} 160}
161 161
162ruby_einstall() { 162ruby_einstall() {
163
164 local siteruby=$(ruby -r rbconfig -e 'print Config::CONFIG["sitelibdir"]')
163 165
164 if [[ "${WITH_RUBY/1.6/}" != "${WITH_RUBY}" && "${WITH_RUBY/1.8/}" != "${WITH_RUBY}" ]] ; then 166 if [[ "${WITH_RUBY/1.6/}" != "${WITH_RUBY}" && "${WITH_RUBY/1.8/}" != "${WITH_RUBY}" ]] ; then
165 einfo "running einstall for ruby 1.6 ;)" 167 einfo "running einstall for ruby 1.6 ;)"
166 MY_S=${S}/1.6/${S#${WORKDIR}} 168 MY_S=${S}/1.6/${S#${WORKDIR}}
167 cd ${MY_S} 169 cd ${MY_S}
170 MY_S=${S}/1.8/${S#${WORKDIR}} 172 MY_S=${S}/1.8/${S#${WORKDIR}}
171 cd ${MY_S} 173 cd ${MY_S}
172 erubyinstall ruby18 $@ 174 erubyinstall ruby18 $@
173 S=${MY_S} 175 S=${MY_S}
174 #cd - 176 #cd -
177 elif [[ "${USE_RUBY/0/}" != "${USE_RUBY}" ]] ; then
178 if [ -n "`use ruby18`" ] ; then
179 erubyinstall ruby18 $@
180 if [ -d ${D}${siteruby}/../1.8 ] ; then
181 cd ${D}${siteruby}/../1.8
182 dodir ${siteruby}/../1.6
183 for x in * ; do
184 ln -s ../1.8/$x ../1.6/$x
185 done
186 cd -
187 fi
188 else
189 erubyinstall ruby16 $@
190 if [ -d ${D}${siteruby}/../1.6 ] ; then
191 cd ${D}${siteruby}/../1.6
192 dodir ${siteruby}/../1.8
193 for x in * ; do
194 ln -s ../1.6/$x ../1.8/$x
195 done
196 cd -
197 fi
198 fi
199 erubyinstall
175 else 200 else
176 einfo "running einstall for ruby ;)" 201 einfo "running einstall for ruby ;)"
177 erubyinstall ruby $@ 202 erubyinstall ruby $@
178 fi 203 fi
179} 204}

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20