summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <a3li@gentoo.org>2010-05-16 13:30:02 +0000
committerAlex Legler <a3li@gentoo.org>2010-05-16 13:30:02 +0000
commit9f0975bd9a420de20c5114d995af28227b9a2fad (patch)
tree0630c7a61821c8ff952200cb87d1e639b32481a1 /dev-ruby
parentx86 stable wrt bug #317143 (diff)
downloadhistorical-9f0975bd9a420de20c5114d995af28227b9a2fad.tar.gz
historical-9f0975bd9a420de20c5114d995af28227b9a2fad.tar.bz2
historical-9f0975bd9a420de20c5114d995af28227b9a2fad.zip
Fix 1.9 gem installation path. Homedir-installed gems are now in ~/.gem/ruby/1.9.1 instead of ~/.gem/ruby19/1.9.1. The systemwide installation directory will follow that change eventually. Closes bug 319977.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/rubygems/ChangeLog11
-rw-r--r--dev-ruby/rubygems/Manifest10
-rw-r--r--dev-ruby/rubygems/files/rubygems-1.3.7-ruby19.patch14
-rw-r--r--dev-ruby/rubygems/rubygems-1.3.7-r1.ebuild119
4 files changed, 149 insertions, 5 deletions
diff --git a/dev-ruby/rubygems/ChangeLog b/dev-ruby/rubygems/ChangeLog
index d031036797c9..5d09fa8b5e10 100644
--- a/dev-ruby/rubygems/ChangeLog
+++ b/dev-ruby/rubygems/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-ruby/rubygems
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.141 2010/05/14 19:04:17 a3li Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.142 2010/05/16 13:30:02 a3li Exp $
+
+*rubygems-1.3.7-r1 (16 May 2010)
+
+ 16 May 2010; Alex Legler <a3li@gentoo.org> +rubygems-1.3.7-r1.ebuild,
+ +files/rubygems-1.3.7-ruby19.patch:
+ Fix 1.9 gem installation path. Homedir-installed gems are now in
+ ~/.gem/ruby/1.9.1 instead of ~/.gem/ruby19/1.9.1. The systemwide
+ installation directory will follow that change eventually. Closes bug
+ 319977.
*rubygems-1.3.7 (14 May 2010)
diff --git a/dev-ruby/rubygems/Manifest b/dev-ruby/rubygems/Manifest
index 919126b8e41d..8010a3dc42b8 100644
--- a/dev-ruby/rubygems/Manifest
+++ b/dev-ruby/rubygems/Manifest
@@ -12,6 +12,7 @@ AUX init.d-gem_server 502 RMD160 9fe089f462edff052e6b7fa6ea3803e0178f41ef SHA1 e
AUX init.d-gem_server2 502 RMD160 baf764bc5ad41adce73576b2376093744ddd3917 SHA1 ad332343eab53b4be8d796999063ec2018245a4b SHA256 b7f7d215bb3dba02150dbdc431a84308010515ad4c5d9776d0dd5b99bf9a2cee
AUX rubygems-1.3.3-gentoo.patch 1422 RMD160 e39a2042170399d0e98c772b0572026d6057353d SHA1 11cb4656b77185c78df809d3180061e5fe41139b SHA256 95e6c7ea38177b0798562be5abaf040e72db4a27f851502d91c4453890e630b0
AUX rubygems-1.3.5-setup.patch 942 RMD160 69e8714f72482387019bad7b9254110c6bb8b957 SHA1 ba58de08e29731de4ce820f7d8e4c60de2fcee6e SHA256 d3e7c43ff20a649d1c731e27b0791f110b920201a28607091da0166495709b97
+AUX rubygems-1.3.7-ruby19.patch 584 RMD160 7f0587930ca8a2a9e1f489169338108020173c01 SHA1 d921a4d2bc794b7e6f8b1472a50b7252eebca609 SHA256 8f0543a261b14e1531047fe6a147402e8db02886b5c566ee3222d9606e8a1eb1
AUX rubygems-1.3.7-rubyee.patch 825 RMD160 d406da8f27ab69de6cea2aec04b954581e271456 SHA1 23a244497f2e495047c65ea9ad030a81c186e3d4 SHA256 4f272cdfe2383546edcefa11a816b4b4c8ab9bd78e5f23f4f737b6fce2f705c0
AUX rubygems-rubyee.patch 949 RMD160 7a819de691d457fdef426176534be97444b9a983 SHA1 deffcf777502399058b091b0f05feed8cdbc79ca SHA256 50af5257189b42c7795eaa33b83feed5b46949a1620a1b18ea289c1326dfd2a8
DIST rubygems-1.3.5.tgz 278469 RMD160 2d17f0de2d387bd2a034916cb79531110f3be196 SHA1 8545f25d00c757a310b879a2580e56d6012fc981 SHA256 c0928cc1ae54dedfb5f57ad3829882c1f90e42bc17bf50491aa6f93a937546ac
@@ -22,13 +23,14 @@ EBUILD rubygems-1.3.5-r3.ebuild 3028 RMD160 67e906d35784d62dd31203b582fadeb90489
EBUILD rubygems-1.3.5.ebuild 3166 RMD160 95a7edee644212eabf8a86f1dc42d06c14a3deed SHA1 8c1b5af2fd039e655628a1884697883824b0bafc SHA256 14822c8c0b156a93a8ab2215b5502f7cea55c2cbce8a57b5ddd7eec2753338b1
EBUILD rubygems-1.3.6-r2.ebuild 3318 RMD160 e48c7b04653de2319bbf74b1ca47bb175c11cdbc SHA1 5a54b2893fce0761f30f0646e8d6c8161e016f62 SHA256 8c0dc8e300a669eae57b3be4096c275988b5d641d4a49e3efbb4298f5a90b610
EBUILD rubygems-1.3.6.ebuild 3096 RMD160 3abcac49900105943cbf2bbde168c97d088b162d SHA1 f598b8ab87f175ead2cb73ed599c37bfe6094fe4 SHA256 492d0c250fb3a7c5d84d52301c7ca4e4eaa942d452cbcf096c5fefe69e4c8ea9
+EBUILD rubygems-1.3.7-r1.ebuild 3405 RMD160 b2876e032b5f9609ea863e25338ab491df407ba1 SHA1 78252070356461745b7c8ac4a4e5f635bb2c1963 SHA256 38b98cce5addf5b45a9ebc6b4d2c1dad56c2ee8de61cb0cef58bcc50d076d9fc
EBUILD rubygems-1.3.7.ebuild 3314 RMD160 e5905ad88c7f210df0978f0ba804c9e7aa533171 SHA1 3ea9c3519266f8ff546a6c6de6d028b67f38e83c SHA256 cbfab609137b0d8ebcd57165a7d2d15662bae18dd7dbc30d00c4eee20c06435d
-MISC ChangeLog 21574 RMD160 73ee061e56693f86fff20caceae44344bead3bab SHA1 adacbab0ab0e5c3dd366c198e486b8e0fa28a541 SHA256 addb4dcf904fe17c64e82aa79e1e8670ee940a6b30f977bad179d9e9ef49b174
+MISC ChangeLog 21935 RMD160 928058295fa5140928d0884a8c658750ad7c8e5a SHA1 ad050db4639ebc976ffa8328efc3291f5c3a4c58 SHA256 93f3b2e88d11960e92ec13a340fab8f1aa7b02d4f78eef92baf7b7154cd17c3f
MISC metadata.xml 247 RMD160 eb1d10b4366542ce2f232dcaf7317341b6b5608f SHA1 fcb6e2a1d6cda6d45640f9c5a5dfcc0fd4f3ab3b SHA256 633ae9912e8dd27f76b9cf53f5ad0d3222db85d9a19a76da7fd5e26f40b144e3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
-iEYEARECAAYFAkvtnsgACgkQ+tgfDpkAy6A4hQCgjAPMwZVY4o+y2Q2PBPfrY2Rm
-B4QAnj2NQscf8wmC/I6l7MBaY/JQYB6U
-=c3V/
+iEYEARECAAYFAkvv82cACgkQ+tgfDpkAy6CyUwCfZZubbhyKxoZNbEqd2S5oxv0/
+y4AAniZJ44wqxhxAcpSQagdZqzCq7ZNe
+=+/VK
-----END PGP SIGNATURE-----
diff --git a/dev-ruby/rubygems/files/rubygems-1.3.7-ruby19.patch b/dev-ruby/rubygems/files/rubygems-1.3.7-ruby19.patch
new file mode 100644
index 000000000000..6d71989f8c3d
--- /dev/null
+++ b/dev-ruby/rubygems/files/rubygems-1.3.7-ruby19.patch
@@ -0,0 +1,14 @@
+Smaller portion of the REE patch.
+We still need to bend the gem installation path until we install 1.9 in /usr/lib/ruby/ just like 1.8.
+
+--- lib/rubygems/defaults.rb.orig 2010-05-16 15:11:19.359858029 +0200
++++ lib/rubygems/defaults.rb 2010-05-16 15:11:43.855868924 +0200
+@@ -24,7 +24,7 @@
+ File.join(ConfigMap[:rubylibprefix], 'gems',
+ ConfigMap[:ruby_version])
+ else
+- File.join(ConfigMap[:libdir], ruby_engine, 'gems',
++ File.join(ConfigMap[:sitedir].gsub(/site_ruby\/?$/, ''), 'gems',
+ ConfigMap[:ruby_version])
+ end
+ end
diff --git a/dev-ruby/rubygems/rubygems-1.3.7-r1.ebuild b/dev-ruby/rubygems/rubygems-1.3.7-r1.ebuild
new file mode 100644
index 000000000000..3adf527a16bc
--- /dev/null
+++ b/dev-ruby/rubygems/rubygems-1.3.7-r1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-1.3.7-r1.ebuild,v 1.1 2010/05/16 13:30:02 a3li Exp $
+
+EAPI="2"
+
+USE_RUBY="ruby18 ruby19 ree18 jruby"
+
+inherit ruby-ng
+
+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 ~arm ~hppa ~ia64 ~mips ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd"
+SLOT="0"
+IUSE="doc server"
+
+# previous versions had rubygems bundled, so it would collide badly
+RDEPEND="
+ ruby_targets_jruby? ( >=dev-java/jruby-1.4.0-r5 )
+ ruby_targets_ruby19? ( >=dev-lang/ruby-1.9.1_p376 )
+"
+
+# index_gem_repository.rb
+PDEPEND="server? ( dev-ruby/builder[ruby_targets_ruby18] )"
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}/${PN}-1.3.5-setup.patch"
+ # Fixes a new "feature" that would prevent us from recognizing installed
+ # gems inside the sandbox
+ epatch "${FILESDIR}/${PN}-1.3.3-gentoo.patch"
+}
+
+each_ruby_prepare() {
+ case ${RUBY} in
+ *rubyee18)
+ epatch "${FILESDIR}/${P}-rubyee.patch" || die "ree patch failed"
+ ;;
+ *ruby19)
+ epatch "${FILESDIR}/${P}-ruby19.patch" || die "ruby19 patch failed"
+ ;;
+ *)
+ ;;
+ esac
+}
+
+each_ruby_install() {
+ # Unset RUBYOPT to avoid interferences, bug #158455 et. al.
+ unset RUBYOPT
+
+ local gemsitedir=$(ruby_rbconfig_value 'sitelibdir' | sed -e 's:site_ruby:gems:')
+
+ # 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}${gemsitedir}"
+ export GEM_PATH="${GEM_HOME}/"
+ keepdir ${gemsitedir}/{doc,gems,cache,specifications}
+
+ myconf=""
+ if ! use doc; then
+ myconf="${myconf} --no-ri"
+ myconf="${myconf} --no-rdoc"
+ fi
+
+ ${RUBY} setup.rb $myconf --destdir="${D}" || die "setup.rb install failed"
+
+ insinto $(ruby_rbconfig_value 'sitelibdir')
+ newins "${FILESDIR}/auto_gem.rb.$(basename ${RUBY})" auto_gem.rb || die "newins auto_gem failed"
+}
+
+all_ruby_install() {
+ dodoc README || die "dodoc README 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
+}
+
+clear_source_cache() {
+ local gemsitedir=$(ruby_rbconfig_value 'sitelibdir' | sed -e 's:site_ruby:gems:')
+ SOURCE_CACHE="${gemsitedir}/source_cache"
+
+ if [[ -e "${SOURCE_CACHE}" ]]; then
+ rm "${SOURCE_CACHE}"
+ einfo "Cleared gem source cache."
+ fi
+}
+
+pkg_postinst() {
+ _ruby_each_implementation clear_source_cache
+
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/gem) ]] ; then
+ eselect ruby set $(eselect --brief --no-color ruby show | head -n1)
+ fi
+
+ ewarn
+ ewarn "To switch between available Ruby profiles, execute as root:"
+ ewarn "\teselect ruby set ruby(18|19|...)"
+ ewarn
+}
+
+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"
+}