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

ruby-changes:15727

From: nobu <ko1@a...>
Date: Fri, 7 May 2010 09:17:39 +0900 (JST)
Subject: [ruby-changes:15727] Ruby:r27652 (ruby_1_8, trunk): * ext/tk/extconf.rb (get_tclConfig_dirs): glob with EXEEXT.

nobu	2010-05-07 09:16:19 +0900 (Fri, 07 May 2010)

  New Revision: 27652

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27652

  Log:
    * ext/tk/extconf.rb (get_tclConfig_dirs): glob with EXEEXT.
    
    * ext/tk/extconf.rb (search_tclConfig): fixed typo.

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/ext/tk/extconf.rb
    trunk/ChangeLog
    trunk/ext/tk/extconf.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27651)
+++ ChangeLog	(revision 27652)
@@ -1,3 +1,9 @@
+Fri May  7 09:16:16 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@a...>
 
 	* ext/tk/extconf.rb: search directories on PATH, only if containing
Index: ext/tk/extconf.rb
===================================================================
--- ext/tk/extconf.rb	(revision 27651)
+++ ext/tk/extconf.rb	(revision 27652)
@@ -396,9 +396,10 @@
     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 @@
       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 @@
   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 @@
 
       # 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 @@
       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
Index: ruby_1_8/ext/tk/extconf.rb
===================================================================
--- ruby_1_8/ext/tk/extconf.rb	(revision 27651)
+++ ruby_1_8/ext/tk/extconf.rb	(revision 27652)
@@ -396,9 +396,10 @@
     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 @@
       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 @@
   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 @@
 
       # 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 @@
       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
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 27651)
+++ ruby_1_8/ChangeLog	(revision 27652)
@@ -1,3 +1,9 @@
+Fri May  7 09:16:16 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@a...>
 
 	* ext/tk/extconf.rb: search directories on PATH, only if containing

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

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