Gentoo Archives: gentoo-commits

From: Guilherme Amadio <amadio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/geant-vmc/
Date: Thu, 23 Aug 2018 14:19:19
Message-Id: 1535033896.ff01e7c6bcc8917f61a34eb2ae58e4a44880d94c.amadio@gentoo
1 commit: ff01e7c6bcc8917f61a34eb2ae58e4a44880d94c
2 Author: Oliver Freyermuth <o.freyermuth <AT> googlemail <DOT> com>
3 AuthorDate: Mon Feb 5 23:17:42 2018 +0000
4 Commit: Guilherme Amadio <amadio <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 23 14:18:16 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff01e7c6
7
8 sci-physics/geant-vmc: new package.
9
10 Geant4 VMC represents the realisation of the
11 Virtual Monte Carlo (VMC) for Geant4.
12
13 Package-Manager: Portage-2.3.24, Repoman-2.3.6
14 RepoMan-Options: --force
15
16 sci-physics/geant-vmc/Manifest | 1 +
17 sci-physics/geant-vmc/geant-vmc-4.3.6.ebuild | 88 ++++++++++++++++++++++++++++
18 sci-physics/geant-vmc/geant-vmc-9999.ebuild | 88 ++++++++++++++++++++++++++++
19 sci-physics/geant-vmc/metadata.xml | 21 +++++++
20 4 files changed, 198 insertions(+)
21
22 diff --git a/sci-physics/geant-vmc/Manifest b/sci-physics/geant-vmc/Manifest
23 new file mode 100644
24 index 00000000000..0bd6fad71af
25 --- /dev/null
26 +++ b/sci-physics/geant-vmc/Manifest
27 @@ -0,0 +1 @@
28 +DIST geant4_vmc.3.6.tar.gz 1017407 BLAKE2B f386ea49843abedbed16ba1d12a10ae4165123fb0f7842482c416becf4141bc15360be1038626ce40f96a9dbb15d27116cd2fbd46d74b856d5a9391d073784a5 SHA512 eaf8626a3702149a1c5be4adff7843ef828da8024aafb8de489dd6b55b4ee05850581318d01032a4008767ad4e2fc0fde23e1aa5c751693e902d51ce9ad3d1df
29
30 diff --git a/sci-physics/geant-vmc/geant-vmc-4.3.6.ebuild b/sci-physics/geant-vmc/geant-vmc-4.3.6.ebuild
31 new file mode 100644
32 index 00000000000..2156a04588f
33 --- /dev/null
34 +++ b/sci-physics/geant-vmc/geant-vmc-4.3.6.ebuild
35 @@ -0,0 +1,88 @@
36 +# Copyright 1999-2018 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=6
40 +
41 +inherit cmake-utils eapi7-ver
42 +
43 +if [[ ${PV} == *9999* ]]; then
44 + inherit git-r3
45 + EGIT_REPO_URI="https://github.com/vmc-project/geant4_vmc.git"
46 +else
47 + DOWN_PV=$(ver_cut 2-)
48 + SRC_URI="http://root.cern.ch/download/vmc/geant4_vmc.${DOWN_PV}.tar.gz"
49 + SOURCE_PV=$(ver_rs 1- - ${DOWN_PV})
50 + S="${WORKDIR}/geant4_vmc-${SOURCE_PV}"
51 + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
52 +fi
53 +
54 +DESCRIPTION="Virtual Monte Carlo Geant4 implementation"
55 +HOMEPAGE="http://root.cern.ch/root/vmc/VirtualMC.html"
56 +
57 +LICENSE="GPL-2"
58 +SLOT="4"
59 +IUSE="doc examples geant3 +g4root +mtroot vgm test"
60 +
61 +# sci-physics/root[root7] flag activates std=c++14, which we could only support if also Geant is built with it.
62 +# Disable for now.
63 +RDEPEND="
64 + >=sci-physics/geant-4.10.03:=[opengl,geant3?]
65 + sci-physics/root:=[-root7]
66 + vgm? ( >=sci-physics/vgm-4.4:= )"
67 +DEPEND="${RDEPEND}
68 + doc? ( app-doc/doxygen )"
69 +RESTRICT="
70 + !geant3? ( test )
71 + !g4root? ( test )
72 + !mtroot? ( test )
73 + !vgm? ( test )"
74 +
75 +DOCS=(
76 + history
77 + README.md
78 +)
79 +
80 +src_configure() {
81 + local mycmakeargs=(
82 + -DGeant4VMC_USE_VGM="$(usex vgm)"
83 + -DGeant4VMC_USE_GEANT4_G3TOG4="$(usex geant3)"
84 + -DGeant4VMC_USE_G4Root="$(usex g4root)"
85 + -DGeant4VMC_BUILD_MTRoot="$(usex mtroot)"
86 + -DGeant4VMC_BUILD_EXAMPLES="$(usex test)"
87 + -DGeant4VMC_INSTALL_EXAMPLES="$(usex examples)"
88 + )
89 + cmake-utils_src_configure
90 +}
91 +
92 +src_compile() {
93 + cmake-utils_src_compile
94 + if use doc ; then
95 + local dirs=(
96 + source
97 + $(usev g4root)
98 + $(usev mtroot)
99 + $(usev examples)
100 + )
101 + local d
102 + for d in "${dirs[@]}"; do
103 + pushd "${d}" > /dev/null || die
104 + doxygen || die
105 + popd > /dev/null || die
106 + done
107 + fi
108 +}
109 +
110 +src_test() {
111 + # Required by sci-physics/root for pointer validity checking,
112 + # see e.g. https://sft.its.cern.ch/jira/browse/ROOT-8146 .
113 + addwrite /dev/random
114 + cd examples || die
115 + ./test_suite.sh --g3=off --builddir="${BUILD_DIR}" || die
116 + ./test_suite_exe.sh --g3=off --builddir="${BUILD_DIR}" || die
117 +}
118 +
119 +src_install() {
120 + cmake-utils_src_install
121 + use doc && local HTML_DOCS=(doc/.)
122 + einstalldocs
123 +}
124
125 diff --git a/sci-physics/geant-vmc/geant-vmc-9999.ebuild b/sci-physics/geant-vmc/geant-vmc-9999.ebuild
126 new file mode 100644
127 index 00000000000..2156a04588f
128 --- /dev/null
129 +++ b/sci-physics/geant-vmc/geant-vmc-9999.ebuild
130 @@ -0,0 +1,88 @@
131 +# Copyright 1999-2018 Gentoo Foundation
132 +# Distributed under the terms of the GNU General Public License v2
133 +
134 +EAPI=6
135 +
136 +inherit cmake-utils eapi7-ver
137 +
138 +if [[ ${PV} == *9999* ]]; then
139 + inherit git-r3
140 + EGIT_REPO_URI="https://github.com/vmc-project/geant4_vmc.git"
141 +else
142 + DOWN_PV=$(ver_cut 2-)
143 + SRC_URI="http://root.cern.ch/download/vmc/geant4_vmc.${DOWN_PV}.tar.gz"
144 + SOURCE_PV=$(ver_rs 1- - ${DOWN_PV})
145 + S="${WORKDIR}/geant4_vmc-${SOURCE_PV}"
146 + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
147 +fi
148 +
149 +DESCRIPTION="Virtual Monte Carlo Geant4 implementation"
150 +HOMEPAGE="http://root.cern.ch/root/vmc/VirtualMC.html"
151 +
152 +LICENSE="GPL-2"
153 +SLOT="4"
154 +IUSE="doc examples geant3 +g4root +mtroot vgm test"
155 +
156 +# sci-physics/root[root7] flag activates std=c++14, which we could only support if also Geant is built with it.
157 +# Disable for now.
158 +RDEPEND="
159 + >=sci-physics/geant-4.10.03:=[opengl,geant3?]
160 + sci-physics/root:=[-root7]
161 + vgm? ( >=sci-physics/vgm-4.4:= )"
162 +DEPEND="${RDEPEND}
163 + doc? ( app-doc/doxygen )"
164 +RESTRICT="
165 + !geant3? ( test )
166 + !g4root? ( test )
167 + !mtroot? ( test )
168 + !vgm? ( test )"
169 +
170 +DOCS=(
171 + history
172 + README.md
173 +)
174 +
175 +src_configure() {
176 + local mycmakeargs=(
177 + -DGeant4VMC_USE_VGM="$(usex vgm)"
178 + -DGeant4VMC_USE_GEANT4_G3TOG4="$(usex geant3)"
179 + -DGeant4VMC_USE_G4Root="$(usex g4root)"
180 + -DGeant4VMC_BUILD_MTRoot="$(usex mtroot)"
181 + -DGeant4VMC_BUILD_EXAMPLES="$(usex test)"
182 + -DGeant4VMC_INSTALL_EXAMPLES="$(usex examples)"
183 + )
184 + cmake-utils_src_configure
185 +}
186 +
187 +src_compile() {
188 + cmake-utils_src_compile
189 + if use doc ; then
190 + local dirs=(
191 + source
192 + $(usev g4root)
193 + $(usev mtroot)
194 + $(usev examples)
195 + )
196 + local d
197 + for d in "${dirs[@]}"; do
198 + pushd "${d}" > /dev/null || die
199 + doxygen || die
200 + popd > /dev/null || die
201 + done
202 + fi
203 +}
204 +
205 +src_test() {
206 + # Required by sci-physics/root for pointer validity checking,
207 + # see e.g. https://sft.its.cern.ch/jira/browse/ROOT-8146 .
208 + addwrite /dev/random
209 + cd examples || die
210 + ./test_suite.sh --g3=off --builddir="${BUILD_DIR}" || die
211 + ./test_suite_exe.sh --g3=off --builddir="${BUILD_DIR}" || die
212 +}
213 +
214 +src_install() {
215 + cmake-utils_src_install
216 + use doc && local HTML_DOCS=(doc/.)
217 + einstalldocs
218 +}
219
220 diff --git a/sci-physics/geant-vmc/metadata.xml b/sci-physics/geant-vmc/metadata.xml
221 new file mode 100644
222 index 00000000000..ef4bdfb269e
223 --- /dev/null
224 +++ b/sci-physics/geant-vmc/metadata.xml
225 @@ -0,0 +1,21 @@
226 +<?xml version="1.0" encoding="UTF-8"?>
227 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
228 +<pkgmetadata>
229 + <maintainer type="person">
230 + <email>o.freyermuth@××××××××××.com</email>
231 + <name>Oliver Freyermuth</name>
232 + </maintainer>
233 + <maintainer type="project">
234 + <email>proxy-maint@g.o</email>
235 + <name>Proxy Maintainers</name>
236 + </maintainer>
237 + <upstream>
238 + <remote-id type="github">vmc-project/geant4_vmc</remote-id>
239 + </upstream>
240 + <use>
241 + <flag name="vgm">Enable the Virtual Geometry Model (<pkg>sci-physics/vgm</pkg>)</flag>
242 + <flag name="g4root">Build G4Root (interface for GEANT4 simulation with a ROOT geometry)</flag>
243 + <flag name="geant3">Build with Geant4 G3toG4 library</flag>
244 + <flag name="mtroot">Build MTRoot (provides ROOT IO manager classes with multi-threading support)</flag>
245 + </use>
246 +</pkgmetadata>