diff options
author | Alexander Miller <alex.miller@gmx.de> | 2024-03-07 17:50:03 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-03-16 17:25:02 +0100 |
commit | 3d3575f4df1aa8c81092fbc7bc8913f17f0d3520 (patch) | |
tree | 5081df518b1a6fe97b921d6f56500bfbd6bf0acd | |
parent | dev-util/nihtest: New package, add version 1.5.0 (diff) | |
download | gentoo-3d3575f4df1aa8c81092fbc7bc8913f17f0d3520.tar.gz gentoo-3d3575f4df1aa8c81092fbc7bc8913f17f0d3520.tar.bz2 gentoo-3d3575f4df1aa8c81092fbc7bc8913f17f0d3520.zip |
app-arch/torrentzip: Enable tests
Signed-off-by: Alexander Miller <alex.miller@gmx.de>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r-- | app-arch/torrentzip/torrentzip-1.3.ebuild | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/app-arch/torrentzip/torrentzip-1.3.ebuild b/app-arch/torrentzip/torrentzip-1.3.ebuild index d7b943a837fe..5a45d54d5f5f 100644 --- a/app-arch/torrentzip/torrentzip-1.3.ebuild +++ b/app-arch/torrentzip/torrentzip-1.3.ebuild @@ -3,7 +3,8 @@ EAPI=8 -inherit cmake +PYTHON_COMPAT=( python3_{10..12} ) +inherit cmake python-any-r1 MY_P="trrntzip-${PV}" DESCRIPTION="Create identical zip archives over multiple systems" @@ -14,6 +15,8 @@ S="${WORKDIR}/${MY_P}" LICENSE="GPL-2+ ZLIB" SLOT="0" KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" RDEPEND=" sys-libs/zlib:= @@ -21,8 +24,25 @@ RDEPEND=" DEPEND=" ${RDEPEND} " +BDEPEND=" + test? ( + ${RDEPEND} + ${PYTHON_DEPS} + >=dev-util/nihtest-1.5.0 + ) +" DOCS=(AUTHORS NEWS.md README.md) -# Tests need nihtest <https://nih.at/nihtest/>, not packaged -mycmakeargs=( -DRUN_REGRESS=OFF ) +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_configure() { + if use test; then + local mycmakeargs=( -DPYTHONBIN="${EPYTHON}" ) + else + local mycmakeargs=( -DRUN_REGRESS=NO ) + fi + cmake_src_configure +} |