vondruch pushed to ruby (private-ruby-2.3). "Use patches submitted upstream."

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Apr 2 14:18:59 UTC 2015


>From 36ef4abcf256f53bac2ecd1160bb21a862b6cd3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch at redhat.com>
Date: Wed, 1 Apr 2015 17:08:04 +0200
Subject: Use patches submitted upstream.


diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
index d8bc891..5404a08 100644
--- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
+++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
@@ -39,7 +39,7 @@ diff --git a/configure.in b/configure.in
 index 0e371e2..d4f1dcb 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -4199,6 +4199,13 @@ AC_SUBST(rubyarchhdrdir)dnl
+@@ -4201,6 +4201,13 @@ AC_SUBST(rubyarchhdrdir)dnl
  AC_SUBST(sitearchhdrdir)dnl
  AC_SUBST(vendorarchhdrdir)dnl
  
diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
index c00d559..e3dcba8 100644
--- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
+++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
@@ -5,114 +5,25 @@ Subject: [PATCH] Prevent duplicated paths when empty version string is
  configured.
 
 ---
- configure.in     | 15 +++++++++------
+ configure.in     |  3 ++-
  loadpath.c       | 12 ++++++++++++
  tool/mkconfig.rb |  2 +-
- 3 files changed, 22 insertions(+), 7 deletions(-)
+ 3 files changed, 15 insertions(+), 2 deletions(-)
 
 diff --git a/configure.in b/configure.in
