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