blob: c3adb65924a559f5349da91d303b55ab4147d2da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
DESCRIPTION="Data files for Geant4 physical processes"
HOMEPAGE="http://geant4.cern.ch/"
GEANT4_DATA="
G4NDL.4.5
G4EMLOW.6.48
G4PhotonEvaporation.3.2
G4RadioactiveDecay.4.3
G4SAIDDATA.1.1
G4NEUTRONXS.1.4
G4ABLA.3.0
G4PII.1.3
RealSurface.1.0
G4ENSDFSTATE.1.2
G4TENDL.1.0"
SRC_COM="http://geant4.cern.ch/support/source"
for d in ${GEANT4_DATA}; do
SRC_URI="${SRC_URI} ${SRC_COM}/${d}.tar.gz"
done
LICENSE="geant4"
SLOT="4"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE=""
RDEPEND=">=sci-physics/geant-${PV}:4"
DEPEND="${RDEPEND}"
S="${WORKDIR}"
src_unpack() {
# unpack in destination only to avoid copy
return
}
src_install() {
sed -n "s,export \(G4.\+DATA=\"\).*\(/share/Geant.\+/data/.\+\) > /dev/null ; pwd\`,\1${EROOT%/}/usr\2,p" \
"${EROOT}/usr/bin/geant4.sh" > 99geant-data
doenvd 99geant-data
local g4dir=/usr/$(sed -n 's|.*/\(share/Geant4.*/data\).*|\1|p' "${EROOT}/usr/bin/geant4.sh" | tail -n 1)
dodir ${g4dir}
cd "${ED}${g4dir}"
unpack ${A}
}
|