1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 if [[ ${PV} == *9999* ]]; then
10 EGIT_REPO_URI="https://github.com/vmc-project/geant4_vmc.git"
13 SRC_URI="http://root.cern.ch/download/vmc/geant4_vmc.${DOWN_PV}.tar.gz"
14 SOURCE_PV=$(ver_rs 1- . ${DOWN_PV})
15 S="${WORKDIR}/geant4_vmc.${SOURCE_PV}"
16 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
19 DESCRIPTION="Virtual Monte Carlo Geant4 implementation"
20 HOMEPAGE="http://root.cern.ch/root/vmc/VirtualMC.html"
24 IUSE="doc examples geant3 +g4root +mtroot vgm test"
26 # sci-physics/root[c++11] required to match sci-physics/geant flags.
28 >=sci-physics/geant-4.10.03:=[opengl,geant3?]
29 sci-physics/root:=[c++11,vmc]
30 vgm? ( >=sci-physics/vgm-4.4:= )"
32 doc? ( app-doc/doxygen )"
46 "${FILESDIR}"/"${PN}-${PV}"-fix-cflags.patch
51 -DGeant4VMC_USE_VGM="$(usex vgm)"
52 -DGeant4VMC_USE_GEANT4_G3TOG4="$(usex geant3)"
53 -DGeant4VMC_USE_G4Root="$(usex g4root)"
54 -DGeant4VMC_BUILD_MTRoot="$(usex mtroot)"
55 -DGeant4VMC_BUILD_EXAMPLES="$(usex test)"
56 -DGeant4VMC_INSTALL_EXAMPLES="$(usex examples)"
71 for d in "${dirs[@]}"; do
72 pushd "${d}" > /dev/null || die
74 popd > /dev/null || die
80 # Required by sci-physics/root for pointer validity checking,
81 # see e.g. https://sft.its.cern.ch/jira/browse/ROOT-8146 .
84 # Bug: Can not disable Garfield in test suite, fixed upstream.
85 sed -i 's/ExGarfield//' test_suite.sh || die
86 # Bug: Path for E03 sub-examples wrong, see https://github.com/vmc-project/geant4_vmc/pull/11 .
87 sed -i 's#only in E03 test#only in E03 test\nG4EXEDIR=${BUILDDIR}/examples/$EXAMPLE/$OPTION#' test_suite_exe.sh || die
88 ./test_suite.sh --g3=off --builddir="${BUILD_DIR}" || die
89 ./test_suite_exe.sh --g3=off --garfield=off --builddir="${BUILD_DIR}" || die
94 use doc && local HTML_DOCS=(doc/.)