summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-04-30 17:40:10 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-04-30 17:40:10 +0000
commit488f39456f72b378ca57a671599d68e1970a2844 (patch)
tree79a09cd00a09ec79491fafeb53bd3e8984ccc4f8
parentVersion bump (diff)
downloadhistorical-488f39456f72b378ca57a671599d68e1970a2844.tar.gz
historical-488f39456f72b378ca57a671599d68e1970a2844.tar.bz2
historical-488f39456f72b378ca57a671599d68e1970a2844.zip
Create a special handling of S variable for github-based packages.
Since using GitHub is widely common for Ruby packages, especially those not packaging the tests within the gem, we would be reimplementing this so many times that it's worth special casing here.
-rw-r--r--eclass/ruby-ng.eclass13
1 files changed, 11 insertions, 2 deletions
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index 41ffede517d9..12ac03e90058 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.11 2010/04/26 15:07:58 a3li Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.12 2010/04/30 17:40:10 flameeyes Exp $
#
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
@@ -216,7 +216,16 @@ done
_ruby_invoke_environment() {
old_S=${S}
- sub_S=${S#${WORKDIR}}
+ sub_S=${S#${WORKDIR}/}
+
+ # Special case, for the always-lovely GitHub fetches. With this,
+ # we allow the star glob to just expand to whatever directory it's
+ # called.
+ if [[ ${sub_S} = *"*" ]]; then
+ pushd "${WORKDIR}"/all &>/dev/null
+ sub_S=$(eval ls -d ${sub_S})
+ popd &>/dev/null
+ fi
environment=$1; shift