1 |
flameeyes 10/04/30 17:40:10 |
2 |
|
3 |
Modified: ruby-ng.eclass |
4 |
Log: |
5 |
Create a special handling of S variable for github-based packages. |
6 |
|
7 |
Since using GitHub is widely common for Ruby packages, especially |
8 |
those not packaging the tests within the gem, we would be |
9 |
reimplementing this so many times that it's worth special casing here. |
10 |
|
11 |
Revision Changes Path |
12 |
1.12 eclass/ruby-ng.eclass |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.12&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?rev=1.12&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ruby-ng.eclass?r1=1.11&r2=1.12 |
17 |
|
18 |
Index: ruby-ng.eclass |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v |
21 |
retrieving revision 1.11 |
22 |
retrieving revision 1.12 |
23 |
diff -u -r1.11 -r1.12 |
24 |
--- ruby-ng.eclass 26 Apr 2010 15:07:58 -0000 1.11 |
25 |
+++ ruby-ng.eclass 30 Apr 2010 17:40:10 -0000 1.12 |
26 |
@@ -1,6 +1,6 @@ |
27 |
# Copyright 1999-2009 Gentoo Foundation |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.11 2010/04/26 15:07:58 a3li Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.12 2010/04/30 17:40:10 flameeyes Exp $ |
31 |
# |
32 |
# @ECLASS: ruby-ng.eclass |
33 |
# @MAINTAINER: |
34 |
@@ -216,7 +216,16 @@ |
35 |
|
36 |
_ruby_invoke_environment() { |
37 |
old_S=${S} |
38 |
- sub_S=${S#${WORKDIR}} |
39 |
+ sub_S=${S#${WORKDIR}/} |
40 |
+ |
41 |
+ # Special case, for the always-lovely GitHub fetches. With this, |
42 |
+ # we allow the star glob to just expand to whatever directory it's |
43 |
+ # called. |
44 |
+ if [[ ${sub_S} = *"*" ]]; then |
45 |
+ pushd "${WORKDIR}"/all &>/dev/null |
46 |
+ sub_S=$(eval ls -d ${sub_S}) |
47 |
+ popd &>/dev/null |
48 |
+ fi |
49 |
|
50 |
environment=$1; shift |