summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-physics/geant4_vmc/Manifest1
-rw-r--r--sci-physics/geant4_vmc/geant4_vmc-6.5.ebuild80
2 files changed, 81 insertions, 0 deletions
diff --git a/sci-physics/geant4_vmc/Manifest b/sci-physics/geant4_vmc/Manifest
index 4e125e42ec22..016a9ebfc268 100644
--- a/sci-physics/geant4_vmc/Manifest
+++ b/sci-physics/geant4_vmc/Manifest
@@ -1 +1,2 @@
DIST geant4_vmc-6.3_p2.tar.gz 5737615 BLAKE2B db6b27e2ff81d37f61c75f39b4bdc775fa2eeded4916b82de7a6e717b206f9648eb295058547d0eaf8bc30bb8f28dddd1b00dea334aeccf6c2cb53da25cee90a SHA512 d9994a291fd195737b94101cafeadbb18aa14a71046cf8c637ea42c8560f290edd7fa524056c472b164fbff8f07afe01b4f5c6b86eeecfa1cfd564e55839052f
+DIST geant4_vmc-6.5.tar.gz 5933744 BLAKE2B 8d797eb770a0627f11860c0c6f7544b2bbfd93de1d6cb1b7ad8ca0888e81ec01a8f07067f810d45a86546f08c08136221c425e4b82039b8e74d24ea01da558a7 SHA512 d81b38eab84fa8d6bcf66b9a755970e4aa79b8c212e528a1e91f4d8692a89180f9f16cefcd049ffc63894a29b258d04dfcd217f0b82cfbe7e5e911ce16b2184f
diff --git a/sci-physics/geant4_vmc/geant4_vmc-6.5.ebuild b/sci-physics/geant4_vmc/geant4_vmc-6.5.ebuild
new file mode 100644
index 000000000000..f376fc36fd36
--- /dev/null
+++ b/sci-physics/geant4_vmc/geant4_vmc-6.5.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake virtualx
+
+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"
+ S="${WORKDIR}/${PN}-${MY_PV}"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Virtual Monte Carlo Geant4 implementation"
+HOMEPAGE="https://github.com/vmc-project/geant4_vmc"
+
+LICENSE="GPL-3"
+SLOT="4"
+IUSE="doc examples geant3 +g4root vgm test"
+
+RDEPEND="
+ sci-physics/clhep:=
+ >=sci-physics/geant-4.11.1:=[opengl,geant3?]
+ sci-physics/root:=
+ >=sci-physics/vmc-2.0:=
+ vgm? ( >=sci-physics/vgm-5.1:= )"
+DEPEND="${RDEPEND}
+ test? ( >=sci-physics/geant-4.11.1:=[gdml] )"
+BDEPEND="doc? ( app-doc/doxygen[dot] )"
+RESTRICT="
+ !examples? ( test )
+ !geant3? ( test )
+ !g4root? ( test )
+ !test? ( test )
+ !vgm? ( test )"
+
+DOCS=(history README.md)
+
+src_configure() {
+ local mycmakeargs=(
+ -DGeant4VMC_USE_VGM="$(usex vgm)"
+ -DGeant4VMC_USE_GEANT4_G3TOG4="$(usex geant3)"
+ -DGeant4VMC_USE_G4Root="$(usex g4root)"
+ -DGeant4VMC_BUILD_EXAMPLES="$(usex test)"
+ -DGeant4VMC_INSTALL_EXAMPLES="$(usex examples)"
+ -DGeant4VMC_BUILD_G4Root_TEST="$(usex test)"
+ )
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ if use doc ; then
+ local dirs=(
+ source
+ $(usev g4root)
+ $(usev examples)
+ )
+ local d
+ for d in "${dirs[@]}"; do
+ doxygen "${d}"/Doxyfile || die
+ done
+ fi
+}
+
+src_test() {
+ cd examples || die
+ virtx ./test_suite.sh --debug --g3=off --garfield=off --builddir="${BUILD_DIR}" || die
+ virtx ./test_suite_exe.sh --g3=off --garfield=off --garfield=off --builddir="${BUILD_DIR}" || die
+}
+
+src_install() {
+ cmake_src_install
+ use doc && local HTML_DOCS=(doc/.)
+ einstalldocs
+}