1 # Copyright 1999-2025 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 COMMIT=e7e0780114881dcf6e5ad934323f2595966865f9
7 PYTHON_COMPAT=( python3_{10..13} )
8 inherit cmake python-single-r1
10 DESCRIPTION="Geometry library for topological robustness"
11 HOMEPAGE="https://github.com/elalish/manifold"
12 SRC_URI="https://github.com/elalish/manifold/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
13 S="${WORKDIR}/${PN}-${COMMIT}"
19 IUSE="debug python test"
20 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
22 RESTRICT="!test? ( test )"
26 sci-mathematics/clipper2
27 python? ( ${PYTHON_DEPS}
28 $(python_gen_cond_dep '
29 dev-python/numpy[${PYTHON_USEDEP}]
35 $(python_gen_cond_dep '
36 >=dev-python/nanobind-2.1.0[${PYTHON_USEDEP}]
39 test? ( dev-cpp/gtest )
47 -e "/list(APPEND MANIFOLD_FLAGS/s/^/# DONOTSET /" \
48 -i CMakeLists.txt || die
53 -DMANIFOLD_CROSS_SECTION="yes"
54 -DMANIFOLD_DEBUG="$(usex debug)"
55 -DMANIFOLD_DOWNLOADS="no"
56 -DMANIFOLD_EXPORT="no"
57 -DMANIFOLD_JSBIND="no"
59 -DMANIFOLD_PYBIND="$(usex python)"
60 -DMANIFOLD_TEST="$(usex test)"
67 "${BUILD_DIR}/test/manifold_test" || die