summaryrefslogtreecommitdiff
path: root/eclass
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
commit2f64385de54c7655d1e2534c8f6819fbba7a0243 (patch)
tree3b040d4dd49a001b2477620f2ec670e65b8d2272 /eclass
parentVersion bumped. (diff)
downloadhistorical-2f64385de54c7655d1e2534c8f6819fbba7a0243.tar.gz
historical-2f64385de54c7655d1e2534c8f6819fbba7a0243.tar.bz2
historical-2f64385de54c7655d1e2534c8f6819fbba7a0243.zip
fix fake-rubygem.eclass for Prefix, bug #336906
Diffstat (limited to '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'