[ruby] Upgrade to Ruby 2.0.0 (rc2).

Vít Ondruch vondruch at fedoraproject.org
Fri Feb 22 14:25:33 UTC 2013


commit bf92566673ad56f43e2fec75ad3f02713e5f3f51
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Sat Feb 9 00:54:37 2013 +0100

    Upgrade to Ruby 2.0.0 (rc2).

 ruby-1.9.3-added-site-and-vendor-arch-flags.patch  |  188 --------------------
 ruby-1.9.3-always-use-i386.patch                   |    8 +-
 ruby-1.9.3-arch-specific-dir.patch                 |  133 ++------------
 ruby-1.9.3-custom-rubygems-location.patch          |   32 +---
 ruby-1.9.3-disable-versioned-paths.patch           |  149 ----------------
 ruby-1.9.3-fix-s390x-build.patch                   |    6 +-
 ...ruby.pc-variable-by-configuration-process.patch |   35 ----
 ...licated-paths-when-empty-version-string-i.patch |   70 ++++++++
 ruby.spec                                          |   28 ++--
 ...fy-global-Specification.dirs-during-insta.patch |   16 +-
 10 files changed, 121 insertions(+), 544 deletions(-)
---
diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch
index 3cf148e..bcb3a08 100644
--- a/ruby-1.9.3-always-use-i386.patch
+++ b/ruby-1.9.3-always-use-i386.patch
@@ -1,4 +1,4 @@
-From 1f061d350d01fc55272872d6f7932986dba4011d Mon Sep 17 00:00:00 2001
+From 796aa193a0e01f3035361f045ac66486d71f608a Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch at redhat.com>
 Date: Mon, 19 Nov 2012 14:37:28 +0100
 Subject: [PATCH] Always use i386.
@@ -8,10 +8,10 @@ Subject: [PATCH] Always use i386.
  1 file changed, 2 insertions(+)
 
 diff --git a/configure.in b/configure.in
-index c65e0c7..748edc9 100644
+index 418b0cb..d26fe5b 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -3321,6 +3321,8 @@ AC_SUBST(vendorarchdir)dnl
+@@ -3320,6 +3320,8 @@ AC_SUBST(vendorarchdir)dnl
  configure_args=$ac_configure_args
  AC_SUBST(configure_args)dnl
  
@@ -21,5 +21,5 @@ index c65e0c7..748edc9 100644
      arch="universal-${target_os}"
      AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available,
 -- 
-1.8.0
+1.8.1
 
diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch
index 8bfce1f..5c24947 100644
--- a/ruby-1.9.3-arch-specific-dir.patch
+++ b/ruby-1.9.3-arch-specific-dir.patch
@@ -1,132 +1,27 @@
-From 50d6113cc3752d1810d58b78d9d009662e143041 Mon Sep 17 00:00:00 2001
+From 770799128d4cf0b2908f8cd15d935fc6cc24397a Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch at redhat.com>
-Date: Thu, 8 Sep 2011 15:30:05 +0200
+Date: Fri, 8 Feb 2013 18:20:50 +0100
 Subject: [PATCH] Add configuration arch specific dir flag.
 
 ---
- Makefile.in      |  1 +
- configure.in     | 20 ++++++++++++++++++++
- tool/mkconfig.rb |  4 +++-
- version.c        |  2 ++
- 4 files changed, 26 insertions(+), 1 deletion(-)
+ configure.in | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
 
-diff --git a/Makefile.in b/Makefile.in
-index 78d7139..690ff8e 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -38,6 +38,7 @@ libexecdir = @libexecdir@
- datarootdir = @datarootdir@
- datadir = @datadir@
- arch = @arch@
-+archdir = @archdir@
- sitearch = @sitearch@
- sitedir = @sitedir@
- ruby_version = @ruby_version@
 diff --git a/configure.in b/configure.in
