pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/mikutter Update mikutter to 3.5.8.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bbdbb9e36976
branches:  trunk
changeset: 363460:bbdbb9e36976
user:      tsutsui <tsutsui%pkgsrc.org@localhost>
date:      Sat Jun 10 09:45:33 2017 +0000

description:
Update mikutter to 3.5.8.

pkgsrc changes:

- pull upstream fix for redmine ticket #1031 (twitpic gzipped xfer)
- pull changes to use delayer-deferred 2.0.0 for redmine ticket
  #916 (extra follow/follower activities) and
  #995 (abnormal cpu load with delayer-deferred 1.1.0)

Upstream changes:

- ruby-gnome2 3.1.6
- subcommands that create spec files don't accept . as a pathname
- free memories on loading images earlier
- avoid to use deprecated Gdk::PixbufLoader

diffstat:

 net/mikutter/Makefile                                                   |   9 +-
 net/mikutter/distinfo                                                   |  19 +-
 net/mikutter/patches/patch-Gemfile                                      |  16 ++
 net/mikutter/patches/patch-core_boot_delayer.rb                         |  39 ++++++
 net/mikutter/patches/patch-core_lib_mikutwitter_api__shortcuts.rb       |  65 ++++++++++
 net/mikutter/patches/patch-core_mui_gtk__inneruserlist.rb               |  21 +++
 net/mikutter/patches/patch-core_mui_gtk__userlist.rb                    |  44 ++++++
 net/mikutter/patches/patch-core_plugin_photo__support_photo__support.rb |  19 ++-
 net/mikutter/patches/patch-mikutter.rb                                  |  37 +++++-
 9 files changed, 251 insertions(+), 18 deletions(-)

diffs (truncated from 351 to 300 lines):

diff -r 4c382bc7c0b1 -r bbdbb9e36976 net/mikutter/Makefile
--- a/net/mikutter/Makefile     Sat Jun 10 08:40:18 2017 +0000
+++ b/net/mikutter/Makefile     Sat Jun 10 09:45:33 2017 +0000
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.141 2017/05/30 15:18:31 taca Exp $
+# $NetBSD: Makefile,v 1.142 2017/06/10 09:45:33 tsutsui Exp $
 #
 
-DISTNAME=      mikutter.3.5.7
+DISTNAME=      mikutter.3.5.8
 PKGNAME=       ${RUBY_PKGPREFIX}-${DISTNAME:S/./-/}
-PKGREVISION=   1
 CATEGORIES=    net
 MASTER_SITES=  http://mikutter.hachune.net/bin/
 
@@ -15,7 +14,7 @@
 .include "../../lang/ruby/rubyversion.mk"
 
 DEPENDS+=      ${RUBY_PKGPREFIX}-pluggaloid>=1.1.1:../../net/ruby-pluggaloid
-DEPENDS+=      ${RUBY_PKGPREFIX}-gnome2-gtk>=3.1.1:../../x11/ruby-gnome2-gtk
+DEPENDS+=      ${RUBY_PKGPREFIX}-gnome2-gtk>=3.1.6:../../x11/ruby-gnome2-gtk
 DEPENDS+=      ${RUBY_PKGPREFIX}-gettext>=3.0.1:../../devel/ruby-gettext
 DEPENDS+=      ${RUBY_PKGPREFIX}-oauth>=0.5.1:../../security/ruby-oauth
 DEPENDS+=      ${RUBY_PKGPREFIX}-addressable>=2.3:../../net/ruby-addressable
@@ -23,7 +22,7 @@
 DEPENDS+=      ${RUBY_PKGPREFIX}-hmac>=0.4:../../security/ruby-hmac
 DEPENDS+=      ${RUBY_PKGPREFIX}-typed-array>=0.1:../../misc/ruby-typed-array
 DEPENDS+=      ${RUBY_PKGPREFIX}-delayer-[0-9]*:../../devel/ruby-delayer
-DEPENDS+=      ${RUBY_PKGPREFIX}-delayer-deferred>=1.0.4:../../devel/ruby-delayer-deferred
+DEPENDS+=      ${RUBY_PKGPREFIX}-delayer-deferred>=2.0.0:../../devel/ruby-delayer-deferred
 DEPENDS+=      ${RUBY_PKGPREFIX}-nokogiri-[0-9]*:../../textproc/ruby-nokogiri
 DEPENDS+=      ${RUBY_PKGPREFIX}-httpclient-[0-9]*:../../www/ruby-httpclient
 DEPENDS+=      ${RUBY_PKGPREFIX}-moneta>=0.7:../../databases/ruby-moneta
