summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2009-12-26 17:06:02 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2009-12-26 17:06:02 +0000
commite8daf7ea1e07a259844562616e51692cc6c766f2 (patch)
tree4b6aabe5bf092ea1be0bfc5ddb43019c7e55d93a /eclass
parentDrop sparc keywords (diff)
downloadgentoo-2-e8daf7ea1e07a259844562616e51692cc6c766f2.tar.gz
gentoo-2-e8daf7ea1e07a259844562616e51692cc6c766f2.tar.bz2
gentoo-2-e8daf7ea1e07a259844562616e51692cc6c766f2.zip
Add a variable to explicit further required paths, useful for gems like RedCloth.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ruby-fakegem.eclass15
1 files changed, 13 insertions, 2 deletions
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index a4e45564e16d..dbea445ca160 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.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-fakegem.eclass,v 1.7 2009/12/21 19:07:38 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.8 2009/12/26 17:06:02 flameeyes Exp $
#
# @ECLASS: ruby-fakegem.eclass
# @MAINTAINER:
@@ -54,6 +54,11 @@ inherit ruby-ng
# Binaries to wrap around (relative to the bin/ directory)
# RUBY_FAKEGEM_BINWRAP="*"
+# @ECLASS-VARIABLE: RUBY_FAKEGEM_REQUIRE_PATHS
+# @DESCRIPTION:
+# Extra require paths (beside lib) to add to the specification
+# RUBY_FAKEGEM_BINWRAP=""
+
RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN}}"
RUBY_FAKEGEM_VERSION="${RUBY_FAKEGEM_VERSION:-${PV}}"
@@ -128,8 +133,14 @@ ruby_fakegem_newins() {
# In the gemspec, the following values are set: name, version, summary,
# homepage, and require_paths=["lib"].
# See RUBY_FAKEGEM_NAME and RUBY_FAKEGEM_VERSION for setting name and version.
+# See RUBY_FAKEGEM_REQUIRE_PATHS for setting extra require paths.
ruby_fakegem_genspec() {
(
+ local required_paths="'lib'"
+ for path in ${RUBY_FAKEGEM_REQUIRE_PATHS}; do
+ required_paths="${required_paths}, '${path}'"
+ done
+
# We use the _ruby_implementation variable to avoid having stray
# copies with different implementations; while for now we're using
# the same exact content, we might have differences in the future,
@@ -140,7 +151,7 @@ Gem::Specification.new do |s|
s.version = "${RUBY_FAKEGEM_VERSION}"
s.summary = "${DESCRIPTION}"
s.homepage = "${HOMEPAGE}"
- s.require_paths = ["lib"]
+ s.require_paths = [${required_paths}]
end
EOF