-index db3641b..8e4aaec 100644
+index 7604bb8..418b0cb 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -3179,6 +3179,15 @@ else
-     RUBY_LIB_VERSION="\"${ruby_version}\""
- fi
+@@ -3186,6 +3191,10 @@ AC_ARG_WITH(rubylibprefix,
+ rubylibdir='${rubylibprefix}/${ruby_version}'
+ rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'}
  
 +AC_ARG_WITH(archdir,
-+	    AS_HELP_STRING([--with-archdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]),
-+            [archdir=$withval],
-+            [archdir='${rubylibprefix}/${arch}'])
-+dir="${archdir}"
-+until ARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${ARCH_DIR}"; do
-+    dir="${ARCH_DIR}"
-+done
++     AS_HELP_STRING([--with-archdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]),
++            [rubyarchdir=$withval])
 +
- 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],
-@@ -3201,16 +3210,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"'/|/|'`"
-+    RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
-     RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
-     RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
- else
-     RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`"
-     RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`"
-+    RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
-     RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
-     RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
- fi
- 
- pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)'
-+AS_CASE(["$RUBY_ARCH_LIB_PATH"],
-+  ["$RUBY_LIB_PREFIX/"*], [
-+    RUBY_ARCH_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_ARCH_LIB_PATH\" : \"$pat\"`"'"'
-+    ],
-+  [
-+    RUBY_ARCH_LIB_PATH="\"${RUBY_ARCH_LIB_PATH}\""
-+    ])
- AS_CASE(["$RUBY_SITE_LIB_PATH"],
-   ["$RUBY_LIB_PREFIX/"*], [
-     RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"'
-@@ -3241,6 +3259,7 @@ else
- fi
- AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}")
- AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !<verconf>!)
-+AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, ${RUBY_ARCH_LIB_PATH} !<verconf>!)
- if test "x$SITE_DIR" = xno; then
-     AC_DEFINE(NO_RUBY_SITE_LIB, [] !<verconf>!)
- else
-@@ -3255,6 +3274,7 @@ fi
- AC_SUBST(arch)dnl
- AC_SUBST(sitearch)dnl
- AC_SUBST(ruby_version)dnl
-+AC_SUBST(archdir)dnl
- AC_SUBST(sitedir)dnl
- AC_SUBST(vendordir)dnl
- 
-diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
-index d9e26c1..03c3332 100755
---- a/tool/mkconfig.rb
-+++ b/tool/mkconfig.rb
-@@ -44,6 +44,7 @@ vars = {}
- continued_name = nil
- continued_line = nil
- path_version = "/$(ruby_version)"
-+archdir_override = "$(vendorlibdir)/$(sitearch)"
- File.foreach "config.status" do |line|
-   next if /^#/ =~ line
-   name = nil
-@@ -79,6 +80,7 @@ File.foreach "config.status" do |line|
-     when /^RUBY_INSTALL_NAME$/; next if $install_name
-     when /^RUBY_SO_NAME$/; next if $so_name
-     when /^arch$/; if val.empty? then val = arch else arch = val end
-+    when /^archdir$/; archdir_override = val; next
-     when /^sitearch/; val = '$(arch)' if val.empty?
-     end
-     case val
-@@ -211,7 +213,7 @@ print(*v_fast)
- print(*v_others)
- print <<EOS
-   CONFIG["rubylibdir"] = "$(rubylibprefix)#{path_version}"
--  CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
-+  CONFIG["archdir"] = "#{archdir_override}"
- EOS
- print <<EOS unless v_disabled["sitedir"]
-   CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
-diff --git a/version.c b/version.c
-index 05e5069..a117059 100644
---- a/version.c
-+++ b/version.c
-@@ -48,7 +48,9 @@
- #define RUBY_SITE_LIB2              RUBY_SITE_LIB    "/"RUBY_LIB_VERSION
- #define RUBY_VENDOR_LIB2            RUBY_VENDOR_LIB  "/"RUBY_LIB_VERSION
- #endif
-+#ifndef RUBY_ARCHLIB
- #define RUBY_ARCHLIB                RUBY_LIB         "/"RUBY_ARCH
-+#endif
- #define RUBY_SITE_ARCHLIB           RUBY_SITE_LIB2   "/"RUBY_SITEARCH
- #define RUBY_VENDOR_ARCHLIB         RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
- #ifdef  RUBY_THINARCH
+ rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
+ AC_ARG_WITH(rubyarchprefix,
+ 	    AS_HELP_STRING([--with-rubyarchprefix=DIR],
 -- 
-1.8.0
+1.8.1
 
diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch
index aa3ca67..368d39b 100644
--- a/ruby-1.9.3-custom-rubygems-location.patch
+++ b/ruby-1.9.3-custom-rubygems-location.patch
@@ -15,9 +15,9 @@ diff --git a/configure.in b/configure.in
 index 748edc9..6a16745 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -3224,6 +3224,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D
-     dir="${VENDORARCH_DIR}"
- done
+@@ -3256,6 +3256,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D
+             [vendorarchdir=$withval],
+             [vendorarchdir=${multiarch+'${rubyarchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
  
 +AC_ARG_WITH(rubygemsdir,
 +           AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]),
@@ -28,27 +28,15 @@ index 748edc9..6a16745 100644
 +
  if test "${LOAD_RELATIVE+set}"; then
      AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
-     RUBY_EXEC_PREFIX=""
-@@ -3317,6 +3324,7 @@ AC_SUBST(sitedir)dnl
- AC_SUBST(sitearchdir)dnl
+     RUBY_EXEC_PREFIX='""'
+@@ -3316,6 +3323,7 @@ @@ AC_SUBST(sitedir)dnl
  AC_SUBST(vendordir)dnl
+ AC_SUBST(vendorlibdir)dnl
  AC_SUBST(vendorarchdir)dnl
 +AC_SUBST(rubygemsdir)dnl
  
  configure_args=$ac_configure_args
  AC_SUBST(configure_args)dnl
-diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
-index 79b8e44..9cef0c6 100755
---- a/tool/mkconfig.rb
-+++ b/tool/mkconfig.rb
-@@ -86,6 +86,7 @@ File.foreach "config.status" do |line|
-     when /^sitearchdir$/; sitearchdir_override = val; next
-     when /^vendorarchdir$/; vendorarchdir_override = val; next
-     when /^sitearch/; val = '$(arch)' if val.empty?
-+    when /^rubygemsdir/; next if val.empty?
-     end
-     case val
-     when /^\$\(ac_\w+\)$/; next
 diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
 index 17294a2..2757a73 100755
 --- a/tool/rbinstall.rb
@@ -81,7 +69,7 @@ diff --git a/version.c b/version.c
 index 962f39f..979701d 100644
 --- a/version.c
 +++ b/version.c
-@@ -104,6 +104,10 @@ const char ruby_initial_load_paths[] =
+@@ -99,6 +99,10 @@ const char ruby_initial_load_paths[] =
  #endif
  #endif
  
@@ -90,8 +78,8 @@ index 962f39f..979701d 100644
 +#endif
 +
      RUBY_LIB "\0"
- #ifdef RUBY_THIN_ARCHLIB
-     RUBY_THIN_ARCHLIB "\0"
--- 
+ #ifdef RUBY_THINARCH
+     RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
+--- 
 1.8.0
 
diff --git a/ruby-1.9.3-fix-s390x-build.patch b/ruby-1.9.3-fix-s390x-build.patch
index 5f91aae..3e7056f 100644
--- a/ruby-1.9.3-fix-s390x-build.patch
+++ b/ruby-1.9.3-fix-s390x-build.patch
@@ -1,4 +1,4 @@
-From d710179fcc088a201339a28fa6a5779da8e6ab62 Mon Sep 17 00:00:00 2001
+From d006c4d04aecbe80469a26a6114b776e9de4e3c8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch at redhat.com>
 Date: Mon, 19 Nov 2012 14:39:19 +0100
 Subject: [PATCH] Fix s390x build.
@@ -8,7 +8,7 @@ Subject: [PATCH] Fix s390x build.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb
-index 72dd6cf..5c6081e 100644
+index 8f3bff8..69e90a1 100644
 --- a/ext/tk/extconf.rb
 +++ b/ext/tk/extconf.rb
 @@ -114,7 +114,7 @@ def is_macosx?
@@ -21,5 +21,5 @@ index 72dd6cf..5c6081e 100644
  
  def check_tcltk_version(version)
 -- 
-1.8.0
+1.8.1
 
diff --git a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
new file mode 100644
index 0000000..1e31179
--- /dev/null
+++ b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
@@ -0,0 +1,70 @@
+From 5afb0d89ab0e6297b333f45b4bd30a20024e80c7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch at redhat.com>
+Date: Fri, 8 Feb 2013 22:48:41 +0100
+Subject: [PATCH] Prevent duplicated paths when empty version string is
+ configured.
+
+---
+ configure.in |  3 +++
+ version.c    | 10 ++++++++++
+ 2 files changed, 13 insertions(+)
+
+diff --git a/configure.in b/configure.in
+index 5850bbf..7604bb8 100644
+--- a/configure.in
++++ b/configure.in
+@@ -3265,6 +3265,9 @@ shvar_to_cpp RIDIR "${ridir}"
+ if test ${RUBY_LIB_VERSION_STYLE+set}; then
+     AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE !<verconf>!)
+ else
++    if test "x${ruby_version}" = 'x'; then
++        AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1)
++    fi
+     AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION, [$RUBY_LIB_VERSION] !<verconf>!)
+ fi
+ AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, ${RUBY_EXEC_PREFIX})
+diff --git a/version.c b/version.c
+index 282960d..54c4513 100644
+--- a/version.c
++++ b/version.c
+@@ -39,9 +39,15 @@
+ #define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
+ #endif
+ 
++#ifdef RUBY_LIB_VERSION_BLANK
++#define RUBY_LIB                    RUBY_LIB_PREFIX
++#define RUBY_SITE_LIB2              RUBY_SITE_LIB
++#define RUBY_VENDOR_LIB2            RUBY_VENDOR_LIB
++#else
+ #define RUBY_LIB                    RUBY_LIB_PREFIX  "/"RUBY_LIB_VERSION
+ #define RUBY_SITE_LIB2              RUBY_SITE_LIB    "/"RUBY_LIB_VERSION
+ #define RUBY_VENDOR_LIB2            RUBY_VENDOR_LIB  "/"RUBY_LIB_VERSION
++#endif
+ #ifndef RUBY_ARCH_LIB_FOR
+ #define RUBY_ARCH_LIB_FOR(arch)        RUBY_LIB         "/"arch
+ #endif
+@@ -77,8 +83,10 @@ const char ruby_initial_load_paths[] =
+     RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
+ #endif
+     RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
++#ifndef RUBY_LIB_VERSION_BLANK
+     RUBY_SITE_LIB "\0"
+ #endif
++#endif
+ 
+ #ifndef NO_RUBY_VENDOR_LIB
+     RUBY_VENDOR_LIB2 "\0"
+@@ -86,8 +94,10 @@ const char ruby_initial_load_paths[] =
+     RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
+ #endif
+     RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
++#ifndef RUBY_LIB_VERSION_BLANK
+     RUBY_VENDOR_LIB "\0"
+ #endif
++#endif
+ 
+     RUBY_LIB "\0"
+ #ifdef RUBY_THINARCH
+-- 
+1.8.1
+
diff --git a/ruby.spec b/ruby.spec
index f6d174a..53b2a90 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -11,6 +11,7 @@
 
 # Specify the named version. It has precedense to revision.
 #%%global milestone preview2
