summaryrefslogtreecommitdiff
blob: f4fcc56bded0b4f68b2b28454ef01e7aa414aa46 (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-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

if [[ ${PV} == *9999* ]]; then
	EGIT_REPO_URI="https://gitlab.com/mdds/mdds.git"
	inherit git-r3
else
	# For 3.0.0, it mysteriously redirects to 2.0.0
	#SRC_URI="https://kohei.us/files/${PN}/src/${P}.tar.xz"
	SRC_URI="https://gitlab.com/api/v4/projects/mdds%2Fmdds/packages/generic/source/${PV}/${P}.tar.xz"
	KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
fi
inherit autotools toolchain-funcs

DESCRIPTION="Collection of multi-dimensional data structure and indexing algorithm"
HOMEPAGE="https://gitlab.com/mdds/mdds"

LICENSE="MIT"
SLOT="1/3.0" # Check API version on version bumps!
IUSE="doc openmp test"
RESTRICT="!test? ( test )"

DEPEND="dev-libs/boost:="
RDEPEND="${DEPEND}"
BDEPEND="
	doc? (
		app-text/doxygen
		dev-python/sphinx
	)
	test? ( dev-util/dejagnu )
"

PATCHES=(
	"${FILESDIR}/${PN}-3.0.0-buildsystem.patch"
)

pkg_pretend() {
	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}

pkg_setup() {
	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}

src_prepare() {
	default
	eautoreconf
}

src_configure() {
	local myeconfargs=(
		$(use_enable doc docs)
		$(use_enable openmp)
	)
	econf "${myeconfargs[@]}"
}

src_test() {
	tc-export CXX
	default
}