summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuilherme Amadio <amadio@gentoo.org>2020-04-27 10:28:30 +0200
committerGuilherme Amadio <amadio@gentoo.org>2020-04-27 11:05:03 +0200
commitc4d3a404c8ca9714594fdd7ec3b497783be3bdd4 (patch)
tree452dcb508124f3b0556d471ef828a9a6209c22f5 /sci-physics/geant-data/geant-data-4.10.6_p1-r1.ebuild
parentkde-apps/dolphin-plugins-bazaar: remove last-rited pkg (diff)
downloadgentoo-c4d3a404c8ca9714594fdd7ec3b497783be3bdd4.tar.gz
gentoo-c4d3a404c8ca9714594fdd7ec3b497783be3bdd4.tar.bz2
gentoo-c4d3a404c8ca9714594fdd7ec3b497783be3bdd4.zip
sci-physics/geant-data: fix env for particle high precision data
As mentioned in [1], the variable G4PARTICLEHPDATA has been introduced in Geant4 10.3 to be used as default base name for all particle data modules. It substitutes G4PROTONHPDATA, G4NEUTRONHPDATA, etc. These datasets are optional and have been included in Gentoo since Geant4 10.6 beta, but were using the old variable name. 1. https://cern.ch/geant4-data/ReleaseNotes/ReleaseNotes4.10.3.html#had-notes Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Guilherme Amadio <amadio@gentoo.org>
Diffstat (limited to 'sci-physics/geant-data/geant-data-4.10.6_p1-r1.ebuild')
-rw-r--r--sci-physics/geant-data/geant-data-4.10.6_p1-r1.ebuild54
1 files changed, 54 insertions, 0 deletions
diff --git a/sci-physics/geant-data/geant-data-4.10.6_p1-r1.ebuild b/sci-physics/geant-data/geant-data-4.10.6_p1-r1.ebuild
new file mode 100644
index 000000000000..90910f4c9e59
--- /dev/null
+++ b/sci-physics/geant-data/geant-data-4.10.6_p1-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Data files for Geant4 physical processes"
+HOMEPAGE="https://geant4.web.cern.ch"
+SRC_DATA="https://geant4-data.web.cern.ch/geant4-data/datasets"
+
+declare -A DATASETS
+
+DATASETS=(
+ [G4NDL]="G4NDL 4.6 G4NEUTRONHPDATA"
+ [G4EMLOW]="G4EMLOW 7.9.1 G4LEDATA"
+ [PhotonEvaporation]="G4PhotonEvaporation 5.5 G4LEVELGAMMADATA"
+ [RadioactiveDecay]="G4RadioactiveDecay 5.4 G4RADIOACTIVEDATA"
+ [G4PARTICLEXS]="G4PARTICLEXS 2.1 G4PARTICLEXSDATA"
+ [G4PII]="G4PII 1.3 G4PIIDATA"
+ [RealSurface]="G4RealSurface 2.1.1 G4REALSURFACEDATA"
+ [G4SAIDDATA]="G4SAIDDATA 2.0 G4SAIDXSDATA"
+ [G4ABLA]="G4ABLA 3.1 G4ABLADATA"
+ [G4INCL]="G4INCL 1.0 G4INCLDATA"
+ [G4ENSDFSTATE]="G4ENSDFSTATE 2.2 G4ENSDFSTATEDATA"
+ [G4TENDL]="G4TENDL 1.3.2 G4PARTICLEHPDATA"
+)
+
+for DATASET in ${!DATASETS[@]}; do
+ read FILENAME VERSION ENVVAR <<< "${DATASETS[$DATASET]}"
+ SRC_URI+="${SRC_DATA}/${FILENAME}.${VERSION}.tar.gz "
+done
+unset DATASET FILENAME VERSION ENVVAR
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+S="${WORKDIR}"
+
+src_unpack() {
+ # unpack in destination only to avoid copy
+ return
+}
+
+src_install() {
+ for DATASET in ${!DATASETS[@]}; do
+ read FILENAME VERSION ENVVAR <<< "${DATASETS[$DATASET]}"
+ echo $ENVVAR=\"${EPREFIX}/usr/share/geant4/data/${DATASET}${VERSION}\";
+ done >| 99geant-data
+ doenvd 99geant-data
+ dodir /usr/share/geant4/data
+ cd "${ED%/}/usr/share/geant4/data" || die
+ unpack ${A}
+}