commit:     fc033e87267f5740b660a72372da23c5e7705eb4
Author:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
AuthorDate: Mon May  5 06:58:39 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Mon May  5 06:58:39 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fc033e87

dev-python/pyfiglet: add 1.0.2

Signed-off-by: Takuya Wakazono <pastalian46 <AT> gmail.com>

 dev-python/pyfiglet/Manifest                       |  1 +
 .../pyfiglet/files/pyfiglet-1.0.2-fix-test.patch   | 70 ++++++++++++++++++++++
 dev-python/pyfiglet/metadata.xml                   |  3 +
 dev-python/pyfiglet/pyfiglet-1.0.2.ebuild          | 37 ++++++++++++
 4 files changed, 111 insertions(+)

diff --git a/dev-python/pyfiglet/Manifest b/dev-python/pyfiglet/Manifest
index 7785bcec6..a3db616b3 100644
--- a/dev-python/pyfiglet/Manifest
+++ b/dev-python/pyfiglet/Manifest
@@ -1 +1,2 @@
 DIST pyfiglet-0.8.post1.tar.gz 634618 BLAKE2B 
49268581974e72f28ddb11785a1629a4ac2696bcdd57710147cafdcf7709be8c67bdf03e5ccdb1655a9be6eb8a83baf4ca5ae0a6412e2318d0923376558b8d49
 SHA512 
3b8c7b4c9ae48466da3ccc6711aac9c35b08a373abbdda66c60a62f17ba6edd316b0d5e3085613f7c44fbaa2f02acc4a5b3830a31d22437d9261863878421400
+DIST pyfiglet-1.0.2.gh.tar.gz 1660490 BLAKE2B 
72fc4ddff5901fbb5eb70d677bfdbbf8f16e042305c9e91a350268a450f71bed2af0192c88211c86f80ba0d2815eae7ff5dd89585144207ef7c89f2f9540c2bd
 SHA512 
fdfe2e52bcf49635cf41067c1438eaccae685216ae32e9b443730222077aff8f5834014766df80ba8435d5fca5df0e0338573f2a423aa21202966562fc2d4f28

diff --git a/dev-python/pyfiglet/files/pyfiglet-1.0.2-fix-test.patch 
b/dev-python/pyfiglet/files/pyfiglet-1.0.2-fix-test.patch
new file mode 100644
index 000000000..a1b97bed1
--- /dev/null
+++ b/dev-python/pyfiglet/files/pyfiglet-1.0.2-fix-test.patch
@@ -0,0 +1,70 @@
+https://github.com/pwaller/pyfiglet/commit/b5bb37142ce49ac5376b7f89a0b5508962c6672e
+From: Lyes Saadi <[email protected]>
+Date: Wed, 27 Dec 2023 20:18:32 +0100
+Subject: [PATCH] Use slant instead of doh to use only fonts-contrib
+
+--- a/pyfiglet/tests/test_cli.py
++++ b/pyfiglet/tests/test_cli.py
+@@ -11,24 +11,13 @@ def test_font_dir():
+ 
+ 
+ def test_strip():
+-    command = "pyfiglet -f doh -s 0"
++    command = "pyfiglet -f slant -s 0"
+     expected = '''\
+-     000000000     
+-   00:::::::::00   
+- 00:::::::::::::00 
+-0:::::::000:::::::0
+-0::::::0   0::::::0
+-0:::::0     0:::::0
+-0:::::0     0:::::0
+-0:::::0 000 0:::::0
+-0:::::0 000 0:::::0
+-0:::::0     0:::::0
+-0:::::0     0:::::0
+-0::::::0   0::::::0
+-0:::::::000:::::::0
+- 00:::::::::::::00 
+-   00:::::::::00   
+-     000000000
++   ____ 
++  / __ \\
++ / / / /
++/ /_/ / 
++\\____/
+ '''
+     result = subprocess.run(command, shell=True, stdout=subprocess.PIPE)
+     assert result.stdout.decode() == expected
+@@ -58,25 +47,14 @@ def test_strip_strange_font(test_font_dir):
+ 
+ # normalize is just strip with padding
+ def test_normalize():
+-    command = "pyfiglet -f doh -n 0"
++    command = "pyfiglet -f slant -n 0"
+     expected = '''\
+ 
+-     000000000     
+-   00:::::::::00   
+- 00:::::::::::::00 
+-0:::::::000:::::::0
+-0::::::0   0::::::0
+-0:::::0     0:::::0
+-0:::::0     0:::::0
+-0:::::0 000 0:::::0
+-0:::::0 000 0:::::0
+-0:::::0     0:::::0
+-0:::::0     0:::::0
+-0::::::0   0::::::0
+-0:::::::000:::::::0
+- 00:::::::::::::00 
+-   00:::::::::00   
+-     000000000
++   ____ 
++  / __ \\
++ / / / /
++/ /_/ / 
++\\____/
+ 
+ '''
+     result = subprocess.run(command, shell=True, stdout=subprocess.PIPE)

diff --git a/dev-python/pyfiglet/metadata.xml b/dev-python/pyfiglet/metadata.xml
index a7da40097..711dbe0b0 100644
--- a/dev-python/pyfiglet/metadata.xml
+++ b/dev-python/pyfiglet/metadata.xml
@@ -7,4 +7,7 @@
         <remote-id type="pypi">pyfiglet</remote-id>
         <bugs-to>https://github.com/pwaller/pyfiglet/issues</bugs-to>
     </upstream>
+    <use>
+        <flag name="contrib">Install fonts that don't have a clear 
license</flag>
+    </use>
 </pkgmetadata>

diff --git a/dev-python/pyfiglet/pyfiglet-1.0.2.ebuild 
b/dev-python/pyfiglet/pyfiglet-1.0.2.ebuild
new file mode 100644
index 000000000..a490caaf2
--- /dev/null
+++ b/dev-python/pyfiglet/pyfiglet-1.0.2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..13} )
+DISTUTILS_USE_PEP517=setuptools
+inherit distutils-r1
+
+DESCRIPTION="Pure-python FIGlet implementation"
+HOMEPAGE="
+       https://pypi.org/project/pyfiglet/
+       https://github.com/pwaller/pyfiglet
+"
+# no tests in pypi sdist
+SRC_URI="https://github.com/pwaller/pyfiglet/archive/refs/tags/v${PV}.tar.gz 
-> ${P}.gh.tar.gz"
+
+LICENSE="MIT"
+# bundled fonts: 
https://src.fedoraproject.org/rpms/python-pyfiglet/blob/rawhide/f/python-pyfiglet.spec
+LICENSE+=" BSD HPND MIT NTP contrib? ( all-rights-reserved )"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="contrib"
+
+PATCHES=(
+       "${FILESDIR}/${P}-fix-test.patch"
+)
+
+distutils_enable_tests pytest
+
+src_prepare() {
+       mv pyfiglet/fonts-standard pyfiglet/fonts || die
+       if use contrib; then
+               mv pyfiglet/fonts-contrib/* pyfiglet/fonts || die
+       fi
+       distutils-r1_src_prepare
+}

Reply via email to