* [gentoo-commits] repo/gentoo:master commit in: app-misc/hyfetch/, app-misc/hyfetch/files/
@ 2023-10-20 7:35 Joonas Niilola
0 siblings, 0 replies; 3+ messages in thread
From: Joonas Niilola @ 2023-10-20 7:35 UTC (permalink / raw
To: gentoo-commits
commit: 6fb8c321abb5af9f53eb29c66c4abe7c457fe4b2
Author: Bailey Kasin <baileykasin <AT> gmail <DOT> com>
AuthorDate: Fri Oct 20 07:11:04 2023 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Oct 20 07:29:45 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fb8c321
app-misc/hyfetch: new package, add 1.4.10, 9999
Closes: https://github.com/gentoo/gentoo/pull/32681
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
app-misc/hyfetch/Manifest | 1 +
.../hyfetch/files/hyfetch-1.4.10-config_fix.patch | 15 ++++++++
app-misc/hyfetch/hyfetch-1.4.10.ebuild | 40 ++++++++++++++++++++++
app-misc/hyfetch/hyfetch-9999.ebuild | 36 +++++++++++++++++++
app-misc/hyfetch/metadata.xml | 19 ++++++++++
5 files changed, 111 insertions(+)
diff --git a/app-misc/hyfetch/Manifest b/app-misc/hyfetch/Manifest
new file mode 100644
index 000000000000..3a5f627eff09
--- /dev/null
+++ b/app-misc/hyfetch/Manifest
@@ -0,0 +1 @@
+DIST hyfetch-1.4.10.tar.gz 266471 BLAKE2B 294002c2cd986055f6392aa61bb8de1d3d558712cd327243e7c2e756aa6e00ff23372fd0ffcc60db8f978110a3d8d1d78c6f683e304fc65b19d2f076e10347f2 SHA512 3f44bd9c0b030b435949db0c0cbd4913e7ec15e857df0dcf2fc3b7d10dca0a4c8ecb9862157f60eebd15b7a1c233c51a74f341b440892e0925871e42215c80e0
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
new file mode 100644
index 000000000000..955eaf60ca30
--- /dev/null
+++ b/app-misc/hyfetch/files/hyfetch-1.4.10-config_fix.patch
@@ -0,0 +1,15 @@
+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/hyfetch-1.4.10.ebuild b/app-misc/hyfetch/hyfetch-1.4.10.ebuild
new file mode 100644
index 000000000000..076daa812814
--- /dev/null
+++ b/app-misc/hyfetch/hyfetch-1.4.10.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..12} )
+inherit optfeature distutils-r1
+
+DESCRIPTION="Neofetch with LGBTQ+ pride flags!"
+HOMEPAGE="https://github.com/hykilpikonna/hyfetch"
+if [[ ${PV} == *9999 ]]; then
+ EGIT_REPO_URI="https://github.com/hykilpikonna/hyfetch.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/hykilpikonna/${PN}/archive/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+RDEPEND="
+ dev-python/typing-extensions[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.10-config_fix.patch
+)
+
+pkg_postinst() {
+ optfeature "displaying images" "media-libs/imlib2 www-client/w3m[imlib]"
+ optfeature "gpu detection" sys-apps/pciutils
+ optfeature "thumbnail creation" media-gfx/imagemagick
+ optfeature "wallpaper" media-gfx/feh x11-misc/nitrogen
+ optfeature "window size" x11-misc/xdotool "x11-apps/xwininfo x11-apps/xprop" "x11-apps/xwininfo x11-apps/xdpyinfo"
+ elog "The standard neofetch is installed as 'neowofetch', to avoid name conflicts."
+ elog "So if you do not wish to use the pride flag functionality, you can call the"
+ elog "tool that way instead."
+}
diff --git a/app-misc/hyfetch/hyfetch-9999.ebuild b/app-misc/hyfetch/hyfetch-9999.ebuild
new file mode 100644
index 000000000000..c73d6a446e80
--- /dev/null
+++ b/app-misc/hyfetch/hyfetch-9999.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..12} )
+inherit optfeature distutils-r1
+
+DESCRIPTION="Neofetch with LGBTQ+ pride flags!"
+HOMEPAGE="https://github.com/hykilpikonna/hyfetch"
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/hykilpikonna/hyfetch.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/hykilpikonna/${PN}/archive/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+RDEPEND="
+ dev-python/typing-extensions[${PYTHON_USEDEP}]
+"
+
+pkg_postinst() {
+ optfeature "displaying images" "media-libs/imlib2 www-client/w3m[imlib]"
+ optfeature "gpu detection" sys-apps/pciutils
+ optfeature "thumbnail creation" media-gfx/imagemagick
+ optfeature "wallpaper" media-gfx/feh x11-misc/nitrogen
+ optfeature "window size" x11-misc/xdotool "x11-apps/xwininfo x11-apps/xprop" "x11-apps/xwininfo x11-apps/xdpyinfo"
+ elog "The standard neofetch is installed as 'neowofetch', to avoid name conflicts."
+ elog "So if you do not wish to use the pride flag functionality, you can call the"
+ elog "tool that way instead."
+}
diff --git a/app-misc/hyfetch/metadata.xml b/app-misc/hyfetch/metadata.xml
new file mode 100644
index 000000000000..3a8c9e49c124
--- /dev/null
+++ b/app-misc/hyfetch/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>baileykasin@gmail.com</email>
+ <name>Bailey Kasin</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en"> hyfetch builds upon neofetch to add pride flag coloration to the OS
+ logo, and also maintains the standard version of neofetch with bug fixes and new features,
+ as the original project is un-maintained. </longdescription>
+ <upstream>
+ <remote-id type="github">hykilpikonna/hyfetch</remote-id>
+ <bugs-to>https://github.com/hykilpikonna/hyfetch/issues</bugs-to>
+ </upstream>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-misc/hyfetch/, app-misc/hyfetch/files/
@ 2024-05-13 18:42 Joonas Niilola
0 siblings, 0 replies; 3+ messages in thread
From: Joonas Niilola @ 2024-05-13 18:42 UTC (permalink / raw
To: gentoo-commits
commit: c54f3d3ea841308bf0b11594f43d08ca330417a1
Author: Bailey Kasin <baileykasin <AT> gmail <DOT> com>
AuthorDate: Sun May 5 23:06:42 2024 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon May 13 18:42:09 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c54f3d3e
app-misc/hyfetch: remove unexpected directory in site-packages
Closes: https://bugs.gentoo.org/922206
Removes site-packages/tools which wasn't supposed to be included at all,
installs the contents of site-packages/hyfetch/scripts to the proper
locations and deletes the folder. This has the addded benefit of
bringing this version of the package more inline with how other distros
package this project.
Signed-off-by: Bailey Kasin <baileykasin <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36577
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
.../hyfetch/files/hyfetch-1.4.11-neofetch.patch | 22 ++++
.../hyfetch/files/hyfetch-1.4.11-pyproject.patch | 116 ++++++++++++++++++++
.../hyfetch/files/hyfetch-9999-pyproject.patch | 117 +++++++++++++++++++++
...etch-1.4.11.ebuild => hyfetch-1.4.11-r1.ebuild} | 22 +++-
app-misc/hyfetch/hyfetch-9999.ebuild | 24 ++++-
5 files changed, 296 insertions(+), 5 deletions(-)
diff --git a/app-misc/hyfetch/files/hyfetch-1.4.11-neofetch.patch b/app-misc/hyfetch/files/hyfetch-1.4.11-neofetch.patch
new file mode 100644
index 000000000000..02c22614cfb2
--- /dev/null
+++ b/app-misc/hyfetch/files/hyfetch-1.4.11-neofetch.patch
@@ -0,0 +1,22 @@
+From: Bailey Kasin <baileykasin@gmail.com>
+Date: Mon, 02 Oct 2023 23:02:10 -0700
+Subject: [PATCH] use system neowofetch
+
+Signed-off-by: Bailey Kasin <baileykasin@gmail.com>
+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
+@@ -285,7 +285,7 @@ def run_neofetch_cmd(args: str, pipe: bool = False) -> str | None:
+ Run neofetch command
+ """
+ if platform.system() != 'Windows':
+- full_cmd = ['/usr/bin/env', '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/files/hyfetch-1.4.11-pyproject.patch b/app-misc/hyfetch/files/hyfetch-1.4.11-pyproject.patch
new file mode 100644
index 000000000000..c82503c45b35
--- /dev/null
+++ b/app-misc/hyfetch/files/hyfetch-1.4.11-pyproject.patch
@@ -0,0 +1,116 @@
+From 4b926d90e8f2a5eebfdd68105facff1f99694f5a Mon Sep 17 00:00:00 2001
+From: Bailey Kasin <baileykasin@gmail.com>
+Date: Thu, 28 Sep 2023 13:05:22 -0700
+Subject: [PATCH] [+] Start switch to pyproject.toml
+
+Signed-off-by: Bailey Kasin <baileykasin@gmail.com>
+---
+ pyproject.toml | 37 +++++++++++++++++++++++++++++++++++
+ setup.py | 52 ++------------------------------------------------
+ 2 files changed, 39 insertions(+), 50 deletions(-)
+ create mode 100644 pyproject.toml
+ mode change 100755 => 100644 setup.py
+
+diff --git a/pyproject.toml b/pyproject.toml
+new file mode 100644
+index 000000000..d30f10c0b
+--- /dev/null
++++ b/pyproject.toml
+@@ -0,0 +1,38 @@
++[build-system]
++requires = ["setuptools", "typing_extensions"]
++build-backend = "setuptools.build_meta"
++
++[project]
++name = "HyFetch"
++authors = [{ name = "Azalea Gui", email = "me@hydev.org" }]
++description = "neofetch with flags <3"
++readme = "README.md"
++requires-python = ">=3.7"
++license = { text = "MIT License" }
++classifiers = [
++ "License :: OSI Approved :: MIT License",
++ "Programming Language :: Python :: 3",
++ "Programming Language :: Python :: 3.7",
++ "Programming Language :: Python :: 3.8",
++ "Programming Language :: Python :: 3.9",
++ "Programming Language :: Python :: 3.10",
++ "Programming Language :: Python :: 3.11",
++ "Programming Language :: Python :: 3.12",
++]
++dependencies = [
++ "typing_extensions",
++ 'psutil ; platform_system=="Windows"',
++ 'colorama>=0.4.6 ; platform_system=="Windows"'
++]
++dynamic = ["version"]
++
++[tool.setuptools]
++packages = ["hyfetch", "hyfetch.distros"]
++license-files = ["LICENSE.md"]
++script-files = ["hyfetch/scripts/neowofetch"]
++
++[tool.setuptools.dynamic]
++version = {attr = "hyfetch.__version__"}
++
++[project.scripts]
++hyfetch = "hyfetch.main:run"
+diff --git a/setup.py b/setup.py
+index 95260a40..60684932 100755
+--- a/setup.py 2023-12-02 00:22:33.000000000 -0000
++++ b/setup.py 2024-05-03 08:58:46.479797868 -0000
+@@ -1,52 +1,3 @@
+-#!/usr/bin/env python3
+-from pathlib import Path
+-from setuptools import setup, find_namespace_packages
++from setuptools import setup
+
+-# The directory containing this file
+-HERE = Path(__file__).parent
+-
+-# Load version without importing it (see issue #192 if you are confused)
+-for l in (HERE / 'hyfetch' / '__version__.py').read_text().strip().splitlines():
+- exec(l)
+-
+-# The text of the README file
+-README = (HERE / "README.md").read_text('utf-8')
+-
+-# This call to setup() does all the work
+-setup(
+- name="HyFetch",
+- version=VERSION,
+- description="neofetch with flags <3",
+- long_description=README,
+- long_description_content_type="text/markdown",
+- url="https://github.com/hykilpikonna/HyFetch",
+- author="Azalea Gui",
+- author_email="me@hydev.org",
+- license="MIT",
+- classifiers=[
+- "License :: OSI Approved :: MIT License",
+- "Programming Language :: Python :: 3",
+- "Programming Language :: Python :: 3.7",
+- "Programming Language :: Python :: 3.8",
+- "Programming Language :: Python :: 3.9",
+- "Programming Language :: Python :: 3.10",
+- "Programming Language :: Python :: 3.11",
+- ],
+- packages=find_namespace_packages(),
+- package_data={'hyfetch': ['hyfetch/*']},
+- include_package_data=True,
+- install_requires=[
+- # Universal dependencies
+- 'setuptools', 'typing_extensions',
+-
+- # Windows dependencies
+- 'psutil ; platform_system=="Windows"',
+- 'colorama>=0.4.6 ; platform_system=="Windows"',
+- ],
+- entry_points={
+- "console_scripts": [
+- "hyfetch=hyfetch.main:run",
+- ]
+- },
+- scripts=['hyfetch/scripts/neowofetch']
+-)
++setup()
diff --git a/app-misc/hyfetch/files/hyfetch-9999-pyproject.patch b/app-misc/hyfetch/files/hyfetch-9999-pyproject.patch
new file mode 100644
index 000000000000..ae0a3131d228
--- /dev/null
+++ b/app-misc/hyfetch/files/hyfetch-9999-pyproject.patch
@@ -0,0 +1,117 @@
+From 4b926d90e8f2a5eebfdd68105facff1f99694f5a Mon Sep 17 00:00:00 2001
+From: Bailey Kasin <baileykasin@gmail.com>
+Date: Thu, 28 Sep 2023 13:05:22 -0700
+Subject: [PATCH] [+] Start switch to pyproject.toml
+
+Signed-off-by: Bailey Kasin <baileykasin@gmail.com>
+---
+ pyproject.toml | 37 +++++++++++++++++++++++++++++++++++
+ setup.py | 52 ++------------------------------------------------
+ 2 files changed, 39 insertions(+), 50 deletions(-)
+ create mode 100644 pyproject.toml
+ mode change 100755 => 100644 setup.py
+
+diff --git a/pyproject.toml b/pyproject.toml
+new file mode 100644
+index 000000000..d30f10c0b
+--- /dev/null
++++ b/pyproject.toml
+@@ -0,0 +1,38 @@
++[build-system]
++requires = ["setuptools", "typing_extensions"]
++build-backend = "setuptools.build_meta"
++
++[project]
++name = "HyFetch"
++authors = [{ name = "Azalea Gui", email = "me@hydev.org" }]
++description = "neofetch with flags <3"
++readme = "README.md"
++requires-python = ">=3.7"
++license = { text = "MIT License" }
++classifiers = [
++ "License :: OSI Approved :: MIT License",
++ "Programming Language :: Python :: 3",
++ "Programming Language :: Python :: 3.7",
++ "Programming Language :: Python :: 3.8",
++ "Programming Language :: Python :: 3.9",
++ "Programming Language :: Python :: 3.10",
++ "Programming Language :: Python :: 3.11",
++ "Programming Language :: Python :: 3.12",
++]
++dependencies = [
++ "typing_extensions",
++ 'psutil ; platform_system=="Windows"',
++ 'colorama>=0.4.6 ; platform_system=="Windows"'
++]
++dynamic = ["version"]
++
++[tool.setuptools]
++packages = ["hyfetch", "hyfetch.distros"]
++license-files = ["LICENSE.md"]
++script-files = ["hyfetch/scripts/neowofetch"]
++
++[tool.setuptools.dynamic]
++version = {attr = "hyfetch.__version__"}
++
++[project.scripts]
++hyfetch = "hyfetch.main:run"
+diff --git a/setup.py b/setup.py
+index 95260a40..60684932 100755
+--- a/setup.py 2023-12-02 00:22:33.000000000 -0000
++++ b/setup.py 2024-05-03 08:58:46.479797868 -0000
+@@ -1,53 +1,3 @@
+-#!/usr/bin/env python3
+-from pathlib import Path
+-from setuptools import setup, find_namespace_packages
++from setuptools import setup
+
+-# The directory containing this file
+-HERE = Path(__file__).parent
+-
+-# Load version without importing it (see issue #192 if you are confused)
+-for l in (HERE / 'hyfetch' / '__version__.py').read_text().strip().splitlines():
+- exec(l)
+-
+-# The text of the README file
+-README = (HERE / "README.md").read_text('utf-8')
+-
+-# This call to setup() does all the work
+-setup(
+- name="HyFetch",
+- version=VERSION,
+- description="neofetch with flags <3",
+- long_description=README,
+- long_description_content_type="text/markdown",
+- url="https://github.com/hykilpikonna/HyFetch",
+- author="Azalea Gui",
+- author_email="me@hydev.org",
+- license="MIT",
+- classifiers=[
+- "License :: OSI Approved :: MIT License",
+- "Programming Language :: Python :: 3",
+- "Programming Language :: Python :: 3.7",
+- "Programming Language :: Python :: 3.8",
+- "Programming Language :: Python :: 3.9",
+- "Programming Language :: Python :: 3.10",
+- "Programming Language :: Python :: 3.11",
+- "Programming Language :: Python :: 3.12",
+- ],
+- packages=find_namespace_packages(),
+- package_data={'hyfetch': ['hyfetch/*']},
+- include_package_data=True,
+- install_requires=[
+- # Universal dependencies
+- 'setuptools', 'typing_extensions',
+-
+- # Windows dependencies
+- 'psutil ; platform_system=="Windows"',
+- 'colorama>=0.4.6 ; platform_system=="Windows"',
+- ],
+- entry_points={
+- "console_scripts": [
+- "hyfetch=hyfetch.main:run",
+- ]
+- },
+- scripts=['hyfetch/scripts/neowofetch']
+-)
++setup()
diff --git a/app-misc/hyfetch/hyfetch-1.4.11.ebuild b/app-misc/hyfetch/hyfetch-1.4.11-r1.ebuild
similarity index 72%
rename from app-misc/hyfetch/hyfetch-1.4.11.ebuild
rename to app-misc/hyfetch/hyfetch-1.4.11-r1.ebuild
index 2be7a98f9acf..1259152e377e 100644
--- a/app-misc/hyfetch/hyfetch-1.4.11.ebuild
+++ b/app-misc/hyfetch/hyfetch-1.4.11-r1.ebuild
@@ -3,9 +3,10 @@
EAPI=8
-DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..12} )
-inherit optfeature distutils-r1
+DISTUTILS_USE_PEP517=setuptools
+
+inherit optfeature distutils-r1 shell-completion
DESCRIPTION="Neofetch with LGBTQ+ pride flags!"
HOMEPAGE="https://github.com/hykilpikonna/hyfetch"
@@ -20,10 +21,27 @@ fi
LICENSE="MIT"
SLOT="0"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.11-pyproject.patch
+ "${FILESDIR}"/${PN}-1.4.11-neofetch.patch
+)
+
RDEPEND="
dev-python/typing-extensions[${PYTHON_USEDEP}]
"
+python_install() {
+ newbashcomp hyfetch/scripts/autocomplete.bash ${PN}
+ newzshcomp hyfetch/scripts/autocomplete.zsh _${PN}
+
+ distutils-r1_python_install
+
+ dodir /usr/bin/
+ mv 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
diff --git a/app-misc/hyfetch/hyfetch-9999.ebuild b/app-misc/hyfetch/hyfetch-9999.ebuild
index 448b872ef1ad..2cb3939d54e0 100644
--- a/app-misc/hyfetch/hyfetch-9999.ebuild
+++ b/app-misc/hyfetch/hyfetch-9999.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
-DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..12} )
-inherit optfeature distutils-r1
+DISTUTILS_USE_PEP517=setuptools
+
+inherit optfeature distutils-r1 shell-completion
DESCRIPTION="Neofetch with LGBTQ+ pride flags!"
HOMEPAGE="https://github.com/hykilpikonna/hyfetch"
@@ -20,10 +21,27 @@ fi
LICENSE="MIT"
SLOT="0"
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999-pyproject.patch
+ "${FILESDIR}"/${PN}-1.4.11-neofetch.patch
+)
+
RDEPEND="
dev-python/typing-extensions[${PYTHON_USEDEP}]
"
+python_install() {
+ newbashcomp hyfetch/scripts/autocomplete.bash ${PN}
+ newzshcomp hyfetch/scripts/autocomplete.zsh _${PN}
+
+ distutils-r1_python_install
+
+ dodir /usr/bin/
+ mv 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-misc/hyfetch/, app-misc/hyfetch/files/
@ 2024-10-25 11:36 Joonas Niilola
0 siblings, 0 replies; 3+ messages in thread
From: Joonas Niilola @ 2024-10-25 11:36 UTC (permalink / raw
To: gentoo-commits
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 <cat@aulucya.gay>
+Date: Thu, 23 Oct 2024 19:31:10 -0700
+Subject: [PATCH] use system neowofetch
+
+Signed-off-by: Cat Kasin <cat@aulucya.gay>
+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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-25 11:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-25 11:36 [gentoo-commits] repo/gentoo:master commit in: app-misc/hyfetch/, app-misc/hyfetch/files/ Joonas Niilola
-- strict thread matches above, loose matches on Subject: below --
2024-05-13 18:42 Joonas Niilola
2023-10-20 7:35 Joonas Niilola
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox