pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang Add patches for supporting tcl/tk 8.6 on ruby-tk ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/718a1dba15cd
branches:  trunk
changeset: 643320:718a1dba15cd
user:      taca <taca%pkgsrc.org@localhost>
date:      Sun Dec 14 13:59:53 2014 +0000

description:
Add patches for supporting tcl/tk 8.6 on ruby-tk package.

diffstat:

 lang/ruby193-base/distinfo                                              |   12 +-
 lang/ruby193-base/patches/patch-ext_tk_extconf.rb                       |   19 +
 lang/ruby193-base/patches/patch-ext_tk_lib_tk.rb                        |   56 ++
 lang/ruby193-base/patches/patch-ext_tk_lib_tk_autoload.rb               |   15 +
 lang/ruby193-base/patches/patch-ext_tk_lib_tk_fontchooser.rb            |   17 +
 lang/ruby193-base/patches/patch-ext_tk_lib_tk_tk__mac.rb                |  165 ++++++++
 lang/ruby193-base/patches/patch-ext_tk_lib_tkextlib_tcllib_validator.rb |   72 +++
 lang/ruby193-base/patches/patch-ext_tk_lib_tkextlib_tile_treeview.rb    |   50 ++
 lang/ruby193-base/patches/patch-ext_tk_lib_tkextlib_tkimg_dted.rb       |   40 ++
 lang/ruby193-base/patches/patch-ext_tk_lib_tkextlib_tkimg_raw.rb        |   40 ++
 lang/ruby193-base/patches/patch-ext_tk_tcltklib.c                       |  195 ++++++++++
 lang/ruby200-base/distinfo                                              |   12 +-
 lang/ruby200-base/patches/patch-ext_tk_extconf.rb                       |   19 +
 lang/ruby200-base/patches/patch-ext_tk_lib_tk.rb                        |   56 ++
 lang/ruby200-base/patches/patch-ext_tk_lib_tk_autoload.rb               |   15 +
 lang/ruby200-base/patches/patch-ext_tk_lib_tk_fontchooser.rb            |   17 +
 lang/ruby200-base/patches/patch-ext_tk_lib_tk_tk__mac.rb                |  165 ++++++++
 lang/ruby200-base/patches/patch-ext_tk_lib_tkextlib_tcllib_validator.rb |   72 +++
 lang/ruby200-base/patches/patch-ext_tk_lib_tkextlib_tile_treeview.rb    |   50 ++
 lang/ruby200-base/patches/patch-ext_tk_lib_tkextlib_tkimg_dted.rb       |   40 ++
 lang/ruby200-base/patches/patch-ext_tk_lib_tkextlib_tkimg_raw.rb        |   40 ++
 lang/ruby200-base/patches/patch-ext_tk_tcltklib.c                       |  179 +++++++++
 lang/ruby21-base/distinfo                                               |   12 +-
 lang/ruby21-base/patches/patch-ext_tk_extconf.rb                        |   19 +
 lang/ruby21-base/patches/patch-ext_tk_lib_tk.rb                         |   56 ++
 lang/ruby21-base/patches/patch-ext_tk_lib_tk_autoload.rb                |   15 +
 lang/ruby21-base/patches/patch-ext_tk_lib_tk_fontchooser.rb             |   17 +
 lang/ruby21-base/patches/patch-ext_tk_lib_tk_tk__mac.rb                 |  165 ++++++++
 lang/ruby21-base/patches/patch-ext_tk_lib_tkextlib_tcllib_validator.rb  |   72 +++
 lang/ruby21-base/patches/patch-ext_tk_lib_tkextlib_tile_treeview.rb     |   50 ++
 lang/ruby21-base/patches/patch-ext_tk_lib_tkextlib_tkimg_dted.rb        |   40 ++
 lang/ruby21-base/patches/patch-ext_tk_lib_tkextlib_tkimg_raw.rb         |   40 ++
 lang/ruby21-base/patches/patch-ext_tk_tcltklib.c                        |  170 ++++++++
 33 files changed, 1999 insertions(+), 3 deletions(-)

diffs (truncated from 2161 to 300 lines):

