/[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.3 Revision 1.8
1# Copyright 1999-2004 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.3 2009/12/05 11:32:19 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.8 2010/01/15 12:58:20 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#
119_ruby_add_bdepend() { 119_ruby_add_bdepend() {
120 local atom=$1 120 local atom=$1
121 local conditions=$2 121 local conditions=$2
122 122
123 for condition in $conditions; do 123 for condition in $conditions; do
124 hasq $condition "$IUSE" || IUSE="${IUSE} $condition"
124 atom="${condition}? ( ${atom} )" 125 atom="${condition}? ( ${atom} )"
125 done 126 done
126 127
127 DEPEND="${DEPEND} ${atom}" 128 DEPEND="${DEPEND} ${atom}"
128 RDEPEND="${RDEPEND}" 129 RDEPEND="${RDEPEND}"
131_ruby_add_rdepend() { 132_ruby_add_rdepend() {
132 local atom=$1 133 local atom=$1
133 local conditions=$2 134 local conditions=$2
134 135
135 for condition in $conditions; do 136 for condition in $conditions; do
137 hasq $condition "$IUSE" || IUSE="${IUSE} $condition"
136 atom="${condition}? ( ${atom} )" 138 atom="${condition}? ( ${atom} )"
137 done 139 done
138 140
139 RDEPEND="${RDEPEND} ${atom}" 141 RDEPEND="${RDEPEND} ${atom}"
140 _ruby_add_bdepend "$atom" test 142 _ruby_add_bdepend "$atom" test
265 _ruby_each_implementation 267 _ruby_each_implementation
266} 268}
267 269
268# @FUNCTION: ruby-ng_src_unpack 270# @FUNCTION: ruby-ng_src_unpack
269# @DESCRIPTION: 271# @DESCRIPTION:
270# Unpack the source archive, including gems. 272# Unpack the source archive.
271ruby-ng_src_unpack() { 273ruby-ng_src_unpack() {
272 mkdir "${WORKDIR}"/all 274 mkdir "${WORKDIR}"/all
273 pushd "${WORKDIR}"/all &>/dev/null 275 pushd "${WORKDIR}"/all &>/dev/null
274 276
275 # We don't support an each-unpack, it's either all or nothing! 277 # We don't support an each-unpack, it's either all or nothing!
316 # almost every other ebuild. 318 # almost every other ebuild.
317 find . -name '._*' -delete 319 find . -name '._*' -delete
318 320
319 _ruby_invoke_environment all _ruby_apply_patches 321 _ruby_invoke_environment all _ruby_apply_patches
320 322
323 _PHASE="source copy" \
321 _ruby_each_implementation _ruby_source_copy 324 _ruby_each_implementation _ruby_source_copy
322 325
323 if type each_ruby_prepare &>/dev/null; then 326 if type each_ruby_prepare &>/dev/null; then
324 _ruby_each_implementation each_ruby_prepare 327 _ruby_each_implementation each_ruby_prepare
325 fi 328 fi
326} 329}
409# @FUNCTION: doruby 412# @FUNCTION: doruby
410# @USAGE: file [file...] 413# @USAGE: file [file...]
411# @DESCRIPTION: 414# @DESCRIPTION:
412# Installs the specified file(s) into the sitelibdir of the Ruby interpreter in ${RUBY}. 415# Installs the specified file(s) into the sitelibdir of the Ruby interpreter in ${RUBY}.
413doruby() { 416doruby() {
417 [[ -z ${RUBY} ]] && die "\$RUBY is not set"
414 ( # don't want to pollute calling env 418 ( # don't want to pollute calling env
415 insinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]') 419 insinto $(${RUBY} -rrbconfig -e 'print Config::CONFIG["sitelibdir"]')
416 insopts -m 0644 420 insopts -m 0644
417 doins "$@" 421 doins "$@"
418 ) || die "failed to install $@" 422 ) || die "failed to install $@"
419} 423}
420 424

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20