diff --git a/app-admin/run0edit/Manifest b/app-admin/run0edit/Manifest index 24c4255a97..76947c5eff 100644 --- a/app-admin/run0edit/Manifest +++ b/app-admin/run0edit/Manifest @@ -1,2 +1,3 @@ +DIST run0edit-0.5.10.tar.gz 215040 BLAKE2B a0b692eb2a3dbf38883ddb6421f8125fd4333c36b9846ef3ecdb09d3ee132deff6b492ee79b878697b8b54ed1f2a8b41addd1c001c77a243f701a484636cb9a9 SHA512 5f7f1118c5c083637963986bb24e0fcaec39c8fbe95201d137ccbaddeab12919794e1ed1eba717fbbd57676bb67b6a9b9e41d2c5219e00551060c5e984d583b2 DIST run0edit-0.5.8.tar.gz 61440 BLAKE2B dabb11034e380e9ed38d837fd68088f8db641b16a57685fd765dff2f7cebb2be089435450b4d5e9f9ca25a549a8e9ade111e35dcb734461c7b82d45460d20eb3 SHA512 af324e18bd2cee60e72eb557c5b64f062d315a2ba3e30a314cc1879a993e1d4f8d446510e8669df92f1f306104c6b52dc14adc80e4a8e7622a1dba1aa2b07f86 DIST run0edit-0.5.9.tar.gz 61440 BLAKE2B ca86288b8af51bf615893840eb0fa848b6c245098989ec115459d7315686f296e0c82bed62a3b3821bbbe9ffd2984cb5954d00812eed76d4d6b63724c8a4b261 SHA512 6f0a4943a65514a6d42e2bfd0fad488c44b83f71118c6f1f1970c8874794ca0b10aaaf4e7acc1d5e02ad146a0c3b149ecf43714cc16739780ce652f636aba857 diff --git a/app-admin/run0edit/run0edit-0.5.10.ebuild b/app-admin/run0edit/run0edit-0.5.10.ebuild new file mode 100644 index 0000000000..f4a6ba17c9 --- /dev/null +++ b/app-admin/run0edit/run0edit-0.5.10.ebuild @@ -0,0 +1,73 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{12..15} ) + +inherit meson python-single-r1 + +DESCRIPTION="Script to edit a single file as root using run0" +HOMEPAGE="https://github.com/HastD/run0edit" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/HastD/run0edit.git" +else + SRC_URI="https://github.com/HastD/run0edit/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="|| ( Apache-2.0 MIT )" +SLOT="0" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + virtual/pandoc + test? ( + $(python_gen_cond_dep ' + dev-python/coverage[${PYTHON_USEDEP}] + ') + ) +" +RDEPEND=" + ${PYTHON_DEPS} + >=sys-apps/systemd-256:= +" + +DOCS=( {CHANGELOG,SECURITY,README}.md ) + +src_prepare() { + default + + python_fix_shebang run0edit_main.py.in run0edit_inner.py + + local b2=$(b2sum "${S}"/run0edit_inner.py | cut -d' ' -f1) + + # patch hard-coded variables to work + sed -i \ + -e "/^INNER_SCRIPT_B2:/{ + N + s|^.*|INNER_SCRIPT_B2: Final[str] = \"${b2}\"| + }" \ + run0edit_main.py.in || die +} + +src_configure() { + local emesonargs=( + $(meson_feature test unit-tests) + $(meson_feature test integration-tests) + ) + + meson_src_configure +} + +src_install() { + meson_src_install + + rm -r "${ED}"/usr/share/licenses || die +} diff --git a/app-admin/run0edit/run0edit-9999.ebuild b/app-admin/run0edit/run0edit-9999.ebuild index bdf7abd4bb..f4a6ba17c9 100644 --- a/app-admin/run0edit/run0edit-9999.ebuild +++ b/app-admin/run0edit/run0edit-9999.ebuild @@ -3,8 +3,9 @@ EAPI=8 -PYTHON_COMPAT=( python3_{12..14} ) -inherit python-single-r1 +PYTHON_COMPAT=( python3_{12..15} ) + +inherit meson python-single-r1 DESCRIPTION="Script to edit a single file as root using run0" HOMEPAGE="https://github.com/HastD/run0edit" @@ -13,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/HastD/run0edit.git" else - SRC_URI="https://github.com/HastD/run0edit/releases/download/v${PV}/run0edit-${PV}.tar.gz" + SRC_URI="https://github.com/HastD/run0edit/releases/download/v${PV}/${P}.tar.gz" KEYWORDS="~amd64" fi @@ -21,6 +22,18 @@ LICENSE="|| ( Apache-2.0 MIT )" SLOT="0" REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + virtual/pandoc + test? ( + $(python_gen_cond_dep ' + dev-python/coverage[${PYTHON_USEDEP}] + ') + ) +" RDEPEND=" ${PYTHON_DEPS} >=sys-apps/systemd-256:= @@ -31,25 +44,30 @@ DOCS=( {CHANGELOG,SECURITY,README}.md ) src_prepare() { default - python_fix_shebang run0edit_main.py run0edit_inner.py + python_fix_shebang run0edit_main.py.in run0edit_inner.py local b2=$(b2sum "${S}"/run0edit_inner.py | cut -d' ' -f1) - local sitedir=$(python_get_sitedir) # patch hard-coded variables to work sed -i \ - -e "s|^INNER_SCRIPT_PATH:.*|INNER_SCRIPT_PATH: Final[str] = \"${sitedir}/run0edit_inner.py\"|" \ -e "/^INNER_SCRIPT_B2:/{ N s|^.*|INNER_SCRIPT_B2: Final[str] = \"${b2}\"| }" \ - run0edit_main.py || die + run0edit_main.py.in || die +} + +src_configure() { + local emesonargs=( + $(meson_feature test unit-tests) + $(meson_feature test integration-tests) + ) + + meson_src_configure } src_install() { - python_domodule run0edit_inner.py + meson_src_install - python_newscript run0edit_main.py run0edit - - einstalldocs + rm -r "${ED}"/usr/share/licenses || die }