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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Mar 16 21:03:59 2012 UTC (7 years, 1 month ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Fix for openinventor to use SGI OpenInventor in portage instead of SoXt, bug #408187

(Portage version: 2.1.10.44/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.5.ebuild,v 1.1 2011/12/18 07:13:04 bicatali Exp $
4
5 EAPI=4
6
7 inherit cmake-utils eutils fortran-2 versionator
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 MYP=${PN}$(replace_version_separator 3 .)
13
14 DESCRIPTION="Toolkit for simulation of passage of particles through matter"
15 HOMEPAGE="http://geant4.cern.ch/"
16 SRC_COM="http://geant4.cern.ch/support/source"
17 SRC_URI="${SRC_COM}/${MYP}.tar.gz"
18 GEANT4_DATA="
19 G4NDL.4.0
20 G4EMLOW.6.23
21 G4RadioactiveDecay.3.4
22 G4NEUTRONXS.1.1
23 G4PII.1.3
24 G4PhotonEvaporation.2.2
25 G4ABLA.3.0
26 RealSurface.1.0"
27 for d in ${GEANT4_DATA}; do
28 SRC_URI="${SRC_URI} data? ( ${SRC_COM}/${d}.tar.gz )"
29 done
30
31 LICENSE="geant4"
32 SLOT="4"
33 KEYWORDS="~amd64 ~x86"
34 IUSE="+data dawn examples gdml geant3 granular motif opengl openinventor
35 raytracerx qt4 static-libs test vrml zlib"
36
37 RDEPEND="virtual/fortran
38 >=sci-physics/clhep-2.1.1
39 dawn? ( media-gfx/dawn )
40 gdml? ( dev-libs/xerces-c )
41 geant3? ( sci-physics/geant:3 )
42 motif? ( x11-libs/openmotif:0 )
43 openinventor? ( media-libs/openinventor )
44 raytracerx? ( x11-libs/libX11 x11-libs/libXmu )
45 qt4? ( x11-libs/qt-gui:4 opengl? ( x11-libs/qt-opengl:4 ) )
46 zlib? ( sys-libs/zlib )"
47 DEPEND="${RDEPEND}"
48
49 S="${WORKDIR}/${MYP}"
50
51 PATCHES=( "${FILESDIR}"/${PN}-4.9.4-zlib.patch )
52
53 src_configure() {
54 mycmakeargs=(
55 -DGEANT4_USE_SYSTEM_CLHEP=ON
56 -DCMAKE_SKIP_RPATH=ON
57 $(cmake-utils_use dawn GEANT4_USE_NETWORKDAWN)
58 $(cmake-utils_use gdml GEANT4_USE_GDML)
59 $(cmake-utils_use geant3 GEANT4_USE_GEANT3TOGEANT4)
60 $(cmake-utils_use granular GEANT4_BUILD_GRANULAR_BUILD)
61 $(cmake-utils_use dawn GEANT4_USE_NETWORKDAWN)
62 $(cmake-utils_use motif GEANT4_USE_XM)
63 $(cmake-utils_use opengl GEANT4_USE_OPENGL_X11)
64 $(cmake-utils_use openinventor GEANT4_USE_INVENTOR)
65 $(cmake-utils_use qt4 GEANT4_USE_QT)
66 $(cmake-utils_use raytracerx GEANT4_USE_RAYTRACER_X11)
67 $(cmake-utils_use test GEANT4_ENABLE_TESTING)
68 $(cmake-utils_use vrml GEANT4_USE_NETWORKVRML)
69 $(cmake-utils_use zlib GEANT4_USE_SYSTEM_ZLIB)
70 $(cmake-utils_use_build static-libs STATIC_LIBS)
71 )
72 cmake-utils_src_configure
73 }
74
75 src_install() {
76 cmake-utils_src_install
77 if use data; then
78 einfo "Installing Geant4 data"
79 insinto /usr/share/geant4/data
80 pushd "${WORKDIR}" > /dev/null
81 for d in ${GEANT4_DATA}; do
82 local p=${d/.}
83 doins -r *${p/G4}
84 done
85 popd > /dev/null
86 fi
87
88 insinto /usr/share/doc/${PF}
89 local mypv="${PV1}.${PV2}.${PV3}"
90 doins ReleaseNotes/ReleaseNotes${mypv}.html
91 [[ -e ReleaseNotes/Patch${mypv}-1.txt ]] && \
92 dodoc ReleaseNotes/Patch${mypv}-*.txt
93 use examples && doins -r examples
94 }
95
96 pkg_postinst() {
97 elog "Users need to define the G4WORKDIR variable (\$HOME/geant4 is normally used)."
98 }

  ViewVC Help
Powered by ViewVC 1.1.20