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