diff options
author | John Helmert III <ajak@gentoo.org> | 2024-07-28 15:42:42 -0700 |
---|---|---|
committer | John Helmert III <ajak@gentoo.org> | 2024-07-28 15:55:25 -0700 |
commit | c580f5aa47cfd93a4b4265e41780467f9b5244b5 (patch) | |
tree | ab01b86af85af82216a802af817fdbf49e7cc077 /sys-process | |
parent | gui-libs/greetd: add 0.10.3 (diff) | |
download | gentoo-c580f5aa47cfd93a4b4265e41780467f9b5244b5.tar.gz gentoo-c580f5aa47cfd93a4b4265e41780467f9b5244b5.tar.bz2 gentoo-c580f5aa47cfd93a4b4265e41780467f9b5244b5.zip |
sys-process/glances: add 4.1.2.1
Upstream has migrated from ujson to orjson. orjson in Gentoo doesn't
have pypy3 compat. Also mask >=4.1.2.1 in the wd40 profile as a new
reverse dependency of Rust-requiring orjson.
Also note that here introduces a hack to handle a mismatched release
version with the version in code, and this is hacked around through
src_prepare.
Signed-off-by: John Helmert III <ajak@gentoo.org>
Diffstat (limited to 'sys-process')
-rw-r--r-- | sys-process/glances/Manifest | 1 | ||||
-rw-r--r-- | sys-process/glances/glances-4.1.2.1.ebuild | 70 |
2 files changed, 71 insertions, 0 deletions
diff --git a/sys-process/glances/Manifest b/sys-process/glances/Manifest index edd2322164c6..cd264dab7bef 100644 --- a/sys-process/glances/Manifest +++ b/sys-process/glances/Manifest @@ -1 +1,2 @@ DIST glances-4.0.6.gh.tar.gz 6622650 BLAKE2B 82290999d94ea46bb5671a6eb2959cbb4246dd231fddbb6ad72108d7270faf5a3da5f73f25d1bdb8987a6db79d7a07eb05581fa7b4d7406df97cffb274e20387 SHA512 d5bb804aff6dbc5147a185cb613ca9f402b43fc2d9bef1e80dfd90db3fe11f445aade0d73e987a9a3665c4bf4f210dd3d1a98e9b53e028ef4e49a9111b527f0d +DIST glances-4.1.2.1.gh.tar.gz 6579592 BLAKE2B 2c22bd5bc4c1a162b92dcb016363dcf789c13b0fbeaab091f0f84d5538885b7c7e20347620491cc248242e25f81806119d82395ee72623ca2a80ffab78cddf56 SHA512 a440e6fb39c6aac3fa846e49268170e2a7c1a331a7b319dbe9d5cadf8aa9975146a5fae7d99abc085a9f9aadc739281073f5a99f95f456132a2e78b14898f340 diff --git a/sys-process/glances/glances-4.1.2.1.ebuild b/sys-process/glances/glances-4.1.2.1.ebuild new file mode 100644 index 000000000000..cecf27b778a1 --- /dev/null +++ b/sys-process/glances/glances-4.1.2.1.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_SINGLE_IMPL=1 +PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_REQ_USE="ncurses" +DISTUTILS_USE_PEP517=setuptools + +inherit distutils-r1 linux-info optfeature + +DESCRIPTION="CLI curses based monitoring tool" +HOMEPAGE="https://github.com/nicolargo/glances" +SRC_URI="https://github.com/nicolargo/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" + +RDEPEND=" + $(python_gen_cond_dep ' + dev-python/defusedxml[${PYTHON_USEDEP}] + dev-python/orjson[${PYTHON_USEDEP}] + dev-python/packaging[${PYTHON_USEDEP}] + >=dev-python/psutil-5.4.3[${PYTHON_USEDEP}] + ') +" + +# PYTHON_USEDEP omitted on purpose +BDEPEND="doc? ( dev-python/sphinx-rtd-theme )" + +CONFIG_CHECK="~TASK_IO_ACCOUNTING ~TASK_DELAY_ACCT ~TASKSTATS" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.6-disable-update-check.patch" + "${FILESDIR}/${PN}-4.0.6-doc-install-path.patch" +) + +distutils_enable_tests unittest +distutils_enable_sphinx docs --no-autodoc + +pkg_setup() { + linux-info_pkg_setup + python-single-r1_pkg_setup +} + +src_prepare() { + # the version is tagged 4.1.2.1 but upstream seemingly forgot to + # update the version, hack around it for now + sed -i "/__version__/s/4.1.2/${PV}/" glances/__init__.py || die + + distutils-r1_src_prepare +} + +python_test() { + "${EPYTHON}" unittest-core.py || die "tests failed with ${EPYTHON}" +} + +pkg_postinst() { + optfeature "Autodiscover mode" dev-python/zeroconf + optfeature "Cloud support" dev-python/requests + optfeature "Docker monitoring support" dev-python/docker + optfeature "SVG graph support" dev-python/pygal + optfeature "IP plugin" dev-python/netifaces + optfeature "RAID monitoring" dev-python/pymdstat + optfeature "RAID support" dev-python/pymdstat + optfeature "SNMP support" dev-python/pysnmp + optfeature "WIFI plugin" net-wireless/python-wifi +} |