]> git.pld-linux.org Git - packages/ruby.git/commitdiff
update patches from fedora (d14e3f780f68851070c2a5bf08b61327a59d857c)
authorElan Ruusamäe <glen@delfi.ee>
Mon, 24 Apr 2017 18:50:49 +0000 (21:50 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 24 Apr 2017 18:54:36 +0000 (21:54 +0300)
archlibdir.patch
custom-rubygems-location.patch
duplicated-paths.patch
mkmf-verbose.patch
operating_system.rb
ruby-version.patch
ruby.spec

index b54f8e0caa09adba3ec4470bfe1986d76e60fda2..43fa7f67a4d753506c0572beaa70e311b34b9c53 100644 (file)
@@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in
 index 37d9a62..553d4d0 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -3385,6 +3385,11 @@ if test ${multiarch+set}; then
+@@ -3632,6 +3632,11 @@ if test ${multiarch+set}; then
  fi
  
  archlibdir='${libdir}/${arch}'
index c21c858b88c54f25a8bbbf2987c78bf6ff71cb84..e82f17255ea153b656777495e0da4349e3f0d12f 100644 (file)
@@ -15,9 +15,9 @@ diff --git a/configure.in b/configure.in
 index 03a4152..0e371e2 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -4061,6 +4061,10 @@ AC_ARG_WITH(vendorarchdir,
+@@ -4264,6 +4264,10 @@ AC_ARG_WITH(vendorarchdir,
              [vendorarchdir=$withval],
-             [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
+             [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
  
 +AC_ARG_WITH(rubygemsdir,
 +           AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]),
@@ -26,14 +26,14 @@ index 03a4152..0e371e2 100644
  if test "${LOAD_RELATIVE+set}"; then
      AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
      RUBY_EXEC_PREFIX=''
-@@ -4084,6 +4088,7 @@ AC_SUBST(sitearchdir)dnl
+@@ -4288,6 +4292,7 @@ AC_SUBST(sitearchdir)dnl
  AC_SUBST(vendordir)dnl
  AC_SUBST(vendorlibdir)dnl
  AC_SUBST(vendorarchdir)dnl
 +AC_SUBST(rubygemsdir)dnl
  
+ AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl
  AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
 diff --git a/loadpath.c b/loadpath.c
 index 623dc9d..74c5d9e 100644
 --- a/loadpath.c
@@ -53,7 +53,7 @@ diff --git a/template/verconf.h.tmpl b/template/verconf.h.tmpl
 index 79c003e..34f2382 100644
 --- a/template/verconf.h.tmpl
 +++ b/template/verconf.h.tmpl
-@@ -34,6 +34,9 @@
+@@ -36,6 +36,9 @@
  % if C["RUBY_SEARCH_PATH"]
  #define RUBY_SEARCH_PATH              "${RUBY_SEARCH_PATH}"
  % end
@@ -67,7 +67,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
 index b47b6e1..0b99408 100755
 --- a/tool/rbinstall.rb
 +++ b/tool/rbinstall.rb
-@@ -317,6 +317,7 @@ sitelibdir = CONFIG["sitelibdir"]
+@@ -328,6 +328,7 @@ def CONFIG.[](name, mandatory = false)
  sitearchlibdir = CONFIG["sitearchdir"]
  vendorlibdir = CONFIG["vendorlibdir"]
  vendorarchlibdir = CONFIG["vendorarchdir"]
@@ -75,7 +75,7 @@ index b47b6e1..0b99408 100755
  mandir = CONFIG["mandir", true]
  docdir = CONFIG["docdir", true]
  configure_args = Shellwords.shellwords(CONFIG["configure_args"])
-@@ -505,7 +506,15 @@ end
+@@ -506,7 +507,15 @@ def CONFIG.[](name, mandatory = false)
  install?(:local, :comm, :lib) do
    prepare "library scripts", rubylibdir
    noinst = %w[README* *.txt *.rdoc *.gemspec]
index b401158df41bd7d2e635fc129ead4a3a1477ddbe..eb341075724e084838728c294f7a632e2cd6220d 100644 (file)
@@ -5,71 +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 17ed3ed..5843651 100644
+index db37cd6..ce8d149 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -3975,8 +3975,6 @@ AS_CASE(["$target_os"],
-     rubyw_install_name='$(RUBYW_INSTALL_NAME)'
-     ])
+@@ -4228,7 +4228,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,
-@@ -4006,6 +4004,7 @@ AC_ARG_WITH(ruby-version,
-             [ruby_version=full])
- unset RUBY_LIB_VERSION
- unset RUBY_LIB_VERSION_STYLE
-+ruby_version_suffix=/'${ruby_version}'
- AS_CASE(["$ruby_version"],
-   [full],  [RUBY_LIB_VERSION_STYLE='3 /* full */'],
-   [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */'])
-@@ -4022,30 +4021,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then
-     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])
-+    unset ruby_version_suffix
++    unset ruby_version_dir
 +    AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1)
- else
-     RUBY_LIB_VERSION="${ruby_version}"
  fi
- AC_SUBST(RUBY_LIB_VERSION_STYLE)
- AC_SUBST(RUBY_LIB_VERSION)
-+rubylibdir='${rubylibprefix}'${ruby_version_suffix}
-+rubyarchdir=${multiarch+'${rubyarchprefix}'${ruby_version_suffix}}${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_suffix}
- 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_suffix}}${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_suffix}
  
