/[gentoo-x86]/sci-physics/geant/geant-4.9.4.ebuild
Gentoo

Contents of /sci-physics/geant/geant-4.9.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Mar 18 16:43:55 2011 UTC (8 years, 1 month ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Version bump. Unm Unmasking.

(Portage version: 2.1.9.43/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-physics/geant/geant-4.9.4.ebuild,v 1.3 2011/02/13 12:44:57 armin76 Exp $
4
5 EAPI=3
6
7 inherit cmake-utils versionator eutils
8
9 PV1=$(get_version_component_range 1 ${PV})
10 PV2=$(get_version_component_range 2 ${PV})
11 PV3=$(get_version_component_range 3 ${PV})
12
13 MYP=${PN}$(replace_version_separator 3 .)
14
15 DESCRIPTION="Toolkit for simulation of passage of particles through matter"
16 HOMEPAGE="http://geant4.cern.ch/"
17
18 SRC_COM="http://geant4.cern.ch/support/source"
19 SRC_URI="${SRC_COM}/${MYP}.tar.gz"
20 GEANT4_DATA="G4NDL.3.14
21 G4EMLOW.6.19
22 G4RadioactiveDecay.3.3
23 G4NEUTRONXS.1.0
24 G4PII.1.2
25 G4PhotonEvaporation.2.1
26 G4ABLA.3.0
27 RealSurface.1.0"
28 for d in ${GEANT4_DATA}; do
29 SRC_URI="${SRC_URI} data? ( ${SRC_COM}/${d}.tar.gz )"
30 done
31
32 LICENSE="geant4"
33 SLOT="4"
34 KEYWORDS="~amd64 ~hppa ~x86"
35 IUSE="+data dawn examples gdml geant3 granular qt4 static-libs vrml zlib"
36
37 RDEPEND=">=sci-physics/clhep-2.1
38 qt4? ( x11-libs/qt-gui:4 x11-libs/qt-opengl:4 )
39 gdml? ( dev-libs/xerces-c )
40 geant3? ( sci-physics/geant:3 )
41 dawn? ( media-gfx/dawn )
42 zlib? ( sys-libs/zlib )"
43
44 DEPEND="${RDEPEND}"
45
46 S="${WORKDIR}/${MYP}"
47
48 PATCHES=( "${FILESDIR}"/${P}-{no-benchmarks,zlib,libdir,datadir,no-examples}.patch )
49
50 src_configure() {
51 mycmakeargs=(
52 $(cmake-utils_use_enable dawn GEANT4_USE_NETWORKDAWN)
53 $(cmake-utils_use_enable gdml GEANT4_USE_GDML)
54 $(cmake-utils_use_enable geant3 GEANT4_USE_GEANT3TOGEANT4)
55 $(cmake-utils_use_enable granular GEANT4_BUILD_GRANULAR_BUILD)
56 $(cmake-utils_use_enable vrml GEANT4_USE_NETWORKVRML)
57 $(cmake-utils_use_enable qt4 GEANT4_USE_QT)
58 $(cmake-utils_use_enable zlib GEANT4_USE_SYSTEM_ZLIB)
59 $(cmake-utils_use_build static-libs STATIC_LIBS)
60 )
61 cmake-utils_src_configure
62 }
63
64 src_install() {
65 cmake-utils_src_install
66 if use data; then
67 einfo "Installing Geant4 data"
68 insinto /usr/share/geant4/data
69 pushd "${WORKDIR}" > /dev/null
70 for d in ${GEANT4_DATA}; do
71 local p=${d/.}
72 doins -r *${p/G4} || die "installing data ${d} failed"
73 done
74 popd > /dev/null
75 fi
76
77 insinto /usr/share/doc/${PF}
78 local mypv="${PV1}.${PV2}.${PV3}"
79 doins ReleaseNotes/ReleaseNotes${mypv}.html
80 [[ -e ReleaseNotes/Patch${mypv}-1.txt ]] && \
81 dodoc ReleaseNotes/Patch${mypv}-*.txt
82 use examples && doins -r examples
83 }
84
85 pkg_postinst() {
86 elog "Users need to define the G4WORKDIR (\$HOME/geant4 is normally used)."
87 }

  ViewVC Help
Powered by ViewVC 1.1.20