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

ruby-changes:31846

From: nagai <ko1@a...>
Date: Sat, 30 Nov 2013 11:46:54 +0900 (JST)
Subject: [ruby-changes:31846] nagai:r43925 (trunk): * ext/tk/extconf.rb: show the reason of why ignore tclConfig.sh/tkConfig.sh.

nagai	2013-11-30 11:46:47 +0900 (Sat, 30 Nov 2013)

  New Revision: 43925

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

  Log:
    * ext/tk/extconf.rb: show the reason of why ignore tclConfig.sh/tkConfig.sh.

  Modified files:
    trunk/ext/tk/extconf.rb
Index: ext/tk/extconf.rb
===================================================================
--- ext/tk/extconf.rb	(revision 43924)
+++ ext/tk/extconf.rb	(revision 43925)
@@ -745,6 +745,7 @@ def search_tclConfig(*paths) # libdir li https://github.com/ruby/ruby/blob/trunk/ext/tk/extconf.rb#L745
   end
 
   conf = nil
+  progress_flag = false
 
   config_dir.uniq!
   config_dir.map{|dir|
@@ -755,7 +756,7 @@ def search_tclConfig(*paths) # libdir li https://github.com/ruby/ruby/blob/trunk/ext/tk/extconf.rb#L756
       dir.strip.chomp('/')
     end
   }.each{|dir|
-    print(".") # progress
+    print("."); progress_flag = true # progress
     # print("check #{dir} ==>");
     if dir.kind_of? Array
       tcldir, tkdir = dir
@@ -795,18 +796,34 @@ def search_tclConfig(*paths) # libdir li https://github.com/ruby/ruby/blob/trunk/ext/tk/extconf.rb#L796
       # parse tclConfig.sh/tkConfig.sh
       tclconf = (tclpath)? parse_tclConfig(tclpath): nil
       if tclconf
-        next if tclver && ((tclver_major && tclver_major != tclconf['TCL_MAJOR_VERSION']) || (tclver_minor && tclver_minor != tclconf['TCL_MINOR_VERSION']))
-        next if TkLib_Config['unsupported_versions'].find{|ver|
-          ver == "#{tclconf['TCL_MAJOR_VERSION']}.#{tclconf['TCL_MINOR_VERSION']}"
-        }
+        if tclver && ((tclver_major && tclver_major != tclconf['TCL_MAJOR_VERSION']) || (tclver_minor && tclver_minor != tclconf['TCL_MINOR_VERSION']))
+          print("\n") if progress_flag
+          puts "Ignore \"#{tclpath}\" (unmatch with configured version)."
+          progress_flag = false
+          next
+        end
+        if TkLib_Config['unsupported_versions'].find{|ver| ver == "#{tclconf['TCL_MAJOR_VERSION']}.#{tclconf['TCL_MINOR_VERSION']}"}
+          print("\n") if progress_flag
+          puts "Ignore \"#{tclpath}\" (unsupported version of Tcl/Tk)."
+          progress_flag = false
+          next
+        end
       end
 
       tkconf = (tkpath)? parse_tclConfig(tkpath): nil
       if tkconf
-        next if tkver && ((tkver_major && tkver_major != tkconf['TK_MAJOR_VERSION']) || (tkver_minor && tkver_minor != tkconf['TK_MINOR_VERSION']))
-        next if TkLib_Config['unsupported_versions'].find{|ver|
-          ver == "#{tkconf['TK_MAJOR_VERSION']}.#{tkconf['TK_MINOR_VERSION']}"
-        }
+        if tkver && ((tkver_major && tkver_major != tkconf['TK_MAJOR_VERSION']) || (tkver_minor && tkver_minor != tkconf['TK_MINOR_VERSION']))
+          print("\n") if progress_flag
+          puts "Ignore \"#{tkpath}\" (unmatch with configured version)."
+          progress_flag = false
+          next
+        end
+        if TkLib_Config['unsupported_versions'].find{|ver| ver == "#{tkconf['TK_MAJOR_VERSION']}.#{tkconf['TK_MINOR_VERSION']}"}
+          print("\n") if progress_flag
+          puts "Ignore \"#{tkpath}\" (unsupported version of Tcl/Tk)."
+          progress_flag = false
+          next
+        end
       end
 
       # nativethread check

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

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