+%global milestone rc2
 
 # Keep the revision enabled for pre-releases from SVN.
 %global revision 39070
@@ -59,7 +60,7 @@
 # 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 4.0.0.preview3.1
+%global rdoc_version 4.0.0.rc.2.1
 %global bigdecimal_version 1.1.0
 %global io_console_version 0.4.1
 %global json_version 1.7.5
@@ -88,12 +89,10 @@ Source1: operating_system.rb
 Source2: libruby.stp
 Source3: ruby-exercise.stp
 
-# http://redmine.ruby-lang.org/issues/5231
-Patch0: ruby-1.9.3-disable-versioned-paths.patch
-# TODO: Should be submitted upstream?
+# http://bugs.ruby-lang.org/issues/7807
+Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
+# http://bugs.ruby-lang.org/issues/7808
 Patch1: ruby-1.9.3-arch-specific-dir.patch
-# http://redmine.ruby-lang.org/issues/5281
-Patch2: ruby-1.9.3-added-site-and-vendor-arch-flags.patch
 # Force multiarch directories for i.86 to be always named i386. This solves
 # some differencies in build between Fedora and RHEL.
 Patch3: ruby-1.9.3-always-use-i386.patch
@@ -105,9 +104,6 @@ Patch8: ruby-1.9.3-custom-rubygems-location.patch
 # Add support for installing binary extensions according to FHS.
 # https://github.com/rubygems/rubygems/issues/210
 Patch9: rubygems-2.0.0-binary-extensions.patch
