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

EAPI=8

inherit cmake

if [[ ${PV} == *9999* ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/vmc-project/${PN}.git"
else
	MY_PV=$(ver_rs 1-2 -)
	SRC_URI="https://github.com/vmc-project/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64 ~x86"
	S="${WORKDIR}/${PN}-${MY_PV}"
fi

DESCRIPTION="The Virtual Monte Carlo core library"
HOMEPAGE="https://vmc-project.github.io/ https://github.com/vmc-project/vmc"

LICENSE="GPL-3"
SLOT="0"
IUSE="c++14 +c++17 doc"

REQUIRED_USE="^^ ( c++14 c++17 )"

RDEPEND="sci-physics/root:=[c++14?,c++17?,-vmc(-)]"
DEPEND="${RDEPEND}"
BDEPEND="doc? ( app-doc/doxygen[dot] )"

DOCS=(README.md History)

src_compile() {
	cmake_src_compile
	if use doc; then
		doxygen doc/doxygen/Doxyfile || die
	fi
}

src_install() {
	cmake_src_install
	use doc && local HTML_DOCS=( doc/html/. )
	einstalldocs
}