Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/hepmc/
Date: Fri, 26 Aug 2022 11:13:18
Message-Id: 1661512375.3e66c213565749c4cd61dcaced4aef984b75a11e.andrewammerlaan@gentoo
1 commit: 3e66c213565749c4cd61dcaced4aef984b75a11e
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 26 10:13:21 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 26 11:12:55 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e66c213
7
8 sci-physics/hepmc: add 2.06.11
9
10 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
11
12 sci-physics/hepmc/Manifest | 1 +
13 sci-physics/hepmc/hepmc-2.06.11.ebuild | 95 ++++++++++++++++++++++++++++++++++
14 2 files changed, 96 insertions(+)
15
16 diff --git a/sci-physics/hepmc/Manifest b/sci-physics/hepmc/Manifest
17 index 956b4d3fc19a..80795b1f230c 100644
18 --- a/sci-physics/hepmc/Manifest
19 +++ b/sci-physics/hepmc/Manifest
20 @@ -1,2 +1,3 @@
21 DIST HepMC-2.06.09.tar.gz 4612637 BLAKE2B 6bbf1a6a8410b6717ddff29fc3643247582f7a61a05fd9e52a0b09f78bf75de587c1c55525f6a1367b306a26a4687ce55b64908c049d91bdb2db3d40467af62b SHA512 1030f31ad9d19d8ae184145a693c4a3092131f485e2ed89598b7172992a825ad9aa46fb44a9199a00c4a6bd7e163daead9452e9bc4fe32cb3b97351cf22906c4
22 DIST HepMC3-3.2.5.tar.gz 9217649 BLAKE2B 520e4621cdfa277376e94b87a070f23e6479867bbf696dc972e7496c54504c7da921932fbeaf7713cbaab18c72101ad3fa79396fe8ee1737180946696dcd1fbd SHA512 de60aaa686f6499c62112c265438b9ba41a7ed312b767ddc3409178b6e908e4fffd6a1153bd9f2929cf479074b14bcbec33d377f51a11cfcd4c67e45fc9bb2b9
23 +DIST hepmc2.06.11.tgz 4893958 BLAKE2B ac8eef250cb330a167c9e0f4bd1aaf8df82e0ffec3557ab5cdaf8bc5b0b7333d6a45f73710ce63abab52d2c5758d5663c15c2a7c940a09504b3ef2fd4517aa0b SHA512 81c100d4931e0e4de62c8ffd18cc06e7996a642fecc092892988bdc0dd0dc3c0f5b336e85f09ceb8f5e0e09456775ae5928d37daf28d82923476089bc0e910f2
24
25 diff --git a/sci-physics/hepmc/hepmc-2.06.11.ebuild b/sci-physics/hepmc/hepmc-2.06.11.ebuild
26 new file mode 100644
27 index 000000000000..f75ed0d07cf6
28 --- /dev/null
29 +++ b/sci-physics/hepmc/hepmc-2.06.11.ebuild
30 @@ -0,0 +1,95 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +inherit cmake
37 +
38 +MYP=HepMC-${PV}
39 +
40 +DESCRIPTION="Event Record for Monte Carlo Generators"
41 +HOMEPAGE="https://hepmc.web.cern.ch/hepmc/"
42 +SRC_URI="https://hepmc.web.cern.ch/hepmc/releases/hepmc${PV}.tgz"
43 +S="${WORKDIR}/${MYP}"
44 +
45 +LICENSE="GPL-2"
46 +SLOT="2"
47 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
48 +IUSE="cm doc examples gev test"
49 +RESTRICT="!test? ( test )"
50 +
51 +BDEPEND="
52 + doc? (
53 + app-doc/doxygen[dot]
54 + dev-texlive/texlive-latex
55 + dev-texlive/texlive-latexextra
56 + dev-texlive/texlive-latexrecommended
57 + )"
58 +
59 +# Block against old slot 0
60 +RDEPEND="!sci-physics/hepmc:0"
61 +
62 +src_prepare() {
63 + cmake_src_prepare
64 +
65 + sed -i -e '/add_subdirectory(doc)/d' CMakeLists.txt || die
66 + # CMake doc building broken
67 + # gentoo doc directory
68 + #sed -i \
69 + # -e "s:share/HepMC/doc:share/doc/${PF}:" \
70 + # doc/CMakeLists.txt || die
71 +
72 + # gentoo examples directory
73 + sed -i \
74 + -e "s:share/HepMC:share/doc/${PF}:" \
75 + $(find examples -name CMakeLists.txt) || die
76 +
77 + # respect user's flags
78 + sed -i \
79 + -e "s/-O -ansi -pedantic -Wall//g" \
80 + cmake/Modules/HepMCVariables.cmake || die
81 +
82 + # gentoo libdir love
83 + sed -i \
84 + -e '/DESTINATION/s/lib/lib${LIB_SUFFIX}/g' \
85 + {src,fio}/CMakeLists.txt || die
86 +
87 + # remove targets if use flags not set
88 + if ! use examples; then
89 + sed -i -e '/add_subdirectory(examples)/d' CMakeLists.txt || die
90 + fi
91 + if ! use test; then
92 + sed -i -e '/add_subdirectory(test)/d' CMakeLists.txt || die
93 + fi
94 +
95 + # remove static libs
96 + sed -i \
97 + -e '/(HepMC\(fio\|\)S/d' \
98 + -e '/TARGETS/s/HepMC\(fio\|\)S//' \
99 + {src,fio}/CMakeLists.txt || die
100 +}
101 +
102 +src_configure() {
103 + # use MeV over GeV and mm over cm
104 + local mycmakeargs=(
105 + -Dlength=$(usex cm CM MM)
106 + -Dmomentum=$(usex gev GEV MEV)
107 + )
108 + cmake_src_configure
109 +}
110 +
111 +src_compile() {
112 + cmake_src_compile
113 +
114 + if use doc; then
115 + cd doc || die
116 + ./buildDoc.sh || die
117 + ./buildDoxygen.sh || die
118 + HTML_DOCS=( doc/html/. )
119 + fi
120 +}
121 +
122 +src_install() {
123 + cmake_src_install
124 + use doc && dodoc doc/*.pdf
125 +}