sci-physics/geant-vmc: Version bump to 4.4.0.
authorOliver Freyermuth <o.freyermuth@googlemail.com>
Mon, 15 Jul 2019 19:43:24 +0000 (21:43 +0200)
committerMichał Górny <mgorny@gentoo.org>
Thu, 18 Jul 2019 15:45:45 +0000 (17:45 +0200)
Compatible with latest sci-physics/geant.

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
sci-physics/geant-vmc/Manifest
sci-physics/geant-vmc/geant-vmc-4.4.0.ebuild [new file with mode: 0644]

index 0bd6fad71af6933b669743953c33dd9f89a2ff63..a4d93d148dc48dcd0a5da39415621d7a62deb250 100644 (file)
@@ -1 +1,2 @@
 DIST geant4_vmc.3.6.tar.gz 1017407 BLAKE2B f386ea49843abedbed16ba1d12a10ae4165123fb0f7842482c416becf4141bc15360be1038626ce40f96a9dbb15d27116cd2fbd46d74b856d5a9391d073784a5 SHA512 eaf8626a3702149a1c5be4adff7843ef828da8024aafb8de489dd6b55b4ee05850581318d01032a4008767ad4e2fc0fde23e1aa5c751693e902d51ce9ad3d1df
+DIST geant4_vmc.4.0.tar.gz 7118838 BLAKE2B 5edbd13adeeb560188deb54c1f5d52fda371dd5f3dc04d676bcaf7edad0bbf8eb573d6345e5c3626b5b64c229d49b7f02aafec77a2587e525cf3f407444391b5 SHA512 faf5fed17b317399b97f77ff1c2a1bf1cead8f0b02a3a89244f01f8ae04ce621763e52b40000e481b3826796bb4d94216368d2e3c98a62f02048c5979f4ee648
diff --git a/sci-physics/geant-vmc/geant-vmc-4.4.0.ebuild b/sci-physics/geant-vmc/geant-vmc-4.4.0.ebuild
new file mode 100644 (file)
index 0000000..ae53bfc
--- /dev/null
@@ -0,0 +1,88 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+if [[ ${PV} == *9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/vmc-project/geant4_vmc.git"
+else
+       DOWN_PV=$(ver_cut 2-)
+       SRC_URI="http://root.cern.ch/download/vmc/geant4_vmc.${DOWN_PV}.tar.gz"
+       SOURCE_PV=$(ver_rs 1- . ${DOWN_PV})
+       S="${WORKDIR}/geant4_vmc.${SOURCE_PV}"
+       KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Virtual Monte Carlo Geant4 implementation"
+HOMEPAGE="http://root.cern.ch/root/vmc/VirtualMC.html"
+
+LICENSE="GPL-2"
+SLOT="4"
+IUSE="doc examples geant3 +g4root +mtroot vgm test"
+
+# sci-physics/root[c++11] required to match sci-physics/geant flags.
+RDEPEND="
+       >=sci-physics/geant-4.10.03:=[opengl,geant3?]
+       sci-physics/root:=[c++11,vmc]
+       vgm? ( >=sci-physics/vgm-4.4:= )"
+DEPEND="${RDEPEND}
+       doc? ( app-doc/doxygen )"
+RESTRICT="
+       !geant3? ( test )
+       !g4root? ( test )
+       !mtroot? ( 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_MTRoot="$(usex mtroot)"
+               -DGeant4VMC_BUILD_EXAMPLES="$(usex test)"
+               -DGeant4VMC_INSTALL_EXAMPLES="$(usex examples)"
+       )
+       cmake-utils_src_configure
+}
+
+src_compile() {
+       cmake-utils_src_compile
+       if use doc ; then
+               local dirs=(
+                       source
+                       $(usev g4root)
+                       $(usev mtroot)
+                       $(usev examples)
+               )
+               local d
+               for d in "${dirs[@]}"; do
+                       pushd "${d}" > /dev/null || die
+                       doxygen || die
+                       popd > /dev/null || die
+               done
+       fi
+}
+
+src_test() {
+       # Required by sci-physics/root for pointer validity checking,
+       # see e.g. https://sft.its.cern.ch/jira/browse/ROOT-8146 .
+       addwrite /dev/random
+       cd examples || die
+       ./test_suite.sh --g3=off --builddir="${BUILD_DIR}" || die
+       ./test_suite_exe.sh --g3=off --builddir="${BUILD_DIR}" || die
+}
+
+src_install() {
+       cmake-utils_src_install
+       use doc && local HTML_DOCS=(doc/.)
+       einstalldocs
+}