(ruby/tk) ruby_1_9_2 $B$X$N(B backport

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B

trunk e$B$K$*$1$k0J2<$NJQ99e(B (extconf.rb, stubs.c, tk.rb)
e$B$G$9$,!$e(B
1.9.2 e$B$X$Ne(B backport e$B$r$*4j$$$G$-$^$9$G$7$g$&$+!)e(B
e$B$"$k$$$Oe(B backport e$B$7$F$b9=$o$J$$$G$7$g$&$+!%e(B

Thu Jun 3 01:22:45 2010 Hidetoshi NAGAI [email protected]

    * ext/tk/lib/tk.rb: fix typo and race condition.

Mon May 31 23:44:22 2010 Hidetoshi NAGAI [email protected]

    * ext/tk/extconf.rb: use tclConfig.sh/tkConfig.sh when 

frameworks
are enabled on MacOS X.

    * ext/tk/stubs.c: dirty hack for frameworks and stubs on MacOS 

X.

    * ext/tk/lib/tk.rb: stop creating a dummy Tcl/Tk interpreter.
      And hide a root window before starting eventloop. (for ruby 

1.9)

//e$B=|30e(B * ext/tk/tcltklib.c: add codes to support Ruby/Tk-Kit
(Rubykit).


e$B!V=|30!W$H$7$F$$$k0J30$Oe(B [ruby-core:30358]
e$B$GJs9p$5$l$?LdBj$X$NBP=h$G$9!%e(B
e$BJs9p<T$+$i$O!$$3$l$i$N=$@5$K$h$jLdBj$O2r7h$7$?$H$NO"Mm$O$b$i$C$F$$$^$9!%e(B

e$B>e5-$K$Oe(B MacOS X e$BMm$_$N=$@5$,4^$^$l$F$O$$$^$9$,!$e(B
e$B$=$l$i$Oe(B [ruby-core:30358] (windows e$B4D6-e(B)
e$B$N$?$a$N=$@5$KH<$C$Fe(B
MacOS X e$B>e$G@8$8$F$7$^$&LdBje(B (e$B$*$h$SJ|CV$7$F$$$?LdBje(B)
e$B$X$NBP=h$G$9!%e(B
e$B$h$C$F!$$3$l$i$r@Z$jN%$7$FE,MQ$9$k$3$H$K$OFq$,$"$j$^$9!%e(B

e$BE,MQ$K$D$$$F$NAjCL$r$5$;$F$$$?$@$$$F$$$k$N$O!$e(B
e$B$3$l$^$G$Ne(B preview e$B$H<c43$N0c$$$,@8$8$k$?$a$G$9!%e(B

(1) require ‘tk’ e$B8e$KB(:B$Ke(B tk e$B$Ne(B root window
e$B$,I=<($5$l$F$$$?$,!$e(B
Tk.mainloop e$B$r<B9T$9$k$^$G$OI=<($5$l$J$/$J$k!%e(B

 e$B"*e(B window e$B$OI=<($5$l$F$$$F$be(B mainloop 

e$B$r5/F0$9$k$^$G$Oe(B
e$BDL>o$O$^$H$b$K$Oe(B GUI
e$B$H$7$FA`:n$G$-$J$$$N$GLdBj$J$$$H;W$&$,!$e(B
e$B$3$N5sF0$K0MB8$7$?$3$H$r$7$F$$$k%1!<%9$,@dBP$J$$$H$O8@$($J$$!%e(B
e$B$J$*!$e(B1.8 e$B7O$N5sF0$K6a$$$N$O=$@58e$NJ}!%e(B

(2) MacOS X e$B>e$G$Ne(B tcltklib.c e$B$rE,@Z$Ke(B compile
e$B$9$k$?$a$K!$e(B
tclConfig.sh e$B$He(B tkConfig.sh e$B$,;veI,?$H$J$k!%e(B

 e$B"*e(B e$B$3$l$i$Oe(B Tcl/Tk 

e$B$NF3F~;~$KDL>o%$%s%9%H!<%k$5$l$F$$$k$O$:$N$b$N$G!$e(B
compile e$B;~$KM?$($k$Y$-%U%i%0$N>pJs$,5-:$5$l$F$$$k!%e(B
e$B=$@5A0$O$3$l$i$,$J$/$F$b8mKb2=$7$Fe(B compile
e$B$7$F$$$?$,!$e(B
X e$BHG$He(B Aqua e$BHG$H$N5sF0$N0c$$$X$Ne(B ad-hoc
e$B$JBP=h$K$OL5M}$,=P$F$$$?!%e(B

    e$B=$@58e$O!$e(BtclConfig.sh/tkConfig.sh e$B$,$J$$>l9g$Ke(B
    e$BFC$Ke(B Aqua e$BHG$G@5$7$/e(B compile 

e$B$G$-$J$/$J$k2DG=@-$,9b$$!%e(B
e$B$^$?!$=$@5A0$Oe(B X e$BHG$He(B Aqua e$BHG$H$r6&DL$Ne(B
tcltklib.so e$B$Ge(B
e$B@ZBX$($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$G$7$g$&!#e(B

(2) MacOS X e$B>e$G$Ne(B tcltklib.c e$B$rE,@Z$Ke(B compile e$B$9$k$?$a$K!$e(B
tclConfig.sh e$B$He(B tkConfig.sh e$B$,;veI,?$H$J$k!%e(B

e$B"*e(B e$B$3$l$i$Oe(B Tcl/Tk e$B$NF3F~;~$KDL>o%$%s%9%H!<%k$5$l$F$$$k$O$:$N$b$N$G!$e(B
   compile e$B;~$KM?$($k$Y$-%U%i%0$N>pJs$,5-:\$5$l$F$$$k!%e(B

e$B%$%s%9%H!<%k$5$l$F$$$k$O$:$C$F$3$H$O!"e(B

  e$B=$@58e$O!$e(BtclConfig.sh/tkConfig.sh e$B$,$J$$>l9g$Ke(B
 e$BFC$Ke(B Aqua e$BHG$G@5$7$/e(B compile e$B$G$-$J$/$J$k2DG=@-e(B

e$B$H$$$&$N$O$I$&$$$&%1!<%9$GH/@8$7F@$k$G$7$g$&$+!#G0$N$?$a!"$=$NJU$r;G$($l$PM-$jFq$$$G$9!#e(B


Yuki S. (Yugui)
[email protected]

Yugui e$B$5$s!$e(B

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B
e$B$*<j?t$r$*3]$1$7$F$7$^$C$F$$$^$9!%e(B

From: Yugui [email protected]
Subject: [ruby-dev:41742] Re: (ruby/tk) ruby_1_9_2 e$B$X$Ne(B backport
Date: Sun, 27 Jun 2010 23:32:18 +0900
Message-ID:
[email protected]

e$B$3$N=$@5$O%^!<%8$9$k$+LB$C$?$s$G$9$,!"2<$N$h$&$JI{:nMQ$,$I$3$^$G=P$ke(B
e$B$+J,$+$i$J$+$C$?$N$G%^!<%8$r8e2s$7$K$7$FK:$l$F$$j$^$7$?!#e(B
e$B7k9=Bg$-$JJQ99$G$b$“$j$^$9$7!”;~4|E
$K$G$-$k$@$1%^!<%8$7$?$/$J$$$s$Ge(B
e$B$9$,!"e(Bwindowse$B$G$Ne(B[ruby-core:30358]e$B$N2sHr:v$H$$$&$N$O$J$$$s$G$7$g$&$+!#e(B

[ruby-core:30397] e$B$Ke(B “Just with 8.5 built from source with
msys/mingw.”
e$B$J$I$H$“$k$h$&$K!$B.EY$NAa$$%^%k%A%3%”$Ne(B Windows
e$B4D6-$GH/@8$7$F$7$^$&e(B
e$BLdBj$G$"$k$H9M$($F$$$^$9!%e(B
e$B%F%9%HL\E*$G0l;~E*$Ke(B Tcl/Tk
e$B%$%s%?!<%W%j%?$r@8@.$7$F3NG’$r9T$C$?8e$Ke(B
e$B$=$N3NG’MQ%$%s%?!<%W%j%?$re(B delete e$B$7$F$$$?$N$G$9$,!$e(B
e$B%^%k%A%9%l%C%IMm$_$Ge(B delete e$BA0$K%$%Y%s%H$,E~Ce$7!$e(B
e$B%$%Y%s%H=hM}$5$l$J$$$^$^$Ke(B delete
e$B$r40N;$7$F$$$k$N$@$m$&$H;W$$$^$9!%e(B

e$BF1$8$h$&$J$3$H$O:#8eA}$9$3$H$O$"$C$F$b8:$k$3$H$O$J$$$G$7$g$&$+$i!$e(B
e$B$=$N:,K\E*$J2r7h$H$7$F!$3NG’MQ%$%s%?!<%W%j%?$N@8@.$r;_$a$k$h$&$K$7$^$7$?!%e(B
e$BBe$j$K!$e(BMacOS X
e$B$G$OE,@Z$J%^%/%mDj5A$,$J$5$l$F$$$k$3$H$,I,?$H$J$C$?$?$a!$e(B
e$B$=$N>pJs$rF@$k$?$a$Ne(B tclConfig.sh/tkConfig.sh
e$B$bI,MW$H$J$j$^$7$?!%e(B

reasonablee$B$J2sHr:v$,$J$1$l$P!“%P%0$G$b$”$j$^$9$7%^!<%8$K;?@.$7$?$$$H;W$$$^$9!#e(B

[ruby-core:30372] e$B$G;n$7$F$b$i$C$?2sHr:v$OK\Ev$KHs>o<jCJ$G!$e(B
e$B$3$l$r<B9T$9$k$He(B Thread.new{Tk.mainloop} e$B$H$$$&$h$&$Ke(B
e$B%$%Y%s%H%k!<%W$re(B main thread
e$B0J30$G<B9T$7$F$$$?=>Mh$N%9%/%j%W%H$Oe(B
e$BA4LG$9$k$3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$$3$H$K$J$j$^$9!%e(B

e$B$^$!!$e(BtclConfig.sh/tkConfig.sh
e$B$,A4$/B8:_$7$F$$$J$$$H$$$&>l9g0J30$Oe(B
configure e$B%%W%7%g%s$G;XDj$7$F$d$l$P$$$$$@$1$G$9!%e(B
e$BFC<l$J%$%s%9%H!<%k>u67$r:n$j=P$;$F$$$k?M$J$i!$e(B
e$B$-$C$He(B configure
e$B%
%W%7%g%s$N;XDjDxEY$N$3$H$OLdBj$K$7$J$$$G$7$g$&$M!%e(B

e$B1J0f$5$se(B

e$B$4@bL@$"$j$,$H$&$4$6$$$^$7$?!#BgBN>u67$OM}2r$G$-$?$h$&$K;W$$$^$9!#e(B1.9.2
RCe$B$K$OF~$l$?$$$N$GAa$a$K%^!<%8$r$*4j$$$7$^$9!#e(B

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B

From: Yugui [email protected]
Subject: [ruby-dev:41758] Re: (ruby/tk) ruby_1_9_2 e$B$X$Ne(B backport
Date: Mon, 28 Jun 2010 23:51:50 +0900
Message-ID:
[email protected]

e$B$4@bL@$"$j$,$H$&$4$6$$$^$7$?!#BgBN>u67$OM}2r$G$-$?$h$&$K;W$$$^$9!#e(B1.9.2 RCe$B$K$OF~$l$?$$$N$GAa$a$K%^!<%8$r$*4j$$$7$^$9!#e(B

e$B$"$j$,$H$&$4$6$$$^$9!%e(B
e$B$3$N%a!<%k$N8e$Ge(B merge e$B$7$^$9$N$G!$$h$m$7$/$*4j$$CW$7$^$9!%e(B