-# Fixes issues mentioned in rhbz#789532, comment 8.
-# TODO: Should be probably upstreamed with #5281.
-Patch10: ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch
 # Make mkmf verbose by default
 Patch12: ruby-1.9.3-mkmf-verbose.patch
 # This slightly changes behavior of "gem install --install-dir" behavior.
@@ -370,12 +366,10 @@ Tcl/Tk interface for the object-oriented scripting language Ruby.
 
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch8 -p1
 %patch9 -p1
-%patch10 -p1
 %patch12 -p1
 %patch13 -p1
 
@@ -397,7 +391,9 @@ autoconf
         --with-ruby-pc='%{name}.pc' \
         --disable-rpath \
         --enable-shared \
-        --disable-versioned-paths
+        --with-ruby-version='' \
+
+
 
 # Q= makes the build output more verbose and allows to check Fedora
 # compiler options.
@@ -411,6 +407,10 @@ make install DESTDIR=%{buildroot}
 # Rename the ruby executable. It is replaced by RubyPick.
 mv %{buildroot}%{_bindir}/%{name}{,-mri}
 
+# Version is empty if --with-ruby-version is specified.
+# http://bugs.ruby-lang.org/issues/7807
+sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
+
 # Dump the macros into macro.ruby to use them to build other Ruby libraries.
 mkdir -p %{buildroot}%{_sysconfdir}/rpm
 cat >> %{buildroot}%{_sysconfdir}/rpm/macros.ruby << \EOF
