diff options
author | Hans de Graaff <graaff@gentoo.org> | 2008-11-14 14:00:23 +0000 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2008-11-14 14:00:23 +0000 |
commit | ee73e404646886871f99e4aa5b1b156c8187401b (patch) | |
tree | 31b037659f492e18122f7a35af326eaea5e743b8 /dev-ruby/rubygems | |
parent | Multiple ruby versions are currently only supported in the ruby overlay, use ... (diff) | |
download | gentoo-2-ee73e404646886871f99e4aa5b1b156c8187401b.tar.gz gentoo-2-ee73e404646886871f99e4aa5b1b156c8187401b.tar.bz2 gentoo-2-ee73e404646886871f99e4aa5b1b156c8187401b.zip |
Version bump.
(Portage version: 2.1.4.5)
Diffstat (limited to 'dev-ruby/rubygems')
-rw-r--r-- | dev-ruby/rubygems/ChangeLog | 9 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/rubygems-1.3.1-gentoo.patch | 44 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/rubygems-1.3.1-proxy.patch | 13 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/rubygems-1.3.1-setup.patch | 53 | ||||
-rw-r--r-- | dev-ruby/rubygems/rubygems-1.3.1.ebuild | 90 |
5 files changed, 208 insertions, 1 deletions
diff --git a/dev-ruby/rubygems/ChangeLog b/dev-ruby/rubygems/ChangeLog index 6362a86dd645..de480c9fb141 100644 --- a/dev-ruby/rubygems/ChangeLog +++ b/dev-ruby/rubygems/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-ruby/rubygems # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.109 2008/11/03 11:22:59 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.110 2008/11/14 14:00:23 graaff Exp $ + +*rubygems-1.3.1 (14 Nov 2008) + + 14 Nov 2008; Hans de Graaff <graaff@gentoo.org> + +files/rubygems-1.3.1-gentoo.patch, +files/rubygems-1.3.1-proxy.patch, + +files/rubygems-1.3.1-setup.patch, +rubygems-1.3.1.ebuild: + Version bump. Also fixed bug 238061 (http_proxy settings without a scheme). 03 Nov 2008; Raúl Porcel <armin76@gentoo.org> rubygems-1.2.0.ebuild: alpha/ia64 stable wrt #244952 diff --git a/dev-ruby/rubygems/files/rubygems-1.3.1-gentoo.patch b/dev-ruby/rubygems/files/rubygems-1.3.1-gentoo.patch new file mode 100644 index 000000000000..03f8680eb92f --- /dev/null +++ b/dev-ruby/rubygems/files/rubygems-1.3.1-gentoo.patch @@ -0,0 +1,44 @@ +Fix a mismatch between our use of a sandbox while installing and +rubygems' assumptions on where to find already installed gems. + +diff -ru a/lib/rubygems/commands/install_command.rb b/lib/rubygems/commands/install_command.rb +--- a/lib/rubygems/commands/install_command.rb 2008-09-11 01:54:41.000000000 +0200 ++++ b/lib/rubygems/commands/install_command.rb 2008-09-28 10:24:27.000000000 +0200 +@@ -76,6 +76,7 @@ + :wrappers => options[:wrappers], + :bin_dir => options[:bin_dir], + :development => options[:development], ++ :sandbox_fix => options[:sandbox_fix], + } + + exit_code = 0 +diff -ru a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb +--- a/lib/rubygems/dependency_installer.rb 2008-08-12 23:50:22.000000000 +0200 ++++ b/lib/rubygems/dependency_installer.rb 2008-09-28 10:22:21.000000000 +0200 +@@ -40,9 +40,10 @@ + # :security_policy:: See Gem::Installer::new and Gem::Security. + # :user_install:: See Gem::Installer.new + # :wrappers:: See Gem::Installer::new ++ # :sandbox_fix:: Gentoo patch to repair compatibility + + def initialize(options = {}) +- if options[:install_dir] then ++ if options[:install_dir] and not options[:sandbox_fix] then + spec_dir = options[:install_dir], 'specifications' + @source_index = Gem::SourceIndex.from_gems_in spec_dir + else +diff -ru a/lib/rubygems/install_update_options.rb b/lib/rubygems/install_update_options.rb +--- a/lib/rubygems/install_update_options.rb 2008-06-24 20:56:30.000000000 +0200 ++++ b/lib/rubygems/install_update_options.rb 2008-09-28 10:24:09.000000000 +0200 +@@ -83,6 +83,11 @@ + options[:include_dependencies] = value + end + ++ add_option(:"Install/Update", '--sandbox-fix', ++ 'Fix specifications lookup path [Gentoo patch]') do |value, options| ++ options[:sandbox_fix] = true ++ end ++ + add_option(:"Install/Update", '--[no-]format-executable', + 'Make installed executable names match ruby.', + 'If ruby is ruby18, foo_exec will be', diff --git a/dev-ruby/rubygems/files/rubygems-1.3.1-proxy.patch b/dev-ruby/rubygems/files/rubygems-1.3.1-proxy.patch new file mode 100644 index 000000000000..f28c1eb07d5a --- /dev/null +++ b/dev-ruby/rubygems/files/rubygems-1.3.1-proxy.patch @@ -0,0 +1,13 @@ +Fix use of http_proxy URLs without an explicit scheme. Fixes #238061. + +--- lib/rubygems/remote_fetcher.rb.1 2008-06-21 23:21:17.000000000 +0200 ++++ lib/rubygems/remote_fetcher.rb 2008-09-23 20:37:24.000000000 +0200 +@@ -195,7 +195,7 @@ + + return nil if env_proxy.nil? or env_proxy.empty? + +- uri = URI.parse env_proxy ++ uri = URI.parse(normalize_uri(env_proxy)) + + if uri and uri.user.nil? and uri.password.nil? then + # Probably we have http_proxy_* variables? diff --git a/dev-ruby/rubygems/files/rubygems-1.3.1-setup.patch b/dev-ruby/rubygems/files/rubygems-1.3.1-setup.patch new file mode 100644 index 000000000000..3b76ad3f9990 --- /dev/null +++ b/dev-ruby/rubygems/files/rubygems-1.3.1-setup.patch @@ -0,0 +1,53 @@ +--- setup.rb.~1~ 2008-06-22 01:51:11.000000000 +0200 ++++ setup.rb 2008-06-28 09:05:54.923666929 +0200 +@@ -128,8 +128,8 @@ + lib_dir = Gem::ConfigMap[site_or_vendor] + bin_dir = Gem::ConfigMap[:bindir] + else +- lib_dir = File.join prefix, 'lib' +- bin_dir = File.join prefix, 'bin' ++ lib_dir = File.join prefix, Gem::ConfigMap[site_or_vendor] ++ bin_dir = File.join prefix, Gem::ConfigMap[:bindir] + end + end + +@@ -240,19 +240,6 @@ + end + end + +-# Remove source caches +-if install_destdir.empty? +- require 'rubygems/source_info_cache' +- +- user_cache_file = File.join(install_destdir, +- Gem::SourceInfoCache.user_cache_file) +- system_cache_file = File.join(install_destdir, +- Gem::SourceInfoCache.system_cache_file) +- +- rm_f user_cache_file if File.writable? File.dirname(user_cache_file) +- rm_f system_cache_file if File.writable? File.dirname(system_cache_file) +-end +- + # install RDoc + + gem_doc_dir = File.join Gem.dir, 'doc' +@@ -262,10 +249,6 @@ + if File.writable? gem_doc_dir and + (not File.exist? rubygems_doc_dir or + File.writable? rubygems_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) + begin +@@ -277,7 +260,7 @@ + + args << '--quiet' + args << '--main' << 'README' +- args << '.' << 'README' << 'LICENSE.txt' << 'GPL.txt' ++ args << '.' << 'README' + + r = RDoc::RDoc.new + r.document args diff --git a/dev-ruby/rubygems/rubygems-1.3.1.ebuild b/dev-ruby/rubygems/rubygems-1.3.1.ebuild new file mode 100644 index 000000000000..045fa01f1ec4 --- /dev/null +++ b/dev-ruby/rubygems/rubygems-1.3.1.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-1.3.1.ebuild,v 1.1 2008/11/14 14:00:23 graaff Exp $ + +inherit ruby + +DESCRIPTION="Centralized Ruby extension management system" +HOMEPAGE="http://rubyforge.org/projects/rubygems/" +LICENSE="|| ( Ruby GPL-2 )" + +# Needs to be installed first +RESTRICT="test" + +SRC_URI="mirror://rubyforge/${PN}/${P}.tgz" + +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +SLOT="0" +IUSE="doc server" +DEPEND=">=dev-lang/ruby-1.8" +PDEPEND="server? ( dev-ruby/builder )" # index_gem_repository.rb + +USE_RUBY="ruby18" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-setup.patch" + epatch "${FILESDIR}/${P}-proxy.patch" + epatch "${FILESDIR}/${P}-gentoo.patch" +} + +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}" + ewarn "RUBYOPT=${RUBYOPT}" + + ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]') + + # rubygems tries to create GEM_HOME if it doesn't exist, upsetting + # sandbox, bug #202109. Since 1.2.0 we also need to set GEM_PATH + # for this reason, bug #230163. + export GEM_HOME="${D}/usr/$(get_libdir)/ruby/gems/${ver}" + export GEM_PATH="${GEM_HOME}/" + keepdir /usr/$(get_libdir)/ruby/gems/$ver/{doc,gems,cache,specifications} + + myconf="" + if ! use doc; then + myconf="${myconf} --no-ri" + myconf="${myconf} --no-rdoc" + fi + + ${RUBY} setup.rb $myconf --prefix="${D}" || die "setup.rb install failed" + + dosym gem18 /usr/bin/gem || die "dosym gem failed" + + dodoc README ChangeLog TODO || die "dodoc README failed" + + cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]') || die "cp auto_gem.rb failed" + doenvd "${FILESDIR}/10rubygems" || die "doenvd 10rubygems failed" + + if use server; then + newinitd "${FILESDIR}/init.d-gem_server2" gem_server || die "newinitd failed" + newconfd "${FILESDIR}/conf.d-gem_server" gem_server || die "newconfd failed" + fi +} + +pkg_postinst() +{ + SOURCE_CACHE="/usr/$(get_libdir)/ruby/gems/$ver/source_cache" + if [[ -e "${SOURCE_CACHE}" ]]; then + rm "${SOURCE_CACHE}" + fi +} + +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" +} |