summaryrefslogtreecommitdiff
path: root/eclass
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
commit2374af0d5a1247eea140ecd121a6a045d6284f23 (patch)
treef3937cb17a3308c00a2748b7b767037a03ac8893 /eclass
parentVersion bump (diff)
downloadgentoo-2-2374af0d5a1247eea140ecd121a6a045d6284f23.tar.gz
gentoo-2-2374af0d5a1247eea140ecd121a6a045d6284f23.tar.bz2
gentoo-2-2374af0d5a1247eea140ecd121a6a045d6284f23.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.
Diffstat (limited to 'eclass')
-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