summaryrefslogtreecommitdiff
path: root/net/mikutter
diff options
context:
space:
mode:
authortsutsui <tsutsui@pkgsrc.org>2018-07-08 06:08:09 +0000
committertsutsui <tsutsui@pkgsrc.org>2018-07-08 06:08:09 +0000
commit082391844c20fa1ee89537ccb8deb100852b21f8 (patch)
tree06db2b48cd879860b01ef073a08d3a34c19e72b3 /net/mikutter
parent0f6e18c40d888ba9b7a4952f21b8f1c88e3c7956 (diff)
downloadpkgsrc-082391844c20fa1ee89537ccb8deb100852b21f8.tar.gz
mikutter: pull upstream fixes.
Diffstat (limited to 'net/mikutter')
-rw-r--r--net/mikutter/Makefile6
-rw-r--r--net/mikutter/PLIST3
-rw-r--r--net/mikutter/distinfo8
-rw-r--r--net/mikutter/patches/patch-core_mui_cairo__markup__generator.rb16
-rw-r--r--net/mikutter/patches/patch-core_plugin_current__world_current__world.rb40
-rw-r--r--net/mikutter/patches/patch-core_plugin_current__world_error.rb14
-rw-r--r--net/mikutter/patches/patch-core_plugin_score_select.rb19
-rw-r--r--net/mikutter/patches/patch-core_plugin_twitter_model_world.rb18
-rw-r--r--net/mikutter/patches/patch-core_plugin_world_world.rb35
9 files changed, 154 insertions, 5 deletions
diff --git a/net/mikutter/Makefile b/net/mikutter/Makefile
index dea4cca1024..ee73d36ff06 100644
--- a/net/mikutter/Makefile
+++ b/net/mikutter/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.161 2018/06/11 14:09:11 tsutsui Exp $
+# $NetBSD: Makefile,v 1.162 2018/07/08 06:08:09 tsutsui Exp $
#
DISTNAME= mikutter.3.7.2
PKGNAME= ${RUBY_PKGPREFIX}-${DISTNAME:S/./-/}
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= https://mikutter.hachune.net/bin/
@@ -17,7 +18,7 @@ RUBY_VERSIONS_ACCEPTED= 23 24
DEPENDS+= ${RUBY_PKGPREFIX}-pluggaloid>=1.1.1:../../net/ruby-pluggaloid
DEPENDS+= ${RUBY_PKGPREFIX}-diva>=0.3.2:../../devel/ruby-diva
-DEPENDS+= ${RUBY_PKGPREFIX}-gnome2-gtk>=3.2.4nb2:../../x11/ruby-gnome2-gtk
+DEPENDS+= ${RUBY_PKGPREFIX}-gnome2-gtk>=3.2.7:../../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
@@ -37,7 +38,6 @@ USE_TOOLS+= pax
REPLACE_RUBY= mikutter.rb devel/makechi.rb
REPLACE_RUBY_DIRS= core
-OVERRIDE_GEMSPEC+= json_pure:json>=1.8
INSTALLATION_DIRS+= bin share/doc/mikutter share/applications share/mikutter
diff --git a/net/mikutter/PLIST b/net/mikutter/PLIST
index d1a07b151b1..07830e71d24 100644
--- a/net/mikutter/PLIST
+++ b/net/mikutter/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.41 2018/05/27 05:17:40 tsutsui Exp $
+@comment $NetBSD: PLIST,v 1.42 2018/07/08 06:08:09 tsutsui Exp $
bin/mikutter
share/applications/mikutter.desktop
share/doc/mikutter/README
@@ -235,6 +235,7 @@ share/mikutter/core/plugin/core/.mikutter.yml
share/mikutter/core/plugin/core/core.rb
share/mikutter/core/plugin/current_world/.mikutter.yml
share/mikutter/core/plugin/current_world/current_world.rb
+share/mikutter/core/plugin/current_world/error.rb
share/mikutter/core/plugin/direct_message/.mikutter.yml
share/mikutter/core/plugin/direct_message/direct_message.rb
share/mikutter/core/plugin/direct_message/dmlistview.rb
diff --git a/net/mikutter/distinfo b/net/mikutter/distinfo
index 28a61b8938c..dc47546ce0e 100644
--- a/net/mikutter/distinfo
+++ b/net/mikutter/distinfo
@@ -1,10 +1,16 @@
-$NetBSD: distinfo,v 1.145 2018/06/11 14:09:11 tsutsui Exp $
+$NetBSD: distinfo,v 1.146 2018/07/08 06:08:09 tsutsui Exp $
SHA1 (mikutter.3.7.2.tar.gz) = 21b823c752ae4fa49de226f196dadcda5d224aec
RMD160 (mikutter.3.7.2.tar.gz) = 13bca59a3040d40ee0cc885a31a5f7bfe072e71c
SHA512 (mikutter.3.7.2.tar.gz) = 58b8fc4734aafa32bfa616c32f1f72c1ce484c56ba52f46c1eb9aeec462853a1a66f2af31db7544dd0ee74f78833444fab8a2041eac0a1e7767bddf2f17788d8
Size (mikutter.3.7.2.tar.gz) = 2908984 bytes
+SHA1 (patch-core_mui_cairo__markup__generator.rb) = e39dec59758d15db48da82e95375158c7353253d
+SHA1 (patch-core_plugin_current__world_current__world.rb) = bffddf24f59b48b4f954b2812df51880a05236f8
+SHA1 (patch-core_plugin_current__world_error.rb) = cf3bc785b4adde9bf19071e2bd4a7d5628ace732
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) = 2d10f907d278000168210c5325e7d41c5dd2ca08
+SHA1 (patch-core_plugin_score_select.rb) = 6b53774fc7061e5c7ad875fb28d199c77397859d
+SHA1 (patch-core_plugin_twitter_model_world.rb) = 94a28af27c1e1cab754884f4b498feeb62cea035
+SHA1 (patch-core_plugin_world_world.rb) = 455e91ff8756f40195e5a4290fe2fc292f25a125
SHA1 (patch-mikutter.rb) = 061d1b5d4fcf9296bc111a5da1e34a3d622c62a1
diff --git a/net/mikutter/patches/patch-core_mui_cairo__markup__generator.rb b/net/mikutter/patches/patch-core_mui_cairo__markup__generator.rb
new file mode 100644
index 00000000000..605cf3b00df
--- /dev/null
+++ b/net/mikutter/patches/patch-core_mui_cairo__markup__generator.rb
@@ -0,0 +1,16 @@
+$NetBSD: patch-core_mui_cairo__markup__generator.rb,v 1.1 2018/07/08 06:08:09 tsutsui Exp $
+
+- pull upstream fix
+ https://dev.mikutter.hachune.net/issues/1242
+
+--- core/mui/cairo_markup_generator.rb.orig 2018-06-10 15:38:30.000000000 +0000
++++ core/mui/cairo_markup_generator.rb
+@@ -31,7 +31,7 @@ module Gdk::MarkupGenerator
+ # ==== Return
+ # Pango::AttrList 本文に適用する装飾
+ def description_attr_list(attr_list=Pango::AttrList.new, emoji_height: 24)
+- Plugin[:gtk].score_of(message).inject(0){|start_index, note|
++ score.inject(0){|start_index, note|
+ end_index = start_index + note.description.bytesize
+ if UserConfig[:miraclepainter_expand_custom_emoji] && note.respond_to?(:inline_photo)
+ end_index += -note.description.bytesize + 1
diff --git a/net/mikutter/patches/patch-core_plugin_current__world_current__world.rb b/net/mikutter/patches/patch-core_plugin_current__world_current__world.rb
new file mode 100644
index 00000000000..8055d5586d6
--- /dev/null
+++ b/net/mikutter/patches/patch-core_plugin_current__world_current__world.rb
@@ -0,0 +1,40 @@
+$NetBSD: patch-core_plugin_current__world_current__world.rb,v 1.1 2018/07/08 06:08:09 tsutsui Exp $
+
+- pull upstream fix
+ https://dev.mikutter.hachune.net/issues/1231
+
+--- core/plugin/current_world/current_world.rb.orig 2018-06-10 15:38:30.000000000 +0000
++++ core/plugin/current_world/current_world.rb
+@@ -1,5 +1,7 @@
+ # -*- coding: utf-8 -*-
+
++require_relative 'error'
++
+ Plugin.create(:current_world) do
+ # 現在選択されているアカウントに対応するModelを返すフィルタ。
+ filter_world_current do |result|
+@@ -17,8 +19,13 @@ Plugin.create(:current_world) do
+ self.current_world = new
+ Plugin.call(:primary_service_changed, current_world)
+ end
+- rescue RuntimeError => err
+- error err
++ rescue Plugin::CurrentWorld::WorldNotfoundError
++ activity :system, _('アカウントを存在しないアカウント(%{uri})に切り替えようとしました') % {uri: new&.uri || 'nil'},
++ description: _('アカウントを切り替えようとしましたが、切り替えようとしたアカウントは存在しませんでした。') + "\n\n" +
++ _("切り替え先のアカウント:\n%{uri}") % {uri: new&.uri || 'nil'} + "\n\n" +
++ _('現在存在するアカウント:') + "\n" +
++ Enumerator.new{|y| Plugin.filtering(:worlds, y) }.map{|w| "#{w.slug} (#{w.uri})" }.to_a.join("\n") + "\n\n" +
++ _('%{world_class}#uri を定義することでこのエラーを回避できます。詳しくは %{see} を参照してください') % {world_class: new.class, see: 'https://dev.mikutter.hachune.net/issues/1231'}
+ end
+ end
+
+@@ -39,7 +46,7 @@ Plugin.create(:current_world) do
+ # ==== Raise
+ # [Plugin::World::InvalidWorldError] _worlds_ にないアカウントが渡された場合
+ def current_world=(new)
+- raise RuntimeError unless Enumerator.new{|y| Plugin.filtering(:worlds, y) }.include?(new)
++ raise Plugin::CurrentWorld::WorldNotfoundError unless Enumerator.new{|y| Plugin.filtering(:worlds, y) }.include?(new)
+ @current = new
+ end
+
diff --git a/net/mikutter/patches/patch-core_plugin_current__world_error.rb b/net/mikutter/patches/patch-core_plugin_current__world_error.rb
new file mode 100644
index 00000000000..cf2d950657d
--- /dev/null
+++ b/net/mikutter/patches/patch-core_plugin_current__world_error.rb
@@ -0,0 +1,14 @@
+$NetBSD: patch-core_plugin_current__world_error.rb,v 1.1 2018/07/08 06:08:09 tsutsui Exp $
+
+- pull upstream fix
+ https://dev.mikutter.hachune.net/issues/1231
+
+--- core/plugin/current_world/error.rb.orig 2018-07-08 05:27:15.379532058 +0000
++++ core/plugin/current_world/error.rb
+@@ -0,0 +1,6 @@
++# -*- coding: utf-8 -*-
++
++module Plugin::CurrentWorld
++ Error = Class.new(RuntimeError)
++ WorldNotfoundError = Class.new(Error)
++end
diff --git a/net/mikutter/patches/patch-core_plugin_score_select.rb b/net/mikutter/patches/patch-core_plugin_score_select.rb
new file mode 100644
index 00000000000..41989f769be
--- /dev/null
+++ b/net/mikutter/patches/patch-core_plugin_score_select.rb
@@ -0,0 +1,19 @@
+$NetBSD: patch-core_plugin_score_select.rb,v 1.1 2018/07/08 06:08:09 tsutsui Exp $
+
+- pull upstream fix
+ https://dev.mikutter.hachune.net/issues/1242
+
+--- core/plugin/score/select.rb.orig 2018-06-10 15:38:30.000000000 +0000
++++ core/plugin/score/select.rb
+@@ -4,6 +4,11 @@ module Plugin::Score
+ extend self
+
+ def score_by_score(model, target_note=model)
++ @score_cache ||= TimeLimitedStorage.new(Array, Object, 60)
++ @score_cache[[model, target_note]] ||= score_by_score_nocache(model, target_note)
++ end
++
++ def score_by_score_nocache(model, target_note=model)
+ _, _, available_score_list = Plugin.filtering(:score_filter, model, target_note, Set.new)
+ selected_score = choose_best_score(available_score_list)
+ if selected_score && !selected_score.all? { |s| s.is_a?(Plugin::Score::TextNote) }
diff --git a/net/mikutter/patches/patch-core_plugin_twitter_model_world.rb b/net/mikutter/patches/patch-core_plugin_twitter_model_world.rb
new file mode 100644
index 00000000000..bc99070490a
--- /dev/null
+++ b/net/mikutter/patches/patch-core_plugin_twitter_model_world.rb
@@ -0,0 +1,18 @@
+$NetBSD: patch-core_plugin_twitter_model_world.rb,v 1.1 2018/07/08 06:08:09 tsutsui Exp $
+
+- pull upstream fix
+ https://dev.mikutter.hachune.net/issues/1231
+
+--- core/plugin/twitter/model/world.rb.orig 2018-06-10 15:38:30.000000000 +0000
++++ core/plugin/twitter/model/world.rb
+@@ -53,6 +53,10 @@ module Plugin::Twitter
+ profile_image_url: user_obj.icon.perma_link.to_s})
+ end
+
++ def path
++ "/#{slug}"
++ end
++
+ # サービスにクエリ _kind_ を投げる。
+ # レスポンスを受け取るまでブロッキングする。
+ # レスポンスを返す。失敗した場合は、apifailイベントを発生させてnilを返す。
diff --git a/net/mikutter/patches/patch-core_plugin_world_world.rb b/net/mikutter/patches/patch-core_plugin_world_world.rb
new file mode 100644
index 00000000000..c989cf15ccb
--- /dev/null
+++ b/net/mikutter/patches/patch-core_plugin_world_world.rb
@@ -0,0 +1,35 @@
+$NetBSD: patch-core_plugin_world_world.rb,v 1.1 2018/07/08 06:08:09 tsutsui Exp $
+
+- pull upstream fix
+ https://dev.mikutter.hachune.net/issues/1231
+
+--- core/plugin/world/world.rb.orig 2018-06-10 15:38:30.000000000 +0000
++++ core/plugin/world/world.rb
+@@ -10,6 +10,7 @@ miquire :lib, 'diva_hacks'
+ Plugin.create(:world) do
+
+ world_struct = Struct.new(:slug, :name, :proc)
++ @world_slug_dict = {} # world_slug(Symbol) => World URI(Diva::URI)
+
+ defdsl :world_setting do |world_slug, world_name, &proc|
+ filter_world_setting_list do |settings|
+@@ -103,6 +104,18 @@ Plugin.create(:world) do
+ nil
+ end
+ end
+- }.compact.freeze
++ }.compact.freeze.tap(&method(:check_world_uri))
++ end
++
++ def check_world_uri(new_worlds)
++ new_worlds.each do |w|
++ if @world_slug_dict.key?(w.slug)
++ if @world_slug_dict[w.slug] != w.uri
++ warn "The URI of World `#{w.slug}' is not defined. You must define a consistent URI for World Model. see: https://dev.mikutter.hachune.net/issues/1231"
++ end
++ else
++ @world_slug_dict[w.slug] = w.uri
++ end
++ end
+ end
+ end