mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Merge fiddle from github repository.
* ext/fiddle/extconf.rb: It supports to build libffi with standalone gem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8d3b2631ba
commit
d303a2c45a
1 changed files with 10 additions and 0 deletions
|
@ -18,6 +18,16 @@ if ! bundle
|
||||||
end and (have_library('ffi') || have_library('libffi'))
|
end and (have_library('ffi') || have_library('libffi'))
|
||||||
end or
|
end or
|
||||||
begin
|
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 &&
|
ver = bundle != false &&
|
||||||
Dir.glob("#{$srcdir}/libffi-*/")
|
Dir.glob("#{$srcdir}/libffi-*/")
|
||||||
.map {|n| File.basename(n)}
|
.map {|n| File.basename(n)}
|
||||||
|
|
Loading…
Reference in a new issue