[gentoo-commits] repo/proj/guru:master commit in: games-board/rmahjong/
commit: efd57955d6243b5839c3edd951383114a444d43c Author: Sergey Torokhov yandex ru> AuthorDate: Thu Apr 18 20:05:52 2024 + Commit: Julien Roy jroy ca> CommitDate: Thu Apr 18 20:05:52 2024 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=efd57955 games-board/rmahjong: enable py3.12 Signed-off-by: Sergey Torokhov yandex.ru> games-board/rmahjong/rmahjong-0.4_p20201106.ebuild | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild b/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild index 2a02080965..e64fb3bc65 100644 --- a/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild +++ b/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_COMPAT=( python3_{10..12} ) inherit desktop python-single-r1 toolchain-funcs xdg @@ -20,15 +20,15 @@ SRC_URI=" https://github.com/spirali/${PN}/archive/${PKG_sha}.tar.gz -> ${P}.tar.gz https://github.com/KDE/kmahjongg/raw/master/icons/48-apps-kmahjongg.png -> kmahjongg_${PN}.png" +S="${WORKDIR}/${PN}-${PKG_sha}" + LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="test" -RESTRICT="!test? ( test )" REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -S="${WORKDIR}/${PN}-${PKG_sha}" +RESTRICT="mirror !test? ( test )" RDEPEND=" ${PYTHON_DEPS}
[gentoo-commits] repo/proj/guru:master commit in: games-board/rmahjong/
commit: 270ab7dc299f649b2bab7339c8eb4a169d901060 Author: Sergey Torokhov yandex ru> AuthorDate: Sun Apr 25 12:20:45 2021 + Commit: Andrew Ammerlaan riseup net> CommitDate: Sun Apr 25 12:20:45 2021 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=270ab7dc games-board/rmahjong: fix passing system LDFLAGS Closes: https://bugs.gentoo.org/785526 Signed-off-by: Sergey Torokhov yandex.ru> games-board/rmahjong/rmahjong-0.4_p20201106.ebuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild b/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild index c05893d27..0e87d3710 100644 --- a/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild +++ b/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild @@ -51,7 +51,8 @@ src_prepare(){ # pass compiler and CFLAGS to 'Bot' makefile sed -i -e 's:gcc:'"$(tc-getCC)"':g' bot/makefile \ - -e 's:CFLAGS=-Wall -O3 -march=native:CFLAGS='"${CFLAGS}"':'|| die + -e 's:CFLAGS=-Wall -O3 -march=native:CFLAGS='"${CFLAGS}"':' \ + -e 's:\$(ARG):\$(ARG) '"${LDFLAGS}"':' || die } src_compile() {
[gentoo-commits] repo/proj/guru:master commit in: games-board/rmahjong/
commit: ed101e00ee873d95f0d01b2d637dff8e22c8c86e Author: Sergey Torokhov yandex ru> AuthorDate: Sat Apr 24 10:26:01 2021 + Commit: Theo Anderson posteo de> CommitDate: Sat Apr 24 10:30:23 2021 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ed101e00 games-board/rmahjong: fix bot install path; fix exec permissions The bot file is installed wrong path since fix module installation. Without shell-scripts and bot exec permissions app doesn't start. Signed-off-by: Sergey Torokhov yandex.ru> games-board/rmahjong/rmahjong-0.4_p20201106.ebuild | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild b/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild index 4453adf3c..a8a3e6da8 100644 --- a/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild +++ b/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{7..9} ) inherit desktop python-single-r1 xdg @@ -62,9 +62,12 @@ src_test() { src_install() { python_moduleinto ${PN} python_domodule {client/,server/,start.sh} + fperms 755 $(python_get_sitedir)/${PN}/start.sh + fperms 755 $(python_get_sitedir)/${PN}/server/run_server.sh - python_moduleinto bot - python_domodule "bot/bot" + python_moduleinto ${PN}/bot + python_domodule bot/bot + fperms 755 $(python_get_sitedir)/${PN}/bot/bot python_optimize "${D}/$(python_get_sitedir)/${PN}/"{client,server}/*.py
[gentoo-commits] repo/proj/guru:master commit in: games-board/rmahjong/
commit: fbbfb65d28b9e7889b4615973cdc886787798561 Author: Sergey Torokhov yandex ru> AuthorDate: Sat Apr 24 10:32:34 2021 + Commit: Theo Anderson posteo de> CommitDate: Sat Apr 24 10:32:34 2021 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fbbfb65d games-board/rmahjong: fix pass system CC and CFLAGS Closes: https://bugs.gentoo.org/785019 Closes: https://bugs.gentoo.org/780966 Signed-off-by: Sergey Torokhov yandex.ru> games-board/rmahjong/rmahjong-0.4_p20201106.ebuild | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild b/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild index a8a3e6da8..c05893d27 100644 --- a/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild +++ b/games-board/rmahjong/rmahjong-0.4_p20201106.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{7..9} ) -inherit desktop python-single-r1 xdg +inherit desktop python-single-r1 toolchain-funcs xdg # Tarball from py3 port branch: # https://github.com/spirali/rmahjong/tree/py3 @@ -48,6 +48,10 @@ src_prepare(){ sed -i "/logging.info/d" "${S}/server/server.py" || die echo $'#!/bin/sh\ncd '"$(python_get_sitedir)/${PN}"' && ./start.sh' > "${S}/rmahjong" + + # pass compiler and CFLAGS to 'Bot' makefile + sed -i -e 's:gcc:'"$(tc-getCC)"':g' bot/makefile \ + -e 's:CFLAGS=-Wall -O3 -march=native:CFLAGS='"${CFLAGS}"':'|| die } src_compile() {
[gentoo-commits] repo/proj/guru:master commit in: games-board/rmahjong/, games-board/rmahjong/files/
commit: 82abfbd2c267ecf579222b9040140309e09a7dfe Author: Sergey Torokhov yandex ru> AuthorDate: Mon Nov 9 22:13:01 2020 + Commit: Andrew Ammerlaan riseup net> CommitDate: Mon Nov 9 22:13:01 2020 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=82abfbd2 games-board/rmahjong: update to p20201106 tarball with merged patches Signed-off-by: Sergey Torokhov yandex.ru> .../files/rmahjong-0.4_fix_python3_compat.patch| 105 .../rmahjong/files/rmahjong-0.4_fix_tests.patch| 296 - ...201013.ebuild => rmahjong-0.4_p20201106.ebuild} | 9 +- 3 files changed, 2 insertions(+), 408 deletions(-) diff --git a/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch b/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch deleted file mode 100644 index 0fd0de1e.. --- a/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff --git a/client/client.py b/client/client.py a/client/client.py -+++ b/client/client.py -@@ -138,10 +138,10 @@ class Mahjong: - - def init_player_boxes(self, names, player_winds, score): - self.player_boxes = [ -- PlayerBox((50, 700), names[0], player_winds[0], int(score[0]), direction_up, (0,-80)), -- PlayerBox((954, 50), names[1], player_winds[1], int(score[1]), direction_left, (-210, 0)), -- PlayerBox((700, 0), names[2], player_winds[2], int(score[2]), direction_up, (0,80)), -- PlayerBox((0, 50), names[3], player_winds[3], int(score[3]), direction_right, (80,0)) ] -+ PlayerBox((50, 700), names[0], player_winds[0], int(float(score[0])), direction_up, (0,-80)), -+ PlayerBox((954, 50), names[1], player_winds[1], int(float(score[1])), direction_left, (-210, 0)), -+ PlayerBox((700, 0), names[2], player_winds[2], int(float(score[2])), direction_up, (0,80)), -+ PlayerBox((0, 50), names[3], player_winds[3], int(float(score[3])), direction_right, (80,0)) ] - for widget in self.player_boxes: - self.gui.add_widget(widget) - -diff --git a/client/states.py b/client/states.py a/client/states.py -+++ b/client/states.py -@@ -555,8 +555,8 @@ class ScoreState(RoundPreparingState): - results = [] - for wind in winds: - name = (self.mahjong.get_player_name(wind)) -- score = (int(self.message[wind + "_score"])) -- payment = (int(self.message[wind + "_payment"])) -+ score = (int(float(self.message[wind + "_score"]))) -+ payment = (int(float(self.message[wind + "_payment"]))) - results.append((name, score, payment)) - results.sort(key = lambda r: r[1], reverse = True) - return results -diff --git a/client/tilepainter.py b/client/tilepainter.py a/client/tilepainter.py -+++ b/client/tilepainter.py -@@ -89,7 +89,7 @@ class TilePainter: - img = self.tile_images[name] - w = img.get_width() - h = img.get_height() -- screen.blit(pygame.transform.smoothscale(img, (w/4, h/4)), position) -+ screen.blit(pygame.transform.smoothscale(img, (w//4, h//4)), position) - - def draw_tile_list(self, screen, position, tile_names, space = 0): - for i, tile_name in enumerate(tile_names): -diff --git a/server/botengine.py b/server/botengine.py -index 03623f9..b128135 100644 a/server/botengine.py -+++ b/server/botengine.py -@@ -71,7 +71,7 @@ class BotEngine(): - - def get_tiles(self, blocking = False): - if self._is_next_line() or blocking: -- return map(Tile, (self._read_line().strip().split())) -+ return [*map(Tile, (self._read_line().strip().split()))] - else: - return None - -diff --git a/server/eval.py b/server/eval.py -index 042ee54..dc7e463 100644 a/server/eval.py -+++ b/server/eval.py -@@ -19,6 +19,7 @@ from tile import Pon, Chi - from tile import red_dragon, white_dragon, green_dragon, dragons - from tile import bamboos, chars, pins, all_tiles, honors - from copy import copy -+import functools - - def is_hand_open(sets): - for set in sets: -@@ -97,14 +97,14 @@ - - if wintype == "Ron": - if player_wind.name == "WE": -- return (name, round_to_base(score / 2 * 3, 100)) -+ return (name, round_to_base(score // 2 * 3, 100)) - else: - return (name, score) - else: - if player_wind.name == "WE": -- return (name, (round_to_base(score / 2, 100), 0)) -+ return
[gentoo-commits] repo/proj/guru:master commit in: games-board/rmahjong/
commit: f1037d213c4e152e85658fab6f39696857f59581 Author: Sergey Torokhov yandex ru> AuthorDate: Mon Nov 9 22:18:32 2020 + Commit: Andrew Ammerlaan riseup net> CommitDate: Mon Nov 9 22:18:32 2020 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f1037d21 games-board/rmahjong: update Manifest (missed change) Signed-off-by: Sergey Torokhov yandex.ru> games-board/rmahjong/Manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games-board/rmahjong/Manifest b/games-board/rmahjong/Manifest index 624f607c..a74ec7ec 100644 --- a/games-board/rmahjong/Manifest +++ b/games-board/rmahjong/Manifest @@ -1,2 +1,2 @@ DIST kmahjongg_rmahjong.png 3816 BLAKE2B 8029e6c3f4eddff9d3593ad7d5615860cd3b9d9bc4b067145e2d191b8fec00f934f3752adec32db11eb7f3e31eba7d4586a2c2f005de4ded8555ec73a4f2f81f SHA512 49cb371b1260aa23bb7b341247047cf7abc59487fd75cc365c2c6f77588af7a83dfed73d7fc1845edcedb8a9b6810ac39dbecff065c3799e3fcc7195df84e67c -DIST rmahjong-0.4_p20201013.tar.gz 1399540 BLAKE2B 9dd1c40fea7c2d93e33a7bea0e1b66912eb547c64b45bbeadd95e4234380786551005cec8bf5edc1a7e8b135e5a66b2af80b4f22d257e14aa7068ff9959cee64 SHA512 9eface62972abe37753c380af713e168d39e23f6031af08d735467669b2dd0cbe5dec40eb9e750fff675a054791a58cfad710266229c966d94c190990f63c466 +DIST rmahjong-0.4_p20201106.tar.gz 1399585 BLAKE2B c5b63e6b149945cece8d1a4bfc99b468876979161f2461b36acb8db7a5f6292a4d1e7f97079319f3b71fa32804d6135a83e102fd870f3cd86556e45c75b532fb SHA512 d311b025eb7d35e4523f139c8a0703c894b730b2da3a173930f5eeb36e7f7a9889b4caf8ccaa8b1683f10b47461c608ae49a0ba0657bb58bf8cb55f8ba66ed38
[gentoo-commits] repo/proj/guru:master commit in: games-board/rmahjong/files/
commit: 549434473ec0f1fe1d7b221b9569095b37662e89 Author: Sergey Torokhov yandex ru> AuthorDate: Tue Oct 27 21:32:44 2020 + Commit: Andrew Ammerlaan riseup net> CommitDate: Tue Oct 27 21:32:44 2020 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=54943447 games-board/rmahjong: revert deletion passing literal to int() in patch The following or similar error still takes place under certain conditions on score screen: File "... /rmahjong/client/states.py", line 558, in get_results score = (int(self.message[wind + "_score"])) ValueError: invalid literal for int() with base 10: '27100.0' so restore part of patch to fix passing literal to int(). Signed-off-by: Sergey Torokhov yandex.ru> .../files/rmahjong-0.4_fix_python3_compat.patch| 32 ++ 1 file changed, 32 insertions(+) diff --git a/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch b/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch index 62ec68e7..0fd0de1e 100644 --- a/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch +++ b/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch @@ -1,3 +1,35 @@ +diff --git a/client/client.py b/client/client.py +--- a/client/client.py b/client/client.py +@@ -138,10 +138,10 @@ class Mahjong: + + def init_player_boxes(self, names, player_winds, score): + self.player_boxes = [ +- PlayerBox((50, 700), names[0], player_winds[0], int(score[0]), direction_up, (0,-80)), +- PlayerBox((954, 50), names[1], player_winds[1], int(score[1]), direction_left, (-210, 0)), +- PlayerBox((700, 0), names[2], player_winds[2], int(score[2]), direction_up, (0,80)), +- PlayerBox((0, 50), names[3], player_winds[3], int(score[3]), direction_right, (80,0)) ] ++ PlayerBox((50, 700), names[0], player_winds[0], int(float(score[0])), direction_up, (0,-80)), ++ PlayerBox((954, 50), names[1], player_winds[1], int(float(score[1])), direction_left, (-210, 0)), ++ PlayerBox((700, 0), names[2], player_winds[2], int(float(score[2])), direction_up, (0,80)), ++ PlayerBox((0, 50), names[3], player_winds[3], int(float(score[3])), direction_right, (80,0)) ] + for widget in self.player_boxes: + self.gui.add_widget(widget) + +diff --git a/client/states.py b/client/states.py +--- a/client/states.py b/client/states.py +@@ -555,8 +555,8 @@ class ScoreState(RoundPreparingState): + results = [] + for wind in winds: + name = (self.mahjong.get_player_name(wind)) +- score = (int(self.message[wind + "_score"])) +- payment = (int(self.message[wind + "_payment"])) ++ score = (int(float(self.message[wind + "_score"]))) ++ payment = (int(float(self.message[wind + "_payment"]))) + results.append((name, score, payment)) + results.sort(key = lambda r: r[1], reverse = True) + return results diff --git a/client/tilepainter.py b/client/tilepainter.py --- a/client/tilepainter.py +++ b/client/tilepainter.py
[gentoo-commits] repo/proj/guru:master commit in: games-board/rmahjong/files/, games-board/rmahjong/
commit: 3a392ae4913e38bd7631181fff65f8711ae7396e Author: Sergey Torokhov yandex ru> AuthorDate: Tue Oct 27 04:25:27 2020 + Commit: Andrew Ammerlaan riseup net> CommitDate: Tue Oct 27 04:25:27 2020 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3a392ae4 games-board/rmahjong: Fix tests ResourceWarnings, remove unittest2 DEPEND The inittest2 dependence is unneccessary as python3 internal unittest is used. Update patches to fix passing float into int("") in other way. Update test.py patch to fix numerous 'ResourceWarning's. Signed-off-by: Sergey Torokhov yandex.ru> .../files/rmahjong-0.4_fix_python3_compat.patch| 50 -- .../rmahjong/files/rmahjong-0.4_fix_tests.patch| 14 ++ games-board/rmahjong/rmahjong-0.4_p20201013.ebuild | 5 +-- 3 files changed, 34 insertions(+), 35 deletions(-) diff --git a/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch b/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch index d6ad5893..62ec68e7 100644 --- a/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch +++ b/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch @@ -1,35 +1,3 @@ -diff --git a/client/client.py b/client/client.py a/client/client.py -+++ b/client/client.py -@@ -138,10 +138,10 @@ class Mahjong: - - def init_player_boxes(self, names, player_winds, score): - self.player_boxes = [ -- PlayerBox((50, 700), names[0], player_winds[0], int(score[0]), direction_up, (0,-80)), -- PlayerBox((954, 50), names[1], player_winds[1], int(score[1]), direction_left, (-210, 0)), -- PlayerBox((700, 0), names[2], player_winds[2], int(score[2]), direction_up, (0,80)), -- PlayerBox((0, 50), names[3], player_winds[3], int(score[3]), direction_right, (80,0)) ] -+ PlayerBox((50, 700), names[0], player_winds[0], int(float(score[0])), direction_up, (0,-80)), -+ PlayerBox((954, 50), names[1], player_winds[1], int(float(score[1])), direction_left, (-210, 0)), -+ PlayerBox((700, 0), names[2], player_winds[2], int(float(score[2])), direction_up, (0,80)), -+ PlayerBox((0, 50), names[3], player_winds[3], int(float(score[3])), direction_right, (80,0)) ] - for widget in self.player_boxes: - self.gui.add_widget(widget) - -diff --git a/client/states.py b/client/states.py a/client/states.py -+++ b/client/states.py -@@ -555,8 +555,8 @@ class ScoreState(RoundPreparingState): - results = [] - for wind in winds: - name = (self.mahjong.get_player_name(wind)) -- score = (int(self.message[wind + "_score"])) -- payment = (int(self.message[wind + "_payment"])) -+ score = (int(float(self.message[wind + "_score"]))) -+ payment = (int(float(self.message[wind + "_payment"]))) - results.append((name, score, payment)) - results.sort(key = lambda r: r[1], reverse = True) - return results diff --git a/client/tilepainter.py b/client/tilepainter.py --- a/client/tilepainter.py +++ b/client/tilepainter.py @@ -67,6 +35,24 @@ index 042ee54..dc7e463 100644 def is_hand_open(sets): for set in sets: +@@ -97,14 +97,14 @@ + + if wintype == "Ron": + if player_wind.name == "WE": +- return (name, round_to_base(score / 2 * 3, 100)) ++ return (name, round_to_base(score // 2 * 3, 100)) + else: + return (name, score) + else: + if player_wind.name == "WE": +- return (name, (round_to_base(score / 2, 100), 0)) ++ return (name, (round_to_base(score // 2, 100), 0)) + else: +- return (name, (round_to_base(score / 4, 100), round_to_base(score / 2, 100))) ++ return (name, (round_to_base(score // 4, 100), round_to_base(score // 2, 100))) + + def quick_pons_and_kans(hand): + d = {} @@ -274,7 +275,7 @@ def eval_sets(pair, sets, round_wind, player_wind, last_tile, wintype): # Other hands for name, fn in score_functions: diff --git a/games-board/rmahjong/files/rmahjong-0.4_fix_tests.patch b/games-board/rmahjong/files/rmahjong-0.4_fix_tests.patch index 7926e714..93b671db 100644 --- a/games-board/rmahjong/files/rmahjong-0.4_fix_tests.patch +++ b/games-board/rmahjong/files/rmahjong-0.4_fix_tests.patch @@ -1,3 +1,17 @@ +diff a/server/botengine.py b/server/botengine.py +--- a/server/botengine.py b/server/botengine.py +@@ -53,7 +53,10 @@ + + def shutdown(self): + self.thread.thread_quit = True ++ self.process.stdin.close() ++
[gentoo-commits] repo/proj/guru:master commit in: games-board/rmahjong/files/, games-board/rmahjong/
commit: ef556bcba0d3fb3451d080cdf0ce559c00ad6c72 Author: Sergey Torokhov yandex ru> AuthorDate: Sun Oct 25 12:28:08 2020 + Commit: Andrew Ammerlaan riseup net> CommitDate: Sun Oct 25 12:35:57 2020 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ef556bcb games-board/rmahjong: new package This is attempt python3 "final" porting the game by means of additional patches to initial py3 port. The game is playable for me at "single player + 3 bots". Network game process is not tested. Menu icon for desktop entry is fetched from Kmahjongg project. Signed-off-by: Sergey Torokhov yandex.ru> games-board/rmahjong/Manifest | 2 + .../files/rmahjong-0.4_fix_python3_compat.patch| 87 +++ .../rmahjong/files/rmahjong-0.4_fix_tests.patch| 282 + games-board/rmahjong/metadata.xml | 18 ++ games-board/rmahjong/rmahjong-0.4_p20201013.ebuild | 83 ++ 5 files changed, 472 insertions(+) diff --git a/games-board/rmahjong/Manifest b/games-board/rmahjong/Manifest new file mode 100644 index ..624f607c --- /dev/null +++ b/games-board/rmahjong/Manifest @@ -0,0 +1,2 @@ +DIST kmahjongg_rmahjong.png 3816 BLAKE2B 8029e6c3f4eddff9d3593ad7d5615860cd3b9d9bc4b067145e2d191b8fec00f934f3752adec32db11eb7f3e31eba7d4586a2c2f005de4ded8555ec73a4f2f81f SHA512 49cb371b1260aa23bb7b341247047cf7abc59487fd75cc365c2c6f77588af7a83dfed73d7fc1845edcedb8a9b6810ac39dbecff065c3799e3fcc7195df84e67c +DIST rmahjong-0.4_p20201013.tar.gz 1399540 BLAKE2B 9dd1c40fea7c2d93e33a7bea0e1b66912eb547c64b45bbeadd95e4234380786551005cec8bf5edc1a7e8b135e5a66b2af80b4f22d257e14aa7068ff9959cee64 SHA512 9eface62972abe37753c380af713e168d39e23f6031af08d735467669b2dd0cbe5dec40eb9e750fff675a054791a58cfad710266229c966d94c190990f63c466 diff --git a/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch b/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch new file mode 100644 index ..d6ad5893 --- /dev/null +++ b/games-board/rmahjong/files/rmahjong-0.4_fix_python3_compat.patch @@ -0,0 +1,87 @@ +diff --git a/client/client.py b/client/client.py +--- a/client/client.py b/client/client.py +@@ -138,10 +138,10 @@ class Mahjong: + + def init_player_boxes(self, names, player_winds, score): + self.player_boxes = [ +- PlayerBox((50, 700), names[0], player_winds[0], int(score[0]), direction_up, (0,-80)), +- PlayerBox((954, 50), names[1], player_winds[1], int(score[1]), direction_left, (-210, 0)), +- PlayerBox((700, 0), names[2], player_winds[2], int(score[2]), direction_up, (0,80)), +- PlayerBox((0, 50), names[3], player_winds[3], int(score[3]), direction_right, (80,0)) ] ++ PlayerBox((50, 700), names[0], player_winds[0], int(float(score[0])), direction_up, (0,-80)), ++ PlayerBox((954, 50), names[1], player_winds[1], int(float(score[1])), direction_left, (-210, 0)), ++ PlayerBox((700, 0), names[2], player_winds[2], int(float(score[2])), direction_up, (0,80)), ++ PlayerBox((0, 50), names[3], player_winds[3], int(float(score[3])), direction_right, (80,0)) ] + for widget in self.player_boxes: + self.gui.add_widget(widget) + +diff --git a/client/states.py b/client/states.py +--- a/client/states.py b/client/states.py +@@ -555,8 +555,8 @@ class ScoreState(RoundPreparingState): + results = [] + for wind in winds: + name = (self.mahjong.get_player_name(wind)) +- score = (int(self.message[wind + "_score"])) +- payment = (int(self.message[wind + "_payment"])) ++ score = (int(float(self.message[wind + "_score"]))) ++ payment = (int(float(self.message[wind + "_payment"]))) + results.append((name, score, payment)) + results.sort(key = lambda r: r[1], reverse = True) + return results +diff --git a/client/tilepainter.py b/client/tilepainter.py +--- a/client/tilepainter.py b/client/tilepainter.py +@@ -89,7 +89,7 @@ class TilePainter: + img = self.tile_images[name] + w = img.get_width() + h = img.get_height() +- screen.blit(pygame.transform.smoothscale(img, (w/4, h/4)), position) ++ screen.blit(pygame.transform.smoothscale(img, (w//4, h//4)), position) + + def draw_tile_list(self, screen, position, tile_names, space = 0): + for i, tile_name in enumerate(tile_names): +diff --git a/server/botengine.py b/server/botengine.py +index 03623f9..b128135 100644 +--- a/server/botengine.py b/server/botengine.py +@@ -71,7 +71,7 @@ class BotEngine(): + + def get_tiles(self, blocking =