mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/tk/extconf.rb (get_tclConfig_dirs): glob with EXEEXT.
* ext/tk/extconf.rb (search_tclConfig): fixed typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cc9333b840
commit
69310faab2
2 changed files with 14 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
Fri May 7 09:16:16 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/tk/extconf.rb (get_tclConfig_dirs): glob with EXEEXT.
|
||||
|
||||
* ext/tk/extconf.rb (search_tclConfig): fixed typo.
|
||||
|
||||
Fri May 7 06:45:28 2010 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tk/extconf.rb: search directories on PATH, only if containing
|
||||
|
|
|
@ -396,9 +396,10 @@ def get_tclConfig_dirs
|
|||
dirs.collect{|d| Dir.glob(d, File::FNM_CASEFOLD)}.flatten!
|
||||
dirs |= dirs
|
||||
|
||||
exeext = RbConfig::CONFIG['EXEEXT']
|
||||
ENV['PATH'].split(File::PATH_SEPARATOR).each{|dir|
|
||||
dir.tr!(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
|
||||
next if Dir.glob(File.join(dir, '{tclsh,wish}*'), File::FNM_CASEFOLD).empty?
|
||||
next if Dir.glob(File.join(dir, "{tclsh,wish}*#{exeext}"), File::FNM_CASEFOLD).empty?
|
||||
dirs << File.expand_path(File.join(dir, '..', 'lib'))
|
||||
dirs << dir
|
||||
# dirs << File.expand_path(File.join(dir, '..'))
|
||||
|
@ -439,9 +440,10 @@ def get_tclConfig_dirs
|
|||
Dir.glob(dir + '/{tcltk,tcl,tk}', File::FNM_CASEFOLD)
|
||||
}.flatten!
|
||||
|
||||
exeext = RbConfig::CONFIG['EXEEXT']
|
||||
ENV['PATH'].split(File::PATH_SEPARATOR).each{|dir|
|
||||
dir.tr!(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
|
||||
next if Dir.glob(File.join(dir, '{tclsh,wish}*'), File::FNM_CASEFOLD).empty?
|
||||
next if Dir.glob(File.join(dir, "{tclsh,wish}*#{exeext}"), File::FNM_CASEFOLD).empty?
|
||||
config_dir << File.expand_path(File.join(dir, '..', 'lib'))
|
||||
}
|
||||
|
||||
|
@ -489,7 +491,8 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file]
|
|||
tclver, tkver = TkLib_Config['tcltkversion']
|
||||
conf = nil
|
||||
|
||||
(config_dir | config_dir).map{|dir|
|
||||
config_dir.uniq!
|
||||
config_dir.map{|dir|
|
||||
if dir.kind_of? Array
|
||||
[dir[0].strip.chomp('/'), dir[1].strip.chomp('/')]
|
||||
else
|
||||
|
@ -529,7 +532,7 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file]
|
|||
|
||||
# nativethread check
|
||||
if !TkLib_Config["ruby_with_thread"] && tclconf['TCL_THREADS'] == '1'
|
||||
puts "WARNIG: find #{tclpath.inspect}, but it WITH nativethread-support under ruby WITHOUT nativethread-support. So, ignore it."
|
||||
puts "WARNING: found #{tclpath.inspect}, but it WITH nativethread-support under ruby WITHOUT nativethread-support. So, ignore it."
|
||||
TkLib_Config["tcltk-NG-path"] << File.dirname(tclpath)
|
||||
next
|
||||
end
|
||||
|
@ -574,7 +577,7 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file]
|
|||
end
|
||||
|
||||
unless tcllib_ok && tklib_ok
|
||||
puts "WARNIG: find #{tclpath.inspect}, but cannot find valid Tcl/Tk libraries on the same directory. So, ignore it."
|
||||
puts "WARNING: found #{tclpath.inspect}, but cannot find valid Tcl/Tk libraries on the same directory. So, ignore it."
|
||||
TkLib_Config["tcltk-NG-path"] << File.dirname(tclpath)
|
||||
next
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue