Skip to content

Commit

Permalink
lang/ruby31: Update to 3.1.3
Browse files Browse the repository at this point in the history
ReleaseNotes:	https://www.ruby-lang.org/en/news/2022/11/24/ruby-3-1-3-released/
PR:		267979
Approved by:	meta (ruby@)
MFH:		2022Q4
Security:	84ab03b6-6c20-11ed-b519-080027f5fec9
  • Loading branch information
Yasuhiro Kimura authored and Yasuhiro Kimura committed Dec 9, 2022
1 parent 6db5d78 commit 9f81108
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 67 deletions.
4 changes: 2 additions & 2 deletions Mk/bsd.ruby.mk
Expand Up @@ -147,8 +147,8 @@ RUBY_PORTEPOCH= 1
#
# Ruby 3.1
#
RUBY_DISTVERSION= 3.1.2
RUBY_PORTREVISION= 2
RUBY_DISTVERSION= 3.1.3
RUBY_PORTREVISION= 0
RUBY_PORTEPOCH= 1

. elif ${RUBY_VER} == 3.2
Expand Down
6 changes: 3 additions & 3 deletions lang/ruby31/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1649833463
SHA256 (ruby/ruby-3.1.2.tar.xz) = ca10d017f8a1b6d247556622c841fc56b90c03b1803f87198da1e4fd3ec3bf2a
SIZE (ruby/ruby-3.1.2.tar.xz) = 15101588
TIMESTAMP = 1669322575
SHA256 (ruby/ruby-3.1.3.tar.xz) = 4ee161939826bcdfdafa757cf8e293a7f14e357f62be7144f040335cc8c7371a
SIZE (ruby/ruby-3.1.3.tar.xz) = 15300224
64 changes: 23 additions & 41 deletions lang/ruby31/files/patch-tool_rbinstall.rb
@@ -1,6 +1,6 @@
--- tool/rbinstall.rb.orig 2021-12-25 12:23:14 UTC
--- tool/rbinstall.rb.orig 2022-11-24 10:20:31 UTC
+++ tool/rbinstall.rb
@@ -923,188 +923,6 @@ end
@@ -930,170 +930,6 @@ end

# :startdoc:

Expand All @@ -11,13 +11,12 @@
- install_default_gem('ext', srcdir, bindir)
-end
-
-def load_gemspec(file, expanded = false)
-def load_gemspec(file, base = nil)
- file = File.realpath(file)
- code = File.read(file, encoding: "utf-8:-")
- code.gsub!(/(?:`git[^\`]*`|%x\[git[^\]]*\])\.split\([^\)]*\)/m) do
- files = []
- if expanded
- base = File.dirname(file)
- if base
- Dir.glob("**/*", File::FNM_DOTMATCH, base: base) do |n|
- case File.basename(n); when ".", ".."; next; end
- next if File.directory?(File.join(base, n))
Expand All @@ -30,7 +29,7 @@
- unless Gem::Specification === spec
- raise TypeError, "[#{file}] isn't a Gem::Specification (#{spec.class} instead)."
- end
- spec.loaded_from = file
- spec.loaded_from = base ? File.join(base, File.basename(file)) : file
- spec.files.reject! {|n| n.end_with?(".gemspec") or n.start_with?(".git")}
-
- spec
Expand Down Expand Up @@ -85,20 +84,6 @@
-end
-
-install?(:ext, :comm, :gem, :'bundled-gems') do
- if CONFIG['CROSS_COMPILING'] == 'yes'
- # The following hacky steps set "$ruby = BASERUBY" in tool/fake.rb
- $hdrdir = ''
- $extmk = nil
- $ruby = nil # ...
- ruby_path = $ruby + " -I#{Dir.pwd}" # $baseruby + " -I#{Dir.pwd}"
- else
- # ruby_path = File.expand_path(with_destdir(File.join(bindir, ruby_install_name)))
- ENV['RUBYLIB'] = nil
- ENV['RUBYOPT'] = nil
- ruby_path = File.expand_path(with_destdir(File.join(bindir, ruby_install_name))) + " --disable=gems -I#{with_destdir(archlibdir)}"
- end
- Gem.instance_variable_set(:@ruby, ruby_path) if Gem.ruby != ruby_path
-
- gem_dir = Gem.default_dir
- install_dir = with_destdir(gem_dir)
- prepare "bundled gems", gem_dir
Expand All @@ -118,40 +103,38 @@
- :wrappers => true,
- :format_executable => true,
- }
- gem_ext_dir = "#$extout/gems/#{CONFIG['arch']}"
- extensions_dir = with_destdir(Gem::StubSpecification.gemspec_stub("", gem_dir, gem_dir).extensions_dir)
-
- extensions_dir = Gem::StubSpecification.gemspec_stub("", gem_dir, gem_dir).extensions_dir
- specifications_dir = File.join(gem_dir, "specifications")
- build_dir = Gem::StubSpecification.gemspec_stub("", ".bundle", ".bundle").extensions_dir
-
- # We are about to build extensions, and want to configure extensions with the
- # newly installed ruby.
- Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, ruby_install_name)))
- # Prevent fake.rb propagation. It conflicts with the natural mkmf configs of
- # the newly installed ruby.
- ENV.delete('RUBYOPT')
-
- File.foreach("#{srcdir}/gems/bundled_gems") do |name|
- next if /^\s*(?:#|$)/ =~ name
- next unless /^(\S+)\s+(\S+).*/ =~ name
- gem_name = "#$1-#$2"
- path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
- if File.exist?(path)
- spec = load_gemspec(path)
- else
- path = "#{srcdir}/.bundle/gems/#{gem_name}/#$1.gemspec"
- path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
- unless File.exist?(path)
- path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
- next unless File.exist?(path)
- spec = load_gemspec(path, true)
- end
- spec = load_gemspec(path, "#{srcdir}/.bundle/gems/#{gem_name}")
- next unless spec.platform == Gem::Platform::RUBY
- next unless spec.full_name == gem_name
- if !spec.extensions.empty? && CONFIG["EXTSTATIC"] == "static"
- puts "skip installation of #{spec.name} #{spec.version}; bundled gem with an extension library is not supported on --with-static-linked-ext"
- next
- end
- spec.extension_dir = "#{extensions_dir}/#{spec.full_name}"
- if File.directory?(ext = "#{gem_ext_dir}/#{spec.full_name}")
- spec.extensions[0] ||= "-"
- end
- package = RbInstall::DirPackage.new spec
- ins = RbInstall::UnpackedInstaller.new(package, options)
- puts "#{INDENT}#{spec.name} #{spec.version}"
- ins.install
- unless $dryrun
- File.chmod($data_mode, File.join(install_dir, "specifications", "#{spec.full_name}.gemspec"))
- end
- unless spec.extensions.empty?
- install_recursive(ext, spec.extension_dir)
- install_recursive("#{build_dir}/#{gem_name}", "#{extensions_dir}/#{gem_name}") do |src, dest|
- # puts "#{INDENT} #{dest[extensions_dir.size+gem_name.size+2..-1]}"
- install src, dest, :mode => (File.executable?(src) ? $prog_mode : $data_mode)
- end
- installed_gems[spec.full_name] = true
- end
Expand All @@ -162,7 +145,6 @@
- end
- next if gems.empty?
- if defined?(Zlib)
- Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, ruby_install_name)))
- silent = Gem::SilentUI.new
- gems.each do |gem|
- package = Gem::Package.new(gem)
Expand Down

0 comments on commit 9f81108

Please sign in to comment.