dev-util/pkgcheck: Sync with Gentoo

It's from Gentoo commit b537c387c5ebf5e5c40d39845ad529a204447db0.
This commit is contained in:
Flatcar Buildbot 2025-04-07 07:07:41 +00:00 committed by Krzesimir Nowak
parent 5e5817d50c
commit edc309e052
2 changed files with 94 additions and 0 deletions

View File

@ -1 +1,2 @@
DIST pkgcheck-0.10.33.tar.gz 380205 BLAKE2B 7f732443cc03e5bfb184f976f1af507cae55f3c98b9d251701d209cc18e76a99e168afcdffe359b9b3ec731aa754eb6223381cc7bc5a7661cfde82a50337f8fe SHA512 f4a1de6d99982d6ec4d77e245ea968922a2a906087449a0d98ebe3d8fc22a4a6cf060b09d3455efdbe7e9a445e785c0312120d3158a08790880a94c8e045e9c6 DIST pkgcheck-0.10.33.tar.gz 380205 BLAKE2B 7f732443cc03e5bfb184f976f1af507cae55f3c98b9d251701d209cc18e76a99e168afcdffe359b9b3ec731aa754eb6223381cc7bc5a7661cfde82a50337f8fe SHA512 f4a1de6d99982d6ec4d77e245ea968922a2a906087449a0d98ebe3d8fc22a4a6cf060b09d3455efdbe7e9a445e785c0312120d3158a08790880a94c8e045e9c6
DIST pkgcheck-0.10.34.tar.gz 382566 BLAKE2B d91302f673326bf4756e06c2bad1ad89b10f14a08ac54a24a6a00d7a95d4313e5e1755393aefa55e1057a396483b023cc38e67902238e2620a76961feb8b2a81 SHA512 57ec0ccea00cde4187219f85d23f755878e2298f6219cb9b18eb35f927a685aac2d9b9c73045f6750f90959abb6313a1ed99dedaae4f0ec6b59f08585253a410

View File

@ -0,0 +1,93 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=standalone
PYTHON_COMPAT=( python3_{10..13} )
inherit elisp-common distutils-r1 optfeature
if [[ ${PV} == *9999 ]] ; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/pkgcore/pkgcheck.git
https://github.com/pkgcore/pkgcheck.git"
inherit git-r3
else
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
inherit pypi
fi
DESCRIPTION="pkgcore-based QA utility for ebuild repos"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
LICENSE="BSD MIT"
SLOT="0"
IUSE="emacs"
if [[ ${PV} == *9999 ]]; then
RDEPEND="
~dev-python/snakeoil-9999[${PYTHON_USEDEP}]
~sys-apps/pkgcore-9999[${PYTHON_USEDEP}]"
else
RDEPEND="
>=dev-python/snakeoil-0.10.10[${PYTHON_USEDEP}]
>=sys-apps/pkgcore-0.12.25[${PYTHON_USEDEP}]"
fi
RDEPEND+="
>=dev-libs/tree-sitter-bash-0.21.0[python,${PYTHON_USEDEP}]
dev-python/chardet[${PYTHON_USEDEP}]
dev-python/lazy-object-proxy[${PYTHON_USEDEP}]
dev-python/lxml[${PYTHON_USEDEP}]
dev-python/pathspec[${PYTHON_USEDEP}]
>=dev-python/tree-sitter-0.23.0[${PYTHON_USEDEP}]
<dev-python/tree-sitter-0.25.0[${PYTHON_USEDEP}]
emacs? (
>=app-editors/emacs-24.1:*
app-emacs/ebuild-mode
app-emacs/flycheck
)
"
BDEPEND="${RDEPEND}
>=dev-python/flit-core-3.8[${PYTHON_USEDEP}]
test? (
dev-python/requests[${PYTHON_USEDEP}]
dev-vcs/git
)
"
SITEFILE="50${PN}-gentoo.el"
distutils_enable_tests pytest
export USE_SYSTEM_TREE_SITTER_BASH=1
src_compile() {
distutils-r1_src_compile
if use emacs ; then
pushd "${S}"/contrib/emacs >/dev/null || die
elisp-compile *.el
popd >/dev/null || die
fi
}
python_install_all() {
local DOCS=( NEWS.rst )
[[ ${PV} == *9999 ]] || doman build/sphinx/man/*
distutils-r1_python_install_all
if use emacs ; then
elisp-install ${PN} "${S}"/contrib/emacs/*.el{,c}
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi
}
pkg_postinst() {
use emacs && elisp-site-regen
optfeature "Network check support" dev-python/requests
optfeature "Perl module version check support" dev-perl/Gentoo-PerlMod-Version
}
pkg_postrm() {
use emacs && elisp-site-regen
}