diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-05-21 23:18:46 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-05-21 23:18:46 +0000 |
commit | 906315511aee81512dd44d1777488fde09b30a36 (patch) | |
tree | 5d3a516ea243e78df8b987744618fd9b8ed3d4b3 /eclass/ruby-ng.eclass | |
parent | amd64 stable, bug #320831 (diff) | |
download | gentoo-2-906315511aee81512dd44d1777488fde09b30a36.tar.gz gentoo-2-906315511aee81512dd44d1777488fde09b30a36.tar.bz2 gentoo-2-906315511aee81512dd44d1777488fde09b30a36.zip |
Change processing of atoms in ruby_add_rdepend and ruby_add_bdepend to
make it possible to process complex dependency strings, such as
|| ( virtual/ruby-test-unit dev-ruby/test-unit:2 )
which is going to be common for test-unit-2 compatible packages; to
have a proper dependency tree.
This, theorically, can also drop the need for the 2-ary calls for
ruby_add_bdepend and ruby_add_rdepend.
Diffstat (limited to 'eclass/ruby-ng.eclass')
-rw-r--r-- | eclass/ruby-ng.eclass | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index 4e5a3ec4710d..8d86e7c03b22 100644 --- a/eclass/ruby-ng.eclass +++ b/eclass/ruby-ng.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.13 2010/05/01 16:05:45 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.14 2010/05/21 23:18:46 flameeyes Exp $ # # @ECLASS: ruby-ng.eclass # @MAINTAINER: @@ -142,6 +142,19 @@ _ruby_add_rdepend() { _ruby_add_bdepend "$atom" test } +_ruby_atoms_samelib() { + local samelib=$(ruby_samelib) + + for token in $*; do + case "$token" in + "||" | "(" | ")" ) + echo "${token}" ;; + *) + echo "${token}${samelib}" ;; + esac + done +} + # @FUNCTION: ruby_add_rdepend # @USAGE: [conditions] atom # @DESCRIPTION: @@ -167,9 +180,7 @@ ruby_add_rdepend() { ;; esac - for atom in $atoms; do - _ruby_add_rdepend "${atom}$(ruby_samelib)" "$conditions" - done + _ruby_add_rdepend "$(_ruby_atoms_samelib "${atoms}")" "$conditions" } # @FUNCTION: ruby_add_bdepend @@ -198,9 +209,7 @@ ruby_add_bdepend() { ;; esac - for atom in $atoms; do - _ruby_add_bdepend "${atom}$(ruby_samelib)" "$conditions" - done + _ruby_add_bdepend "$(_ruby_atoms_samelib "${atoms}")" "$conditions" } for _ruby_implementation in $USE_RUBY; do |