summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2007-11-18 13:40:21 +0000
committerHans de Graaff <graaff@gentoo.org>2007-11-18 13:40:21 +0000
commit1ac5b361e4c66b27b76adfadb4f04a1c98ac123b (patch)
tree5239b678758c4f8b34fe89d86fcf96246dbdb9fc /dev-ruby
parentVersion bump (diff)
downloadgentoo-2-1ac5b361e4c66b27b76adfadb4f04a1c98ac123b.tar.gz
gentoo-2-1ac5b361e4c66b27b76adfadb4f04a1c98ac123b.tar.bz2
gentoo-2-1ac5b361e4c66b27b76adfadb4f04a1c98ac123b.zip
Backport fix for bug 199378
(Portage version: 2.1.3.19)
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/rubygems/ChangeLog8
-rw-r--r--dev-ruby/rubygems/files/digest-rubygems-0.9.4-r23
-rw-r--r--dev-ruby/rubygems/files/rubygems-0.9.4-shebang-env-fix.patch20
-rw-r--r--dev-ruby/rubygems/rubygems-0.9.4-r2.ebuild89
4 files changed, 119 insertions, 1 deletions
diff --git a/dev-ruby/rubygems/ChangeLog b/dev-ruby/rubygems/ChangeLog
index bf37c8ade31a..47e07fbf7878 100644
--- a/dev-ruby/rubygems/ChangeLog
+++ b/dev-ruby/rubygems/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-ruby/rubygems
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.71 2007/11/04 07:48:01 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.72 2007/11/18 13:40:21 graaff Exp $
+
+*rubygems-0.9.4-r2 (18 Nov 2007)
+
+ 18 Nov 2007; Hans de Graaff <graaff@gentoo.org>
+ +files/rubygems-0.9.4-shebang-env-fix.patch, +rubygems-0.9.4-r2.ebuild:
+ Backport a patch from rubygems SVN to fix #199378.
04 Nov 2007; Hans de Graaff <graaff@gentoo.org>
-files/rubygems-0.9.0-build-c-extensions.patch,
diff --git a/dev-ruby/rubygems/files/digest-rubygems-0.9.4-r2 b/dev-ruby/rubygems/files/digest-rubygems-0.9.4-r2
new file mode 100644
index 000000000000..29a12d32c242
--- /dev/null
+++ b/dev-ruby/rubygems/files/digest-rubygems-0.9.4-r2
@@ -0,0 +1,3 @@
+MD5 b5680acaa019c80ea44fe87cc2e227da rubygems-0.9.4.tgz 204841
+RMD160 6ee02db45173f05e6f8c5b1ecd5af832fb8601f8 rubygems-0.9.4.tgz 204841
+SHA256 b4d47bcfe2f3b08f7c3bb659a2f4e34a3fa9c1135ba98ad3272753753c354e5c rubygems-0.9.4.tgz 204841
diff --git a/dev-ruby/rubygems/files/rubygems-0.9.4-shebang-env-fix.patch b/dev-ruby/rubygems/files/rubygems-0.9.4-shebang-env-fix.patch
new file mode 100644
index 000000000000..944d542e5196
--- /dev/null
+++ b/dev-ruby/rubygems/files/rubygems-0.9.4-shebang-env-fix.patch
@@ -0,0 +1,20 @@
+This patch is taken from r1441 of rubygems's SVN repository to fix
+rewriting of /usr/bin/env shebang patch with additional arguments to
+the ruby interpreter. Without the patch the regexp would not match,
+leaving the /usr/bin/env in place. This causes problems on platforms
+that pass the remainder of the shebang line as a single argument, such
+as Linux. See bug #199378 for all the details.
+
+This patch should no longer be needed with rubygems 0.9.5.
+
+--- lib/rubygems/installer.rb.~1~ 2007-05-10 21:01:45.000000000 +0200
++++ lib/rubygems/installer.rb 2007-11-18 14:18:31.000000000 +0100
+@@ -254,7 +254,7 @@
+ path_to_ruby = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name'])
+ if first_line =~ /^#!/
+ # Preserve extra words on shebang line, like "-w". Thanks RPA.
+- shebang = first_line.sub(/\A\#!\s*\S*ruby\S*/, "#!" + path_to_ruby)
++ shebang = first_line.sub(/\A\#!.*?ruby\S*/, "#!" + path_to_ruby)
+ else
+ # Create a plain shebang line.
+ shebang = "#!" + path_to_ruby
diff --git a/dev-ruby/rubygems/rubygems-0.9.4-r2.ebuild b/dev-ruby/rubygems/rubygems-0.9.4-r2.ebuild
new file mode 100644
index 000000000000..af1b1ff49bb5
--- /dev/null
+++ b/dev-ruby/rubygems/rubygems-0.9.4-r2.ebuild
@@ -0,0 +1,89 @@
+# 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.4-r2.ebuild,v 1.1 2007/11/18 13:40:21 graaff 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/20989/${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
+
+PATCHES="${FILESDIR}/${PN}-0.9.1-no_post_install.patch
+ ${FILESDIR}/${P}-shebang-env-fix.patch
+ ${FILESDIR}/no-system-rubygems.patch"
+USE_RUBY="ruby18"
+
+src_unpack() {
+ ruby_src_unpack
+ use doc || epatch "${FILESDIR}/${PN}-0.9.1-no_rdoc_install.patch"
+
+ # Delete mis-packaged . files
+ cd "${S}"
+ find -name '.*' -type f -print0|xargs -0 rm
+}
+
+src_compile() {
+ ${RUBY} setup.rb config --libruby="/usr/$(get_libdir)/ruby" || die "setup.rb config failed"
+ ${RUBY} setup.rb setup || die "setup.rb setup failed"
+}
+
+src_test() {
+ # Currently RESTRICTed because rubygems needs to be installed
+ # When I work out how to get around that I'll remove the RETRICT
+
+ #for i in test/{test,functional}*.rb; do
+ # ruby -I pkgs/sources/lib/ -I lib ${i} # || die "$i failed"
+ #done
+ ruby setup.rb test || die "test failed"
+}
+
+src_install() {
+ # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
+ export RUBYOPT="${GENTOO_RUBYOPT}"
+
+ # 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"
+
+ if use server; then
+ newinitd "${FILESDIR}/init.d-gem_server" gem_server
+ newconfd "${FILESDIR}/conf.d-gem_server" gem_server
+ fi
+}
+
+pkg_postinst()
+{
+ 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"
+}