Match --with/--without
options against gem names
The simple names in `default_exclude_exts` do not match extension paths under gems. Extract each gem name from the gemspec file at the top level of each gem directory. For example, if `ext` is `syslog-0.1.2/ext/syslog/`, find out `syslog-0.1.2/syslog.gemspec` and take the base name `syslog` without the suffix `.gemspec`.
This commit is contained in:
parent
235aa7ad63
commit
af88ca4c07
@ -517,6 +517,12 @@ cond = proc {|ext, *|
|
|||||||
incl, excl = Dir.glob("#{e}/**/extconf.rb", base: "#$top_srcdir/#{ext_prefix}").collect {|d|
|
incl, excl = Dir.glob("#{e}/**/extconf.rb", base: "#$top_srcdir/#{ext_prefix}").collect {|d|
|
||||||
File.dirname(d)
|
File.dirname(d)
|
||||||
}.partition {|ext|
|
}.partition {|ext|
|
||||||
|
if @gemname
|
||||||
|
ext = ext[%r[\A[^/]+]] # extract gem name
|
||||||
|
Dir.glob("*.gemspec", base: "#$top_srcdir/#{ext_prefix}/#{ext}") do |g|
|
||||||
|
break ext = g if ext.start_with?("#{g.chomp!(".gemspec")}-")
|
||||||
|
end
|
||||||
|
end
|
||||||
with_config(ext, &cond)
|
with_config(ext, &cond)
|
||||||
}
|
}
|
||||||
incl.sort!
|
incl.sort!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user