summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Brown <rbrown@gentoo.org>2007-12-15 17:34:27 +0000
committerRichard Brown <rbrown@gentoo.org>2007-12-15 17:34:27 +0000
commitaf8d74a94537d299ecd5675c18bbbd992bc7f4c6 (patch)
treeba581e6576690d9772d88758a3b331c4178fe1a5 /dev-ruby
parentUnmask USE gsm for net-voip/yate since we have shared library to link at now. (diff)
downloadgentoo-2-af8d74a94537d299ecd5675c18bbbd992bc7f4c6.tar.gz
gentoo-2-af8d74a94537d299ecd5675c18bbbd992bc7f4c6.tar.bz2
gentoo-2-af8d74a94537d299ecd5675c18bbbd992bc7f4c6.zip
Version Bump
(Portage version: 2.1.3.19)
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/rubygems/files/digest-rubygems-0.9.53
-rw-r--r--dev-ruby/rubygems/files/rubygems-0.9.5-setup.patch70
-rw-r--r--dev-ruby/rubygems/rubygems-0.9.5.ebuild93
3 files changed, 166 insertions, 0 deletions
diff --git a/dev-ruby/rubygems/files/digest-rubygems-0.9.5 b/dev-ruby/rubygems/files/digest-rubygems-0.9.5
new file mode 100644
index 000000000000..d68ffb9b6e65
--- /dev/null
+++ b/dev-ruby/rubygems/files/digest-rubygems-0.9.5
@@ -0,0 +1,3 @@
+MD5 91f7036a724e34cc66dd8d09348733d9 rubygems-0.9.5.tgz 226070
+RMD160 c22d5092c62f36c6025658962052b582609e4fb7 rubygems-0.9.5.tgz 226070
+SHA256 a2da0229a6d834695ed1530895cc3d9653f7f8b333aa4122fe1f7c41b92fb9ce rubygems-0.9.5.tgz 226070
diff --git a/dev-ruby/rubygems/files/rubygems-0.9.5-setup.patch b/dev-ruby/rubygems/files/rubygems-0.9.5-setup.patch
new file mode 100644
index 000000000000..789c68018fca
--- /dev/null
+++ b/dev-ruby/rubygems/files/rubygems-0.9.5-setup.patch
@@ -0,0 +1,70 @@
+Index: setup.rb
+===================================================================
+--- setup.rb (revision 1542)
++++ setup.rb (working copy)
+@@ -72,8 +72,8 @@
+
+ raise "invalid --prefix #{prefix.inspect}" if prefix.nil?
+
+- lib_dir = File.join prefix, 'lib'
+- bin_dir = File.join prefix, 'bin'
++ lib_dir = File.join prefix, Config::CONFIG['sitelibdir']
++ bin_dir = File.join prefix, Config::CONFIG['bindir']
+
+ mkdir_p lib_dir
+ mkdir_p bin_dir
+@@ -173,26 +173,12 @@
+ end
+ end
+
+-# Remove source caches
+-
+-require 'rubygems/source_info_cache'
+-
+-user_cache_file = Gem::SourceInfoCache.user_cache_file
+-system_cache_file = Gem::SourceInfoCache.system_cache_file
+-
+-rm user_cache_file if File.writable? user_cache_file
+-rm system_cache_file if File.writable? system_cache_file
+-
+ # install RDoc
+
+-gem_doc_dir = File.join Gem.dir, 'doc'
++gem_doc_dir = File.join prefix, Gem.dir, 'doc'
+
++unless ARGV.include? '--no-rdoc'
+ if File.writable? gem_doc_dir then
+- puts "Removing old RubyGems RDoc and ri..."
+- Dir[File.join(Gem.dir, 'doc', 'rubygems-[0-9]*')].each do |dir|
+- rm_rf dir
+- end
+-
+ def run_rdoc(*args)
+ args << '--quiet'
+ args << '--main' << 'README'
+@@ -204,7 +190,7 @@
+
+ rubygems_name = "rubygems-#{Gem::RubyGemsVersion}"
+
+- doc_dir = File.join Gem.dir, 'doc', rubygems_name
++ doc_dir = File.join prefix, Gem.dir, 'doc', rubygems_name
+
+ unless ARGV.include? '--no-ri' then
+ ri_dir = File.join doc_dir, 'ri'
+@@ -221,8 +207,10 @@
+ puts "Skipping RDoc generation, #{gem_doc_dir} not writable"
+ puts "Set the GEM_HOME environment variable if you want RDoc generated"
+ end
++end
+
+ # Remove stubs
++if false # Don't want this
+
+ def stub?(path)
+ return unless File.readable? path
+@@ -268,3 +256,4 @@
+ puts "No library stubs found."
+ end
+
++end
+
diff --git a/dev-ruby/rubygems/rubygems-0.9.5.ebuild b/dev-ruby/rubygems/rubygems-0.9.5.ebuild
new file mode 100644
index 000000000000..1a5748f18d4c
--- /dev/null
+++ b/dev-ruby/rubygems/rubygems-0.9.5.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-0.9.5.ebuild,v 1.1 2007/12/15 17:34:26 rbrown Exp $
+
+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
+# change the filename on the end, it still downloads the same file.
+SRC_URI="http://rubyforge.org/frs/download.php/28174/${P}.tgz"
+
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+SLOT="0"
+IUSE="doc server examples"
+DEPEND=">=dev-lang/ruby-1.8"
+PDEPEND="server? ( dev-ruby/builder )" # index_gem_repository.rb
+
+USE_RUBY="ruby18"
+
+PATCHES="${FILESDIR}/${P}-setup.patch"
+
+src_unpack() {
+ ruby_src_unpack
+
+ # Delete mis-packaged . files
+ cd "${S}"
+ find -name '.*' -type f -print0|xargs -0 rm
+
+}
+
+src_compile() {
+ # Allowing ruby_src_compile would be bad with the new setup.rb
+ :
+}
+
+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["ruby_version"]')
+ export GEM_HOME="/usr/$(get_libdir)/ruby/gems/${ver}"
+ keepdir /usr/$(get_libdir)/ruby/gems/$ver/{doc,gems,cache,specifications}
+
+ myconf="--no-ri"
+ if ! use doc; then
+ myconf="${myconf} --no-rdoc"
+ fi
+
+ ${RUBY} setup.rb $myconf --prefix="${D}" || die "setup.rb install failed"
+
+ dodoc README
+ if use examples; then
+ cp -pPR examples "${D}/usr/share/doc/${PF}"
+ fi
+
+ cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
+ doenvd "${FILESDIR}/10rubygems"
+
+ if use server; then
+ newinitd "${FILESDIR}/init.d-gem_server" gem_server
+ newconfd "${FILESDIR}/conf.d-gem_server" gem_server
+ fi
+}
+
+pkg_postinst()
+{
+ ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
+ SOURCE_CACHE="/usr/$(get_libdir)/ruby/gems/$ver/source_cache"
+ if [[ -e "${SOURCE_CACHE}" ]]; then
+ rm "${SOURCE_CACHE}"
+ fi
+
+ ewarn "If you have previously switched to using ruby18_with_gems using ruby-config, this"
+ ewarn "package has removed that file and makes it unnecessary anymore."
+ ewarn "Please use ruby-config to revert back to ruby18."
+}
+
+pkg_postrm()
+{
+ ewarn "If you have uninstalled dev-ruby/rubygems. Ruby applications are unlikely"
+ ewarn "to run in current shells because of missing auto_gem."
+ ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
+ ewarn "or start new shells"
+ ewarn
+ ewarn "If you have not uninstalled dev-ruby/rubygems, please do not unset "
+ ewarn "RUBYOPT"
+}