| 1 |
|
# Copyright 2022-2024 Gentoo Authors
|
|
1 |
# Copyright 2022-2025 Gentoo Authors
|
| 2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
| 6 |
|
PYTHON_COMPAT=( python3_{10..12} )
|
| 7 |
|
inherit fortran-2 cmake python-single-r1
|
|
6 |
PYTHON_COMPAT=( python3_{11..13} )
|
|
7 |
inherit fortran-2 cmake flag-o-matic python-single-r1
|
| 8 |
8 |
|
| 9 |
|
MYPN=HepMC3
|
| 10 |
|
MYP=${MYPN}-${PV}
|
|
9 |
MYP=HepMC3-${PV}
|
| 11 |
10 |
|
| 12 |
11 |
DESCRIPTION="Event Record for Monte Carlo Generators"
|
| 13 |
12 |
HOMEPAGE="https://hepmc.web.cern.ch/hepmc/"
|
| ... | ... | |
| 23 |
22 |
|
| 24 |
23 |
LICENSE="GPL-3+"
|
| 25 |
24 |
SLOT="3"
|
| 26 |
|
IUSE="doc test examples python root"
|
|
25 |
IUSE="doc test examples python root static-libs"
|
| 27 |
26 |
RESTRICT="!test? ( test )"
|
| 28 |
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
|
27 |
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
| 29 |
28 |
|
| 30 |
29 |
RDEPEND="
|
| 31 |
30 |
python? (
|
| ... | ... | |
| 36 |
35 |
)
|
| 37 |
36 |
"
|
| 38 |
37 |
DEPEND="${RDEPEND}"
|
|
38 |
# Automagic compression dependencies in test and example.
|
|
39 |
# https://gitlab.cern.ch/hepmc/HepMC3/-/issues/99
|
|
40 |
# For now we install all of them...
|
| 39 |
41 |
BDEPEND="
|
| 40 |
42 |
root? ( sci-physics/root:= )
|
| 41 |
43 |
doc? (
|
| ... | ... | |
| 44 |
46 |
dev-texlive/texlive-latexextra
|
| 45 |
47 |
dev-texlive/texlive-latexrecommended
|
| 46 |
48 |
)
|
|
49 |
test? (
|
|
50 |
virtual/zlib:=
|
|
51 |
app-arch/xz-utils
|
|
52 |
app-arch/bzip2
|
|
53 |
app-arch/zstd
|
|
54 |
)
|
|
55 |
examples? (
|
|
56 |
virtual/zlib:=
|
|
57 |
app-arch/xz-utils
|
|
58 |
app-arch/bzip2
|
|
59 |
app-arch/zstd
|
|
60 |
)
|
| 47 |
61 |
"
|
| 48 |
62 |
|
|
63 |
pkg_setup() {
|
|
64 |
use python && python-single-r1_pkg_setup
|
|
65 |
}
|
|
66 |
|
| 49 |
67 |
src_configure() {
|
|
68 |
filter-lto # 941937 941936
|
| 50 |
69 |
local mycmakeargs=(
|
|
70 |
-DHEPMC3_PYTHON_VERSIONS="${EPYTHON/python/}"
|
| 51 |
71 |
-DHEPMC3_ENABLE_ROOTIO=$(usex root ON OFF)
|
| 52 |
72 |
-DHEPMC3_ENABLE_PYTHON=$(usex python ON OFF)
|
| 53 |
73 |
-DHEPMC3_ENABLE_TEST=$(usex test ON OFF)
|
| 54 |
74 |
-DHEPMC3_BUILD_DOCS=$(usex doc ON OFF)
|
| 55 |
75 |
-DHEPMC3_BUILD_EXAMPLES=$(usex examples ON OFF)
|
|
76 |
-DHEPMC3_BUILD_STATIC_LIBS=$(usex static-libs ON OFF)
|
| 56 |
77 |
)
|
| 57 |
78 |
cmake_src_configure
|
| 58 |
79 |
}
|