diff -r 4c382bc7c0b1 -r bbdbb9e36976 net/mikutter/distinfo
--- a/net/mikutter/distinfo     Sat Jun 10 08:40:18 2017 +0000
+++ b/net/mikutter/distinfo     Sat Jun 10 09:45:33 2017 +0000
@@ -1,10 +1,15 @@
-$NetBSD: distinfo,v 1.126 2017/04/08 07:44:23 tsutsui Exp $
+$NetBSD: distinfo,v 1.127 2017/06/10 09:45:33 tsutsui Exp $
 
-SHA1 (mikutter.3.5.7.tar.gz) = f42718db50e1810fa4891e8cb2b31e1f9109e1bf
-RMD160 (mikutter.3.5.7.tar.gz) = dd5a42818429fb2a951bedd00a1f973ce53a76e5
-SHA512 (mikutter.3.5.7.tar.gz) = 4b84a5681930e6b4463eff87555bdcae6d07ca7318d25906db13af519e7de47038e942aa861ed41c469725cdeb4a2ed254e791b7f7c68d50f5e7e2cae9fd5b10
-Size (mikutter.3.5.7.tar.gz) = 3743921 bytes
+SHA1 (mikutter.3.5.8.tar.gz) = 2d4a64632ebc9170013a3568264c136c639a4dc5
+RMD160 (mikutter.3.5.8.tar.gz) = e035e9d92acd37ba0ad20beb410197ba35e5a94c
+SHA512 (mikutter.3.5.8.tar.gz) = 7e526e995cfd20f1ecb47f0fd657a1036132068ba947de29b3a548c58f86c0a1f71c0134ebbf5e9bb945e2f885af4aff82ea5250fee5ba9f94c6faa3f6007367
+Size (mikutter.3.5.8.tar.gz) = 2733956 bytes
+SHA1 (patch-Gemfile) = 27cc7e1bea05a5a4205d4da89120da3519ddcee0
+SHA1 (patch-core_boot_delayer.rb) = 3070cd4966c509a2bb722d4baabcc1a7e7026b30
+SHA1 (patch-core_lib_mikutwitter_api__shortcuts.rb) = 36c96889e65ff312aa4e854509edfd0e75c59dd0
+SHA1 (patch-core_mui_gtk__inneruserlist.rb) = 552338b5029ca6236993b2c75f892a2b9fd64d2d
+SHA1 (patch-core_mui_gtk__userlist.rb) = fc7a2d850e7e9ab4d5716c2534f991afbda88a7e
 SHA1 (patch-core_plugin_libnotify_rnotify.rb) = 0bb5630f4411d11ad188c722fb1d14e2d6748d17
 SHA1 (patch-core_plugin_photo__support_Gemfile) = 754b96024904e2e2f55c83e88fd3c763eecf723c
