www-apache/mod_tls: new package, add 0.14.0
[gentoo/gentoo.git] / sci-mathematics / manifold / manifold-3.0.0_pre20241115.ebuild
blobfe78b17187a5b5329b7e5a40e03d90cd92b1ad8e
1 # Copyright 1999-2025 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
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}"
15 LICENSE="Apache-2.0"
16 SLOT="0"
17 KEYWORDS="amd64"
19 IUSE="debug python test"
20 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
22 RESTRICT="!test? ( test )"
24 RDEPEND="
25         dev-cpp/tbb:=
26         sci-mathematics/clipper2
27         python? ( ${PYTHON_DEPS}
28                 $(python_gen_cond_dep '
29                         dev-python/numpy[${PYTHON_USEDEP}]
30                 ')
31         )
33 DEPEND="
34         python? (
35                 $(python_gen_cond_dep '
36                         >=dev-python/nanobind-2.1.0[${PYTHON_USEDEP}]
37                 ')
38         )
39         test? ( dev-cpp/gtest )
40         ${RDEPEND}
43 src_prepare() {
44         cmake_src_prepare
46         sed \
47                 -e "/list(APPEND MANIFOLD_FLAGS/s/^/# DONOTSET /" \
48                 -i CMakeLists.txt || die
51 src_configure() {
52         local mycmakeargs=(
53                 -DMANIFOLD_CROSS_SECTION="yes"
54                 -DMANIFOLD_DEBUG="$(usex debug)"
55                 -DMANIFOLD_DOWNLOADS="no"
56                 -DMANIFOLD_EXPORT="no"
57                 -DMANIFOLD_JSBIND="no"
58                 -DMANIFOLD_PAR="no"
59                 -DMANIFOLD_PYBIND="$(usex python)"
60                 -DMANIFOLD_TEST="$(usex test)"
61         )
63         cmake_src_configure
66 src_test() {
67         "${BUILD_DIR}/test/manifold_test" || die