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

Diff of /eclass/ruby-ng.eclass

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

Revision 1.11 Revision 1.14
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
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/ruby-ng.eclass,v 1.11 2010/04/26 15:07:58 a3li Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.14 2010/05/21 23:18:46 flameeyes Exp $
4# 4#
5# @ECLASS: ruby-ng.eclass 5# @ECLASS: ruby-ng.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Ruby herd <ruby@gentoo.org> 7# Ruby herd <ruby@gentoo.org>
8# 8#
138 atom="${condition}? ( ${atom} )" 138 atom="${condition}? ( ${atom} )"
139 done 139 done
140 140
141 RDEPEND="${RDEPEND} ${atom}" 141 RDEPEND="${RDEPEND} ${atom}"
142 _ruby_add_bdepend "$atom" test 142 _ruby_add_bdepend "$atom" test
143}
144
145_ruby_atoms_samelib() {
146 local samelib=$(ruby_samelib)
147
148 for token in $*; do
149 case "$token" in
150 "||" | "(" | ")" )
151 echo "${token}" ;;
152 *)
153 echo "${token}${samelib}" ;;
154 esac
155 done
143} 156}
144 157
145# @FUNCTION: ruby_add_rdepend 158# @FUNCTION: ruby_add_rdepend
146# @USAGE: [conditions] atom 159# @USAGE: [conditions] atom
147# @DESCRIPTION: 160# @DESCRIPTION:
165 *) 178 *)
166 die "bad number of arguments to $0" 179 die "bad number of arguments to $0"
167 ;; 180 ;;
168 esac 181 esac
169 182
170 for atom in $atoms; do
171 _ruby_add_rdepend "${atom}$(ruby_samelib)" "$conditions" 183 _ruby_add_rdepend "$(_ruby_atoms_samelib "${atoms}")" "$conditions"
172 done
173} 184}
174 185
175# @FUNCTION: ruby_add_bdepend 186# @FUNCTION: ruby_add_bdepend
176# @USAGE: [conditions] atom 187# @USAGE: [conditions] atom
177# @DESCRIPTION: 188# @DESCRIPTION:
196 *) 207 *)
197 die "bad number of arguments to $0" 208 die "bad number of arguments to $0"
198 ;; 209 ;;
199 esac 210 esac
200 211
201 for atom in $atoms; do
202 _ruby_add_bdepend "${atom}$(ruby_samelib)" "$conditions" 212 _ruby_add_bdepend "$(_ruby_atoms_samelib "${atoms}")" "$conditions"
203 done
204} 213}
205 214
206for _ruby_implementation in $USE_RUBY; do 215for _ruby_implementation in $USE_RUBY; do
207 IUSE="${IUSE} ruby_targets_${_ruby_implementation}" 216 IUSE="${IUSE} ruby_targets_${_ruby_implementation}"
208 217
214 fi 223 fi
215done 224done
216 225
217_ruby_invoke_environment() { 226_ruby_invoke_environment() {
218 old_S=${S} 227 old_S=${S}
219 sub_S=${S#${WORKDIR}} 228 sub_S=${S#${WORKDIR}/}
229
230 # Special case, for the always-lovely GitHub fetches. With this,
231 # we allow the star glob to just expand to whatever directory it's
232 # called.
233 if [[ ${sub_S} = *"*" ]]; then
234 pushd "${WORKDIR}"/all &>/dev/null
235 sub_S=$(eval ls -d ${sub_S} 2>/dev/null)
236 popd &>/dev/null
237 fi
220 238
221 environment=$1; shift 239 environment=$1; shift
222 240
223 my_WORKDIR="${WORKDIR}"/${environment} 241 my_WORKDIR="${WORKDIR}"/${environment}
224 S="${my_WORKDIR}"/"${sub_S}" 242 S="${my_WORKDIR}"/"${sub_S}"

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.20