-index db37cd6..5f39a70 100644
+index db37cd6..ce8d149 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -4004,9 +4004,6 @@ AS_CASE(["$target_os"],
-     rubyw_install_name='$(RUBYW_INSTALL_NAME)'
-     ])
+@@ -4055,7 +4055,8 @@ AS_CASE(["$ruby_version_dir_name"],
+ ruby_version_dir=/'${ruby_version_dir_name}'
  
--rubylibdir='${rubylibprefix}/${ruby_version}'
--rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'}
--
- rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
- AC_ARG_WITH(rubyarchprefix,
- 	    AS_HELP_STRING([--with-rubyarchprefix=DIR],
-@@ -4031,56 +4028,62 @@ AC_SUBST(RI_BASE_NAME)
- 
- AC_ARG_WITH(ruby-version,
- 	    AS_HELP_STRING([--with-ruby-version=STR], [ruby version string for version specific directories [[full]] (full|minor|STR)]),
--            [ruby_version=$withval],
--            [ruby_version=full])
-+            [ruby_version_dir_name=$withval],
-+            [ruby_version_dir_name=full])
- unset RUBY_LIB_VERSION
- unset RUBY_LIB_VERSION_STYLE
--AS_CASE(["$ruby_version"],
--  [full],  [RUBY_LIB_VERSION_STYLE='3	/* full */'],
--  [minor], [RUBY_LIB_VERSION_STYLE='2	/* minor */'])
--if test ${RUBY_LIB_VERSION_STYLE+set}; then
--    {
--    echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
--    echo '#define STRINGIZE(x) x'
--    test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
--    echo '#include "verconf.h"'
--    echo '#include "version.h"'
--    echo 'ruby_version=RUBY_LIB_VERSION'
--    } > conftest.c
--    test -f verconf.h || > verconf.h
--    ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`"
--    eval $ruby_version
--elif test -z "${ruby_version}"; then
+ if test -z "${ruby_version_dir_name}"; then
 -    AC_MSG_ERROR([No ruby version, No place for bundled libraries])
--else
--    RUBY_LIB_VERSION="${ruby_version}"
--fi
-+AS_CASE(["$ruby_version_dir_name"],
-+  [minor], [RUBY_LIB_VERSION_STYLE='2	/* minor */'],
-+  [RUBY_LIB_VERSION_STYLE='3	/* full */'])
-+{
-+echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
-+echo '#define STRINGIZE(x) x'
-+test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
-+echo '#include "verconf.h"'
-+echo '#include "version.h"'
-+echo 'ruby_version=RUBY_LIB_VERSION'
-+} > conftest.c
-+test -f verconf.h || > verconf.h
-+ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`"
-+eval $ruby_version
-+
-+RUBY_LIB_VERSION="${ruby_version}"
-+
- AC_SUBST(RUBY_LIB_VERSION_STYLE)
- AC_SUBST(RUBY_LIB_VERSION)
- 
-+ruby_version_dir=/'${ruby_version_dir_name}'
-+if test -z "${ruby_version_dir_name}"; then
 +    unset ruby_version_dir
 +    AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1)
-+fi
-+
-+rubylibdir='${rubylibprefix}'${ruby_version_dir}
-+rubyarchdir=${multiarch+'${rubyarchprefix}'${ruby_version_dir}}${multiarch-'${rubylibdir}/${arch}'}
-+
- 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],
-             [sitedir='${rubylibprefix}/site_ruby'])
--sitelibdir='${sitedir}/${ruby_version}'
-+sitelibdir='${sitedir}'${ruby_version_dir}
- 
- AC_ARG_WITH(sitearchdir,
- 	    AS_HELP_STRING([--with-sitearchdir=DIR],
- 			   [architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]),
-             [sitearchdir=$withval],
--            [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}])
-+            [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby'${ruby_version_dir}}${multiarch-'${sitelibdir}/${sitearch}'}])
- 
- 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],
-             [vendordir='${rubylibprefix}/vendor_ruby'])
--vendorlibdir='${vendordir}/${ruby_version}'
-+vendorlibdir='${vendordir}'${ruby_version_dir}
- 
- AC_ARG_WITH(vendorarchdir,
- 	    AS_HELP_STRING([--with-vendorarchdir=DIR],
- 			   [architecture dependent vendor libraries in DIR [[VENDORDIR/SITEARCH]], "no" to disable vendor directory]),
-             [vendorarchdir=$withval],
--            [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
-+            [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
+ fi
  
- if test "${LOAD_RELATIVE+set}"; then
-     AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
+ rubylibdir='${rubylibprefix}'${ruby_version_dir}
 diff --git a/loadpath.c b/loadpath.c
 index 9160031..0d4d953 100644
 --- a/loadpath.c
diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch
index a2861b3..54bd9ee 100644
--- a/ruby-2.1.0-always-use-i386.patch
+++ b/ruby-2.1.0-always-use-i386.patch
@@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in
 index 553d4d0..03a4152 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -4117,6 +4117,8 @@ AC_SUBST(vendorarchdir)dnl
+@@ -4119,6 +4119,8 @@ AC_SUBST(vendorarchdir)dnl
  AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl
  AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
  
diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch
index 5ecad7d..b77f962 100644
--- a/ruby-2.1.0-custom-rubygems-location.patch
+++ b/ruby-2.1.0-custom-rubygems-location.patch
@@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in
 index 03a4152..0e371e2 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -4090,6 +4090,10 @@ AC_ARG_WITH(vendorarchdir,
+@@ -4091,6 +4091,10 @@ AC_ARG_WITH(vendorarchdir,
              [vendorarchdir=$withval],
              [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
  
@@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644
  if test "${LOAD_RELATIVE+set}"; then
      AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
      RUBY_EXEC_PREFIX=''
-@@ -4113,6 +4117,7 @@ AC_SUBST(sitearchdir)dnl
+@@ -4115,6 +4119,7 @@ AC_SUBST(sitearchdir)dnl
  AC_SUBST(vendordir)dnl
  AC_SUBST(vendorlibdir)dnl
  AC_SUBST(vendorarchdir)dnl
diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch
new file mode 100644
index 0000000..23e356a
--- /dev/null
+++ b/ruby-2.3.0-ruby_version.patch
@@ -0,0 +1,300 @@
+From 4fc1be3af3f58621bb751c9e63c208b15c0e8d16 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch at redhat.com>
+Date: Tue, 31 Mar 2015 16:21:04 +0200
+Subject: [PATCH 1/4] Use ruby_version_dir_name for versioned directories.
+
+This disallows changing the ruby_version constant by --with-ruby-version
+configuration options. The two places version numbers are disallowed as
+well, since there are a lot of places which cannot handle this format
+properly.
+
+ruby_version_dir_name now specifies custom version string for versioned
+directories, e.g. instead of default X.Y.Z, you can specify whatever
+string.
+---
+ configure.in        | 68 ++++++++++++++++++++++++++++-------------------------
+ template/ruby.pc.in |  1 +
+ 2 files changed, 37 insertions(+), 32 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index db37cd6..6e73fae 100644
+--- a/configure.in
++++ b/configure.in
+@@ -4004,9 +4004,6 @@ AS_CASE(["$target_os"],
+     rubyw_install_name='$(RUBYW_INSTALL_NAME)'
+     ])
+ 
+-rubylibdir='${rubylibprefix}/${ruby_version}'
+-rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'}
+-
+ rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
+ AC_ARG_WITH(rubyarchprefix,
+ 	    AS_HELP_STRING([--with-rubyarchprefix=DIR],
+@@ -4029,58 +4026,64 @@ AC_ARG_WITH(ridir,
+ AC_SUBST(ridir)
+ AC_SUBST(RI_BASE_NAME)
+ 
+-AC_ARG_WITH(ruby-version,
+-	    AS_HELP_STRING([--with-ruby-version=STR], [ruby version string for version specific directories [[full]] (full|minor|STR)]),
+-            [ruby_version=$withval],
+-            [ruby_version=full])
+ unset RUBY_LIB_VERSION
+-unset RUBY_LIB_VERSION_STYLE
+-AS_CASE(["$ruby_version"],
+-  [full],  [RUBY_LIB_VERSION_STYLE='3	/* full */'],
+-  [minor], [RUBY_LIB_VERSION_STYLE='2	/* minor */'])
+-if test ${RUBY_LIB_VERSION_STYLE+set}; then
+-    {
+-    echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
+-    echo '#define STRINGIZE(x) x'
+-    test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
+-    echo '#include "verconf.h"'
+-    echo '#include "version.h"'
+-    echo 'ruby_version=RUBY_LIB_VERSION'
+-    } > conftest.c
+-    test -f verconf.h || > verconf.h
+-    ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`"
+-    eval $ruby_version
+-elif test -z "${ruby_version}"; then
+-    AC_MSG_ERROR([No ruby version, No place for bundled libraries])
+-else
+-    RUBY_LIB_VERSION="${ruby_version}"
+-fi
++RUBY_LIB_VERSION_STYLE='3	/* full */'
++{
++echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
++echo '#define STRINGIZE(x) x'
++test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
++echo '#include "verconf.h"'
++echo '#include "version.h"'
++echo 'ruby_version=RUBY_LIB_VERSION'
++} > conftest.c
++test -f verconf.h || > verconf.h
++ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`"
++eval $ruby_version
++
++RUBY_LIB_VERSION="${ruby_version}"
++
+ AC_SUBST(RUBY_LIB_VERSION_STYLE)
+ AC_SUBST(RUBY_LIB_VERSION)
+ 
++AC_ARG_WITH(ruby-version,
++	    AS_HELP_STRING([--with-ruby-version=STR], [ruby version string for version specific directories [[full]] (full|STR)]),
++            [ruby_version_dir_name=$withval],
++            [ruby_version_dir_name=full])
++AS_CASE(["$ruby_version_dir_name"],
++  [full], [ruby_version_dir_name='${ruby_version}'])
++
++ruby_version_dir=/'${ruby_version_dir_name}'
++
++if test -z "${ruby_version_dir_name}"; then
++    AC_MSG_ERROR([No ruby version, No place for bundled libraries])
++fi
++
++rubylibdir='${rubylibprefix}'${ruby_version_dir}
++rubyarchdir=${multiarch+'${rubyarchprefix}'${ruby_version_dir}}${multiarch-'${rubylibdir}/${arch}'}
++
+ 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],
+             [sitedir='${rubylibprefix}/site_ruby'])
+-sitelibdir='${sitedir}/${ruby_version}'
++sitelibdir='${sitedir}'${ruby_version_dir}
+ 
+ AC_ARG_WITH(sitearchdir,
+ 	    AS_HELP_STRING([--with-sitearchdir=DIR],
+ 			   [architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]),
+             [sitearchdir=$withval],
+-            [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}])
++            [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby'${ruby_version_dir}}${multiarch-'${sitelibdir}/${sitearch}'}])
+ 
+ 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],
+             [vendordir='${rubylibprefix}/vendor_ruby'])
+-vendorlibdir='${vendordir}/${ruby_version}'
++vendorlibdir='${vendordir}'${ruby_version_dir}
+ 
+ AC_ARG_WITH(vendorarchdir,
+ 	    AS_HELP_STRING([--with-vendorarchdir=DIR],
+ 			   [architecture dependent vendor libraries in DIR [[VENDORDIR/SITEARCH]], "no" to disable vendor directory]),
+             [vendorarchdir=$withval],
+-            [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
++            [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
+ 
+ if test "${LOAD_RELATIVE+set}"; then
+     AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
+@@ -4097,6 +4100,7 @@ AC_SUBST(sitearchincludedir)dnl
+ AC_SUBST(arch)dnl
+ AC_SUBST(sitearch)dnl
+ AC_SUBST(ruby_version)dnl
++AC_SUBST(ruby_version_dir_name)dnl
+ AC_SUBST(rubylibdir)dnl
+ AC_SUBST(rubyarchdir)dnl
+ AC_SUBST(sitedir)dnl
+diff --git a/template/ruby.pc.in b/template/ruby.pc.in
+index 8a2c066..c81b211 100644
+--- a/template/ruby.pc.in
++++ b/template/ruby.pc.in
+@@ -9,6 +9,7 @@ MAJOR=@MAJOR@
+ MINOR=@MINOR@
+ TEENY=@TEENY@
+ ruby_version=@ruby_version@
++ruby_version_dir_name=@ruby_version_dir_name@
+ RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@
+ RUBY_BASE_NAME=@RUBY_BASE_NAME@
+ RUBY_VERSION_NAME=@RUBY_VERSION_NAME@
+-- 
+2.1.0
+
+
+From 518850aba6eee76de7715aae8d37330e34b01983 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch at redhat.com>
+Date: Tue, 31 Mar 2015 16:37:26 +0200
+Subject: [PATCH 2/4] Add ruby_version_dir_name support for RDoc.
+
+---
+ lib/rdoc/ri/paths.rb | 2 +-
+ tool/rbinstall.rb    | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb
+index 970cb91..5bf8230 100644
+--- a/lib/rdoc/ri/paths.rb
++++ b/lib/rdoc/ri/paths.rb
+@@ -9,7 +9,7 @@ module RDoc::RI::Paths
+   #:stopdoc:
+   require 'rbconfig'
+ 
+-  version = RbConfig::CONFIG['ruby_version']
++  version = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
+ 
+   BASE    = if RbConfig::CONFIG.key? 'ridir' then
+               File.join RbConfig::CONFIG['ridir'], version
+diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
+index d4c110e..d39c9a6 100755
+--- a/tool/rbinstall.rb
++++ b/tool/rbinstall.rb
+@@ -406,7 +406,7 @@ end
+ 
+ install?(:doc, :rdoc) do
+   if $rdocdir
+-    ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version'], "system")
++    ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version_dir_name'] || CONFIG['ruby_version'], "system")
+     prepare "rdoc", ridatadir
+     install_recursive($rdocdir, ridatadir, :mode => $data_mode)
+   end
+-- 
+2.1.0
+
+
+From f8d136f9a46d1fe87eba622ab9665935d05e981b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch at redhat.com>
+Date: Tue, 31 Mar 2015 16:37:44 +0200
+Subject: [PATCH 3/4] Add ruby_version_dir_name support for RubyGems.
+
+---
+ lib/rubygems/defaults.rb  | 11 ++++++-----
+ test/rubygems/test_gem.rb |  5 +++--
+ 2 files changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
+index 55ca080..75eea2b 100644
+--- a/lib/rubygems/defaults.rb
++++ b/lib/rubygems/defaults.rb
+@@ -31,20 +31,20 @@ module Gem
+              [
+                File.dirname(RbConfig::CONFIG['sitedir']),
+                'Gems',
+-               RbConfig::CONFIG['ruby_version']
++               RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
+              ]
+            elsif RbConfig::CONFIG['rubylibprefix'] then
+              [
+               RbConfig::CONFIG['rubylibprefix'],
+               'gems',
+-              RbConfig::CONFIG['ruby_version']
++              RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
+              ]
+            else
+              [
+                RbConfig::CONFIG['libdir'],
+                ruby_engine,
+                'gems',
+-               RbConfig::CONFIG['ruby_version']
++               RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
+              ]
+            end
+ 
+@@ -74,7 +74,8 @@ module Gem
+ 
+   def self.user_dir
+     parts = [Gem.user_home, '.gem', ruby_engine]
+-    parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty?
++    ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
++    parts << ruby_version_dir_name unless ruby_version_dir_name.empty?
+     File.join parts
+   end
+ 
+@@ -171,7 +172,7 @@ module Gem
+     return nil unless RbConfig::CONFIG.key? 'vendordir'
+ 
+     File.join RbConfig::CONFIG['vendordir'], 'gems',
+-              RbConfig::CONFIG['ruby_version']
++              RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
+   end
+ 
+ end
+diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
+index 0428bea..b6e090e 100644
+--- a/test/rubygems/test_gem.rb
++++ b/test/rubygems/test_gem.rb
+@@ -925,7 +925,8 @@ class TestGem < Gem::TestCase
+ 
+   def test_self_user_dir
+     parts = [@userhome, '.gem', Gem.ruby_engine]
+-    parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty?
++    ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
++    parts << ruby_version_dir_name unless ruby_version_dir_name.empty?
+ 
+     assert_equal File.join(parts), Gem.user_dir
+   end
+@@ -1052,7 +1053,7 @@ class TestGem < Gem::TestCase
+   def test_self_vendor_dir
+     expected =
+       File.join RbConfig::CONFIG['vendordir'], 'gems',
+-                RbConfig::CONFIG['ruby_version']
++                RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
+ 
+     assert_equal expected, Gem.vendor_dir
+   end
+-- 
+2.1.0
+
+
+From 88c38a030c22dbf9422ece847bdfbf87d6659313 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch at redhat.com>
+Date: Wed, 1 Apr 2015 14:55:37 +0200
+Subject: [PATCH 4/4] Let headers directories follow the configured version
+ name.
+
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 6e73fae..c842725 100644
+--- a/configure.in
++++ b/configure.in
+@@ -270,7 +270,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
+ RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"`
+ AC_SUBST(RUBY_BASE_NAME)
+ AC_SUBST(RUBYW_BASE_NAME)
+-AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version}')
++AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version_dir_name}')
+ 
+ AC_CANONICAL_TARGET
+ test x"$target_alias" = x &&
+-- 
+2.1.0
+
diff --git a/ruby.spec b/ruby.spec
index 36073d6..e519588 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -90,15 +90,18 @@ Source10: rubygems.prov
 %{?load:%{SOURCE4}}
 %{?load:%{SOURCE5}}
 
+# Fix ruby_version abuse.
+# https://bugs.ruby-lang.org/issues/11002
+Patch0: ruby-2.3.0-ruby_version.patch
 # http://bugs.ruby-lang.org/issues/7807
-Patch0: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
+Patch1: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
 # Allows to override libruby.so placement. Hopefully we will be able to return
 # to plain --with-rubyarchprefix.
 # http://bugs.ruby-lang.org/issues/8973
-Patch1: ruby-2.1.0-Enable-configuration-of-archlibdir.patch
+Patch2: ruby-2.1.0-Enable-configuration-of-archlibdir.patch
 # Force multiarch directories for i.86 to be always named i386. This solves
 # some differencies in build between Fedora and RHEL.
-Patch2: ruby-2.1.0-always-use-i386.patch
+Patch3: ruby-2.1.0-always-use-i386.patch
 # Allows to install RubyGems into custom directory, outside of Ruby's tree.
 # http://bugs.ruby-lang.org/issues/5617
 Patch4: ruby-2.1.0-custom-rubygems-location.patch
@@ -403,6 +406,7 @@ rm -rf ext/fiddle/libffi*
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
@@ -494,8 +498,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/%{ruby_version} %{buildroot}%{gem_dir}
-rm -r %{buildroot}%{ruby_libdir}/gems
+mv %{buildroot}%{ruby_libdir}/gems %{buildroot}%{gem_dir}
 
 # Create folders for gem binary extensions.
 # TODO: These folders should go into rubygem-filesystem but how to achieve it,
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/ruby.git/commit/?h=private-ruby-2.3&id=36ef4abcf256f53bac2ecd1160bb21a862b6cd3a


More information about the scm-commits mailing list