app-portage/carnage: add man flag, add 1.1

Signed-off-by: dsaf <ghostyn678+git@gmail.com>
This commit is contained in:
dsaf
2025-11-10 00:49:09 -03:00
parent b2cf10b408
commit 1e633022a8
3 changed files with 99 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST carnage-1.0.tar.gz 246893 BLAKE2B 66aaa483858ee00e10ccb466158f1db5e4d23596a47e931995d8f6a9f4bbf033b401d0aefdb905f4a7d34f8dad4f458227e0774f2e1e465250453a6b2455ac98 SHA512 32d7b7fec21a83f4b35a55e0f59b1c0ec1960606004b99bad42928f328219c319c174aced29e615b7bd2fd1c239f5d900b0cddc4f6585e69cb5736fe2348342f
DIST carnage-1.1.tar.gz 138659 BLAKE2B 0205c6ae7d1361b9e4bd438f8ffc59563706d0810afdf3a864dad2691419c55a7d7e56e653ea827fadf741850122f921413d80bf98e2bdfb8186e460091ce733 SHA512 cbfd8ff1a59d50090e3bdd52a197ff3737fe0c89239786089a8e0537409dda08dd6d46a765d8bf7a0ed609eb024b164e017918d9f359c8ac2ffbc62156f7af31

View File

@@ -0,0 +1,71 @@
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{11..13} )
inherit distutils-r1 optfeature desktop xdg
DESCRIPTION="TUI front-end for Portage and eix"
HOMEPAGE="https://github.com/dsafxP/carnage"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/dsafxP/carnage.git"
else
SRC_URI="https://github.com/dsafxP/carnage/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
LICENSE="MIT"
SLOT="0"
IUSE="man"
RDEPEND="
>=dev-python/lxml-6.0.2[${PYTHON_USEDEP}]
>=dev-python/msgpack-1.1.2[${PYTHON_USEDEP}]
>=dev-python/textual-6.4.0[${PYTHON_USEDEP}]
>=dev-python/tomlkit-0.13.3[${PYTHON_USEDEP}]
"
BDEPEND="
man? (
|| (
app-text/lowdown
virtual/pandoc
)
)
"
distutils_enable_tests pytest
python_compile() {
distutils-r1_python_compile
if use man; then
local docgen=lowdown
# prefer pandoc if it's installed
has_version virtual/pandoc && docgen=pandoc
"${docgen}" docs/man.carnage.md -s -t man -o docs/carnage.1 \
|| die "Failed to generate man page with ${docgen}"
fi
}
src_install() {
distutils-r1_src_install
domenu assets/carnage.desktop
doicon -s scalable assets/carnage.svg
use man && doman docs/carnage.1
}
pkg_postinst() {
optfeature "package & use flag browsing" app-portage/eix
}

View File

@@ -22,6 +22,8 @@ fi
LICENSE="MIT"
SLOT="0"
IUSE="man"
RDEPEND="
>=dev-python/lxml-6.0.2[${PYTHON_USEDEP}]
>=dev-python/msgpack-1.1.2[${PYTHON_USEDEP}]
@@ -29,14 +31,39 @@ RDEPEND="
>=dev-python/tomlkit-0.13.3[${PYTHON_USEDEP}]
"
BDEPEND="
man? (
|| (
app-text/lowdown
virtual/pandoc
)
)
"
distutils_enable_tests pytest
python_compile() {
distutils-r1_python_compile
if use man; then
local docgen=lowdown
# prefer pandoc if it's installed
has_version virtual/pandoc && docgen=pandoc
"${docgen}" docs/man.carnage.md -s -t man -o docs/carnage.1 \
|| die "Failed to generate man page with ${docgen}"
fi
}
src_install() {
distutils-r1_src_install
domenu assets/carnage.desktop
doicon -s scalable assets/carnage.svg
use man && doman docs/carnage.1
}
pkg_postinst() {