diff -r 35e88c5cc180 -r 718a1dba15cd lang/ruby193-base/distinfo
--- a/lang/ruby193-base/distinfo        Sun Dec 14 13:57:07 2014 +0000
+++ b/lang/ruby193-base/distinfo        Sun Dec 14 13:59:53 2014 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.38 2014/11/15 14:39:09 taca Exp $
+$NetBSD: distinfo,v 1.39 2014/12/14 13:59:53 taca Exp $
 
 SHA1 (ruby-1.9.3-p551.tar.bz2) = 35600f4e2ac98653fa8a634104cb6ab3d47a1535
 RMD160 (ruby-1.9.3-p551.tar.bz2) = 59cfcaf4e02957f53bf83557962b0d428156bc01
@@ -7,6 +7,16 @@
 SHA1 (patch-configure.in) = 09dfe819b6a9bd7c9af704eeaef659857d33d0c3
 SHA1 (patch-defs_default__gems) = fb24111736f1a76a05e853aa068024dbdd24e5a5
 SHA1 (patch-ext_dl_extconf.rb) = aed210606893d2b9c463d794df039f06003848e4
+SHA1 (patch-ext_tk_extconf.rb) = 7cda490107ce8d23644152feeade8a8cf21d9898
+SHA1 (patch-ext_tk_lib_tk.rb) = 78034ed6fa0f24099ce06a717da2423731b276cb
+SHA1 (patch-ext_tk_lib_tk_autoload.rb) = e8bcb93feae90fd46531a412f6c963a6d5d2c132
+SHA1 (patch-ext_tk_lib_tk_fontchooser.rb) = cb0155332e5f519ada386fae770cd2f879527323
+SHA1 (patch-ext_tk_lib_tk_tk__mac.rb) = c7b946dd8d37014d9cd43ce787fbb560a21cce2e
+SHA1 (patch-ext_tk_lib_tkextlib_tcllib_validator.rb) = 4e429b8775f9a079e5338d58db7520179566c4b7
+SHA1 (patch-ext_tk_lib_tkextlib_tile_treeview.rb) = e31201b5d0f5c333f14b795ac5e670fdb9a250cf
+SHA1 (patch-ext_tk_lib_tkextlib_tkimg_dted.rb) = c73d94032c22cbefb55daee2ba359d70751b1416
+SHA1 (patch-ext_tk_lib_tkextlib_tkimg_raw.rb) = 2c99d8f59c0ad5d6a493dd6e663850262487f5ef
+SHA1 (patch-ext_tk_tcltklib.c) = c58bffdde4a89ea7c442b1cf37c12c5ce53ee890
 SHA1 (patch-lib_rdoc_ri_driver.rb) = acb4cb022893eb8dea2adf7564f5e5e1a0f1e9c8
 SHA1 (patch-lib_rubygems.rb) = e472c981e544b75c3762385895c9a0197be9badd
 SHA1 (patch-lib_rubygems_command.rb) = 916a93372e714b56a741acc15350536194f34c77
