From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/kajongg/, kde-apps/kajongg/files/
Date: Wed, 29 Dec 2021 15:42:00 +0000 (UTC) [thread overview]
Message-ID: <1640792481.391043355ed36e52482392f1911d4f0513d8d0a6.asturm@gentoo> (raw)
commit: 391043355ed36e52482392f1911d4f0513d8d0a6
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 28 14:49:23 2021 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Dec 29 15:41:21 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39104335
kde-apps/kajongg: Fix running with Python 3.10
See also: https://invent.kde.org/games/kajongg/-/merge_requests/6
Upstream commit b647417e16f6146f4ae89608fd0494e7780da862
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../kajongg/files/kajongg-21.08.3-python3.10.patch | 109 +++++++++++++++++++++
...gg-21.08.3.ebuild => kajongg-21.08.3-r1.ebuild} | 2 +
...gg-21.12.0.ebuild => kajongg-21.12.0-r1.ebuild} | 2 +
3 files changed, 113 insertions(+)
diff --git a/kde-apps/kajongg/files/kajongg-21.08.3-python3.10.patch b/kde-apps/kajongg/files/kajongg-21.08.3-python3.10.patch
new file mode 100644
index 000000000000..d9f7e100309d
--- /dev/null
+++ b/kde-apps/kajongg/files/kajongg-21.08.3-python3.10.patch
@@ -0,0 +1,109 @@
+From b647417e16f6146f4ae89608fd0494e7780da862 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sat, 18 Dec 2021 10:13:32 +0000
+Subject: [PATCH] Fix running with Python 3.10
+
+---
+ src/board.py | 10 +++++-----
+ src/genericdelegates.py | 2 +-
+ src/humanclient.py | 4 ++--
+ src/qtreactor.py | 2 +-
+ src/uitile.py | 4 ++--
+ 5 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/src/board.py b/src/board.py
+index 2f52a47d..ed432c22 100644
+--- a/src/board.py
++++ b/src/board.py
+@@ -102,7 +102,7 @@ class PlayerWind(AnimatedMixin, QGraphicsObject, StrMixin):
+ """paint the marker"""
+ with Painter(painter):
+ painter.setBrush(self.__brush)
+- size = Internal.scene.windTileset.faceSize.height()
++ size = int(Internal.scene.windTileset.faceSize.height())
+ ellRect = QRectF(QPoint(), QPoint(size, size))
+ painter.drawEllipse(ellRect)
+ renderer = Internal.scene.windTileset.renderer()
+@@ -112,7 +112,7 @@ class PlayerWind(AnimatedMixin, QGraphicsObject, StrMixin):
+
+ def boundingRect(self): # pylint: disable=no-self-use
+ """define the part of the tile we want to see"""
+- size = Internal.scene.windTileset.faceSize.height() * 1.1
++ size = int(Internal.scene.windTileset.faceSize.height() * 1.1)
+ return QRectF(QPoint(), QPoint(size, size))
+
+ def __str__(self):
+@@ -878,11 +878,11 @@ class FittingView(QGraphicsView):
+ tRect = uiTile.boundingRect()
+ tRect = self.viewportTransform().mapRect(tRect)
+ pmapSize = QSize(
+- tRect.width() * uiTile.scale,
+- tRect.height() * uiTile.scale)
++ int(tRect.width() * uiTile.scale),
++ int(tRect.height() * uiTile.scale))
+ pMap = uiTile.pixmapFromSvg(pmapSize)
+ drag.setPixmap(pMap)
+- drag.setHotSpot(QPoint(pMap.width() / 2, pMap.height() / 2))
++ drag.setHotSpot(QPoint(int(pMap.width() / 2), int(pMap.height() / 2)))
+ return drag
+
+
+diff --git a/src/genericdelegates.py b/src/genericdelegates.py
+index be99eb57..a4521177 100644
+--- a/src/genericdelegates.py
++++ b/src/genericdelegates.py
+@@ -64,7 +64,7 @@ class RichTextColumnDelegate(QStyledItemDelegate):
+ text = index.model().data(index)
+ self.document.setDefaultFont(option.font)
+ self.document.setHtml(text)
+- return QSize(self.document.idealWidth() + 5,
++ return QSize(int(self.document.idealWidth()) + 5,
+ option.fontMetrics.height())
+
+
+diff --git a/src/humanclient.py b/src/humanclient.py
+index 1d3f58f3..8edf848b 100644
+--- a/src/humanclient.py
++++ b/src/humanclient.py
+@@ -321,8 +321,8 @@ class ClientDialog(QDialog):
+ idx if vertical else 0,
+ idx if not vertical else 0)
+
+- geometry.setWidth(width)
+- geometry.setHeight(height)
++ geometry.setWidth(int(width))
++ geometry.setHeight(int(height))
+ self.setGeometry(geometry)
+
+ def showEvent(self, dummyEvent):
+diff --git a/src/qtreactor.py b/src/qtreactor.py
+index bda4782f..c24d01d0 100644
+--- a/src/qtreactor.py
++++ b/src/qtreactor.py
+@@ -250,7 +250,7 @@ class QtReactor(posixbase.PosixReactorBase):
+ timeout = 0
+ else:
+ timeout = self.timeout()
+- self._timer.setInterval(timeout * 1000)
++ self._timer.setInterval(int(timeout * 1000))
+ self._timer.start()
+
+ def runReturn(self, installSignalHandlers=True):
+diff --git a/src/uitile.py b/src/uitile.py
+index 57e322bb..9e4b3f9d 100644
+--- a/src/uitile.py
++++ b/src/uitile.py
+@@ -250,8 +250,8 @@ class UITile(AnimatedMixin, QGraphicsObject, StrMixin):
+ if self.showFace():
+ faceSize = self.tileset.faceSize.toSize()
+ faceSize = QSize(
+- faceSize.width() * xScale,
+- faceSize.height() * yScale)
++ int(faceSize.width() * xScale),
++ int(faceSize.height() * yScale))
+ painter.translate(self.facePos())
+ renderer.render(painter, self.tileset.svgName[self.tile.exposed],
+ QRectF(QPointF(), QSizeF(faceSize)))
+--
+GitLab
+
diff --git a/kde-apps/kajongg/kajongg-21.08.3.ebuild b/kde-apps/kajongg/kajongg-21.08.3-r1.ebuild
similarity index 95%
rename from kde-apps/kajongg/kajongg-21.08.3.ebuild
rename to kde-apps/kajongg/kajongg-21.08.3-r1.ebuild
index 7bb25ba3b606..254228048ce3 100644
--- a/kde-apps/kajongg/kajongg-21.08.3.ebuild
+++ b/kde-apps/kajongg/kajongg-21.08.3-r1.ebuild
@@ -37,6 +37,8 @@ RDEPEND="${DEPEND}
>=kde-apps/libkmahjongg-${PVCUT}:5
"
+PATCHES=( "${FILESDIR}/${P}-python3.10.patch" )
+
pkg_setup() {
python-single-r1_pkg_setup
ecm_pkg_setup
diff --git a/kde-apps/kajongg/kajongg-21.12.0.ebuild b/kde-apps/kajongg/kajongg-21.12.0-r1.ebuild
similarity index 94%
rename from kde-apps/kajongg/kajongg-21.12.0.ebuild
rename to kde-apps/kajongg/kajongg-21.12.0-r1.ebuild
index e6e07170fdd6..698f5a8e9bcd 100644
--- a/kde-apps/kajongg/kajongg-21.12.0.ebuild
+++ b/kde-apps/kajongg/kajongg-21.12.0-r1.ebuild
@@ -37,6 +37,8 @@ RDEPEND="${DEPEND}
>=kde-apps/libkmahjongg-${PVCUT}:5
"
+PATCHES=( "${FILESDIR}/${PN}-21.08.3-python3.10.patch" )
+
pkg_setup() {
python-single-r1_pkg_setup
ecm_pkg_setup
next reply other threads:[~2021-12-29 15:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-29 15:42 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-09-14 13:43 [gentoo-commits] repo/gentoo:master commit in: kde-apps/kajongg/, kde-apps/kajongg/files/ Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1640792481.391043355ed36e52482392f1911d4f0513d8d0a6.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox