Upgrade to Ruby 2.0.0 (r38184).
This commit is contained in:
parent
dcfbb7a72e
commit
3fa802844a
@ -29,7 +29,7 @@ diff --git a/configure.in b/configure.in
|
||||
index 8e4aaec..c65e0c7 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -3153,6 +3153,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do
|
||||
@@ -3170,6 +3170,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do
|
||||
dir="${SITE_DIR}"
|
||||
done
|
||||
|
||||
@ -45,7 +45,7 @@ index 8e4aaec..c65e0c7 100644
|
||||
AC_ARG_WITH(vendordir,
|
||||
AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]),
|
||||
[vendordir=$withval],
|
||||
@@ -3162,19 +3171,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do
|
||||
@@ -3179,19 +3188,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do
|
||||
dir="${VENDOR_DIR}"
|
||||
done
|
||||
|
||||
@ -78,7 +78,7 @@ index 8e4aaec..c65e0c7 100644
|
||||
fi
|
||||
|
||||
pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)'
|
||||
@@ -3192,6 +3214,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"],
|
||||
@@ -3209,6 +3231,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"],
|
||||
[
|
||||
RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\""
|
||||
])
|
||||
@ -92,7 +92,7 @@ index 8e4aaec..c65e0c7 100644
|
||||
AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
|
||||
["$RUBY_LIB_PREFIX/"*], [
|
||||
RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"'
|
||||
@@ -3199,6 +3228,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
|
||||
@@ -3216,6 +3245,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
|
||||
[
|
||||
RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\""
|
||||
])
|
||||
@ -106,7 +106,7 @@ index 8e4aaec..c65e0c7 100644
|
||||
pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)'
|
||||
AS_CASE(["$RUBY_LIB_PREFIX"],
|
||||
["$RUBY_EXEC_PREFIX/"*], [
|
||||
@@ -3220,11 +3256,13 @@ if test "x$SITE_DIR" = xno; then
|
||||
@@ -3237,11 +3273,13 @@ if test "x$SITE_DIR" = xno; then
|
||||
AC_DEFINE(NO_RUBY_SITE_LIB, [] !<verconf>!)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH} !<verconf>!)
|
||||
@ -120,7 +120,7 @@ index 8e4aaec..c65e0c7 100644
|
||||
fi
|
||||
|
||||
AC_SUBST(arch)dnl
|
||||
@@ -3232,7 +3270,9 @@ AC_SUBST(sitearch)dnl
|
||||
@@ -3249,7 +3287,9 @@ AC_SUBST(sitearch)dnl
|
||||
AC_SUBST(ruby_version)dnl
|
||||
AC_SUBST(archdir)dnl
|
||||
AC_SUBST(sitedir)dnl
|
||||
|
@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in
|
||||
index c65e0c7..748edc9 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -3277,6 +3277,8 @@ AC_SUBST(vendorarchdir)dnl
|
||||
@@ -3294,6 +3294,8 @@ AC_SUBST(vendorarchdir)dnl
|
||||
configure_args=$ac_configure_args
|
||||
AC_SUBST(configure_args)dnl
|
||||
|
||||
|
@ -26,7 +26,7 @@ diff --git a/configure.in b/configure.in
|
||||
index db3641b..8e4aaec 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -3135,6 +3135,15 @@ else
|
||||
@@ -3152,6 +3152,15 @@ else
|
||||
RUBY_LIB_VERSION="\"${ruby_version}\""
|
||||
fi
|
||||
|
||||
@ -42,7 +42,7 @@ index db3641b..8e4aaec 100644
|
||||
AC_ARG_WITH(sitedir,
|
||||
AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]),
|
||||
[sitedir=$withval],
|
||||
@@ -3157,16 +3166,25 @@ if test "${LOAD_RELATIVE+set}"; then
|
||||
@@ -3174,16 +3183,25 @@ if test "${LOAD_RELATIVE+set}"; then
|
||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||
RUBY_EXEC_PREFIX=""
|
||||
RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
|
||||
@ -68,7 +68,7 @@ index db3641b..8e4aaec 100644
|
||||
AS_CASE(["$RUBY_SITE_LIB_PATH"],
|
||||
["$RUBY_LIB_PREFIX/"*], [
|
||||
RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"'
|
||||
@@ -3197,6 +3215,7 @@ else
|
||||
@@ -3214,6 +3232,7 @@ else
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}")
|
||||
AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !<verconf>!)
|
||||
@ -76,7 +76,7 @@ index db3641b..8e4aaec 100644
|
||||
if test "x$SITE_DIR" = xno; then
|
||||
AC_DEFINE(NO_RUBY_SITE_LIB, [] !<verconf>!)
|
||||
else
|
||||
@@ -3211,6 +3230,7 @@ fi
|
||||
@@ -3228,6 +3247,7 @@ fi
|
||||
AC_SUBST(arch)dnl
|
||||
AC_SUBST(sitearch)dnl
|
||||
AC_SUBST(ruby_version)dnl
|
||||
|
@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in
|
||||
index 748edc9..6a16745 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -3180,6 +3180,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D
|
||||
@@ -3197,6 +3197,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D
|
||||
dir="${VENDORARCH_DIR}"
|
||||
done
|
||||
|
||||
@ -29,7 +29,7 @@ index 748edc9..6a16745 100644
|
||||
if test "${LOAD_RELATIVE+set}"; then
|
||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||
RUBY_EXEC_PREFIX=""
|
||||
@@ -3273,6 +3280,7 @@ AC_SUBST(sitedir)dnl
|
||||
@@ -3290,6 +3297,7 @@ AC_SUBST(sitedir)dnl
|
||||
AC_SUBST(sitearchdir)dnl
|
||||
AC_SUBST(vendordir)dnl
|
||||
AC_SUBST(vendorarchdir)dnl
|
||||
|
@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in
|
||||
index f2d22ef..db3641b 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -3302,6 +3302,17 @@ else
|
||||
@@ -3319,6 +3319,17 @@ else
|
||||
fi
|
||||
AC_SUBST(USE_RUBYGEMS)
|
||||
|
||||
@ -37,10 +37,10 @@ diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb
|
||||
index a3c65bf..a4e8559 100644
|
||||
--- a/lib/rdoc/ri/paths.rb
|
||||
+++ b/lib/rdoc/ri/paths.rb
|
||||
@@ -11,9 +11,9 @@ module RDoc::RI::Paths
|
||||
@@ -12,9 +12,9 @@ module RDoc::RI::Paths
|
||||
version = RbConfig::CONFIG['ruby_version']
|
||||
|
||||
base = if RbConfig::CONFIG.key? 'ridir' then
|
||||
BASE = if RbConfig::CONFIG.key? 'ridir' then
|
||||
- File.join RbConfig::CONFIG['ridir'], version
|
||||
+ File.join [RbConfig::CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact
|
||||
else
|
||||
@ -48,7 +48,7 @@ index a3c65bf..a4e8559 100644
|
||||
+ File.join [RbConfig::CONFIG['datadir'], 'ri', RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact
|
||||
end
|
||||
|
||||
SYSDIR = File.join base, "system"
|
||||
homedir = begin
|
||||
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
|
||||
index f9d97d3..d9e26c1 100755
|
||||
--- a/tool/mkconfig.rb
|
||||
|
@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb
|
||||
index ded4e89..0870f22 100644
|
||||
--- a/lib/mkmf.rb
|
||||
+++ b/lib/mkmf.rb
|
||||
@@ -1746,7 +1746,7 @@ SRC
|
||||
@@ -1747,7 +1747,7 @@ SRC
|
||||
SHELL = /bin/sh
|
||||
|
||||
# V=0 quiet, V=1 verbose. other values don't work.
|
||||
|
@ -1,93 +0,0 @@
|
||||
From 6a07398a3aac0793d1a62f6f4778d90baf86ab7e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Mon, 19 Nov 2012 14:41:06 +0100
|
||||
Subject: [PATCH] RubyGems uninstaller upstream fixes.
|
||||
|
||||
---
|
||||
lib/rubygems/uninstaller.rb | 35 +++++++++++++++++++++++------------
|
||||
test/rubygems/test_gem_uninstaller.rb | 2 +-
|
||||
2 files changed, 24 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb
|
||||
index cc32ea4..c0e8b4b 100644
|
||||
--- a/lib/rubygems/uninstaller.rb
|
||||
+++ b/lib/rubygems/uninstaller.rb
|
||||
@@ -51,15 +51,14 @@ class Gem::Uninstaller
|
||||
@bin_dir = options[:bin_dir]
|
||||
@format_executable = options[:format_executable]
|
||||
|
||||
+ if options[:force]
|
||||
+ @force_all = true
|
||||
+ @force_ignore = true
|
||||
+ end
|
||||
+
|
||||
# only add user directory if install_dir is not set
|
||||
@user_install = false
|
||||
@user_install = options[:user_install] unless options[:install_dir]
|
||||
-
|
||||
- if @user_install then
|
||||
- Gem.use_paths Gem.user_dir, @gem_home
|
||||
- else
|
||||
- Gem.use_paths @gem_home
|
||||
- end
|
||||
end
|
||||
|
||||
##
|
||||
@@ -69,10 +68,24 @@ class Gem::Uninstaller
|
||||
def uninstall
|
||||
list = Gem::Specification.find_all_by_name(@gem, @version)
|
||||
|
||||
+ list, other_repo_specs = list.partition do |spec|
|
||||
+ @gem_home == spec.base_dir or
|
||||
+ (@user_install and spec.base_dir == Gem.user_dir)
|
||||
+ end
|
||||
+
|
||||
if list.empty? then
|
||||
- raise Gem::InstallError, "gem #{@gem.inspect} is not installed"
|
||||
+ raise Gem::InstallError, "gem #{@gem.inspect} is not installed" if
|
||||
+ other_repo_specs.empty?
|
||||
+
|
||||
+ other_repos = other_repo_specs.map { |spec| spec.base_dir }.uniq
|
||||
+
|
||||
+ message = ["#{@gem} is not installed in GEM_HOME, try:"]
|
||||
+ message.concat other_repos.map { |repo|
|
||||
+ "\tgem uninstall -i #{repo} #{@gem}"
|
||||
+ }
|
||||
|
||||
- elsif list.size > 1 and @force_all then
|
||||
+ raise Gem::InstallError, message.join("\n")
|
||||
+ elsif @force_all then
|
||||
remove_all list
|
||||
|
||||
elsif list.size > 1 then
|
||||
@@ -250,12 +263,10 @@ class Gem::Uninstaller
|
||||
msg << "\t#{spec.full_name}"
|
||||
|
||||
spec.dependent_gems.each do |dep_spec, dep, satlist|
|
||||
- msg <<
|
||||
- ("#{dep_spec.name}-#{dep_spec.version} depends on " +
|
||||
- "[#{dep.name} (#{dep.requirement})]")
|
||||
+ msg << "#{dep_spec.name}-#{dep_spec.version} depends on #{dep}"
|
||||
end
|
||||
|
||||
- msg << 'If you remove this gems, one or more dependencies will not be met.'
|
||||
+ msg << 'If you remove this gem, one or more dependencies will not be met.'
|
||||
msg << 'Continue with Uninstall?'
|
||||
return ask_yes_no(msg.join("\n"), true)
|
||||
end
|
||||
diff --git a/test/rubygems/test_gem_uninstaller.rb b/test/rubygems/test_gem_uninstaller.rb
|
||||
index a65b992..1cd186f 100644
|
||||
--- a/test/rubygems/test_gem_uninstaller.rb
|
||||
+++ b/test/rubygems/test_gem_uninstaller.rb
|
||||
@@ -225,7 +225,7 @@ class TestGemUninstaller < Gem::InstallerTestCase
|
||||
|
||||
uninstaller = Gem::Uninstaller.new('a')
|
||||
|
||||
- use_ui Gem::MockGemUi.new("2\n") do
|
||||
+ use_ui Gem::MockGemUi.new("2\ny\n") do
|
||||
uninstaller.uninstall
|
||||
end
|
||||
|
||||
--
|
||||
1.8.0
|
||||
|
25
ruby.spec
25
ruby.spec
@ -15,7 +15,7 @@
|
||||
#%%global milestone preview1
|
||||
|
||||
# Keep the revision enabled for pre-releases from SVN.
|
||||
%global revision 37807
|
||||
%global revision 38184
|
||||
|
||||
%global ruby_archive %{name}-%{ruby_version}
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
%global ruby_vendorlibdir %{_datadir}/ruby/%{ruby_vendordir}
|
||||
%global ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir}
|
||||
|
||||
%global rubygems_version 1.8.23
|
||||
%global rubygems_version 2.0.0.preview2
|
||||
|
||||
# The RubyGems library has to stay out of Ruby directory three, since the
|
||||
# RubyGems should be share by all Ruby implementations.
|
||||
@ -57,16 +57,16 @@
|
||||
# http://rpm.org/ticket/78
|
||||
%global gem_extdir %{_exec_prefix}/lib{,64}/gems
|
||||
|
||||
%global rake_version 0.9.4
|
||||
%global rake_version 0.9.5
|
||||
# TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM.
|
||||
# http://redmine.ruby-lang.org/issues/5313
|
||||
%global irb_version %{ruby_version_patch_level}
|
||||
%global rdoc_version 3.9.5
|
||||
%global rdoc_version 4.0.0.preview2
|
||||
%global bigdecimal_version 1.1.0
|
||||
%global io_console_version 0.3
|
||||
%global json_version 1.7.1
|
||||
%global minitest_version 3.4.0
|
||||
%global psych_version 1.3.4
|
||||
%global minitest_version 4.3.2
|
||||
%global psych_version 2.0.0
|
||||
|
||||
%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/')
|
||||
|
||||
@ -92,11 +92,6 @@ Patch2: ruby-1.9.3-added-site-and-vendor-arch-flags.patch
|
||||
Patch3: ruby-1.9.3-always-use-i386.patch
|
||||
# http://redmine.ruby-lang.org/issues/5465
|
||||
Patch4: ruby-1.9.3-fix-s390x-build.patch
|
||||
# Fix the uninstaller, so that it doesn't say that gem doesn't exist
|
||||
# when it exists outside of the GEM_HOME (already fixed in the upstream)
|
||||
# This consist of several RubyGems upstream patches:
|
||||
# 2786a40b, 8e2a9889, 1755effe, 70963846, 21c78318, 88e1e1cc, 415c0ec4
|
||||
Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch
|
||||
# Allows to install RubyGems into custom directory, outside of Ruby's tree.
|
||||
# http://redmine.ruby-lang.org/issues/5617
|
||||
Patch8: ruby-1.9.3-custom-rubygems-location.patch
|
||||
@ -383,7 +378,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby.
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
@ -468,14 +462,17 @@ mkdir -p %{buildroot}%{gem_extdir}/exts
|
||||
# make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib
|
||||
mv %{buildroot}%{ruby_libdir}/rake* %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/rake-%{rake_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib
|
||||
mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/rdoc-%{rdoc_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib
|
||||
mkdir -p %{buildroot}%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib
|
||||
mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib
|
||||
mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib/bigdecimal %{buildroot}%{ruby_libdir}/bigdecimal
|
||||
ln -s %{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so
|
||||
|
||||
@ -483,6 +480,7 @@ mkdir -p %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib
|
||||
mkdir -p %{buildroot}%{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io
|
||||
mv %{buildroot}%{ruby_libdir}/io %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib
|
||||
mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/io-console-%{io_console_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
ln -s %{gem_dir}/gems/io-console-%{io_console_version}/lib/io %{buildroot}%{ruby_libdir}/io
|
||||
ln -s %{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io/console.so %{buildroot}%{ruby_libarchdir}/io/console.so
|
||||
|
||||
@ -490,14 +488,17 @@ mkdir -p %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib
|
||||
mkdir -p %{buildroot}%{_libdir}/gems/exts/json-%{json_version}/lib
|
||||
mv %{buildroot}%{ruby_libdir}/json* %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib
|
||||
mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/exts/json-%{json_version}/lib/
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/json-%{json_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib
|
||||
mv %{buildroot}%{ruby_libdir}/minitest %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/minitest-%{minitest_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib
|
||||
mkdir -p %{buildroot}%{_libdir}/gems/exts/psych-%{psych_version}/lib
|
||||
mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib
|
||||
mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/exts/psych-%{psych_version}/lib/
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
|
||||
# Adjust the gemspec files so that the gems will load properly
|
||||
sed -i '8 a\
|
||||
|
@ -4,14 +4,14 @@ Date: Thu, 3 Nov 2011 16:43:05 +0100
|
||||
Subject: [PATCH 1/6] Add dedicate extensions folder into $LOAD_PATH.
|
||||
|
||||
---
|
||||
lib/rubygems/specification.rb | 37 ++++++++++++++++++++++++++++++-------
|
||||
1 files changed, 30 insertions(+), 7 deletions(-)
|
||||
lib/rubygems/specification.rb | 32 ++++++++++++++++++++++++++++++--
|
||||
1 file changed, 30 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
|
||||
index 97db19e..263e7d3 100644
|
||||
--- a/lib/rubygems/specification.rb
|
||||
+++ b/lib/rubygems/specification.rb
|
||||
@@ -859,6 +859,12 @@ class Gem::Specification
|
||||
@@ -1250,6 +1250,12 @@ class Gem::Specification
|
||||
File.join full_gem_path, path
|
||||
end
|
||||
|
||||
@ -24,31 +24,26 @@ index 97db19e..263e7d3 100644
|
||||
# gem directories must come after -I and ENV['RUBYLIB']
|
||||
insert_index = Gem.load_path_insert_index
|
||||
|
||||
@@ -970,16 +976,16 @@ class Gem::Specification
|
||||
@@ -1364,11 +1370,16 @@ class Gem::Specification
|
||||
|
||||
def contains_requirable_file? file
|
||||
root = full_gem_path
|
||||
+ ext = ext_dir
|
||||
+
|
||||
+ require_paths.any? do |lib|
|
||||
root = full_gem_path
|
||||
+ ext = ext_dir
|
||||
suffixes = Gem.suffixes
|
||||
|
||||
require_paths.any? do |lib|
|
||||
- base = "#{root}/#{lib}/#{file}"
|
||||
- suffixes.any? { |suf| File.file? "#{base}#{suf}" }
|
||||
+ base = ["#{root}/#{lib}/#{file}"]
|
||||
+ base << "#{ext}/#{lib}/#{file}" unless extensions.empty?
|
||||
|
||||
- require_paths.each do |lib|
|
||||
- base = "#{root}/#{lib}/#{file}"
|
||||
- Gem.suffixes.each do |suf|
|
||||
- path = "#{base}#{suf}"
|
||||
- return true if File.file? path
|
||||
+
|
||||
+ base.any? do |path|
|
||||
+ Gem.suffixes.any? { |suf| File.file? "#{path}#{suf}" }
|
||||
end
|
||||
+ suffixes.any? { |suf| File.file? "#{path}#{suf}" }
|
||||
+ end
|
||||
end
|
||||
-
|
||||
- return false
|
||||
end
|
||||
|
||||
##
|
||||
@@ -1295,6 +1301,23 @@ class Gem::Specification
|
||||
@@ -1664,6 +1675,23 @@ class Gem::Specification
|
||||
end
|
||||
|
||||
##
|
||||
@ -73,7 +68,7 @@ index 97db19e..263e7d3 100644
|
||||
#
|
||||
# Formerly used to indicate this gem was RDoc-capable.
|
||||
--
|
||||
1.7.7.3
|
||||
1.8.0
|
||||
|
||||
|
||||
From 671e4285bf9db948bc5f054d7d3d931cdd7a17f8 Mon Sep 17 00:00:00 2001
|
||||
@ -82,18 +77,18 @@ Date: Wed, 16 Nov 2011 13:26:48 +0100
|
||||
Subject: [PATCH 2/6] Use spec's ext dir for extension installation.
|
||||
|
||||
---
|
||||
lib/rubygems/installer.rb | 2 +-
|
||||
lib/rubygems/specification.rb | 7 +++----
|
||||
lib/rubygems/installer.rb | 2 +-
|
||||
lib/rubygems/specification.rb | 7 +++----
|
||||
2 files changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
|
||||
index 74d803d..0063c7f 100644
|
||||
--- a/lib/rubygems/installer.rb
|
||||
+++ b/lib/rubygems/installer.rb
|
||||
@@ -509,7 +509,7 @@ TEXT
|
||||
def build_extensions
|
||||
return if spec.extensions.empty?
|
||||
say "Building native extensions. This could take a while..."
|
||||
@@ -649,7 +649,7 @@ TEXT
|
||||
say "This could take a while..."
|
||||
end
|
||||
|
||||
- dest_path = File.join gem_dir, spec.require_paths.first
|
||||
+ dest_path = spec.ext_dir
|
||||
ran_rake = false # only run rake once
|
||||
@ -103,7 +98,7 @@ diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
|
||||
index 263e7d3..d31b93b 100644
|
||||
--- a/lib/rubygems/specification.rb
|
||||
+++ b/lib/rubygems/specification.rb
|
||||
@@ -1305,16 +1305,15 @@ class Gem::Specification
|
||||
@@ -1679,16 +1679,15 @@ class Gem::Specification
|
||||
# eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0
|
||||
|
||||
def ext_dir
|
||||
@ -124,7 +119,7 @@ index 263e7d3..d31b93b 100644
|
||||
|
||||
##
|
||||
--
|
||||
1.7.7.3
|
||||
1.8.0
|
||||
|
||||
|
||||
From 11b4a0cbadd8b1d3320f838881aa60feb6f848e7 Mon Sep 17 00:00:00 2001
|
||||
@ -133,14 +128,14 @@ Date: Wed, 16 Nov 2011 14:52:16 +0100
|
||||
Subject: [PATCH 3/6] Simplify the extending of $LOAD_PATH for binary gems.
|
||||
|
||||
---
|
||||
lib/rubygems/specification.rb | 11 +++++------
|
||||
1 files changed, 5 insertions(+), 6 deletions(-)
|
||||
lib/rubygems/specification.rb | 11 +++++------
|
||||
1 file changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
|
||||
index d31b93b..e65ea2d 100644
|
||||
--- a/lib/rubygems/specification.rb
|
||||
+++ b/lib/rubygems/specification.rb
|
||||
@@ -859,11 +859,7 @@ class Gem::Specification
|
||||
@@ -1250,11 +1250,7 @@ class Gem::Specification
|
||||
File.join full_gem_path, path
|
||||
end
|
||||
|
||||
@ -153,7 +148,7 @@ index d31b93b..e65ea2d 100644
|
||||
|
||||
# gem directories must come after -I and ENV['RUBYLIB']
|
||||
insert_index = Gem.load_path_insert_index
|
||||
@@ -1313,7 +1309,10 @@ class Gem::Specification
|
||||
@@ -1687,7 +1683,10 @@ class Gem::Specification
|
||||
# gem directory. eg: /usr/local/lib/ruby/1.8/gems
|
||||
|
||||
def exts_dir
|
||||
@ -166,7 +161,7 @@ index d31b93b..e65ea2d 100644
|
||||
|
||||
##
|
||||
--
|
||||
1.7.7.3
|
||||
1.8.0
|
||||
|
||||
|
||||
From 5d46cd2b1ac9517a9cbcfa430261e62bb3a376b8 Mon Sep 17 00:00:00 2001
|
||||
@ -175,18 +170,18 @@ Date: Fri, 9 Dec 2011 16:31:04 +0100
|
||||
Subject: [PATCH 4/6] Fix the binary extension search path construction.
|
||||
|
||||
---
|
||||
lib/rubygems/installer.rb | 2 +-
|
||||
lib/rubygems/specification.rb | 4 ++--
|
||||
lib/rubygems/installer.rb | 2 +-
|
||||
lib/rubygems/specification.rb | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
|
||||
index 0063c7f..83b8fd5 100644
|
||||
--- a/lib/rubygems/installer.rb
|
||||
+++ b/lib/rubygems/installer.rb
|
||||
@@ -509,7 +509,7 @@ TEXT
|
||||
def build_extensions
|
||||
return if spec.extensions.empty?
|
||||
say "Building native extensions. This could take a while..."
|
||||
@@ -649,7 +649,7 @@ TEXT
|
||||
say "This could take a while..."
|
||||
end
|
||||
|
||||
- dest_path = spec.ext_dir
|
||||
+ dest_path = File.join spec.ext_dir, spec.require_paths.first
|
||||
ran_rake = false # only run rake once
|
||||
@ -196,7 +191,7 @@ diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
|
||||
index e65ea2d..8be2ade 100644
|
||||
--- a/lib/rubygems/specification.rb
|
||||
+++ b/lib/rubygems/specification.rb
|
||||
@@ -859,7 +859,7 @@ class Gem::Specification
|
||||
@@ -1250,7 +1250,7 @@ class Gem::Specification
|
||||
File.join full_gem_path, path
|
||||
end
|
||||
|
||||
@ -205,7 +200,7 @@ index e65ea2d..8be2ade 100644
|
||||
|
||||
# gem directories must come after -I and ENV['RUBYLIB']
|
||||
insert_index = Gem.load_path_insert_index
|
||||
@@ -1301,7 +1301,7 @@ class Gem::Specification
|
||||
@@ -1675,7 +1675,7 @@ class Gem::Specification
|
||||
# eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0
|
||||
|
||||
def ext_dir
|
||||
@ -215,7 +210,7 @@ index e65ea2d..8be2ade 100644
|
||||
|
||||
##
|
||||
--
|
||||
1.7.7.3
|
||||
1.8.0
|
||||
|
||||
|
||||
From 6229583633802b45e5a3e5689ab9077347cd9ef7 Mon Sep 17 00:00:00 2001
|
||||
@ -224,14 +219,14 @@ Date: Tue, 13 Dec 2011 12:14:54 +0100
|
||||
Subject: [PATCH 5/6] Remove binary extensions during uninstall.
|
||||
|
||||
---
|
||||
lib/rubygems/uninstaller.rb | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
lib/rubygems/uninstaller.rb | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb
|
||||
index cc32ea4..94d78e0 100644
|
||||
--- a/lib/rubygems/uninstaller.rb
|
||||
+++ b/lib/rubygems/uninstaller.rb
|
||||
@@ -213,6 +213,7 @@ class Gem::Uninstaller
|
||||
@@ -234,6 +234,7 @@ class Gem::Uninstaller
|
||||
File.writable?(spec.base_dir)
|
||||
|
||||
FileUtils.rm_rf spec.full_gem_path
|
||||
@ -240,7 +235,7 @@ index cc32ea4..94d78e0 100644
|
||||
# TODO: should this be moved to spec?... I vote eww (also exists in docmgr)
|
||||
old_platform_name = [spec.name,
|
||||
--
|
||||
1.7.7.3
|
||||
1.8.0
|
||||
|
||||
|
||||
From bc40e1b9f60a9a04456e3504ffe6ee600b6da269 Mon Sep 17 00:00:00 2001
|
||||
@ -249,15 +244,15 @@ Date: Tue, 13 Dec 2011 14:27:14 +0100
|
||||
Subject: [PATCH 6/6] Avoid dependency on customized operating_system.rb.
|
||||
|
||||
---
|
||||
lib/rubygems/defaults.rb | 11 +++++++++++
|
||||
lib/rubygems/specification.rb | 5 +----
|
||||
lib/rubygems/defaults.rb | 11 +++++++++++
|
||||
lib/rubygems/specification.rb | 5 +----
|
||||
2 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
|
||||
index 20b4198..6d8711f 100644
|
||||
--- a/lib/rubygems/defaults.rb
|
||||
+++ b/lib/rubygems/defaults.rb
|
||||
@@ -94,6 +94,17 @@ module Gem
|
||||
@@ -101,6 +101,17 @@ module Gem
|
||||
end
|
||||
|
||||
##
|
||||
@ -272,14 +267,14 @@ index 20b4198..6d8711f 100644
|
||||
+ end
|
||||
+
|
||||
+ ##
|
||||
# The default system-wide source info cache directory
|
||||
# A wrapper around RUBY_ENGINE const that may not be defined
|
||||
|
||||
def self.default_system_source_cache_dir
|
||||
def self.ruby_engine
|
||||
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
|
||||
index 8be2ade..f54210a 100644
|
||||
--- a/lib/rubygems/specification.rb
|
||||
+++ b/lib/rubygems/specification.rb
|
||||
@@ -1309,10 +1309,7 @@ class Gem::Specification
|
||||
@@ -1683,10 +1683,7 @@ class Gem::Specification
|
||||
# gem directory. eg: /usr/local/lib/ruby/1.8/gems
|
||||
|
||||
def exts_dir
|
||||
@ -292,5 +287,5 @@ index 8be2ade..f54210a 100644
|
||||
|
||||
##
|
||||
--
|
||||
1.7.7.3
|
||||
1.8.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user