summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2010-09-23 06:47:01 +0000
committerFabian Groffen <grobian@gentoo.org>2010-09-23 06:47:01 +0000
commite9b2f44c1ac12ffe1be3cc879206dcfff5f20a40 (patch)
tree837c540f7a1e9e6d5b725deb3923eb803833c677 /eclass/ruby-fakegem.eclass
parentVersion bumped. (diff)
downloadgentoo-2-e9b2f44c1ac12ffe1be3cc879206dcfff5f20a40.tar.gz
gentoo-2-e9b2f44c1ac12ffe1be3cc879206dcfff5f20a40.tar.bz2
gentoo-2-e9b2f44c1ac12ffe1be3cc879206dcfff5f20a40.zip
fix fake-rubygem.eclass for Prefix, bug #336906
Diffstat (limited to 'eclass/ruby-fakegem.eclass')
-rw-r--r--eclass/ruby-fakegem.eclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index 72e64f4a7eb4..517d7ad6878b 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.23 2010/08/30 22:08:24 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.24 2010/09/23 06:47:01 grobian Exp $
#
# @ECLASS: ruby-fakegem.eclass
# @MAINTAINER:
@@ -92,7 +92,11 @@ ruby_add_rdepend virtual/rubygems
# This function returns the gems data directory for the ruby
# implementation in question.
ruby_fakegem_gemsdir() {
- local _gemsitedir=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]' | sed -e 's:site_ruby:gems:')
+ has "${EAPI}" 2 && ! use prefix && EPREFIX=
+
+ local _gemsitedir=$(ruby_rbconfig_value 'sitelibdir')
+ _gemsitedir=${_gemsitedir//site_ruby/gems}
+ _gemsitedir=${_gemsitedir#${EPREFIX}}
[[ -z ${_gemsitedir} ]] && {
eerror "Unable to find the gems dir"
@@ -152,7 +156,7 @@ ruby_fakegem_genspec() {
# so better taking this into consideration.
local quoted_description=${DESCRIPTION//\"/\\\"}
cat - > "${T}"/${RUBY_FAKEGEM_NAME}-${_ruby_implementation} <<EOF
-# generated by ruby-fakegem.eclass $Revision: 1.23 $
+# generated by ruby-fakegem.eclass $Revision: 1.24 $
Gem::Specification.new do |s|
s.name = "${RUBY_FAKEGEM_NAME}"
s.version = "${RUBY_FAKEGEM_VERSION}"
@@ -206,7 +210,7 @@ ruby_fakegem_binwrapper() {
#!${rubycmd}
# This is a simplified version of the RubyGems wrapper
#
-# Generated by ruby-fakegem.eclass $Revision: 1.23 $
+# Generated by ruby-fakegem.eclass $Revision: 1.24 $
require 'rubygems'