From 0e943edf5ead4194ae9198e49d5bebde1283eb20 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 28 Jun 2026 09:17:10 +0100 Subject: [PATCH] app-portage/gentoolkit: add 0.7.5 Matt Turner (7): Drop portage._unicode_encode/_encodings usage revdep_rebuild: replace portage.os with stdlib os pprinter: drop Python 2 unicode shim Add encoding="utf-8" to text-mode open() calls atom: adapt to portage Atom attributes becoming read-only properties atom: remove no-op operator assignments in intersects() query: fix AttributeError when query includes category Sam James (2): */*: small `ruff --fix` changes meson.build: prepare for gentoolkit-0.7.5 moexiami (1): eclean: limit keep_binpkgs lifetime to the current binrepo Signed-off-by: Sam James --- app-portage/gentoolkit/Manifest | 1 + .../gentoolkit/gentoolkit-0.7.5.ebuild | 130 ++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 app-portage/gentoolkit/gentoolkit-0.7.5.ebuild diff --git a/app-portage/gentoolkit/Manifest b/app-portage/gentoolkit/Manifest index fb15e8a85ccf0..58e2e6f89d663 100644 --- a/app-portage/gentoolkit/Manifest +++ b/app-portage/gentoolkit/Manifest @@ -1,2 +1,3 @@ DIST gentoolkit-0.7.2.tar.bz2 3190909 BLAKE2B b8646c98858cd4e7c1c4dee5656319fd30b2668ea0b6739e327b94fc9955bb0fd8591769df0168fae46a98e28a96d1a95ff28fa35fe4a146cb100c554cd8a55a SHA512 9afe0e249bcee9f184cf5e691dd841756d00ac4ea63de223d89bc6a4a457f30a7def4390afe2e3f6f83425828f4c22086d381930e35b161000dea4c7146d5cd2 DIST gentoolkit-0.7.4.tar.bz2 3191147 BLAKE2B 7bc7bb819b277269bb0d714d74efe522beee0e1c7a09c818007847bfb5d26006178cf4f9a53da11d7dfb217683752769d53b269711d267da61261d6f997b5623 SHA512 d0f36205210d2a1402d64756983a021465943924657e433120c11c137f18b6c6c42c9a074d75f6d60f1ba0831f1f82feaaeb293086190b224ba6ed9f970e3659 +DIST gentoolkit-0.7.5.tar.bz2 3192126 BLAKE2B 028d6f0c441babc5a49c64c16642d03ffe2863403ee37944b6787b7cccb7f6c25fac2a2a410974fd87ac8552c2891bff8401c332fba9d7bcdcf9c226e6be57eb SHA512 9c08ac0a58f43c3d7aea6867f2aafbeef87bda70d5e26b4c47e6088de38f00604097b943f43bb7a2e79354dc30e642a7f81fb16e1234684dd7019532b2060a6b diff --git a/app-portage/gentoolkit/gentoolkit-0.7.5.ebuild b/app-portage/gentoolkit/gentoolkit-0.7.5.ebuild new file mode 100644 index 0000000000000..89f1792d96439 --- /dev/null +++ b/app-portage/gentoolkit/gentoolkit-0.7.5.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{12..14} ) +PYTHON_REQ_USE="xml(+),threads(+)" + +inherit meson python-r1 tmpfiles + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI=" + https://anongit.gentoo.org/git/proj/gentoolkit.git + https://github.com/gentoo/gentoolkit + " + inherit git-r3 +else + SRC_URI="https://gitweb.gentoo.org/proj/gentoolkit.git/snapshot/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris" +fi + +DESCRIPTION="Collection of administration scripts for Gentoo" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools" + +LICENSE="GPL-2" +SLOT="0" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +IUSE="test" +RESTRICT="!test? ( test )" + +# Need newer Portage for eclean-pkg API, bug #900224 +DEPEND=" + >=sys-apps/portage-3.0.57[${PYTHON_USEDEP}] +" +RDEPEND=" + ${DEPEND} + ${PYTHON_DEPS} + app-alternatives/awk + sys-apps/gentoo-functions +" + +# setuptools is still needed as a workaround for Python 3.12+ for now. +# https://github.com/mesonbuild/meson/issues/7702 +# +# >=meson-1.2.1-r1 for bug #912051 +BDEPEND=" + ${PYTHON_DEPS} + >=dev-build/meson-1.2.1-r1 + $(python_gen_cond_dep ' + dev-python/setuptools[${PYTHON_USEDEP}] + ' python3_12) + test? ( + dev-python/pytest[${PYTHON_USEDEP}] + ) +" + +src_prepare() { + default + if use prefix-guest ; then + # use correct repo name, bug #632223 + sed -i \ + -e "/load_profile_data/s/repo='gentoo'/repo='gentoo_prefix'/" \ + pym/gentoolkit/profile.py || die + fi +} + +src_configure() { + local code_only=false + python_foreach_impl my_src_configure +} + +my_src_configure() { + local emesonargs=( + -Dcode-only=${code_only} + $(meson_use test tests) + -Deprefix="${EPREFIX}" + -Ddocdir="${EPREFIX}/usr/share/doc/${PF}" + ) + + meson_src_configure + code_only=true +} + +src_compile() { + python_foreach_impl meson_src_compile +} + +src_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + python_foreach_impl epytest +} + +src_install() { + python_foreach_impl my_src_install + dotmpfiles data/tmpfiles.d/revdep-rebuild.conf + + local scripts + mapfile -t scripts < <(awk '/^#!.*python/ {print FILENAME} {nextfile}' "${ED}"/usr/bin/* || die) + python_replicate_script "${scripts[@]}" +} + +my_src_install() { + local pydirs=( + "${D}$(python_get_sitedir)" + ) + + meson_src_install + python_optimize "${pydirs[@]}" +} + +pkg_postinst() { + tmpfiles_process revdep-rebuild.conf + + # Only show the elog information on a new install + if [[ ! ${REPLACING_VERSIONS} ]]; then + elog + elog "For further information on gentoolkit, please read the gentoolkit" + elog "guide: https://wiki.gentoo.org/wiki/Gentoolkit" + elog + elog "Another alternative to equery is app-portage/portage-utils" + elog + elog "Additional tools that may be of interest:" + elog + elog " app-admin/eclean-kernel" + elog " app-portage/diffmask" + elog " app-portage/flaggie" + elog " app-portage/portpeek" + elog " app-portage/smart-live-rebuild" + fi +}