- AC_ARG_WITH(vendorarchdir,
-           AS_HELP_STRING([--with-vendorarchdir=DIR],
+ rubylibdir='${rubylibprefix}'${ruby_version_dir}
 diff --git a/loadpath.c b/loadpath.c
 index 9160031..0d4d953 100644
 --- a/loadpath.c
@@ -113,7 +67,7 @@ diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
 index 07076d4..35e6c3c 100755
 --- a/tool/mkconfig.rb
 +++ b/tool/mkconfig.rb
-@@ -123,7 +123,7 @@ File.foreach "config.status" do |line|
+@@ -122,7 +122,7 @@ def config.write(arg)
      val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
      case name
      when /^prefix$/
index 120ee37a232506906e747be4891b9e5ea9147252..ccbd97201808694ba6eca90a005b41ea06accc2a 100644 (file)
@@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb
 index 682eb46..e6b1445 100644
 --- a/lib/mkmf.rb
 +++ b/lib/mkmf.rb
-@@ -1829,7 +1829,7 @@ SRC
+@@ -1892,7 +1892,7 @@ def configuration(srcdir)
  SHELL = /bin/sh
  
  # V=0 quiet, V=1 verbose.  other values don't work.
index ed653fd0239bb95e7d0a94b1b56a47a73d077a4c..4b2903dbb29b7b5b7d667aa8f3230777c2dac77f 100644 (file)
@@ -13,12 +13,28 @@ module Gem
     end
     private :previous_but_one_dir_to
 
+    ##
+    # Detects --install-dir option specified on command line.
+
+    def opt_install_dir?
+      @opt_install_dir ||= ARGV.include?('--install-dir') || ARGV.include?('-i')
+    end
+    private :opt_install_dir?
+
+    ##
+    # Detects --build-root option specified on command line.
+
+    def opt_build_root?
+      @opt_build_root ||= ARGV.include?('--build-root')
+    end
+    private :opt_build_root?
+
     ##
     # Tries to detect, if arguments and environment variables suggest that
     # 'gem install' is executed from rpmbuild.
 
     def rpmbuild?
-      (ARGV.include?('--install-dir') || ARGV.include?('-i')) && ENV['RPM_PACKAGE_NAME']
+      @rpmbuild ||= ENV['RPM_PACKAGE_NAME'] && (opt_install_dir? || opt_build_root?)
     end
     private :rpmbuild?
 
@@ -80,7 +96,9 @@ module Gem
     # RubyGems default overrides.
 
     def default_dir
-      if Process.uid == 0
+      if opt_build_root?
+        Gem.default_dirs[:system][:gem_dir]
+      elsif Process.uid == 0
         Gem.default_dirs[:local][:gem_dir]
       else
         Gem.user_dir
@@ -93,7 +111,9 @@ module Gem
     end
 
     def default_bindir
-      if Process.uid == 0
+      if opt_build_root?
+        Gem.default_dirs[:system][:bin_dir]
+      elsif Process.uid == 0
         Gem.default_dirs[:local][:bin_dir]
       else
         File.join [Dir.home, 'bin']
index cdd016c3225b627321473648f4cd7b723559554c..96d72492e12594e96f9668bae4c0f6ef919cc640 100644 (file)
@@ -249,7 +249,7 @@ 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
-@@ -963,7 +963,8 @@ def test_self_use_paths
+@@ -962,7 +962,8 @@ def test_self_use_paths
  
    def test_self_user_dir
      parts = [@userhome, '.gem', Gem.ruby_engine]
@@ -259,7 +259,7 @@ index 0428bea..b6e090e 100644
  
      assert_equal File.join(parts), Gem.user_dir
    end
-@@ -1090,7 +1091,7 @@ def test_self_user_home_user_drive_and_path
+@@ -1089,7 +1090,7 @@ def test_self_user_home_user_drive_and_path
    def test_self_vendor_dir
      expected =
        File.join RbConfig::CONFIG['vendordir'], 'gems',
index d66c092cdfd303b8e994db4ce6630fc214b5b1f7..2f924dba762bbb0b6f37f5d73d83f914b3c96a97 100644 (file)
--- a/ruby.spec
+++ b/ruby.spec
@@ -521,7 +521,7 @@ preprocess() to extract telnet command sequences.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-#%patch5 -p1
+%patch5 -p1
 %patch6 -p1
 #%patch8 -p1
 %patch9 -p1
This page took 0.147479 seconds and 4 git commands to generate.