Latest ruby 1.8.5_1

Luc Heinrich luc at honk-honk.com
Mon Nov 6 16:01:40 PST 2006


On 6 nov. 06, at 23:02, Paul Guyot wrote:

> The problem is that ruby uses tk and tcl during compilation. I  
> don't know what exactly.

The 'tk' extension, located in the 'ext/tk' folder of the ruby source  
tree, most likely.

> I don't know how to turn it into a variant in such a way that  
> without this variant, ruby doesn't touch tk & tcl if they're  
> available.

Patch 'ext/tk/extconf.rb' [1] so it doesn't run unless an environment  
variable is set, which would be done in the variant [2].

[1] patch-ext-tk-extconf.rb

--- extconf.rb.old      2006-11-07 00:44:19.000000000 +0100
+++ extconf.rb  2006-11-07 00:50:13.000000000 +0100
@@ -1,4 +1,5 @@
# extconf.rb for tcltklib
+exit unless ENV.has_key? "WITH_MACPORTS_TK"
require 'mkmf'

[2] Portfile.patch

--- Portfile.old        2006-11-07 00:58:22.000000000 +0100
+++ Portfile    2006-11-07 00:58:53.000000000 +0100
@@ -42,6 +42,7 @@
                                 patch-mkconfig.rb \
                                 patch-mkmf.rb \
                                 patch-ruby.c \
+                               patch-ext-tk-extconf.rb \
                                 ruby-1.8.5-cgi-dos-1.patch
patch_sites            http://ftp.ruby-lang.org/pub/ruby/1.8/
@@ -75,3 +76,6 @@
         destroot.env    DYLD_LIBRARY_PATH=${destroot}${prefix}/lib
}
+variant tk {
+    build.env   WITH_MACPORTS_TK="yes"
+}

Or something along those lines... ;)

-- 
Luc Heinrich - luc at honk-honk.com - http://www.honk-honk.com





More information about the macports-users mailing list