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

ruby-changes:52996

From: hsbt <ko1@a...>
Date: Sat, 20 Oct 2018 16:27:23 +0900 (JST)
Subject: [ruby-changes:52996] hsbt:r65210 (trunk): Merge fiddle from github repository.

hsbt	2018-10-20 16:27:18 +0900 (Sat, 20 Oct 2018)

  New Revision: 65210

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65210

  Log:
    Merge fiddle from github repository.
    
      * ext/fiddle/extconf.rb: It supports to build libffi with standalone gem.

  Modified files:
    trunk/ext/fiddle/extconf.rb
Index: ext/fiddle/extconf.rb
===================================================================
--- ext/fiddle/extconf.rb	(revision 65209)
+++ ext/fiddle/extconf.rb	(revision 65210)
@@ -18,6 +18,16 @@ if ! bundle https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L18
   end and (have_library('ffi') || have_library('libffi'))
 end or
 begin
+  # for https://github.com/ruby/fiddle
+  if bundle && File.exit?("../../bin/extlibs.rb")
+    require "fileutils"
+    require_relative "../../bin/extlibs"
+    extlibs = ExtLibs.new
+    cache_dir = File.expand_path("../../tmp/.download_cache", $srcdir)
+    ext_dir = File.expand_path("../../ext", $srcdir)
+    Dir.glob("#{$srcdir}/libffi-*/").each{|dir| FileUtils.rm_rf(dir)}
+    extlibs.run(["--cache=#{cache_dir}", ext_dir])
+  end
   ver = bundle != false &&
         Dir.glob("#{$srcdir}/libffi-*/")
         .map {|n| File.basename(n)}

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

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