diff options
Diffstat (limited to 'dev-ruby')
-rw-r--r-- | dev-ruby/rubygems/ChangeLog | 9 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/rubygems-1.1.0-dependency-installer-install-dir-fix.patch | 13 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/rubygems-1.1.0-setup.patch | 61 | ||||
-rw-r--r-- | dev-ruby/rubygems/rubygems-1.1.0-r0.ebuild | 104 |
4 files changed, 186 insertions, 1 deletions
diff --git a/dev-ruby/rubygems/ChangeLog b/dev-ruby/rubygems/ChangeLog index bd335fae5a8a..821dc81be0de 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.85 2008/03/26 03:29:59 ricmm Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.86 2008/03/29 15:16:20 rbrown Exp $ + +*rubygems-1.1.0-r0 (29 Mar 2008) + + 29 Mar 2008; Richard Brown <rbrown@gentoo.org> + +files/rubygems-1.1.0-dependency-installer-install-dir-fix.patch, + +files/rubygems-1.1.0-setup.patch, +rubygems-1.1.0-r0.ebuild: + Version bump. Fixes bug #215293 25 Mar 2008; <ricmm@gentoo.org> rubygems-0.8.11-r6.ebuild: Drop to ~mips due to unstable deps diff --git a/dev-ruby/rubygems/files/rubygems-1.1.0-dependency-installer-install-dir-fix.patch b/dev-ruby/rubygems/files/rubygems-1.1.0-dependency-installer-install-dir-fix.patch new file mode 100644 index 000000000000..145882cda178 --- /dev/null +++ b/dev-ruby/rubygems/files/rubygems-1.1.0-dependency-installer-install-dir-fix.patch @@ -0,0 +1,13 @@ +Index: lib/rubygems/dependency_installer.rb +=================================================================== +--- lib/rubygems/dependency_installer.rb (revision 1678) ++++ lib/rubygems/dependency_installer.rb (working copy) +@@ -189,7 +189,7 @@ + say "Installing gem #{spec.full_name}" if Gem.configuration.really_verbose + + _, source_uri = @specs_and_sources.assoc spec +- local_gem_path = Gem::RemoteFetcher.fetcher.download spec, source_uri ++ local_gem_path = Gem::RemoteFetcher.fetcher.download spec, source_uri, @install_dir + + inst = Gem::Installer.new local_gem_path, + :env_shebang => @env_shebang, diff --git a/dev-ruby/rubygems/files/rubygems-1.1.0-setup.patch b/dev-ruby/rubygems/files/rubygems-1.1.0-setup.patch new file mode 100644 index 000000000000..08fc331bfcc8 --- /dev/null +++ b/dev-ruby/rubygems/files/rubygems-1.1.0-setup.patch @@ -0,0 +1,61 @@ +Source: Richard Brown +Upstream: no +Reason: respect --prefix properly, stop stamping on live filesystem. +--- setup.rb.orig 2008-03-27 23:09:24.000000000 +0000 ++++ setup.rb 2008-03-29 09:12:32.000000000 +0000 +@@ -81,8 +81,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 +@@ -187,30 +187,15 @@ + 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_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) +- + # install RDoc + + gem_doc_dir = File.join Gem.dir, 'doc' + + 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' +- args << '.' << 'README' << 'LICENSE.txt' << 'GPL.txt' ++ args << '.' << 'README' + + r = RDoc::RDoc.new + r.document args +@@ -237,6 +222,7 @@ + end + + # Remove stubs ++if false # Don't want this + + def stub?(path) + return unless File.readable? path +@@ -305,3 +291,4 @@ + puts "to remove it by hand." + puts + ++end diff --git a/dev-ruby/rubygems/rubygems-1.1.0-r0.ebuild b/dev-ruby/rubygems/rubygems-1.1.0-r0.ebuild new file mode 100644 index 000000000000..6ba7a39e07a4 --- /dev/null +++ b/dev-ruby/rubygems/rubygems-1.1.0-r0.ebuild @@ -0,0 +1,104 @@ +# 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.1.0-r0.ebuild,v 1.1 2008/03/29 15:16:20 rbrown 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" + +# 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/34638/${P}.tgz" + +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~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 + ${FILESDIR}/${P}-dependency-installer-install-dir-fix.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"]') + + # rubygems tries to create GEM_HOME if it doesn't exist, upsetting sandbox, + # bug #202109 + export GEM_HOME="${D}/usr/$(get_libdir)/ruby/gems/${ver}" + 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 /usr/bin/gem18 /usr/bin/gem || die "dosym gem failed" + + #This is used to update rubygems, do not want. + rm "${D}/usr/bin/update_rubygems18" + + 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" +} |