summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-ruby/rubygems/rubygems-0.9.3.ebuild15
1 files changed, 9 insertions, 6 deletions
diff --git a/dev-ruby/rubygems/rubygems-0.9.3.ebuild b/dev-ruby/rubygems/rubygems-0.9.3.ebuild
index b76ac12..20f6958 100644
--- a/dev-ruby/rubygems/rubygems-0.9.3.ebuild
+++ b/dev-ruby/rubygems/rubygems-0.9.3.ebuild
@@ -7,6 +7,8 @@ inherit ruby
DESCRIPTION="Centralized Ruby extension management system"
HOMEPAGE="http://rubyforge.org/projects/rubygems/"
LICENSE="Ruby"
+
+# Needs to be installed first
RESTRICT="test"
# The URL depends implicitly on the version, unfortunately. Even if you
@@ -26,13 +28,9 @@ USE_RUBY="ruby18"
src_unpack() {
ruby_src_unpack
use doc || epatch "${FILESDIR}/${PN}-0.9.1-no_rdoc_install.patch"
- cd ${S}
- find -name '.*' -type f -print0|xargs -0 rm
}
src_compile() {
- ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
- export GEM_HOME="${D}usr/$(get_libdir)/ruby/gems/${ver}"
${RUBY} setup.rb config --libruby="/usr/$(get_libdir)/ruby" || die "setup.rb config failed"
${RUBY} setup.rb setup || die "setup.rb setup failed"
}
@@ -47,8 +45,13 @@ src_test() {
src_install() {
# RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
export RUBYOPT="${GENTOO_RUBYOPT}"
- ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["MAJOR"] + "." + Config::CONFIG["MINOR"]')
- GEM_HOME="${D}usr/$(get_libdir)/ruby/gems/${ver}" ${RUBY} setup.rb install --prefix=${D} || die "setup.rb install failed"
+
+ # Fix GEM_HOME to install sources.gem
+ ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
+ export GEM_HOME="${D}usr/$(get_libdir)/ruby/gems/${ver}"
+
+ ${RUBY} setup.rb install --prefix=${D} || die "setup.rb install failed"
+ erubydoc
cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
keepdir /usr/$(get_libdir)/ruby/gems/$ver/doc
doenvd "${FILESDIR}/10rubygems"