summaryrefslogtreecommitdiff
path: root/dev-vcs/gitstats
diff options
context:
space:
mode:
Diffstat (limited to 'dev-vcs/gitstats')
-rw-r--r--dev-vcs/gitstats/Manifest3
-rw-r--r--dev-vcs/gitstats/files/gitstats-0_pre20201124-py312.patch44
-rw-r--r--dev-vcs/gitstats/gitstats-0_pre20201124.ebuild9
3 files changed, 52 insertions, 4 deletions
diff --git a/dev-vcs/gitstats/Manifest b/dev-vcs/gitstats/Manifest
index ebbb60fd343e..c2af931f0d49 100644
--- a/dev-vcs/gitstats/Manifest
+++ b/dev-vcs/gitstats/Manifest
@@ -1,3 +1,4 @@
+AUX gitstats-0_pre20201124-py312.patch 1365 BLAKE2B aaebcd8fbb1b12d4bee2b9902fccb4e69274828956a1504224ba735f0e54c2fe0c1f639f1aa10c5391bad5af1b5d740cc1a9d34f78d1ef8438f19586b39483a5 SHA512 45c01ee73812e299870ce778fa83b5b8cd7bae4be250fa1e2821b1e2a48c5e8ed46c2074f514c909e9f35ccd639c02c2b539fa8f37cc39f3f1128c7ed9ab12db
DIST gitstats-0_pre20201124.tar.gz 37097 BLAKE2B 8ed3f7a157d3a1edbf6f880c491e8b4fec351a0dc3b7212e5bb0eb3e509ae4002fe407267da17bea775d154e38d8ca43eec00e504b614fd8a7d42b6151de43f2 SHA512 98c0a5a67d5daebf951f2e0568182ab65e1077026facc1eef38a35df8411b1356258034fea009c5a15b7e77d17240e02c5a565f0f39d497a45846d5a8cb570ae
-EBUILD gitstats-0_pre20201124.ebuild 1013 BLAKE2B 0ec9c285638f1f502dc211c2aa24987c2f0f681b49bdbd23300964f27d77c98e670efe9223bbf00915b38a914e60c76fcf6df2ba7b8d66a325a387a88d33393b SHA512 18c4cf6dcaea2292b25d0bc0dd2c1d8ccc45ab266fe70f579f540c00bd6a9d9a218845b55dc24d48454bd3a48336b2a721f1dca933bb011b801ca358753a6f83
+EBUILD gitstats-0_pre20201124.ebuild 1055 BLAKE2B a4cfe44b7c428725d8810e51b231e358b15ec195562eb889e1d05c0ba2ffdff7908b86e4da02671a0ab1ec769e2cf0b7b0c75b306722599891234401323a5f4c SHA512 eb554dd52a152e6bfac13fcaecf9f77e8c1d6f0a12c5226e04fc1b22e87a012275d7268504f95410e50544ad7bcbe979708008a5fdc3e6ae880f5b726492cae6
MISC metadata.xml 440 BLAKE2B 520392ad03ea173e2f01774ad3d706ae27036ef8564b1e18ab70d11f735b83797d631003fa8ec19123cf1e4f9452663b2262f112b0063ebccce485244d0df34c SHA512 442983496e87440cdeabd9f1fc0a4de96f2851485e5ed5ea35373734eff6969bc5d26746062e1d078295d1224c4a0b5727838bebb1c155c689eb340af109cd06
diff --git a/dev-vcs/gitstats/files/gitstats-0_pre20201124-py312.patch b/dev-vcs/gitstats/files/gitstats-0_pre20201124-py312.patch
new file mode 100644
index 000000000000..3896fd87e937
--- /dev/null
+++ b/dev-vcs/gitstats/files/gitstats-0_pre20201124-py312.patch
@@ -0,0 +1,44 @@
+From 4743c3fe184ce6e10d145c536af5b3689b069fc2 Mon Sep 17 00:00:00 2001
+From: Bryan Gardiner <bog@khumba.net>
+Date: Fri, 14 Jun 2024 19:13:32 -0700
+Subject: [PATCH] Use raw strings for regexs to fix new SyntaxWarnings in
+ Python 3.12.
+
+---
+ gitstats | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gitstats b/gitstats
+index 9f14a0f..37005f3 100755
+--- a/gitstats
++++ b/gitstats
+@@ -96,7 +96,7 @@ def getkeyssortedbyvaluekey(d, key):
+ return [el[1] for el in sorted([(d[el][key], el) for el in list(d.keys())])]
+
+ def getstatsummarycounts(line):
+- numbers = re.findall('\d+', line)
++ numbers = re.findall(r'\d+', line)
+ if len(numbers) == 1:
+ # neither insertions nor deletions: may probably only happen for "0 files changed"
+ numbers.append(0);
+@@ -322,7 +322,7 @@ class GitDataCollector(DataCollector):
+ continue
+ prev = tag
+ for line in output.split('\n'):
+- parts = re.split('\s+', line, 2)
++ parts = re.split(r'\s+', line, 2)
+ commits = int(parts[1])
+ author = parts[2]
+ self.tags[tag]['commits'] += commits
+@@ -485,7 +485,7 @@ class GitDataCollector(DataCollector):
+ for line in lines:
+ if len(line) == 0:
+ continue
+- parts = re.split('\s+', line, 4)
++ parts = re.split(r'\s+', line, 4)
+ if parts[0] == '160000' and parts[3] == '-':
+ # skip submodules
+ continue
+--
+2.44.2
+
diff --git a/dev-vcs/gitstats/gitstats-0_pre20201124.ebuild b/dev-vcs/gitstats/gitstats-0_pre20201124.ebuild
index 9dfd0467a905..ce08093e401a 100644
--- a/dev-vcs/gitstats/gitstats-0_pre20201124.ebuild
+++ b/dev-vcs/gitstats/gitstats-0_pre20201124.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=7
+EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit python-r1
@@ -30,9 +30,12 @@ BDEPEND="
DOCS=( doc/{AUTHOR,README,TODO.txt} )
src_prepare() {
+ eapply "${FILESDIR}/${P}-py312.patch"
+
sed \
-e "s:basedirs = \[binarypath, secondarypath, '/usr/share/gitstats'\]:basedirs = \['${EPREFIX}/usr/share/gitstats'\]:g" \
-i gitstats || die "failed to fix static files path"
+
default
}