[103424] trunk/dports/lang/ruby

kimuraw at macports.org kimuraw at macports.org
Mon Feb 25 07:41:00 PST 2013


Revision: 103424
          https://trac.macports.org/changeset/103424
Author:   kimuraw at macports.org
Date:     2013-02-25 07:41:00 -0800 (Mon, 25 Feb 2013)
Log Message:
-----------
lang/ruby: fixed +tk linking Tk.framework not libtk.

Modified Paths:
--------------
    trunk/dports/lang/ruby/Portfile

Added Paths:
-----------
    trunk/dports/lang/ruby/files/patch-ext-tk-extconf.rb.diff

Modified: trunk/dports/lang/ruby/Portfile
===================================================================
--- trunk/dports/lang/ruby/Portfile	2013-02-25 14:46:30 UTC (rev 103423)
+++ trunk/dports/lang/ruby/Portfile	2013-02-25 15:41:00 UTC (rev 103424)
@@ -6,7 +6,7 @@
 
 name			ruby
 version			1.8.7-p371
-revision		0
+revision		1
 
 categories		lang ruby
 maintainers		kimuraw
@@ -50,6 +50,7 @@
 # --- clang support ----
 # numeric.c: fix wrong optimizaton of Numeric/Bignum build with clang.
 # configure: correct frame_address and stack_direction for +universal with clang.
+# ext-tk-extconf.rb: use linker option "-rpath," not "-R".
 patchfiles		patch-vendordir.diff \
 				patch-bug3604.diff \
 				patch-bug19050.diff \
@@ -57,7 +58,8 @@
 				patch-c99.diff \
 				patch-lib-drb-ssl.rb.diff \
 				patch-numeric.c.diff \
-				patch-configure.diff
+				patch-configure.diff \
+				patch-ext-tk-extconf.rb.diff
 
 # ignore getcontext() and setcontext()
 # on 10.5 or later, these functions have some problems (SEGV on ppc, slower than 1.8.6)
@@ -157,7 +159,7 @@
 
 variant tk conflicts mactk description "enable tk support" {
 	configure.args-delete	--without-tk
-	configure.args-append	--with-tk
+	configure.args-append	--with-tk --disable-tcltk-framework
 	depends_lib-append		port:tcl port:tk
 }
 

Added: trunk/dports/lang/ruby/files/patch-ext-tk-extconf.rb.diff
===================================================================
--- trunk/dports/lang/ruby/files/patch-ext-tk-extconf.rb.diff	                        (rev 0)
+++ trunk/dports/lang/ruby/files/patch-ext-tk-extconf.rb.diff	2013-02-25 15:41:00 UTC (rev 103424)
@@ -0,0 +1,56 @@
+--- ext/tk/extconf.rb.orig	2011-06-30 12:53:30.000000000 +0900
++++ ext/tk/extconf.rb	2013-02-26 00:25:13.000000000 +0900
+@@ -612,7 +612,7 @@
+           $INCFLAGS << " -I" << File.join(File.dirname(File.dirname(file)),"include") if is_win32?
+         else
+           tcllibs = append_library($libs, libname)
+-          tcllibs = "-L#{tcldir.quote} -Wl,-R#{tcldir.quote} " + tcllibs
++          tcllibs = "-L#{tcldir.quote} -Wl,-rpath,#{tcldir.quote} " + tcllibs
+ 
+           # FIX ME: avoid pathname trouble (fail to find) on MinGW.
+           $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32?
+@@ -654,7 +654,7 @@
+         else
+           tklibs = append_library("", libname)
+           #tklibs = append_library("", $1)
+-          tklibs = "-L#{tkdir.quote} -Wl,-R#{tkdir.quote} " + tklibs
++          tklibs = "-L#{tkdir.quote} -Wl,-rpath,#{tkdir.quote} " + tklibs
+ 
+           # FIX ME: avoid pathname trouble (fail to find) on MinGW.
+           $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32?
+@@ -1123,7 +1123,7 @@
+                   tcllibs = libs_param + " -DSTATIC_BUILD " + fname.quote
+                 else
+                   tcllibs = append_library($libs, lib_w_sufx)
+-                  tcllibs = "-L#{path.quote} -Wl,-R#{path.quote} " + tcllibs
++                  tcllibs = "-L#{path.quote} -Wl,-rpath,#{path.quote} " + tcllibs
+                 end
+                 if try_func(func, tcllibs, ["tcl.h"])
+                   return [true, path, nil, tcllibs, *inc]
+@@ -1262,7 +1262,7 @@
+                   tklibs = libs_param + " -DSTATIC_BUILD " + fname.quote
+                 else
+                   tklibs = append_library($libs, lib_w_sufx)
+-                  tklibs = "-L#{path.quote} -Wl,-R#{path.quote} " + tklibs
++                  tklibs = "-L#{path.quote} -Wl,-rpath,#{path.quote} " + tklibs
+                 end
+                 if try_func(func, tklibs, ["tcl.h", "tk.h"])
+                   return [true, path, nil, tklibs, *inc]
+@@ -1945,7 +1945,7 @@
+ # MacOS X Frameworks?
+ if TkLib_Config["tcltk-framework"]
+   puts("Use MacOS X Frameworks.")
+-  ($LDFLAGS ||= "") << " -L#{TkLib_Config["tcl-build-dir"].quote} -Wl,-R#{TkLib_Config["tcl-build-dir"].quote}" if TkLib_Config["tcl-build-dir"]
++  ($LDFLAGS ||= "") << " -L#{TkLib_Config["tcl-build-dir"].quote} -Wl,-rpath,#{TkLib_Config["tcl-build-dir"].quote}" if TkLib_Config["tcl-build-dir"]
+ 
+   if tcl_cfg_dir
+     TclConfig_Info['TCL_LIBS'] ||= ""
+@@ -1970,7 +1970,7 @@
+     end
+   end
+ 
+-  $LDFLAGS  << " -L#{TkLib_Config["tk-build-dir"].quote} -Wl,-R#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"]
++  $LDFLAGS  << " -L#{TkLib_Config["tk-build-dir"].quote} -Wl,-rpath,#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"]
+ 
+   if tk_cfg_dir
+     TkConfig_Info['TK_LIBS'] ||= ""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130225/052f3e1b/attachment.html>


More information about the macports-changes mailing list