blob: 69c4db1a70549866b7e824957cb4dfb2cabe2aad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
COMMIT=66bca6e3fdfce0f590ca84edc1a6256502636f4b
PYTHON_COMPAT=( python3_{10..13} )
inherit cmake python-single-r1
DESCRIPTION="Geometry library for topological robustness"
HOMEPAGE="https://github.com/elalish/manifold"
SRC_URI="https://github.com/elalish/manifold/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="debug python test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test ) mirror"
RDEPEND="
dev-cpp/tbb
sci-mathematics/clipper2
python? ( ${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/numpy[${PYTHON_USEDEP}]
')
)
"
DEPEND="
python? (
$(python_gen_cond_dep '
>=dev-python/nanobind-2.1.0[${PYTHON_USEDEP}]
')
)
test? ( dev-cpp/gtest )
${RDEPEND}"
src_configure() {
local mycmakeargs=(
-DMANIFOLD_CROSS_SECTION=ON
-DMANIFOLD_DEBUG=$(usex debug)
-DMANIFOLD_DOWNLOADS=OFF
-DMANIFOLD_EXPORT=OFF
-DMANIFOLD_JSBIND=OFF
-DMANIFOLD_PAR=ON
-DMANIFOLD_PYBIND=$(usex python)
-DMANIFOLD_TEST=$(usex test)
)
if use debug; then
mycmakeargs+=(
-DMANIFOLD_FLAGS=-ggdb
)
fi
cmake_src_configure
}
src_test() {
"${BUILD_DIR}"/test/manifold_test || die
}
|