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

ruby-changes:61387

From: Nobuyoshi <ko1@a...>
Date: Wed, 27 May 2020 00:31:45 +0900 (JST)
Subject: [ruby-changes:61387] 135c6a4b99 (master): fiddle: need to update configure after updating config tools

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

From 135c6a4b995f5858687942a2b60a26f007695b78 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 27 May 2020 00:30:18 +0900
Subject: fiddle: need to update configure after updating config tools


diff --git a/ext/fiddle/extlibs b/ext/fiddle/extlibs
index 85490ea..d2a2ed3 100644
--- a/ext/fiddle/extlibs
+++ b/ext/fiddle/extlibs
@@ -10,3 +10,5 @@ https://ftp.osuosl.org/pub/blfs/conglomeration/libffi/$(pkg).tar.gz \ https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extlibs#L10
 
 $(pkg)/config.guess -> /tool/config.guess
 $(pkg)/config.sub -> /tool/config.sub
+
+! chdir: $(pkg)| autoconf
diff --git a/tool/extlibs.rb b/tool/extlibs.rb
index 720f1c7..8a9c5a8 100755
--- a/tool/extlibs.rb
+++ b/tool/extlibs.rb
@@ -125,6 +125,15 @@ class ExtLibs https://github.com/ruby/ruby/blob/trunk/tool/extlibs.rb#L125
     end
   end
 
+  def do_exec(command, dir, dest)
+    dir = dir ? File.join(dest, dir) : dest
+    if $VERBOSE
+      $stdout.puts "running #{command.dump} under #{dir}"
+      $stdout.flush
+    end
+    system(command, chdir: dir) or raise "failed #{command.dump}"
+  end
+
   def do_command(mode, dest, url, cache_dir, chksums)
     extracted = false
     base = /.*(?=\.tar(?:\.\w+)?\z)/
@@ -206,6 +215,13 @@ class ExtLibs https://github.com/ruby/ruby/blob/trunk/tool/extlibs.rb#L215
               do_patch(dest, patch, args)
             end
             next
+          elsif /^!\s*(?:chdir:\s*([^|\s]+)\|\s*)?(.*)/ =~ line
+            if extracted and (mode == :all or mode == :patch)
+              command = vars.expand($2.strip)
+              chdir = $1 and chdir = vars.expand(chdir)
+              do_exec(command, chdir, dest)
+            end
+            next
           elsif /->/ =~ line
             if extracted and (mode == :all or mode == :patch)
               link, file = $`.strip, $'.strip
-- 
cgit v0.10.2


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

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