commit:     0e56a142d03b1dce3ec09e5c27ccdd169677e6dd
Author:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 15 20:37:05 2025 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Sat Mar 15 21:01:24 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e56a142

dev-libs/boxfort: move test deps to bdeps & -* keywords

Test dependencies are moved to BDEPEND and python_has_version is used
instead of has_version as suggested in python guide [1].

The package seems to support only 4 architectures, see the commit
message b2413e6de746 ("dev-lib/boxfort: blacklist all remaining archs"),
therefore, remaining architectures are newly unlisted with -* keyword,
rather than enumerating them all.

[1] https://projects.gentoo.org/python/guide/any.html#conditional-python-use

Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 dev-libs/boxfort/boxfort-0.1.4-r2.ebuild | 43 ++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/dev-libs/boxfort/boxfort-0.1.4-r2.ebuild 
b/dev-libs/boxfort/boxfort-0.1.4-r2.ebuild
new file mode 100644
index 000000000000..ab1808c89d18
--- /dev/null
+++ b/dev-libs/boxfort/boxfort-0.1.4-r2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit meson python-any-r1
+
+DESCRIPTION="Convenient & cross-platform sandboxing C library"
+HOMEPAGE="https://github.com/Snaipe/BoxFort";
+SRC_URI="https://github.com/Snaipe/BoxFort/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}"/BoxFort-${PV}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~arm ~arm64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+       virtual/pkgconfig
+       test? (
+               $(python_gen_any_dep 'dev-util/cram[${PYTHON_USEDEP}]')
+       )
+"
+
+python_check_deps() {
+       use test && python_has_version "dev-util/cram[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       use test && python-any-r1_pkg_setup
+}
+
+src_configure() {
+       local emesonargs=(
+               $(meson_use test samples)
+               $(meson_use test tests)
+       )
+
+       meson_src_configure
+}

Reply via email to