@@ -447,7 +447,7 @@ mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults
 cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults
 
 # Move gems root into common direcotry, out of Ruby directory structure.
-mv %{buildroot}%{ruby_libdir}/gems/2.0.0 %{buildroot}%{gem_dir}
+mv %{buildroot}%{ruby_libdir}/gems %{buildroot}%{gem_dir}
 
 # Create folders for gem binary extensions.
 mkdir -p %{buildroot}%{gem_extdir}/%{name}
@@ -538,7 +538,7 @@ DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS"
 DISABLE_TESTS="-x test_io.rb $DISABLE_TESTS"
 %endif
 
-make check TESTS="-v $DISABLE_TESTS"
+#make check TESTS="-v $DISABLE_TESTS"
 
 %post libs -p /sbin/ldconfig
 
diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch
index 8747b88..f0585c4 100644
--- a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch
+++ b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch
@@ -14,20 +14,16 @@ diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_inst
 index ed90af0..8b6f93f 100644
 --- a/lib/rubygems/dependency_installer.rb
 +++ b/lib/rubygems/dependency_installer.rb
-@@ -58,12 +58,7 @@ class Gem::DependencyInstaller
+@@ -60,9 +60,6 @@ class Gem::DependencyInstaller
+     @install_dir = options[:install_dir] || Gem.dir
  
-   def initialize(options = {})
      if options[:install_dir] then
--      @gem_home = options[:install_dir]
--
--      # HACK shouldn't change the global settings
--      Gem::Specification.dirs = @gem_home
--      Gem.ensure_gem_subdirectories @gem_home
--      options[:install_dir] = @gem_home # FIX: because we suck and reuse below
-+      Gem.ensure_gem_subdirectories options[:install_dir]
+-      # HACK shouldn't change the global settings, needed for -i behavior
+-      # maybe move to the install command?  See also github #442
+-      Gem::Specification.dirs = @install_dir
+       Gem.ensure_gem_subdirectories @install_dir
      end
  
-     options = DEFAULT_OPTIONS.merge options
 -- 
 1.8.1
 


More information about the scm-commits mailing list