--pgp-sign-Multipart_Wed_Jul__9_10:31:06_2008-1
Content-Type: text/plain; charset=ISO-2022-JP

At Wed, 9 Jul 2008 10:14:07 +0900,
I wrote:
>  ruby 1.8 の tk ライブラリが OS X 上でビルドできない件です。
>
>  OS X の gcc には仕掛けがあり、 ruby 1.9 が入っていなくても
> #include <ruby/ruby.h> は
>
> 	/System/Library/Frameworks/Ruby.framework/Headers/ruby.h
>
> を拾ってしまいます。(framework名/Headers以下のパス)
>
>  以下の修正で直ります。コミットしてよいでしょうか。

ext/tk/tkutil/extconf.rb のパッチが漏れていました。

Index: trunk/ext/tk/tcltklib.c
===================================================================
--- trunk/ext/tk/tcltklib.c	(revision 17964)
+++ trunk/ext/tk/tcltklib.c	(working copy)
@@ -8,8 +8,7 @@

 #include "ruby.h"

-#ifdef HAVE_RUBY_RUBY_H
-/* #include "ruby/ruby.h" */
+#ifdef HAVE_RUBY_SIGNAL_H
 #include "ruby/signal.h"
 #ifdef HAVE_RUBY_ENCODING_H
 #include "ruby/encoding.h"
Index: trunk/ext/tk/extconf.rb
===================================================================
--- trunk/ext/tk/extconf.rb	(revision 17964)
+++ trunk/ext/tk/extconf.rb	(working copy)
@@ -5,7 +5,7 @@ require 'mkmf'
 is_win32 = (/mswin|mingw|cygwin|bccwin|wince/ =~ RUBY_PLATFORM)
 #is_macosx = (/darwin/ =~ RUBY_PLATFORM)

-have_header("ruby/ruby.h")
+have_header("ruby/signal.h")
 have_header("ruby/encoding.h")
 have_func("ruby_native_thread_p", "ruby.h")
 have_func("rb_errinfo", "ruby.h")
Index: trunk/ext/tk/tkutil/extconf.rb
===================================================================
--- trunk/ext/tk/tkutil/extconf.rb	(revision 17964)
+++ trunk/ext/tk/tkutil/extconf.rb	(working copy)
@@ -7,7 +7,7 @@ end

 if has_tk
   require 'mkmf'
-  have_header("ruby/ruby.h")
+  have_header("ruby/signal.h")
   have_func("rb_obj_instance_exec", "ruby.h")
   have_func("rb_sym_to_s", "ruby.h")
   have_func("strndup", "string.h")
Index: trunk/ext/tk/tkutil/tkutil.c
===================================================================
--- trunk/ext/tk/tkutil/tkutil.c	(revision 17964)
+++ trunk/ext/tk/tkutil/tkutil.c	(working copy)
@@ -11,8 +11,7 @@

 #include "ruby.h"

-#ifdef HAVE_RUBY_RUBY_H
-/* #include "ruby/ruby.h" */
+#ifdef HAVE_RUBY_SIGNAL_H
 #include "ruby/signal.h"
 #include "ruby/st.h"
 #else
Index: branches/ruby_1_8/ext/tk/tcltklib.c
===================================================================
--- branches/ruby_1_8/ext/tk/tcltklib.c	(revision 17964)
+++ branches/ruby_1_8/ext/tk/tcltklib.c	(working copy)
@@ -8,8 +8,7 @@

 #include "ruby.h"

-#ifdef HAVE_RUBY_RUBY_H
-/* #include "ruby/ruby.h" */
+#ifdef HAVE_RUBY_SIGNAL_H
 #include "ruby/signal.h"
 #ifdef HAVE_RUBY_ENCODING_H
 #include "ruby/encoding.h"
Index: branches/ruby_1_8/ext/tk/extconf.rb
===================================================================
--- branches/ruby_1_8/ext/tk/extconf.rb	(revision 17964)
+++ branches/ruby_1_8/ext/tk/extconf.rb	(working copy)
@@ -5,7 +5,7 @@ require 'mkmf'
 is_win32 = (/mswin|mingw|cygwin|bccwin|wince/ =~ RUBY_PLATFORM)
 #is_macosx = (/darwin/ =~ RUBY_PLATFORM)

-have_header("ruby/ruby.h")
+have_header("ruby/signal.h")
 have_header("ruby/encoding.h")
 have_func("ruby_native_thread_p", "ruby.h")
 have_func("rb_errinfo", "ruby.h")
Index: branches/ruby_1_8/ext/tk/tkutil/extconf.rb
===================================================================
--- branches/ruby_1_8/ext/tk/tkutil/extconf.rb	(revision 17964)
+++ branches/ruby_1_8/ext/tk/tkutil/extconf.rb	(working copy)
@@ -7,7 +7,7 @@ end

 if has_tk
   require 'mkmf'
-  have_header("ruby/ruby.h")
+  have_header("ruby/signal.h")
   have_func("rb_obj_instance_exec", "ruby.h")
   have_func("rb_sym_to_s", "ruby.h")
   have_func("strndup", "string.h")
Index: branches/ruby_1_8/ext/tk/tkutil/tkutil.c
===================================================================
--- branches/ruby_1_8/ext/tk/tkutil/tkutil.c	(revision 17964)
+++ branches/ruby_1_8/ext/tk/tkutil/tkutil.c	(working copy)
@@ -11,8 +11,7 @@

 #include "ruby.h"

-#ifdef HAVE_RUBY_RUBY_H
-/* #include "ruby/ruby.h" */
+#ifdef HAVE_RUBY_SIGNAL_H
 #include "ruby/signal.h"
 #include "ruby/st.h"
 #else


--
Akinori MUSHA / http://akinori.org/

--pgp-sign-Multipart_Wed_Jul__9_10:31:06_2008-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEABECAAYFAkh0FN0ACgkQkgvvx5/Z4e6xOACcDoshS4JDe6/Fapi1aO4v0G+H
DXQAoK6IvQ4rcFcoxX2TSmZ46rBfdIfS
=1gev
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Wed_Jul__9_10:31:06_2008-1--