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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Jun 5 16:14:34 2013 UTC (5 years, 10 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Version bump. Revert to static data download (bug #454152). Removed old.

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

1 # Copyright 1999-2013 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_p02.ebuild,v 1.2 2013/03/02 23:26:38 hwoarang Exp $
4
5 EAPI=4
6
7 inherit cmake-utils eutils fortran-2 versionator multilib
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 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? ( dev-qt/qtgui:4 opengl? ( dev-qt/qtopengl: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_p01-scripts-only-dataenv.patch )
41
42 src_configure() {
43 local mycmakeargs=(
44 -DGEANT4_USE_SYSTEM_CLHEP=ON
45 -DCMAKE_INSTALL_LIBDIR="${EROOT}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 vrml GEANT4_USE_NETWORKVRML)
58 $(cmake-utils_use 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 # adjust clhep linking flags for system clhep
66 # binmake.gmk is only useful for legacy build systems
67 sed -i "s,-lG4clhep,-lCLHEP," config/binmake.gmk || die "sed failed"
68
69 cmake-utils_src_install
70 insinto /usr/share/doc/${PF}
71 local mypv="${PV1}.${PV2}.${PV3}"
72 doins ReleaseNotes/ReleaseNotes${mypv}.html
73 [[ -e ReleaseNotes/Patch${mypv}-1.txt ]] && \
74 dodoc ReleaseNotes/Patch${mypv}-*.txt
75 use examples && doins -r examples
76 if use data ; then
77 sed "s,export \(G4.\+DATA=\"\).*\(/share/Geant.\+/data/.\+\); pwd\`,\1${EPREFIX}/usr\2," \
78 "${CMAKE_BUILD_DIR}/InstallTreeFiles/geant4.sh" > 99geant
79 doenvd 99geant
80 fi
81 }
82
83 pkg_postinst() {
84 elog "The following scripts are provided for backward compatibility:"
85 elog "$(ls -1 ${EROOT}usr/share/Geant4-${PV2}.${PV3}.*/geant4make/*sh)"
86 }

  ViewVC Help
Powered by ViewVC 1.1.20