diff -r 35e88c5cc180 -r 718a1dba15cd lang/ruby193-base/patches/patch-ext_tk_extconf.rb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby193-base/patches/patch-ext_tk_extconf.rb Sun Dec 14 13:59:53 2014 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-ext_tk_extconf.rb,v 1.3 2014/12/14 13:59:53 taca Exp $
+
+* Add tcl/tk 8.6 support.
+
+--- ext/tk/extconf.rb.orig     2013-12-22 04:53:40.000000000 +0000
++++ ext/tk/extconf.rb
+@@ -9,10 +9,10 @@ TkLib_Config['search_versions'] =
+   # %w[8.9 8.8 8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6 4.2]
+   # %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0]
+   # %w[8.7 8.6 8.5 8.4 8.0] # to shorten search steps
+-  %w[8.5 8.4] # At present, Tcl/Tk8.6 is not supported.
++  %w[8.6 8.5 8.4]
+ 
+ TkLib_Config['unsupported_versions'] =
+-  %w[8.8 8.7 8.6] # At present, Tcl/Tk8.6 is not supported.
++  %w[8.8 8.7]
+ 
+ TkLib_Config['major_nums'] = '87'
+ 
diff -r 35e88c5cc180 -r 718a1dba15cd lang/ruby193-base/patches/patch-ext_tk_lib_tk.rb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby193-base/patches/patch-ext_tk_lib_tk.rb  Sun Dec 14 13:59:53 2014 +0000
@@ -0,0 +1,56 @@
+$NetBSD: patch-ext_tk_lib_tk.rb,v 1.1 2014/12/14 13:59:53 taca Exp $
+
+* Add tcl/tk 8.6 support.
+
+--- ext/tk/lib/tk.rb.orig      2011-05-26 23:36:33.000000000 +0000
++++ ext/tk/lib/tk.rb
+@@ -1309,8 +1309,12 @@ EOS
+           end
+ 
+           unless interp.deleted?
+-            #Thread.current[:status].value = TclTkLib.mainloop(false)
+-            Thread.current[:status].value = interp.mainloop(false)
++            begin
++              #Thread.current[:status].value = TclTkLib.mainloop(false)
++              Thread.current[:status].value = interp.mainloop(false)
++            rescue Exception=>e
++              puts "ignore exception on interp: #{e.inspect}\n" if $DEBUG
++            end
+           end
+ 
+         ensure
+@@ -1569,7 +1573,15 @@ EOS
+   EOL
+ =end
+ 
+-  at_exit{ INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME) }
++  if !WITH_RUBY_VM || RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!!
++    at_exit{ INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME) }
++  else
++    at_exit{
++      Tk.root.destroy
++      INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME)
++      INTERP_THREAD.kill.join
++    }
++  end
+ 
+   EventFlag = TclTkLib::EventFlag
+ 
+@@ -5197,6 +5209,8 @@ class TkWindow<TkObject
+     TkWinfo.exist?(self)
+   end
+ 
++  alias subcommand tk_send
++
+   def bind_class
+     @db_class || self.class()
+   end
+@@ -5742,7 +5756,7 @@ TkWidget = TkWindow
+ #Tk.freeze
+ 
+ module Tk
+-  RELEASE_DATE = '2010-06-03'.freeze
++  RELEASE_DATE = '2014-10-19'.freeze
+ 
+   autoload :AUTO_PATH,        'tk/variable'
+   autoload :TCL_PACKAGE_PATH, 'tk/variable'
diff -r 35e88c5cc180 -r 718a1dba15cd lang/ruby193-base/patches/patch-ext_tk_lib_tk_autoload.rb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby193-base/patches/patch-ext_tk_lib_tk_autoload.rb Sun Dec 14 13:59:53 2014 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-ext_tk_lib_tk_autoload.rb,v 1.1 2014/12/14 13:59:53 taca Exp $
+
+* Add tcl/tk 8.6 support.
+
+--- ext/tk/lib/tk/autoload.rb.orig     2011-05-15 11:55:52.000000000 +0000
++++ ext/tk/lib/tk/autoload.rb
+@@ -94,6 +94,8 @@ module Tk
+   autoload :Y_Scrollable,     'tk/scrollable'
+   autoload :Scrollable,       'tk/scrollable'
+ 
++  autoload :Fontchooser,      'tk/fontchooser'
++
+   autoload :Wm,               'tk/wm'
+   autoload :Wm_for_General,   'tk/wm'
+ 
diff -r 35e88c5cc180 -r 718a1dba15cd lang/ruby193-base/patches/patch-ext_tk_lib_tk_fontchooser.rb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby193-base/patches/patch-ext_tk_lib_tk_fontchooser.rb      Sun Dec 14 13:59:53 2014 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-ext_tk_lib_tk_fontchooser.rb,v 1.1 2014/12/14 13:59:53 taca Exp $
+
+* Add tcl/tk 8.6 support.
+
+--- ext/tk/lib/tk/fontchooser.rb.orig  2011-05-15 11:55:52.000000000 +0000
++++ ext/tk/lib/tk/fontchooser.rb
+@@ -8,6 +8,10 @@ module TkFont::Chooser
+   extend TkCore
+ end
+ 
++module Tk
++  Fontchooser = TkFont::Chooser
++end
++
+ class << TkFont::Chooser
+   def method_missing(id, *args)
+     name = id.id2name
diff -r 35e88c5cc180 -r 718a1dba15cd lang/ruby193-base/patches/patch-ext_tk_lib_tk_tk__mac.rb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby193-base/patches/patch-ext_tk_lib_tk_tk__mac.rb  Sun Dec 14 13:59:53 2014 +0000
@@ -0,0 +1,165 @@
+$NetBSD: patch-ext_tk_lib_tk_tk__mac.rb,v 1.1 2014/12/14 13:59:53 taca Exp $
+
+* Add tcl/tk 8.6 support.
+
+--- /dev/null  2014-10-27 05:11:12.000000000 +0000
++++ ext/tk/lib/tk/tk_mac.rb
+@@ -0,0 +1,158 @@
++#
++# tk/tk_mac.rb : Access Mac-Specific functionality on OS X from Tk
++#                (supported by Tk8.6 or later)
++#
++#     ATTENTION !!
++#         This is NOT TESTED. Because I have no test-environment.
++#
++require 'tk'
++
++module Tk
++  module Mac
++  end
++end
++
++module Tk::Mac
++  extend TkCore
++
++  # event handler callbacks
++  def self.def_ShowPreferences(cmd=Proc.new)
++    ip_eval("proc ::tk::mac::ShowPreferences {} { #{install_cmd(cmd)} }")
++    nil
++  end
++
++  def self.def_OpenApplication(cmd=Proc.new)
++    ip_eval("proc ::tk::mac::OpenApplication {} { #{install_cmd(cmd)} }")
++    nil
++  end
++
++  def self.def_ReopenApplication(cmd=Proc.new)
++    ip_eval("proc ::tk::mac::ReopenApplication {} { #{install_cmd(cmd)} }")
++    nil
++  end
++
++  def self.def_OpenDocument(cmd=Proc.new)
++    ip_eval("proc ::tk::mac::OpenDocument {args} { eval #{install_cmd(cmd)} $args }")
++    nil
++  end
++
++  def self.def_PrintDocument(cmd=Proc.new)
++    ip_eval("proc ::tk::mac::PrintDocument {args} { eval #{install_cmd(cmd)} $args }")
++    nil
++  end
++
++  def self.def_Quit(cmd=Proc.new)
++    ip_eval("proc ::tk::mac::Quit {} { #{install_cmd(cmd)} }")
++    nil
++  end
++
++  def self.def_OnHide(cmd=Proc.new)
++    ip_eval("proc ::tk::mac::OnHide {} { #{install_cmd(cmd)} }")
++    nil
++  end
++
++  def self.def_OnShow(cmd=Proc.new)
++    ip_eval("proc ::tk::mac::OnShow {} { #{install_cmd(cmd)} }")
++    nil
++  end
++
++  def self.def_ShowHelp(cmd=Proc.new)
++    ip_eval("proc ::tk::mac::ShowHelp {} { #{install_cmd(cmd)} }")
++    nil
++  end
++
++
++  # additional dialogs
++  def self.standardAboutPanel
++    tk_call('::tk::mac::standardAboutPanel')
++    nil
++  end
++
++
++  # system configuration
++  def self.useCompatibilityMetrics(mode)
++    tk_call('::tk::mac::useCompatibilityMetrics', mode)
++    nil
++  end
++
++  def self.CGAntialiasLimit(limit)
++    tk_call('::tk::mac::CGAntialiasLimit', limit)
++    nil
++  end
++
++  def self.antialiasedtext(num)
++    tk_call('::tk::mac::antialiasedtext', num)
++    nil
++  end
++
++  def self.useThemedToplevel(mode)
++    tk_call('::tk::mac::useThemedToplevel', mode)
++    nil
++  end
++
++end
++
++class Tk::Mac::IconBitmap < TkImage
++  TkCommandNames = ['::tk::mac::iconBitmap'].freeze
++
++  def self.new(width, height, keys)
++    if keys.kind_of?(Hash)
++      name = nil
++      if keys.key?(:imagename)
++        name = keys[:imagename]
++      elsif keys.key?('imagename')
++        name = keys['imagename']
++      end
++      if name
++        if name.kind_of?(TkImage)
++          obj = name
++        else
++          name = _get_eval_string(name)
++          obj = nil
++          Tk_IMGTBL.mutex.synchronize{
++            obj = Tk_IMGTBL[name]
++          }
++        end
++        if obj
++          if !(keys[:without_creating] || keys['without_creating'])
++            keys = _symbolkey2str(keys)
++            keys.delete('imagename')
++            keys.delete('without_creating')
++            obj.instance_eval{
++              tk_call_without_enc('::tk::mac::iconBitmap',
++                                  @path, width, height, *hash_kv(keys, true))
++            }
++          end
++          return obj
++        end
++      end
++    end
++    (obj = self.allocate).instance_eval{
++      Tk_IMGTBL.mutex.synchronize{
++        initialize(width, height, keys)
++        Tk_IMGTBL[@path] = self
++      }
++    }
++    obj
++  end
++
++  def initialize(width, height, keys)
++    @path = nil



Home | Main Index | Thread Index | Old Index