summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2024-06-22 14:50:35 +0100
committerJames Le Cuirot <chewi@gentoo.org>2024-06-22 14:53:32 +0100
commit304c9eb6b83197121560a0e45a8d27dca8c0b920 (patch)
treefa1bf72cea1e9f55e77cd87e9416a7e181ed1703 /games-util
parentgames-util/sc-controller: Drop old 0.4.8.9-r1 (diff)
downloadgentoo-304c9eb6b83197121560a0e45a8d27dca8c0b920.tar.gz
gentoo-304c9eb6b83197121560a0e45a8d27dca8c0b920.tar.bz2
gentoo-304c9eb6b83197121560a0e45a8d27dca8c0b920.zip
games-util/sc-controller: Bump to 0.4.8.15, drop old 0.4.8.11
There is a new upstream (again). Closes: https://bugs.gentoo.org/929599 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-util')
-rw-r--r--games-util/sc-controller/Manifest2
-rw-r--r--games-util/sc-controller/files/sc-controller-0.4.8.15-py12.patch89
-rw-r--r--games-util/sc-controller/metadata.xml2
-rw-r--r--games-util/sc-controller/sc-controller-0.4.8.15.ebuild (renamed from games-util/sc-controller/sc-controller-0.4.8.11.ebuild)10
4 files changed, 98 insertions, 5 deletions
diff --git a/games-util/sc-controller/Manifest b/games-util/sc-controller/Manifest
index 6543fbc58aa3..ea5cf9c7cc89 100644
--- a/games-util/sc-controller/Manifest
+++ b/games-util/sc-controller/Manifest
@@ -1 +1 @@
-DIST sc-controller-0.4.8.11.tar.gz 2566642 BLAKE2B 64e910e27ceb93938d6250ae058a5df102922f36f4e1e7aa5d2f761b93bbcf34296eefabb10145b4e1b7030c05af341ccb6cbe01df7ce891c69f8d8fceefdb30 SHA512 e591e1c44763c38a18f09f8d5d9fcdb7f46c60d8f4dc040d82e48617d0f960abb6ec608188724838060dbe532589453b0be2c1d94686decef657205f8e8efcec
+DIST sc-controller-0.4.8.15.tar.gz 2570427 BLAKE2B 23fe2de5557457162fccd3c88c5bc15149229ccfee2d6b473d93ddd0e747d8700a2454d32db753293bc70a95aab43d1959e93bc34f1a153b152aa9fbc1d73676 SHA512 a9b38270aaf761e0a62b690d64c64e07539292ffe7d724a31b7989afdacbf64dc1074805d34f07dfe0767cf5bdfc14e5000050782f310ea7f439f5f2af9faf07
diff --git a/games-util/sc-controller/files/sc-controller-0.4.8.15-py12.patch b/games-util/sc-controller/files/sc-controller-0.4.8.15-py12.patch
new file mode 100644
index 000000000000..41851c032811
--- /dev/null
+++ b/games-util/sc-controller/files/sc-controller-0.4.8.15-py12.patch
@@ -0,0 +1,89 @@
+From 51dda4b98aac878bdbf84aa9715f7ecc9802ba1d Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 22 Jun 2024 14:24:01 +0100
+Subject: [PATCH 1/2] Fix parser to handle new non-terminating newline NL token
+ in Python 3.12
+
+---
+ scc/parser.py | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/scc/parser.py b/scc/parser.py
+index 78633f0e..9e77de04 100644
+--- a/scc/parser.py
++++ b/scc/parser.py
+@@ -136,7 +136,7 @@ class ActionParser(object):
+ def _parse_parameter(self):
+ """ Parses single parameter """
+ t = self._next_token()
+- while t.type == TokenType.NEWLINE or t.value == "\n":
++ while t.type in (TokenType.NL, TokenType.NEWLINE) or t.value == "\n":
+ if not self._tokens_left():
+ raise ParseError("Expected parameter at end of string")
+ t = self._next_token()
+@@ -236,7 +236,7 @@ class ActionParser(object):
+ parameters.append(self._parse_parameter())
+ # Check if next token is either ')' or ','
+ t = self._peek_token()
+- while t.type == TokenType.NEWLINE or t.value == "\n":
++ while t.type in (TokenType.NL, TokenType.NEWLINE) or t.value == "\n":
+ self._next_token()
+ if not self._tokens_left():
+ raise ParseError("Expected ',' or end of parameter list after parameter '%s'" % (parameters[-1],))
+@@ -310,8 +310,8 @@ class ActionParser(object):
+ action1 = self._create_action(action_class, *parameters)
+ action2 = self._parse_action()
+ return MultiAction(action1, action2)
+-
+- if t.type == TokenType.NEWLINE or t.value == "\n":
++
++ if t.type in (TokenType.NL, TokenType.NEWLINE) or t.value == "\n":
+ # Newline can be used to join actions instead of 'and'
+ self._next_token()
+ if not self._tokens_left():
+@@ -324,11 +324,11 @@ class ActionParser(object):
+ action1 = self._create_action(action_class, *parameters)
+ action2 = self._parse_action()
+ return MultiAction(action1, action2)
+-
++
+ if t.type == TokenType.OP and t.value == ';':
+ # Two (or more) actions joined by ';'
+ self._next_token()
+- while self._tokens_left() and self._peek_token().type == TokenType.NEWLINE:
++ while self._tokens_left() and self._peek_token().type in (TokenType.NL, TokenType.NEWLINE):
+ self._next_token()
+ if not self._tokens_left():
+ # Having ';' at end of string is not actually error
+--
+2.45.1
+
+
+From e8cc68cb17effa413c3ffde2bce5f8dd1798b0c3 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 22 Jun 2024 14:34:48 +0100
+Subject: [PATCH 2/2] Address Python ast deprecations that will be removed in
+ 3.14
+
+---
+ scc/cheader.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/scc/cheader.py b/scc/cheader.py
+index d151d637..f84319f1 100644
+--- a/scc/cheader.py
++++ b/scc/cheader.py
+@@ -59,8 +59,8 @@ def eval_expr(expr):
+ """ Eval and expression inside a #define using a suppart of python grammar """
+
+ def _eval(node):
+- if isinstance(node, ast.Num):
+- return node.n
++ if isinstance(node, ast.Constant):
++ return node.value
+ elif isinstance(node, ast.BinOp):
+ return OPERATORS[type(node.op)](_eval(node.left), _eval(node.right))
+ elif isinstance(node, ast.UnaryOp):
+--
+2.45.1
+
diff --git a/games-util/sc-controller/metadata.xml b/games-util/sc-controller/metadata.xml
index 662b56c13f49..20f13f973f8f 100644
--- a/games-util/sc-controller/metadata.xml
+++ b/games-util/sc-controller/metadata.xml
@@ -6,6 +6,6 @@
<name>Gentoo Games Project</name>
</maintainer>
<upstream>
- <remote-id type="github">Ryochan7/sc-controller</remote-id>
+ <remote-id type="github">C0rn3j/sc-controller</remote-id>
</upstream>
</pkgmetadata>
diff --git a/games-util/sc-controller/sc-controller-0.4.8.11.ebuild b/games-util/sc-controller/sc-controller-0.4.8.15.ebuild
index 7166c28a765e..6f56ab7a0051 100644
--- a/games-util/sc-controller/sc-controller-0.4.8.11.ebuild
+++ b/games-util/sc-controller/sc-controller-0.4.8.15.ebuild
@@ -6,12 +6,12 @@ EAPI=8
DISTUTILS_EXT=1
DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit distutils-r1 linux-info xdg
DESCRIPTION="User-mode driver and GTK-based GUI for Steam Controllers and others"
-HOMEPAGE="https://github.com/Ryochan7/sc-controller/"
-SRC_URI="https://github.com/Ryochan7/sc-controller/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="https://github.com/C0rn3j/sc-controller/"
+SRC_URI="https://github.com/C0rn3j/sc-controller/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2 BSD CC-BY-3.0 CC0-1.0 LGPL-2.1 MIT PSF-2 ZLIB"
SLOT="0"
@@ -32,6 +32,10 @@ RDEPEND="
wayland? ( gui-libs/gtk-layer-shell[introspection(+)] )
"
+PATCHES=(
+ "${FILESDIR}"/${P}-py12.patch
+)
+
distutils_enable_tests pytest
pkg_setup() {