090be3
From 399ef04d6540bf708e5281d8e649165f03e61e1e Mon Sep 17 00:00:00 2001
090be3
From: Josef Stribny <jstribny@redhat.com>
090be3
Date: Thu, 9 Jan 2014 14:50:36 +0100
090be3
Subject: [PATCH] Fix tk extconf to pass arrays instead of strings to
090be3
 libpathflag
090be3
090be3
---
090be3
 ext/tk/extconf.rb | 12 ++++++------
090be3
 1 file changed, 6 insertions(+), 6 deletions(-)
090be3
090be3
diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb
090be3
index ca99129..5b7c19b 100644
090be3
--- a/ext/tk/extconf.rb
090be3
+++ b/ext/tk/extconf.rb
090be3
@@ -623,7 +623,7 @@ def libcheck_for_tclConfig(tcldir, tkdir, tclconf, tkconf)
090be3
           $INCFLAGS << " -I" << File.join(File.dirname(File.dirname(file)),"include") if is_win32?
090be3
         else
090be3
           tcllibs = append_library($libs, libname)
090be3
-          tcllibs = "#{libpathflag(tcldir)} #{tcllibs}"
090be3
+          tcllibs = "#{libpathflag([tcldir])} #{tcllibs}"
090be3
 
090be3
           # FIX ME: avoid pathname trouble (fail to find) on MinGW.
090be3
           $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32?
090be3
@@ -665,7 +665,7 @@ def libcheck_for_tclConfig(tcldir, tkdir, tclconf, tkconf)
090be3
         else
090be3
           tklibs = append_library("", libname)
090be3
           #tklibs = append_library("", $1)
090be3
-          tklibs = "#{libpathflag(tkdir)} #{tklibs}"
090be3
+          tklibs = "#{libpathflag([tkdir])} #{tklibs}"
090be3
 
090be3
           # FIX ME: avoid pathname trouble (fail to find) on MinGW.
090be3
           $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32?
090be3
@@ -1161,7 +1161,7 @@ def find_tcl(tcllib, stubs, version, *opt_paths)
090be3
                   tcllibs = libs_param + " -DSTATIC_BUILD " + fname.quote
090be3
                 else
090be3
                   tcllibs = append_library($libs, lib_w_sufx)
090be3
-                  tcllibs = "#{libpathflag(path)} #{tcllibs}"
090be3
+                  tcllibs = "#{libpathflag([path])} #{tcllibs}"
090be3
                 end
090be3
                 if try_func(func, tcllibs, ["tcl.h"])
090be3
                   return [true, path, nil, tcllibs, *inc]
090be3
@@ -1300,7 +1300,7 @@ def find_tk(tklib, stubs, version, *opt_paths)
090be3
                   tklibs = libs_param + " -DSTATIC_BUILD " + fname.quote
090be3
                 else
090be3
                   tklibs = append_library($libs, lib_w_sufx)
090be3
-                  tklibs = "#{libpathflag(path)} #{tklibs}"
090be3
+                  tklibs = "#{libpathflag([path])} #{tklibs}"
090be3
                 end
090be3
                 if try_func(func, tklibs, ["tcl.h", "tk.h"])
090be3
                   return [true, path, nil, tklibs, *inc]
090be3
@@ -2013,7 +2013,7 @@ $defs += collect_tcltk_defs(TclConfig_Info['TCL_DEFS'], TkConfig_Info['TK_DEFS']
090be3
 # MacOS X Frameworks?
090be3
 if TkLib_Config["tcltk-framework"]
090be3
   puts("Use MacOS X Frameworks.")
090be3
-  ($LDFLAGS ||= "") << " " << libpathflag(TkLib_Config["tcl-build-dir"]) if TkLib_Config["tcl-build-dir"]
090be3
+  ($LDFLAGS ||= "") << " " << libpathflag([TkLib_Config["tcl-build-dir"]]) if TkLib_Config["tcl-build-dir"]
090be3
 
090be3
   libs = ''
090be3
   if tcl_cfg_dir
090be3
@@ -2039,7 +2039,7 @@ if TkLib_Config["tcltk-framework"]
090be3
     end
090be3
   end
090be3
 
090be3
-  libs << " " << libpathflag(TkLib_Config["tk-build-dir"]) if TkLib_Config["tk-build-dir"]
090be3
+  libs << " " << libpathflag([TkLib_Config["tk-build-dir"]]) if TkLib_Config["tk-build-dir"]
090be3
 
090be3
   if tk_cfg_dir
090be3
     TkConfig_Info['TK_LIBS'] ||= ""
090be3
-- 
090be3
1.8.3.1
090be3