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