[前][次][番号順一覧][スレッド一覧]

ruby-changes:71659

From: Nobuyoshi <ko1@a...>
Date: Thu, 7 Apr 2022 09:47:26 +0900 (JST)
Subject: [ruby-changes:71659] d7afaf21f2 (master): Move the target directory of bundled gems like as rubygems

https://git.ruby-lang.org/ruby.git/commit/?id=d7afaf21f2

From d7afaf21f2edfac8a606891868a3c4a7025267bd Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 6 Apr 2022 20:28:00 +0900
Subject: Move the target directory of bundled gems like as rubygems

---
 ext/extmk.rb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ext/extmk.rb b/ext/extmk.rb
index 1da9e27045..a440af27fc 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -2,6 +2,9 @@ https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L2
 # -*- mode: ruby; coding: us-ascii -*-
 # frozen_string_literal: false
 
+module Gem; end # only needs Gem::Platform
+require 'rubygems/platform'
+
 # :stopdoc:
 $extension = nil
 $extstatic = nil
@@ -535,11 +538,12 @@ extend Module.new { https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L538
     super(*args) do |conf|
       conf.find do |s|
         s.sub!(/^(TARGET_SO_DIR *= *)\$\(RUBYARCHDIR\)/) {
-          "TARGET_GEM_DIR = $(extout)/gems/$(arch)/#{@gemname}\n"\
+          "TARGET_GEM_DIR = $(topdir)/.bundle/extensions/$(gem_platform)/$(ruby_version)/#{@gemname}\n"\
           "#{$1}$(TARGET_GEM_DIR)$(target_prefix)"
         }
       end
       conf.any? {|s| /^TARGET *= *\S/ =~ s} and conf << %{
+gem_platform = #{Gem::Platform.local}
 
 # default target
 all:
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]