summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-01-12 13:37:22 +0000
committerSam James <sam@gentoo.org>2021-01-12 15:22:04 +0000
commite24828d13b13b5b885f1945cb16e45a23c9df1c1 (patch)
tree0422604536540e02ff9e27b9fa35fbfe3b9abc0b /games-misc
parentapp-shells/bash: Removed last occurance of emktemp (diff)
downloadgentoo-e24828d13b13b5b885f1945cb16e45a23c9df1c1.tar.gz
gentoo-e24828d13b13b5b885f1945cb16e45a23c9df1c1.tar.bz2
gentoo-e24828d13b13b5b885f1945cb16e45a23c9df1c1.zip
games-misc/ponysay: add Python 3.8, 3.9
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-misc')
-rw-r--r--games-misc/ponysay/files/ponysay-3.0.3-python-syntax.patch38
-rw-r--r--games-misc/ponysay/ponysay-3.0.3.ebuild8
2 files changed, 44 insertions, 2 deletions
diff --git a/games-misc/ponysay/files/ponysay-3.0.3-python-syntax.patch b/games-misc/ponysay/files/ponysay-3.0.3-python-syntax.patch
new file mode 100644
index 000000000000..de35149fcdff
--- /dev/null
+++ b/games-misc/ponysay/files/ponysay-3.0.3-python-syntax.patch
@@ -0,0 +1,38 @@
+https://github.com/erkin/ponysay/commit/f9154fd806bbf31c79b1769b13d5aa1b67f9c06a.patch
+(and an additional fix)
+
+From f9154fd806bbf31c79b1769b13d5aa1b67f9c06a Mon Sep 17 00:00:00 2001
+From: adasiko <adasiko256@yandex.ru>
+Date: Sun, 22 Mar 2020 19:33:28 +0700
+Subject: [PATCH] fix: do not compare literal with "is not"
+
+---
+ src/ponysaytool.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ponysaytool.py b/src/ponysaytool.py
+index 7f9a4da5..574a2baa 100755
+--- a/src/ponysaytool.py
++++ b/src/ponysaytool.py
+@@ -1002,7 +1002,7 @@ def alert(text):
+ for row in range(0, len(datalines)):
+ current = leftlines[row]
+ if len(datalines[row].strip()) == 0:
+- if current is not 'comment':
++ if current != 'comment':
+ if current != last:
+ self.datamap[current] = None
+ continue
+diff --git a/src/backend.py b/src/backend.py
+index 2cc539a..82ff149 100755
+--- a/src/backend.py
++++ b/src/backend.py
+@@ -291,7 +291,7 @@ class Backend():
+ props = dollar[7:]
+ if len(props) > 0:
+ if ',' in props:
+- if props[0] is not ',':
++ if props[0] != ',':
+ w = props[:props.index(',')]
+ h = int(props[props.index(',') + 1:])
+ else:
diff --git a/games-misc/ponysay/ponysay-3.0.3.ebuild b/games-misc/ponysay/ponysay-3.0.3.ebuild
index 5c758bbc2106..00fedbca4e25 100644
--- a/games-misc/ponysay/ponysay-3.0.3.ebuild
+++ b/games-misc/ponysay/ponysay-3.0.3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{6,7} )
+PYTHON_COMPAT=( python3_{6,7,8,9} )
inherit bash-completion-r1 python-single-r1
DESCRIPTION="cowsay reimplemention for ponies"
@@ -22,6 +22,10 @@ RDEPEND="${PYTHON_DEPS}
fish-completion? ( app-shells/fish )
zsh-completion? ( app-shells/zsh )"
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.3-python-syntax.patch"
+)
+
setup_py() {
"${PYTHON}" setup.py \
--prefix="${EPREFIX}"/usr \