These changes are necessary to support offset installs properly, as done in Prefix. The changes are quite minimal and straight forward, hence inline: --- ruby-fakegem.eclass 2010-09-08 10:31:13.943292000 +0200 +++ ruby-fakegem.eclass 2010-09-12 12:29:37.524763000 +0200 @@ -92,7 +92,9 @@ # 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} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]' | sed -e 's:site_ruby:gems:' -e "s:^${EPREFIX}::") [[ -z ${_gemsitedir} ]] && { eerror "Unable to find the gems dir" Please comment on these changes and/or accept. In that case, apply the changes or give us the OK to do so.
It should use the ruby_rbconfig_value function from ruby-ng.eclass instead of the manual rbconfig query. Maybe this is a good time to change that.
ok, how about this? --- ruby-fakegem.eclass 2010-09-08 10:31:13.943292000 +0200 +++ ruby-fakegem.eclass 2010-09-13 18:46:19.098321000 +0200 @@ -92,7 +92,11 @@ # 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"
Is this change ok? I'll assume so this friday and commit the change if you don't object. Thanks.
(In reply to comment #3) > Is this change ok? I'll assume so this friday and commit the change if you > don't object. Thanks. > ugh, forgot about this bug. Please go ahead.
thanks, committed