| 1 | # Copyright 1999-2009 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-fakegem.eclass,v 1.2 2009/12/15 15:32:27 flameeyes Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.4 2009/12/15 17:43:51 flameeyes Exp $ |
| 4 | # |
4 | # |
| 5 | # @ECLASS: ruby-fakegem.eclass |
5 | # @ECLASS: ruby-fakegem.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Ruby herd <ruby@gentoo.org> |
7 | # Ruby herd <ruby@gentoo.org> |
| 8 | # |
8 | # |
| … | |
… | |
| 16 | # providing integration into the RubyGems system even for "regular" packages. |
16 | # providing integration into the RubyGems system even for "regular" packages. |
| 17 | # |
17 | # |
| 18 | |
18 | |
| 19 | inherit ruby-ng |
19 | inherit ruby-ng |
| 20 | |
20 | |
| 21 | SRC_URI="mirror://rubygems/${P}.gem" |
|
|
| 22 | |
|
|
| 23 | # @ECLASS-VARIABLE: RUBY_FAKEGEM_NAME |
21 | # @ECLASS-VARIABLE: RUBY_FAKEGEM_NAME |
| 24 | # @DESCRIPTION: |
22 | # @DESCRIPTION: |
| 25 | # Sets the Gem name for the generated fake gemspec. |
23 | # Sets the Gem name for the generated fake gemspec. |
| 26 | # RUBY_FAKEGEM_NAME="${PN}" |
24 | # RUBY_FAKEGEM_NAME="${PN}" |
| 27 | |
25 | |
| … | |
… | |
| 31 | # RUBY_FAKEGEM_VERSION="${PV}" |
29 | # RUBY_FAKEGEM_VERSION="${PV}" |
| 32 | |
30 | |
| 33 | # @ECLASS-VARIABLE: RUBY_FAKEGEM_TASK_DOC |
31 | # @ECLASS-VARIABLE: RUBY_FAKEGEM_TASK_DOC |
| 34 | # @DESCRIPTION: |
32 | # @DESCRIPTION: |
| 35 | # Specify the rake(1) task to run to generate documentation. |
33 | # Specify the rake(1) task to run to generate documentation. |
| 36 | # RUBY_FAKEGEM_VERSION="rdoc" |
34 | # RUBY_FAKEGEM_TASK_DOC="rdoc" |
| 37 | |
35 | |
| 38 | # @ECLASS-VARIABLE: RUBY_FAKEGEM_TASK_TEST |
36 | # @ECLASS-VARIABLE: RUBY_FAKEGEM_TASK_TEST |
| 39 | # @DESCRIPTION: |
37 | # @DESCRIPTION: |
| 40 | # Specify the rake(1) task used for executing tests. |
38 | # Specify the rake(1) task used for executing tests. |
| 41 | # RUBY_FAKEGEM_VERSION="test" |
39 | # RUBY_FAKEGEM_TASK_TEST="test" |
|
|
40 | |
|
|
41 | # @ECLASS-VARIABLE: RUBY_FAKEGEM_DOCDIR |
|
|
42 | # @DESCRIPTION: |
|
|
43 | # Specify the directory under which the documentation is built; |
|
|
44 | # if empty no documentation will be installed automatically. |
|
|
45 | # RUBY_FAKEGEM_DOCDIR="" |
|
|
46 | |
|
|
47 | # @ECLASS-VARIABLE: RUBY_FAKEGEM_EXTRADOC |
|
|
48 | # @DESCRIPTION: |
|
|
49 | # Extra documentation to install (readme, changelogs, …). |
|
|
50 | # RUBY_FAKEGEM_EXTRADOC="" |
| 42 | |
51 | |
| 43 | RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN}}" |
52 | RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN}}" |
| 44 | RUBY_FAKEGEM_VERSION="${RUBY_FAKEGEM_VERSION:-${PV}}" |
53 | RUBY_FAKEGEM_VERSION="${RUBY_FAKEGEM_VERSION:-${PV}}" |
| 45 | |
54 | |
| 46 | RUBY_FAKEGEM_TASK_DOC="${RUBY_FAKEGEM_TASK_DOC-rdoc}" |
55 | RUBY_FAKEGEM_TASK_DOC="${RUBY_FAKEGEM_TASK_DOC-rdoc}" |
| … | |
… | |
| 53 | |
62 | |
| 54 | if [[ ${RUBY_FAKEGEM_TASK_TEST} != "" ]]; then |
63 | if [[ ${RUBY_FAKEGEM_TASK_TEST} != "" ]]; then |
| 55 | IUSE="$IUSE test" |
64 | IUSE="$IUSE test" |
| 56 | ruby_add_bdepend test "dev-ruby/rake" |
65 | ruby_add_bdepend test "dev-ruby/rake" |
| 57 | fi |
66 | fi |
|
|
67 | |
|
|
68 | SRC_URI="mirror://rubygems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}.gem" |
| 58 | |
69 | |
| 59 | ruby_add_rdepend virtual/rubygems |
70 | ruby_add_rdepend virtual/rubygems |
| 60 | |
71 | |
| 61 | # @FUNCTION: ruby_fakegem_gemsdir |
72 | # @FUNCTION: ruby_fakegem_gemsdir |
| 62 | # @RETURN: Returns the gem data directory |
73 | # @RETURN: Returns the gem data directory |