summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Freyermuth <o.freyermuth@googlemail.com>2019-07-15 21:42:38 +0200
committerMichał Górny <mgorny@gentoo.org>2019-07-18 17:45:44 +0200
commit2acec32e7fff3d46567f29fd49506541148a96ef (patch)
treeb30cb47b1ae48d3f2c078010fb8600d12c907300 /sci-physics/geant-vmc
parentmedia-gfx/rawtherapee: Drop 5.4 (diff)
downloadgentoo-2acec32e7fff3d46567f29fd49506541148a96ef.tar.gz
gentoo-2acec32e7fff3d46567f29fd49506541148a96ef.tar.bz2
gentoo-2acec32e7fff3d46567f29fd49506541148a96ef.zip
sci-physics/geant-vmc: Ebuild fixes and updates.
- Bump to EAPI 7 (revbump). - Block >=sci-physics/geant-4.10.05 for =geant-vmc-4.3.6. - Correct dependency on sci-physics/root[c++11]. - Add missing dependency on sci-physics/root[vmc]. 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>
Diffstat (limited to 'sci-physics/geant-vmc')
-rw-r--r--sci-physics/geant-vmc/geant-vmc-4.3.6-r1.ebuild89
-rw-r--r--sci-physics/geant-vmc/geant-vmc-9999.ebuild16
2 files changed, 97 insertions, 8 deletions
diff --git a/sci-physics/geant-vmc/geant-vmc-4.3.6-r1.ebuild b/sci-physics/geant-vmc/geant-vmc-4.3.6-r1.ebuild
new file mode 100644
index 000000000000..b92483ba721f
--- /dev/null
+++ b/sci-physics/geant-vmc/geant-vmc-4.3.6-r1.ebuild
@@ -0,0 +1,89 @@
+# 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/geant-4.10.05:=
+ 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
+}
diff --git a/sci-physics/geant-vmc/geant-vmc-9999.ebuild b/sci-physics/geant-vmc/geant-vmc-9999.ebuild
index 2156a04588fa..ae53bfcd41d1 100644
--- a/sci-physics/geant-vmc/geant-vmc-9999.ebuild
+++ b/sci-physics/geant-vmc/geant-vmc-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit cmake-utils eapi7-ver
+inherit cmake-utils
if [[ ${PV} == *9999* ]]; then
inherit git-r3
@@ -11,8 +11,8 @@ if [[ ${PV} == *9999* ]]; then
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}"
+ SOURCE_PV=$(ver_rs 1- . ${DOWN_PV})
+ S="${WORKDIR}/geant4_vmc.${SOURCE_PV}"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
fi
@@ -23,11 +23,10 @@ LICENSE="GPL-2"
SLOT="4"
IUSE="doc examples geant3 +g4root +mtroot vgm test"
-# sci-physics/root[root7] flag activates std=c++14, which we could only support if also Geant is built with it.
-# Disable for now.
+# sci-physics/root[c++11] required to match sci-physics/geant flags.
RDEPEND="
>=sci-physics/geant-4.10.03:=[opengl,geant3?]
- sci-physics/root:=[-root7]
+ sci-physics/root:=[c++11,vmc]
vgm? ( >=sci-physics/vgm-4.4:= )"
DEPEND="${RDEPEND}
doc? ( app-doc/doxygen )"
@@ -35,6 +34,7 @@ RESTRICT="
!geant3? ( test )
!g4root? ( test )
!mtroot? ( test )
+ !test? ( test )
!vgm? ( test )"
DOCS=(