-SHA1 (patch-core_plugin_photo__support_photo__support.rb) = d119209d4de835e6d47d85c8ca5209d1f199bd9e
-SHA1 (patch-mikutter.rb) = 637987302bfbf2903e59712df732e3bdc57768ee
+SHA1 (patch-core_plugin_photo__support_photo__support.rb) = 182135fc0b46035c343c746ddba091d71cdc81f4
+SHA1 (patch-mikutter.rb) = b82a38101b94d9f00a998965b02f05ee3947fc73
diff -r 4c382bc7c0b1 -r bbdbb9e36976 net/mikutter/patches/patch-Gemfile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mikutter/patches/patch-Gemfile        Sat Jun 10 09:45:33 2017 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-Gemfile,v 1.1 2017/06/10 09:45:33 tsutsui Exp $
+
+- use delayer-deferred 2.0.x for upstream ticket #995
+  https://dev.mikutter.hachune.net/issues/995
+
+--- Gemfile.orig       2017-06-10 02:41:13.000000000 +0000
++++ Gemfile
+@@ -16,7 +16,7 @@ group :default do
+   gem 'typed-array', '~> 0.1'
+   gem 'delayer', '~> 0.0'
+   gem 'pluggaloid', '>= 1.1.1', '< 2.0'
+-  gem 'delayer-deferred', '>= 1.0.4', '< 2.0'
++  gem 'delayer-deferred', '>= 2.0', '< 3.0'
+   gem 'twitter-text', '1.14.2'
+ end
+ 
diff -r 4c382bc7c0b1 -r bbdbb9e36976 net/mikutter/patches/patch-core_boot_delayer.rb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mikutter/patches/patch-core_boot_delayer.rb   Sat Jun 10 09:45:33 2017 +0000
@@ -0,0 +1,39 @@
+$NetBSD: patch-core_boot_delayer.rb,v 1.1 2017/06/10 09:45:33 tsutsui Exp $
+
+- pull fix to use delayer-deferred 2.x for upstream ticket #995
+  https://dev.mikutter.hachune.net/issues/995
+
+--- core/boot/delayer.rb.orig  2017-06-10 01:11:51.000000000 +0000
++++ core/boot/delayer.rb
+@@ -13,7 +13,7 @@ Delayer.default = Delayer.generate_class
+ 
+ Deferred = Delayer::Deferred::Deferred
+ 
+-module Delayer::Deferred::Deferredable
++module Delayer::Deferred::Deferredable::Chainable
+   # ã?¨ã?©ã?¼ã??ã?­ã?£ã??ã??ã??ã?¦ã??ã??ã?¾ã??å?·å??ã?«mikutterã?«è¡¨ç¤ºã??ã??ã??
+   # ã??ã?®ã??ã?¨ã?«deferredã??ã??ã?£ã?¤ã??ã??ã??ã?¨ã??ã?§ã??ã??ã??ã??å?ºæ?¬ç??ã?«ã?¯deferredã??ã?§ã?¤ã?³ã?®çµ?äº?ã?®æ??ã?«ä½¿ã??ã??
+   # ã?ªã??ã??terminateã?¯å??ã??å??ã?£ã??ã?¨ã?©ã?¼ã??å??度ç?ºç??ã??ã??ã??ã?®ã?§ã??terminateã?§ã?¨ã?©ã?¼ã??å?¦ç??ã??ã??å¾?ã?«ç?¹å?¥ã?ªã?¨ã?©ã?¼å?¦ç??ã??æ??ã??ã??ã?¨ã??ã?§ã??ã??
+@@ -23,7 +23,7 @@ module Delayer::Deferred::Deferredable
+   # ==== Return
+   # Deferred
+   def terminate(message = nil, &message_generator)
+-    self.trap{|exception|
++    defer = self.trap{|exception|
+       message = message_generator.call(exception) if message_generator
+       case exception
+       when MikuTwitter::RateLimitError
+@@ -35,6 +35,13 @@ module Delayer::Deferred::Deferredable
+       else
+         begin
+           notice exception
++          if Mopt.debug
++            if command_exist?('dot')
++              notice "[[#{defer.graph_draw}]]"
++            else
++              notice defer.graph
++            end
++          end
+           if(message)
+             if(exception.is_a?(Net::HTTPResponse))
+               Plugin.activity :error, "#{message} (#{exception.code} #{exception.body})"
diff -r 4c382bc7c0b1 -r bbdbb9e36976 net/mikutter/patches/patch-core_lib_mikutwitter_api__shortcuts.rb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mikutter/patches/patch-core_lib_mikutwitter_api__shortcuts.rb Sat Jun 10 09:45:33 2017 +0000
@@ -0,0 +1,65 @@
+$NetBSD: patch-core_lib_mikutwitter_api__shortcuts.rb,v 1.1 2017/06/10 09:45:33 tsutsui Exp $
+
+- pull upstream fixes for ticket #916
+  https://dev.mikutter.hachune.net/issues/916
+
+--- core/lib/mikutwitter/api_shortcuts.rb.orig 2017-06-10 01:11:51.000000000 +0000
++++ core/lib/mikutwitter/api_shortcuts.rb
+@@ -52,10 +52,10 @@ module MikuTwitter::APIShortcuts
+   defcursorpager :followers_id, 'followers/ids', :paged_ids, :ids, id: :user_id
+ 
+   def followings(args = {})
+-    idlist2userlist(friends_id(RELATIONAL_DEFAULT.merge(args))) end
++    idlist2userlist(friends_id(RELATIONAL_DEFAULT.merge(args)), cache: args[:cache]) end
+ 
+   def followers(args = {})
+-    idlist2userlist(followers_id(RELATIONAL_DEFAULT.merge(args))) end
++    idlist2userlist(followers_id(RELATIONAL_DEFAULT.merge(args)), cache: args[:cache]) end
+ 
+   def direct_messages(args = {})
+     (self/:direct_messages).direct_messages({:count => 200}.merge(args)) end
+@@ -258,21 +258,30 @@ module MikuTwitter::APIShortcuts
+         cursor_pager(api, parser, key, args.merge(cursor: res[:next_cursor])).next{ |nex|
+           res[key] + nex } end } end
+ 
+-  def idlist2userlist(deferred)
+-    deferred.next{ |ids|
+-      promise = Deferred.new(true)
+-      Thread.new{
+-        begin
+-          promise.call(User.findbyid(ids))
+-        rescue Exception => e
+-          promise.fail(e) end }
+-      promise.next{ |users|
+-        if(users.size != ids.size)
+-          Deferred.when(*(ids - users.map{ |u| u[:id] }).each_slice(100).map{ |segment|
+-                          user_lookup(id: segment.join(',')).trap{ |e| warn e; [] } }).next{ |res|
+-            res.inject(users){ |a, b| a + b } }
++  def idlist2userlist(deferred, cache: :keep)
++    deferred.next do |ids|
++      detected = {}           # {id => User}
++      lookups = Set.new       # [id]
++      ids.each do |id|
++        user = User.findbyid(id, Retriever::DataSource::USE_LOCAL_ONLY)
++        if user.is_a? User
++          detected[id] = user
+         else
+-          users end } } end
++          lookups << id
++        end
++      end
++      defer = lookups.each_slice(100).map{|lookup_chunk|
++        user_lookup(id: lookup_chunk.join(','), cache: cache).next{|users|
++          users.each do |user|
++            detected[user.id] = user
++          end
++        }
++      }
++      Delayer::Deferred.when(*defer).next do
++        ids.map{|id| detected[id] }
++      end
++    end
++  end
+ 
+   # upload.twitter.comã?«ç?»å??ç­?ã??ã?¢ã??ã??ã?­ã?¼ã??ã??ã??
+   # ã?¢ã??ã??ã?­ã?¼ã??ã??ã??ã??ã?¡ã?¤ã?«ã?®media_idã??è¿?ã??ã??
diff -r 4c382bc7c0b1 -r bbdbb9e36976 net/mikutter/patches/patch-core_mui_gtk__inneruserlist.rb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mikutter/patches/patch-core_mui_gtk__inneruserlist.rb Sat Jun 10 09:45:33 2017 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-core_mui_gtk__inneruserlist.rb,v 1.1 2017/06/10 09:45:33 tsutsui Exp $
+
+- pull upstream fixes for ticket #916
+  https://dev.mikutter.hachune.net/issues/916
+
+--- core/mui/gtk_inneruserlist.rb.orig 2017-06-10 01:11:51.000000000 +0000
++++ core/mui/gtk_inneruserlist.rb
+@@ -32,10 +32,10 @@ class Gtk::InnerUserList < Gtk::TreeView
+     }.reject{|user|
+       exist_users.include?(user)
+     }.deach{|user|
++      break if destroyed?
+       iter = model.append
+-      iter[COL_ICON] = user.icon.load_pixbuf(width: 24, height: 24){|pixbuf|
+-        iter[COL_ICON] = pixbuf unless destroyed?
+-      }
++      # ã??ã??ã?§ã?¯COL_ICONã??å??ã??ã??ã??nilã?®ã?¾ã?¾ã?«ã??ã?¦ã?¢ã?¤ã?³ã?³ã??表示ã??ã?ªã??ã??
++      # ã?¢ã?¤ã?³ã?³ã?¯ Gtk::UserList#emit_expose_user ã?§ã??ã?«ã?©ã? ã??表示ã??ã??ã??æ??ã?«å??ã??ã?¦å??ã??ã??
+       iter[COL_SCREEN_NAME] = user[:idname]
+       iter[COL_NAME] = user[:name]
+       iter[COL_USER] = user
diff -r 4c382bc7c0b1 -r bbdbb9e36976 net/mikutter/patches/patch-core_mui_gtk__userlist.rb
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mikutter/patches/patch-core_mui_gtk__userlist.rb      Sat Jun 10 09:45:33 2017 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-core_mui_gtk__userlist.rb,v 1.1 2017/06/10 09:45:33 tsutsui Exp $
+
+- pull upstream fixes for ticket #916
+  https://dev.mikutter.hachune.net/issues/916
+
+--- core/mui/gtk_userlist.rb.orig      2017-06-10 01:11:51.000000000 +0000
++++ core/mui/gtk_userlist.rb
+@@ -27,6 +27,10 @@ class Gtk::UserList < Gtk::EventBox
+     scrollbar = ::Gtk::VScrollbar.new(@listview.vadjustment)
+     add Gtk::HBox.new(false, 0).add(@listview).closeup(scrollbar)
+     @listview.ssc(:row_activated, &self.class.row_activated)
++    @listview.ssc(:expose_event){
++      emit_expose_user
++      false
++    }
+   end
+ 
+   def each
+@@ -68,5 +72,25 @@ class Gtk::UserList < Gtk::EventBox
+     @listview.reorder(user)
+     self end
+ 
++  private
++
++  def emit_expose_user
++    if @listview.visible_range
++      current, last = @listview.visible_range
++      Enumerator.new{|y|
++        while (current <=> last) < 1
++          y << @listview.model.get_iter(current)
++          break if not current.next!
++        end
++      }.reject{|iter|
++        iter[Gtk::InnerUserList::COL_ICON]
++      }.each do |iter|
++        iter[Gtk::InnerUserList::COL_ICON] = iter[Gtk::InnerUserList::COL_USER].icon.load_pixbuf(width: 24, height: 24){|pixbuf|
++          iter[Gtk::InnerUserList::COL_ICON] = pixbuf unless @listview.destroyed?
++        }
++      end
++    end
++  end
++
+ end
+ 
diff -r 4c382bc7c0b1 -r bbdbb9e36976 net/mikutter/patches/patch-core_plugin_photo__support_photo__support.rb
--- a/net/mikutter/patches/patch-core_plugin_photo__support_photo__support.rb   Sat Jun 10 08:40:18 2017 +0000
+++ b/net/mikutter/patches/patch-core_plugin_photo__support_photo__support.rb   Sat Jun 10 09:45:33 2017 +0000
@@ -1,8 +1,10 @@
-$NetBSD: patch-core_plugin_photo__support_photo__support.rb,v 1.3 2016/06/04 02:28:25 tsutsui Exp $
+$NetBSD: patch-core_plugin_photo__support_photo__support.rb,v 1.4 2017/06/10 09:45:33 tsutsui Exp $
 
 - temporary workaround to skip totorijp gems (sorry, @toshi_a)
+- pull fixes for upstream ticket #1031
+  https://dev.mikutter.hachune.net/issues/1031
 
---- core/plugin/photo_support/photo_support.rb.orig    2016-05-28 16:42:44.000000000 +0000
+--- core/plugin/photo_support/photo_support.rb.orig    2017-06-10 01:11:51.000000000 +0000
 +++ core/plugin/photo_support/photo_support.rb
 @@ -1,7 +1,7 @@
  # coding: utf-8
@@ -13,7 +15,18 @@
  
  module Plugin::PhotoSupport
    INSTAGRAM_PATTERN = %r{\Ahttps?://(?:instagr\.am|(?:www\.)?instagram\.com)/p/([a-zA-Z0-9_\-]+)/}
-@@ -181,9 +181,14 @@ Plugin.create :photo_support do
+@@ -25,8 +25,9 @@ end
+ 
+ Plugin.create :photo_support do
+   # twitpic
+-  defimageopener('twitpic', %r<^http://twitpic\.com/[a-zA-Z0-9]+>) do |display_url|
++  defimageopener('twitpic', %r<^https?://twitpic\.com/[a-zA-Z0-9]+>) do |display_url|
+     connection = HTTPClient.new
++    connection.transparent_gzip_decompression = true
+     page = connection.get_content(display_url)
+     next nil if page.empty?
+     doc = Nokogiri::HTML(page)
+@@ -181,9 +182,14 @@ Plugin.create :photo_support do
  
    # totori.dip.jp
    defimageopener('totori.dip.jp', %r#\Ahttp://totori\.dip\.jp/?\Z#) do |display_url|



Home | Main Index | Thread Index | Old Index