Parcourir la source

add (temporarily) dev-vcs/gitstats-0_pre20201124-r1, until the official package is updated

jcb il y a 4 mois
Parent
commit
0839f5a630

+ 1 - 0
README.md

@@ -23,6 +23,7 @@ Package list:
 * dev-python/python-doi         - [0.2]              -- Python package to work with Document Object Identifier (doi)
 * dev-python/python-doi         - [0.2]              -- Python package to work with Document Object Identifier (doi)
 * dev-python/python-markdownify - [0.12.1]           -- Library to convert HTML to Markdown 
 * dev-python/python-markdownify - [0.12.1]           -- Library to convert HTML to Markdown 
 * dev-python/textual            - [0.38.1]           -- Python framework to build sophisticated UI
 * dev-python/textual            - [0.38.1]           -- Python framework to build sophisticated UI
+* dev-vcs/gitstats              - [0_pre20201124-r1] -- Statistics generator for git [temporary ebuild, until the official one is updated]
 * games-strategy/unciv-bin      - [4.12.1]           -- Civ V remake for Android & Desktop
 * games-strategy/unciv-bin      - [4.12.1]           -- Civ V remake for Android & Desktop
 * media-fonts/square            - [1.0]              -- A TTF font designed to make characters fill a square space
 * media-fonts/square            - [1.0]              -- A TTF font designed to make characters fill a square space
 * media-libs/libtxc_dxtn        - [1.0.1]            -- Implementation of the S3 Texture Compression
 * media-libs/libtxc_dxtn        - [1.0.1]            -- Implementation of the S3 Texture Compression

+ 3 - 0
dev-vcs/gitstats/Manifest

@@ -0,0 +1,3 @@
+AUX gitstats-0_pre20201124.patch 937 BLAKE2B 11077f883308b53280c7f2b3e08a66715ec14f7d2b8152e6bcaeab61bd952504113ee305f06f4af8bdfaf0c0bc401b7de06271dab968710a1fec5d638ed10b1a SHA512 4e5fac84117c2264b83f18cc2c23442982f4efa7065628d9ae3d8fca5cd9d5fa6a273a648dad15df2d99145278f9d3d95b2b7dbfc23fae38b9086302998e1810
+DIST gitstats-0_pre20201124.tar.gz 37097 BLAKE2B 8ed3f7a157d3a1edbf6f880c491e8b4fec351a0dc3b7212e5bb0eb3e509ae4002fe407267da17bea775d154e38d8ca43eec00e504b614fd8a7d42b6151de43f2 SHA512 98c0a5a67d5daebf951f2e0568182ab65e1077026facc1eef38a35df8411b1356258034fea009c5a15b7e77d17240e02c5a565f0f39d497a45846d5a8cb570ae
+EBUILD gitstats-0_pre20201124-r1.ebuild 1046 BLAKE2B 2b13f003d712b70621be25384080b3d3547728dbaac7c3d921e27c17f83bc0a90c03fbac878efa2c8ee66062c63476db15e927dbf6951afe1d4b2c02fb1ed5ad SHA512 91da48b3396f6bf372833e48f2488a1a493cf3b6e9e323412561209a4f807e2ad5274f374a75f8cea403ecd6524b4d7f8dcde635cd67f7a339ea338d00d8e2d8

+ 29 - 0
dev-vcs/gitstats/files/gitstats-0_pre20201124.patch

@@ -0,0 +1,29 @@
+--- a/gitstats	2024-06-24 21:09:20.426186008 +0200
++++ b/gitstats	2024-06-25 09:12:22.390452602 +0200
+@@ -96,7 +96,7 @@
+ 	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 @@
+ 				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 @@
+ 		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

+ 49 - 0
dev-vcs/gitstats/gitstats-0_pre20201124-r1.ebuild

@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..13} )
+
+inherit python-r1
+
+DESCRIPTION="Statistics generator for git [temporary ebuild, until an official update"
+HOMEPAGE="http://gitstats.sourceforge.net/"
+SRC_URI="https://github.com/gktrk/gitstats/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 GPL-3 ) MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+	${PYTHON_DEPS}
+	sci-visualization/gnuplot[gd]
+	dev-vcs/git"
+DEPEND="
+	${PYTHON_DEPS}
+"
+BDEPEND="
+	dev-lang/perl:*
+"
+
+DOCS=( doc/{AUTHOR,README,TODO.txt} )
+
+src_prepare() {
+	eapply "${FILESDIR}"/${P}.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
+}
+
+src_compile() {
+	emake VERSION="${PV}" man
+}
+
+src_install() {
+	emake PREFIX="${ED}"/usr VERSION="${PV}" install
+	doman doc/${PN}.1
+	einstalldocs
+	python_replicate_script "${ED}"/usr/bin/${PN}
+}