diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-06-15 14:57:03 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-06-15 14:57:03 +0100 |
commit | d18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch) | |
tree | 4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /games-board/pychess | |
parent | e748ba9741f6540f4675c23e3e37b73e822c13a4 (diff) |
gentoo resync : 15.06.2021
Diffstat (limited to 'games-board/pychess')
-rw-r--r-- | games-board/pychess/Manifest | 2 | ||||
-rw-r--r-- | games-board/pychess/files/pychess-gtk-compat.patch | 46 | ||||
-rw-r--r-- | games-board/pychess/files/pychess-setup-no-display.patch | 136 |
3 files changed, 0 insertions, 184 deletions
diff --git a/games-board/pychess/Manifest b/games-board/pychess/Manifest index 891c3c7df1fe..40b58c8579c6 100644 --- a/games-board/pychess/Manifest +++ b/games-board/pychess/Manifest @@ -1,5 +1,3 @@ -AUX pychess-gtk-compat.patch 1802 BLAKE2B 9c073b28c9dc2cbfc3e9bc1acce5b091ae6d77869c23a21d06e84fde2e7190ec412aa7d1f4e3a24698816a843ca8525be4f2114c046774ba6daa6aec6765edc7 SHA512 54db9fd66bcbf2e5c4a0d761b72fb461450a75ac32338fc7a7a097bd8e14667bae682a0ecb9e0ad63f9d0ff04892f3b37afe7041c0582bab57f36e64e6d7d65c -AUX pychess-setup-no-display.patch 5165 BLAKE2B 897e1b5d01b9192ca969c1d4603a1597a3c3ebbc91783c66f8f8067ef6e1064c5011faeca5684dcb3ad472860ea9c256882f35546d3582837957f3d3c53fec17 SHA512 bc7a975b8069e9a96d8f56e54bb3f7b8e2d1c1eddf89615ad2a45292b5bb1926bbb17341f565129a868787120e501b7c2f6cbe3e059249030ec9dc218a2e320a DIST pychess-1.0.2.tar.gz 14571480 BLAKE2B 01ca5d802f651a1f371b32dfbc97ac5c05f3b3fad3c6394209423cdb0fca995ea12254ad98fa94885e3b31a2deb72f63c2df5d0d97258a208c41ff3aab6a8dde SHA512 434f511ead51f1e90381172c894ed8b34fc5fae63e3714395285f6c55aa77dfe2f763e97febd93a3abcbc105f0e7591a9a84276eaae70c80f065a24040bfb083 DIST pychess-1.0.3.tar.gz 14898032 BLAKE2B 0993bcf26d3284847815b37f570b7482c5359595f9649f9546ed090b6c090c3686d71478c9ecdaacde4bdf56f8f57da89623023d25809b46fe4e2800beeba91d SHA512 ca69555b1d952274fc4850f20bc66569e2f08120109908489c584231c754345b16fc1b1e9fa5b44a10582590145cf472604e5f5bd22522037666414418f5fda5 EBUILD pychess-1.0.2.ebuild 1193 BLAKE2B d15cf16cdbbf1a55f96540f988c9dc4f0401a36fdb326334c2ff4df44a85c8389af6ef45218150963ac06795a5b97ab48a68c7a30106cdab2097f7150e25df70 SHA512 b8c03be70ff01f7220ffc779032d6ca8a74efe5d7398df772c01dc32a173400fe8a586de6d57dd3c7ee33edc31ba798001d085dd98e5052db072ca15ab7b5286 diff --git a/games-board/pychess/files/pychess-gtk-compat.patch b/games-board/pychess/files/pychess-gtk-compat.patch deleted file mode 100644 index fa7f2fc61033..000000000000 --- a/games-board/pychess/files/pychess-gtk-compat.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 6c840c9981f2077d0fa4436b30a2f2f6650e55fb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micka=C3=ABl=20Schoentgen?= <contact@tiger-222.fr> -Date: Mon, 13 Apr 2020 14:48:40 +0200 -Subject: [PATCH] Fix missing TreeModelFilter.sort_new_with_model() on some Gtk - versions -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This is due to API changes, but let's keep compatibility with older versions. -That should fix #1811. - -Signed-off-by: Mickaƫl Schoentgen <contact@tiger-222.fr> ---- - lib/pychess/perspectives/fics/__init__.py | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/lib/pychess/perspectives/fics/__init__.py b/lib/pychess/perspectives/fics/__init__.py -index 4f956b695..1518c21e0 100644 ---- a/lib/pychess/perspectives/fics/__init__.py -+++ b/lib/pychess/perspectives/fics/__init__.py -@@ -27,6 +27,24 @@ - from pychess.perspectives import Perspective, perspective_manager, panel_name - - -+if not hasattr(Gtk.TreeModelFilter, "new_with_model"): -+ # Fix #1811: TreeModelFilter.sort_new_with_model() is missing on some Gtk versions -+ # due to API changes. Let's keep compatibility with older versions. -+ -+ def sort_new_with_model(self): -+ super_object = super(Gtk.TreeModel, self) -+ if hasattr(super_object, "sort_new_with_model"): -+ return super_object.sort_new_with_model() -+ return Gtk.TreeModelSort.new_with_model(self) -+ -+ @classmethod -+ def new_with_model(self, child_model): -+ return Gtk.TreeModel.sort_new_with_model(child_model) -+ -+ Gtk.TreeModel.sort_new_with_model = sort_new_with_model -+ Gtk.TreeModelFilter.new_with_model = new_with_model -+ -+ - class PlayerNotificationMessage(InfoBarMessage): - - def __init__(self, message_type, content, callback, player, text): diff --git a/games-board/pychess/files/pychess-setup-no-display.patch b/games-board/pychess/files/pychess-setup-no-display.patch deleted file mode 100644 index 29b06bd93fe8..000000000000 --- a/games-board/pychess/files/pychess-setup-no-display.patch +++ /dev/null @@ -1,136 +0,0 @@ -From faf456bf2d081aa3cff52d0f9f714748a04628b1 Mon Sep 17 00:00:00 2001 -From: gbtami <gbtami@gmail.com> -Date: Sat, 18 May 2019 18:50:17 +0200 -Subject: [PATCH] Fix bdist_rpm. Prevent importing GLib from setup.py - ---- - lib/pychess/Savers/pgn.py | 8 ++++---- - lib/pychess/Utils/__init__.py | 18 ++++++++++++++++++ - lib/pychess/widgets/ChessClock.py | 20 ++------------------ - 3 files changed, 24 insertions(+), 22 deletions(-) - -diff --git a/lib/pychess/Savers/pgn.py b/lib/pychess/Savers/pgn.py -index ac4238471..2b089e1d1 100644 ---- a/lib/pychess/Savers/pgn.py -+++ b/lib/pychess/Savers/pgn.py -@@ -10,8 +10,6 @@ - import sys - import textwrap - --from gi.repository import GLib -- - import pexpect - - from sqlalchemy import String -@@ -23,7 +21,6 @@ - WON_RESIGN, DRAW, BLACKWON, WHITEWON, NORMALCHESS, DRAW_AGREE, FIRST_PAGE, PREV_PAGE, NEXT_PAGE, \ - ABORTED_REASONS, ADJOURNED_REASONS, WON_CALLFLAG, DRAW_ADJUDICATION, WON_ADJUDICATION, \ - WHITE_ENGINE_DIED, BLACK_ENGINE_DIED, RUNNING, TOOL_NONE, TOOL_CHESSDB, TOOL_SCOUTFISH -- - from pychess.System import conf - from pychess.System.Log import log - from pychess.System.protoopen import PGN_ENCODING -@@ -35,7 +32,7 @@ - from pychess.Utils.elo import get_elo_rating_change_pgn - from pychess.Utils.logic import getStatus - from pychess.Variants import name2variant, NormalBoard, variants --from pychess.widgets.ChessClock import formatTime -+from pychess.Utils import formatTime - from pychess.Savers.ChessFile import ChessFile, LoadingError - from pychess.Savers.database import col2label, TagDatabase, parseDateTag - from pychess.Database import model as dbmodel -@@ -460,6 +457,7 @@ def init_tag_database(self, importer=None): - if size > 10000000: - drop_indexes(self.engine) - if self.progressbar is not None: -+ from gi.repository import GLib - GLib.idle_add(self.progressbar.set_text, _("Importing game headers...")) - if importer is None: - importer = PgnImport(self) -@@ -477,6 +475,7 @@ def init_chess_db(self): - if chess_db_path is not None and self.path and self.size > 0: - try: - if self.progressbar is not None: -+ from gi.repository import GLib - GLib.idle_add(self.progressbar.set_text, _("Creating .bin index file...")) - self.chess_db = Parser(engine=(chess_db_path, )) - self.chess_db.open(self.path) -@@ -503,6 +502,7 @@ def init_scoutfish(self): - if scoutfish_path is not None and self.path and self.size > 0: - try: - if self.progressbar is not None: -+ from gi.repository import GLib - GLib.idle_add(self.progressbar.set_text, _("Creating .scout index file...")) - self.scoutfish = Scoutfish(engine=(scoutfish_path, )) - self.scoutfish.open(self.path) -diff --git a/lib/pychess/Utils/__init__.py b/lib/pychess/Utils/__init__.py -index 481273854..038c798da 100755 ---- a/lib/pychess/Utils/__init__.py -+++ b/lib/pychess/Utils/__init__.py -@@ -1,9 +1,27 @@ - import asyncio - import weakref -+from math import ceil - - from pychess.Utils.lutils.ldata import MATE_VALUE, MATE_DEPTH - - -+def formatTime(seconds, clk2pgn=False): -+ minus = "" -+ if seconds <= -10 or seconds >= 10: -+ seconds = ceil(seconds) -+ if seconds < 0: -+ minus = "-" -+ seconds = -seconds -+ hours, remainder = divmod(seconds, 3600) -+ minutes, seconds = divmod(remainder, 60) -+ if hours or clk2pgn: -+ return minus + "%d:%02d:%02d" % (hours, minutes, seconds) -+ elif not minutes and seconds < 10: -+ return minus + "%.1f" % seconds -+ else: -+ return minus + "%d:%02d" % (minutes, seconds) -+ -+ - def prettyPrintScore(s, depth, format_mate=False): - """The score parameter is an eval value from White point of view""" - -diff --git a/lib/pychess/widgets/ChessClock.py b/lib/pychess/widgets/ChessClock.py -index 8811d13db..740e0828a 100644 ---- a/lib/pychess/widgets/ChessClock.py -+++ b/lib/pychess/widgets/ChessClock.py -@@ -1,32 +1,16 @@ - # -*- coding: UTF-8 -*- - --from math import ceil, pi, cos, sin -+from math import pi, cos, sin - - import cairo - from gi.repository import GLib, Gtk, Gdk, Pango, PangoCairo, GObject - - from pychess.System import conf -+from pychess.Utils import formatTime - from pychess.Utils.const import BLACK, WHITE, LOCAL, UNFINISHED_STATES, DRAW, WHITEWON, BLACKWON, UNKNOWN_STATE - from . import preferencesDialog - - --def formatTime(seconds, clk2pgn=False): -- minus = "" -- if seconds <= -10 or seconds >= 10: -- seconds = ceil(seconds) -- if seconds < 0: -- minus = "-" -- seconds = -seconds -- hours, remainder = divmod(seconds, 3600) -- minutes, seconds = divmod(remainder, 60) -- if hours or clk2pgn: -- return minus + "%d:%02d:%02d" % (hours, minutes, seconds) -- elif not minutes and seconds < 10: -- return minus + "%.1f" % seconds -- else: -- return minus + "%d:%02d" % (minutes, seconds) -- -- - class ChessClock(Gtk.DrawingArea): - def __init__(self): - GObject.GObject.__init__(self) |