aboutsummaryrefslogtreecommitdiff
blob: 389e5430d5b523ffb09bf707a5b67b89b35940ab (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
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7..9} )

inherit cmake python-any-r1

COMMIT="39f885951a9b8b11f931f917935a16066a945056"

DESCRIPTION="Multi-dimensional array library for C++"
HOMEPAGE="https://github.com/blitzpp/blitz"
SRC_URI="https://github.com/blitzpp/blitz/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT}"

LICENSE="BSD LGPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
IUSE="boost doc test"
RESTRICT="!test? ( test )"

BDEPEND="
	${PYTHON_DEPS}
	doc? ( app-doc/doxygen[dot] )
"
DEPEND="
	boost? ( dev-libs/boost:= )
"

src_configure() {
	local mycmakeargs=(
		-DBUILD_DOC=$(usex doc)
		-DBUILD_TESTING=$(usex test)
		-DENABLE_SERIALISATION=$(usex boost)
	)
	use doc && mycmakeargs+=( -DDISABLE_REFMAN_PDF=ON )
	cmake_src_configure
}

src_compile() {
	cmake_src_compile
	use doc && cmake_build blitz-doc
	use test && cmake_build testsuite benchmark examples
}

src_install() {
	cmake_src_install
	if use doc ; then
		find "${D}" -type f \( -name "*.md5" -o -name "*.map" \) -delete || die
	fi
}