* 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
@ -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>
|
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
|
* 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.collect{|d| Dir.glob(d, File::FNM_CASEFOLD)}.flatten!
|
||||||
dirs |= dirs
|
dirs |= dirs
|
||||||
|
|
||||||
|
exeext = RbConfig::CONFIG['EXEEXT']
|
||||||
ENV['PATH'].split(File::PATH_SEPARATOR).each{|dir|
|
ENV['PATH'].split(File::PATH_SEPARATOR).each{|dir|
|
||||||
dir.tr!(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
|
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 << File.expand_path(File.join(dir, '..', 'lib'))
|
||||||
dirs << dir
|
dirs << dir
|
||||||
# dirs << File.expand_path(File.join(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)
|
Dir.glob(dir + '/{tcltk,tcl,tk}', File::FNM_CASEFOLD)
|
||||||
}.flatten!
|
}.flatten!
|
||||||
|
|
||||||
|
exeext = RbConfig::CONFIG['EXEEXT']
|
||||||
ENV['PATH'].split(File::PATH_SEPARATOR).each{|dir|
|
ENV['PATH'].split(File::PATH_SEPARATOR).each{|dir|
|
||||||
dir.tr!(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
|
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'))
|
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']
|
tclver, tkver = TkLib_Config['tcltkversion']
|
||||||
conf = nil
|
conf = nil
|
||||||
|
|
||||||
(config_dir | config_dir).map{|dir|
|
config_dir.uniq!
|
||||||
|
config_dir.map{|dir|
|
||||||
if dir.kind_of? Array
|
if dir.kind_of? Array
|
||||||
[dir[0].strip.chomp('/'), dir[1].strip.chomp('/')]
|
[dir[0].strip.chomp('/'), dir[1].strip.chomp('/')]
|
||||||
else
|
else
|
||||||
@ -529,7 +532,7 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file]
|
|||||||
|
|
||||||
# nativethread check
|
# nativethread check
|
||||||
if !TkLib_Config["ruby_with_thread"] && tclconf['TCL_THREADS'] == '1'
|
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)
|
TkLib_Config["tcltk-NG-path"] << File.dirname(tclpath)
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
@ -574,7 +577,7 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file]
|
|||||||
end
|
end
|
||||||
|
|
||||||
unless tcllib_ok && tklib_ok
|
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)
|
TkLib_Config["tcltk-NG-path"] << File.dirname(tclpath)
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user