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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Fri Dec 14 16:51:50 2012 UTC (6 years, 4 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
Version bumps. Tests are not in tar ball anymore. Might have to re-apply patch for data environment variables

(Portage version: 2.2.01.21418-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)

1 # Copyright 1999-2012 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-r1.ebuild,v 1.9 2012/10/24 19:42:46 ulm 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_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
17
18 LICENSE="geant4"
19 SLOT="4"
20 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
21 IUSE="+data dawn examples gdml geant3 granular motif opengl openinventor
22 raytracerx qt4 static-libs test vrml zlib"
23
24 RDEPEND="
25 >=sci-physics/clhep-2.1.1
26 dawn? ( media-gfx/dawn )
27 gdml? ( dev-libs/xerces-c )
28 motif? ( x11-libs/motif:0 )
29 opengl? ( virtual/opengl )
30 openinventor? ( media-libs/openinventor )
31 raytracerx? ( x11-libs/libX11 x11-libs/libXmu )
32 qt4? ( x11-libs/qt-gui:4 opengl? ( x11-libs/qt-opengl:4 ) )
33 zlib? ( sys-libs/zlib )"
34 DEPEND="${RDEPEND}"
35
36 S="${WORKDIR}/${MYP}"
37
38 PATCHES=(
39 "${FILESDIR}"/${PN}-4.9.4-zlib.patch
40 "${FILESDIR}"/${PN}-4.9.5-scripts-only-dataenv.patch )
41
42 src_configure() {
43 mycmakeargs=(
44 -DGEANT4_USE_SYSTEM_CLHEP=ON
45 -DCMAKE_INSTALL_LIBDIR="${EPREFIX}"/usr/$(get_libdir)
46 $(use openinventor && echo "-DINVENTOR_SOXT_LIBRARY=${EROOT}usr/$(get_libdir)/libInventorXt.so")
47 $(cmake-utils_use data GEANT4_INSTALL_DATA)
48 $(cmake-utils_use dawn GEANT4_USE_NETWORKDAWN)
49 $(cmake-utils_use gdml GEANT4_USE_GDML)
50 $(cmake-utils_use geant3 GEANT4_USE_G3TOG4)
51 $(cmake-utils_use granular GEANT4_BUILD_GRANULAR_BUILD)
52 $(cmake-utils_use motif GEANT4_USE_XM)
53 $(cmake-utils_use opengl GEANT4_USE_OPENGL_X11)
54 $(cmake-utils_use openinventor GEANT4_USE_INVENTOR)
55 $(cmake-utils_use qt4 GEANT4_USE_QT)
56 $(cmake-utils_use raytracerx GEANT4_USE_RAYTRACER_X11)
57 $(cmake-utils_use test GEANT4_ENABLE_TESTING)
58 $(cmake-utils_use vrml GEANT4_USE_NETWORKVRML)
59 $(cmake-utils_use zlib GEANT4_USE_SYSTEM_ZLIB)
60 $(cmake-utils_use_build static-libs STATIC_LIBS)
61 )
62 cmake-utils_src_configure
63 }
64
65 src_install() {
66 # adjust clhep linking flags for system clhep
67 # binmake.gmk is only useful for legacy build systems
68 sed -i "s,-lG4clhep,-lCLHEP," config/binmake.gmk || die "sed failed"
69
70 cmake-utils_src_install
71 insinto /usr/share/doc/${PF}
72 local mypv="${PV1}.${PV2}.${PV3}"
73 doins ReleaseNotes/ReleaseNotes${mypv}.html
74 [[ -e ReleaseNotes/Patch${mypv}-1.txt ]] && \
75 dodoc ReleaseNotes/Patch${mypv}-*.txt
76 use examples && doins -r examples
77 if use data ; then
78 sed "s,export \(G4.\+DATA=\"\).*\(/share/Geant.\+/data/.\+\); pwd\`,\1${EPREFIX}/usr\2," \
79 "${CMAKE_BUILD_DIR}/InstallTreeFiles/geant4.sh" > 99geant
80 doenvd 99geant
81 fi
82 }
83
84 pkg_postinst() {
85 elog "The following scripts are provided for backward compatibility:"
86 elog "$(ls -1 ${EROOT}usr/share/Geant4-${PV2}.${PV3}.*/geant4make/*sh)"
87 }

  ViewVC Help
Powered by ViewVC 1.1.20