commit:     ce534e6dd0f22d170f98ea0f7a691630fb223221
Author:     Cat Kasin <cat <AT> aulucya <DOT> gay>
AuthorDate: Thu Oct 24 03:37:51 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Oct 25 11:36:47 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce534e6d

app-misc/hyfetch: add 1.99.0, drop 1.4.10

Signed-off-by: Cat Kasin <cat <AT> aulucya.gay>
Closes: https://github.com/gentoo/gentoo/pull/39095
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-misc/hyfetch/Manifest                          |  2 +-
 .../hyfetch/files/hyfetch-1.4.10-config_fix.patch  | 15 ------------
 .../hyfetch/files/hyfetch-1.99.0-neofetch.patch    | 22 ++++++++++++++++++
 ...hyfetch-1.4.10.ebuild => hyfetch-1.99.0.ebuild} | 27 ++++++++++++++--------
 4 files changed, 41 insertions(+), 25 deletions(-)

diff --git a/app-misc/hyfetch/Manifest b/app-misc/hyfetch/Manifest
index 6828c0de92ea..9ad4bfee6a15 100644
--- a/app-misc/hyfetch/Manifest
+++ b/app-misc/hyfetch/Manifest
@@ -1,2 +1,2 @@
-DIST hyfetch-1.4.10.tar.gz 266471 BLAKE2B 
294002c2cd986055f6392aa61bb8de1d3d558712cd327243e7c2e756aa6e00ff23372fd0ffcc60db8f978110a3d8d1d78c6f683e304fc65b19d2f076e10347f2
 SHA512 
3f44bd9c0b030b435949db0c0cbd4913e7ec15e857df0dcf2fc3b7d10dca0a4c8ecb9862157f60eebd15b7a1c233c51a74f341b440892e0925871e42215c80e0
 DIST hyfetch-1.4.11.tar.gz 275741 BLAKE2B 
0739dc7bc2a90989dcd4dbdd6d14ce8ba62def2a9e069ae16a3a1435118e3639edcc112fc3fa0b8dd54684744e500672c7397315b78d965b68da2f9b9f702b13
 SHA512 
13c757fed68c9aa1caa503553d6d29c0b68284029090b970b863dec3240dabb28a852ef0ec0f2742c6c268e30a15c48018a651e74ba0e6782b5aa14f2b1d1312
+DIST hyfetch-1.99.0.tar.gz 315607 BLAKE2B 
73e44d936124c993251b0d5f7261a1707136aee8fad8b1c660c0932223636db6cfbd1c6747bd16ee94370d6578e0220a96fb58c608ca26791957e855bc70deca
 SHA512 
e6d662ab028cd159e69b09d2929fb7b28d7ce470d2d6c7a5ef9af688ee7ce973d893d4bb13e70be0846a5d0d5808560d92608014d877113166a5e8af11ed8275

diff --git a/app-misc/hyfetch/files/hyfetch-1.4.10-config_fix.patch 
b/app-misc/hyfetch/files/hyfetch-1.4.10-config_fix.patch
deleted file mode 100644
index 955eaf60ca30..000000000000
--- a/app-misc/hyfetch/files/hyfetch-1.4.10-config_fix.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-check_config uses the global constant CONFIG_PATH instead
-of the path that gets passed to it.
-
---- a/hyfetch/main.py
-+++ b/hyfetch/main.py
-@@ -27,7 +27,7 @@ def check_config(path) -> Config:
-     """
-     if path.is_file():
-         try:
--            return 
Config.from_dict(json.loads(CONFIG_PATH.read_text('utf-8')))
-+            return Config.from_dict(json.loads(path.read_text('utf-8')))
-         except KeyError:
-             return create_config()
- 
-

diff --git a/app-misc/hyfetch/files/hyfetch-1.99.0-neofetch.patch 
b/app-misc/hyfetch/files/hyfetch-1.99.0-neofetch.patch
new file mode 100644
index 000000000000..4f1a1f6a3b5c
--- /dev/null
+++ b/app-misc/hyfetch/files/hyfetch-1.99.0-neofetch.patch
@@ -0,0 +1,22 @@
+From: Cat Kasin <[email protected]>
+Date: Thu, 23 Oct 2024 19:31:10 -0700
+Subject: [PATCH] use system neowofetch
+
+Signed-off-by: Cat Kasin <[email protected]>
+Forwarded: not-needed
+
+---
+diff --git a/hyfetch/neofetch_util.py b/hyfetch/neofetch_util.py
+index 17829ac..1fcfcfc 100644
+--- a/hyfetch/neofetch_util.py
++++ b/hyfetch/neofetch_util.py
+@@ -254,8 +254,7 @@
+     Run neofetch command
+     """
+     if platform.system() != 'Windows':
+-        bash = ['/usr/bin/env', 'bash'] if Path('/usr/bin/env').is_file() 
else [shutil.which('bash')]
+-        full_cmd = [*bash, get_command_path(), *shlex.split(args)]
++        full_cmd = ['/usr/bin/neowofetch', *shlex.split(args)]
+ 
+     else:
+         cmd = get_command_path().replace("\\", "/").replace("C:/", "/c/")

diff --git a/app-misc/hyfetch/hyfetch-1.4.10.ebuild 
b/app-misc/hyfetch/hyfetch-1.99.0.ebuild
similarity index 67%
rename from app-misc/hyfetch/hyfetch-1.4.10.ebuild
rename to app-misc/hyfetch/hyfetch-1.99.0.ebuild
index 5584d2553d7b..5361fd610c69 100644
--- a/app-misc/hyfetch/hyfetch-1.4.10.ebuild
+++ b/app-misc/hyfetch/hyfetch-1.99.0.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
+PYTHON_COMPAT=( python3_{10..13} )
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} )
-inherit optfeature distutils-r1
+
+inherit optfeature distutils-r1 shell-completion
 
 DESCRIPTION="Neofetch with LGBTQ+ pride flags!"
 HOMEPAGE="https://github.com/hykilpikonna/hyfetch";
@@ -14,20 +15,28 @@ if [[ ${PV} == *9999 ]]; then
        inherit git-r3
 else
        
SRC_URI="https://github.com/hykilpikonna/${PN}/archive/${PV}/${P}.tar.gz";
-       KEYWORDS="amd64 ~arm64"
+       KEYWORDS="~amd64 ~arm64"
 fi
 
 LICENSE="MIT"
 SLOT="0"
 
-RDEPEND="
-               dev-python/typing-extensions[${PYTHON_USEDEP}]
-"
-
 PATCHES=(
-       "${FILESDIR}"/${PN}-1.4.10-config_fix.patch
+       "${FILESDIR}"/${PN}-1.99.0-neofetch.patch
 )
 
+python_install() {
+       newbashcomp hyfetch/scripts/autocomplete.bash ${PN}
+       newzshcomp hyfetch/scripts/autocomplete.zsh _${PN}
+
+       distutils-r1_python_install
+
+       dodir /usr/bin/
+       cp neofetch "${D}/usr/bin/neowofetch" || die
+
+       rm -r "${D}/usr/lib/${EPYTHON}/site-packages/hyfetch/scripts" || die
+}
+
 pkg_postinst() {
        optfeature "displaying images" "media-libs/imlib2 www-client/w3m[imlib]"
        optfeature "gpu detection" sys-apps/pciutils

Reply via email to